UniFed - Schema Management

UniFed API link

This feature enables organizations to define and modify the structure of data within their systems. It provides tools for creating, updating, and deleting schema elements, ensuring flexibility in how data is organized and managed. This management capability is essential for adapting to evolving business needs and regulatory requirements.

The Unifed Authentication Service extensively utilizes this API endpoint for managing organizational information. It facilitates the creation, retrieval, updation, and deletion of attributes, allowing organizations to manage their schema flexibly and dynamically.


Base URL - Staging


  1. Create Attribute - Design and implement new attributes within your organizational schema to enhance data structuring and accessibility.
curl -i -X POST \
  -u <username>:<password> \
 '<Base URL>/unifed-auth-service/unifed/api/v1/organization/attribute/ \
  -H 'Content-Type: application/json' \
  -d '{
    "attribute_data": [
      {
        "attribute_name": "<string>",
        "attribute_type": "<string>"
      },
      {
        "attribute_name": "<string>",
        "attribute_type": "<string>"
      }
    ]
  }
  • attribute_name
    • ex: lastName
    • Note: special characters are not allowed except "-"

  • attribute_type
    • list of attributes the user can use
    • [ "text", 'number", "file", "date"]

  • format
    • file - via link (ex: s3 link)
    • date - YYYY-MM-DD

  1. List Attribute - Efficiently view and manage the list of attributes defined within an organizational schema.
curl -i -X POST \
  -u <username>:<password> \
  '<Base URL>/unifed-auth-service/unifed/api/v1/organization/filter/attribute/ \
  -H 'Content-Type: application/json' \
  -d '{
    "query": {},
    "page": {
      "size": 10,
      "page_number": 1
    },
    "filter": [
      {
        "key_name": "attribute_name",
        "key_value": "test",
        "operator": "!="
      }
    ],
    "sort": "asc"
  }'
  • query (Not mandatory)
    • {"key_name":"Key_value"}
    • acts like == operator

  • pageSize
    • Counts per page(10)
    • page_number - Page Number(1)

  • ex
    • if page_number is 2 and Size is 10, it skips the first 10 data and delivers 2nd10 data which is 11- 20.

  • filter (Advanced search)
    • key_name - attribute_name
    • ex: givenName
    • key_value - actual value

  • ex: Adam
    • operator - "=="
    • list of operators user can use:[ "like", "==", ">=", ">", "<=", "<", "!=", "notlike" ]
    • If anything is given other than this will be taken as ==

  • sort
    • asc - ascending
    • desc - descending
    • If not given it will be taken as asc randomly given something will be taken as desc

  1. Get Attribute - Retrieve specific attributes within a schema to view detailed information about organizational data structures.
curl -i -X PUT \
  -u <username>:<password> \
   '<Base URL>/unifed-auth-service/unifed/api/v1/organization/attribute/ \
  -H 'Content-Type: application/json' \
  -d '{
    "id": "<string>"
  }'
  • payload = { "id": "<string>" }
  • id - We can get id from the List attribute API Response

  1. Update Attribute - Modify existing schema attributes to align with evolving organizational requirements.
curl -i -X PATCH \
  -u <username>:<password> \
  '<Base URL>/unifed-auth-service/unifed/api/v1/organization/attribute/ \
  -H 'Content-Type: application/json' \
  -d '{
    "id": "<string>",
    "attribute_name": "<string>",
    "attribute_type": "<string>"
  }'
  • id - We can get id from the List attribute API Response

  • attribute_name
    • ex: lastName
    • Note: special characters are not allowed except "-"

  • attribute_type
    • list of attributes the user can use
    • [ "text", 'number", "file", "date"]

  • format
    • file - via link (ex: s3 link)
    • date - YYYY-MM-DD

  1. Delete Attribute - Quickly remove specified attributes from your schema to streamline and update organizational data structures.
curl -i -X DELETE \
  -u <username>:<password> \
  '<Base URL>/unifed-auth-service/unifed/api/v1/organization/attribute/?id=%3Cstring%3E'
  • query = { "id": "<string>" }
  • id - We can get id from the List attribute API Response

  1. Create Schema - Design and establish custom schema structures to effectively organize and manage data within your organization.
curl -i -X POST \
  -u <username>:<password> \
  '<Base URL>/unifed-auth-service/unifed/api/v1/organization/schema/ \
  -H 'Content-Type: application/json' \
  -d '{
    "schema_name": "<string>",
    "attribute_mapping": [
      {
        "attribute_name": "<string>",
      }
    ],
    "is_default": false
  }'

  • schema_name -
    • Note: special characters are not allowed except "-"

  • attribute_name
  • ex: lastName
    • Note: special characters are not allowed except "-"
  • format
    • file - via link (ex: s3 link)
    • date - YYYY-MM-DD

  • is_default
    • true - make it as default schema
    • false - not default

  1. List Schema - Retrieve a comprehensive list of all schemas within the system, enabling efficient overview and management of organizational data structures.
curl -i -X POST \
  -u <username>:<password> \
  '<Base URL>/unifed-auth-service/unifed/api/v1/organization/filter/schema/ \
  -H 'Content-Type: application/json' \
  -d '{
    "query": {},
    "page": {
      "size": 10,
      "page_number": 1
    },
    "filter": [
      {
        "key_name": "schema_name",
        "key_value": "test",
        "operator": "!="
      }
    ],
    "sort": "asc"
  }'
  • query (Not mandatory)
    • {"key_name":"Key_value"} acts like == operator

  • pageSize
    • Counts per page(10)
    • page_number - Page Number(1)

  • ex
    • if page_number is 2 and Size is 10, it skips the first 10 data and delivers 2nd10 data which is 11- 20.

  • filter (Advanced search)
    • key_name - attribute_name
    • ex: givenName
    • key_value - actual value

  • ex: Adam
    • operator - "=="
    • list of operators user can use:[ "like", "==", ">=", ">", "<=", "<", "!=", "notlike" ]
    • If anything is given other than this will be taken as ==

  • sort
    • asc - ascending
    • desc - descending
    • If not given it will be taken as ascIf randomly given something will be taken as desc

  1. Get Schema - Access and view the current schema configuration details for an organization.
curl -i -X PUT \
  -u <username>:<password> \
  '<Base URL>/unifed-auth-service/unifed/api/v1/organization/schema/ \
  -H 'Content-Type: application/json' \
  -d '{
    "id": "<string>"
  }'
  • payload = { "id": "<string>" }
  • id - We can get id from the List Schema API Response

  1. Update Schema - Modify existing schema structures to align with evolving organizational requirements and data standards.
curl -i -X PATCH \
  -u <username>:<password> \
 '<Base URL>/unifed-auth-service/unifed/api/v1/organization/schema/ \
  -H 'Content-Type: application/json' \
  -d '{
    "id": "<string>",
    "attribute_mapping": [
      {
        "attribute_name": "<string>",
      }
    ],
    "is_default": false
  }' 
  • payload =

{

"id": "<string>",

"attribute_mapping":

[

{ "attribute_name": "<string>",

"attribute_type": "<string>" }

],

"is_default": False

}


  • id We can get id from the List schema API

  • attribute_name
    • ex: lastName
    • Note: special characters are not allowed except "-"
  • format
    • file - via link (ex: s3 link)
    • date - YYYY-MM-DD

  1. Delete Schema - Allows for the removal of entire schema configurations, streamlining data structure modifications within the organization.
curl -i -X DELETE \
  -u <username>:<password> \
  '<Base URL>/unifed-auth-service/unifed/api/v1/organization/schema/?id=%3Cstring%3E'
  • query = { "id": "<string>" }
  • id - We can get id from the List Schema API Response

Still need help? Contact Us Contact Us