Documentation

# Admin APIs

# REST API End Points

# Authentication & Authorization

# GET/accesstoken

Request Headers

apikey
username
password
Content-Type application/json

Request Body
Not required for this request.

Responses
STATUS - 200 - application/json

    {
    "result": "RESULT_SUCCESS",
    "active": true,
    "access_token": "eyJhbGciOiJSUzI1NiI....",
    "expires_in": "3600",
    "refresh_token": "eyJhbGciOiJIUzI1....",
    "refresh_expires_in": "1800"
    }

STATUS - 401 - unauthorized

    {
    "result": "RESULT_FAILURE",
    "message": "401 Unauthorized: [no body]",
    "active": false
    }

STATUS - 404 - Returned if there is no user with the given details
For example - A wrong username passed

    {
    "result": "404",
    "message": "There is no user [unknown.user@intellectdesign.comsdf] 
                    exists in the tenantId :::: tenant_id",
    "active": false
    }

# USERS GRAPHQL API’s

# POST /users/iam - createUser

Api to Create the User.

Request Headers

apikey
Authorization Bearer
Content-Type application/json

Request Body

    mutation {
    createUser (createUserInput: {
        tenantId: "idx"
        userName: "idx.testUser100"
        accountId:"idx-user-75582"
        securityProfile: {
        userPermissions: [{userPolicies: ["Viewer"]}]
        }
        personalProfile: {
        firstName: "Test"
        lastName: "User"
        contactDetails: {
            emailId: "testuser@gmail.com"
        }
        }
    }) {
        user_id
        fabric_profile_id
        first_name
        last_name
        org_id
    }
    }

Responses
STATUS - 201 - application/json
Example :

    {
        "data": {
            "createUser": {
                "user_id": "de131e08-db61-4a62-8356-05070c3d4ce9",
                "fabric_profile_id": "idx-user-7246137259",
                "first_name": "Test",
                "last_name": "User",
                "org_id": "f1b59d7b-0980-4614-9921-dec992d07523"
            }
        }
    } 

STATUS - 401 - unauthorized

    {
    "result": "RESULT_FAILURE",
    "message": "401 Unauthorized: [no body]",
    "active": false
    }

STATUS - 403 - Internal server error

    {
    "message": "Access Denied"
    }

Errors

Error_Code Error_Message
403 Access Denied

# POST /users/iam - getUserDetails - By user_id

Api to fetch user details by user_id.

Request Headers

apikey
Authorization Bearer
Content-Type application/json

Request Body

    query{
        getUserDetails(user_id: "7d394d37-8955-4b09-8cc1-790b0c37af0a"){
        last_name
        first_name
        email_id
        user_name
        policies
        status
        user_id
        fabric_profile_id
        }
    }

Responses
STATUS - 201 - application/json
Example :

    {
        "data": {
            "getUserDetails": {
                "last_name": "Arumugam",
                "first_name": "Ashok",
                "email_id": "ashok.arumugam@intellectdesign.com",
                "user_name": "ashok.arumugam",
                "policies": [
                    "DONT_USE_DEV_AK"
                ],
                "status": "ACTIVE",
                "user_id": "a8f51c5f-a55c-4327-ac98-58c49f2d7d1b",
                "fabric_profile_id": "idx-user-6423035354"
            }
        }
    } 

STATUS - 401 - unauthorized

    {
    "result": "RESULT_FAILURE",
    "message": "401 Unauthorized: [no body]",
    "active": false
    }

STATUS - 403 - Internal server error

    {  
    "message": "Access Denied"  
    }

Errors

Error_Code Error_Message
403 Access Denied

# POST /users/iam - getOrgLevelUsers

Api to fetch the details of all users by org_id.

Request Headers

apikey
Authorization Bearer
Content-Type application/json

Request Body
userInput (optional) - Contains the sortFilters, which sorts the output data based on the filter provided.

Default sortFilter value:
userInput: { sortFilters: { created_date: DESC } }

    query{
    getOrgLevelUsers(pagination:{
                        page: 1,
                        limit: 10
                    }, searchFilter: ""){
        meta{
        totalPages,
        currentPage
        itemCount
        totalItems
        }
        items{
        user_id
        first_name
        last_name
        org_id
        email_id
        user_name
        login_date
        policies
        account_id
        groups {
            id
            name
            description
        }
        }
    }
    }

Responses
STATUS - 201 - application/json

Example :

    {
        "data": {
            "getOrgLevelUsers": {
                "meta": {
                    "totalPages": 12,
                    "currentPage": 1,
                    "itemCount": 10,
                    "totalItems": 114
                },
                "items": [
                    {
                        "user_id": "7d394d37-8955-4b09-8cc1-790b0c37af0a",
                        "first_name": "aruns",
                        "last_name": "gmail",
                        "org_id": null,
                        "email_id": "arrunn2006@gmail.com",
                        "user_name": "arunsgmail",
                        "login_date": null,
                        "policies": [
                            "Creator"
                        ],
                        "account_id": "idx-account-06087",
                        "groups": []
                    },
                    {
                        "user_id": "88d3e1d9-64f2-49f3-a3df-207116a4157d",
                        "first_name": "Audit",
                        "last_name": "User",
                        "org_id": null,
                        "email_id": "audituser1@intellectdesign.com",
                        "user_name": "audituser1",
                        "login_date": null,
                        "policies": [
                            "test"
                        ],
                        "account_id": "idx-account-06087",
                        "groups": []
                    },
                    {
                        "user_id": "2ebb89bb-ab6a-4447-be2f-2c7d9fe4ae5b",
                        "first_name": "Test",
                        "last_name": "Account",
                        "org_id": null,
                        "email_id": "test.account@intellectdesign.com",
                        "user_name": "test-account",
                        "login_date": null,
                        "policies": [
                            "Creator",
                            "Reviewer"
                        ],
                        "account_id": "idx-account-06087",
                        "groups": []
                    },
                    {
                        "user_id": "ab49a4db-2c2b-48ac-8873-2461ba3707d6",
                        "first_name": "HariharanSSSSSSSS",
                        "last_name": "S",
                        "org_id": null,
                        "email_id": "s@gmail.com",
                        "user_name": "idx.hari11111",
                        "login_date": null,
                        "policies": [
                            "Viewer"
                        ],
                        "account_id": "idx-account-06087",
                        "groups": []
                    },
                    {
                        "user_id": "b51740ca-41ce-498b-be69-38b8a6c53f11",
                        "first_name": "ayush",
                        "last_name": "test",
                        "org_id": null,
                        "email_id": "ayush.parik@intellectdesign.com",
                        "user_name": "ayush-",
                        "login_date": null,
                        "policies": [
                            "Viewer"
                        ],
                        "account_id": "idx-account-06087",
                        "groups": []
                    },
                    {
                        "user_id": "b86a2478-3590-49a8-aa24-e3fc9450754e",
                        "first_name": "idx",
                        "last_name": "ayush",
                        "org_id": null,
                        "email_id": "ayush.parikh@intellectdesign.com",
                        "user_name": "idx.ayush",
                        "login_date": null,
                        "policies": [
                            "CanViewDocType"
                        ],
                        "account_id": "idx-account-06087",
                        "groups": []
                    },
                    {
                        "user_id": "de131e08-db61-4a62-8356-05070c3d4ce9",
                        "first_name": "Test",
                        "last_name": "User",
                        "org_id": null,
                        "email_id": "testuser@gmail.com",
                        "user_name": "idx.testuser100",
                        "login_date": null,
                        "policies": [
                            "Viewer"
                        ],
                        "account_id": "idx-user-75582",
                        "groups": []
                    },
                    {
                        "user_id": "e0c593cd-a205-4bf7-aedf-9cb55df0a134",
                        "first_name": "chandra",
                        "last_name": "ganivada",
                        "org_id": null,
                        "email_id": "chandra.ganivada@intellectdesign.com",
                        "user_name": "idx.chandra",
                        "login_date": "2023-06-19 11:12:14.282",
                        "policies": [
                            "Administrator"
                        ],
                        "account_id": "idx-account-06087",
                        "groups": []
                    },
                    {
                        "user_id": "bc8580a3-d945-4673-8b91-b81409fe9bc3",
                        "first_name": "haha",
                        "last_name": "HAHA",
                        "org_id": null,
                        "email_id": "hari9551@gmail.com",
                        "user_name": "idx.test2",
                        "login_date": null,
                        "policies": [
                            "Administrator"
                        ],
                        "account_id": "idx-account-06087",
                        "groups": []
                    },
                    {
                        "user_id": "47ea9109-7da2-40ca-9095-6e8b45401b3d",
                        "first_name": "idx",
                        "last_name": "neha",
                        "org_id": null,
                        "email_id": "neha.chhapparghare@intellectdesign.com",
                        "user_name": "idx.neha",
                        "login_date": null,
                        "policies": [
                            "CanAdministerEntities"
                        ],
                        "account_id": "idx-account-06087",
                        "groups": []
                    }
                ]
            }
        }
    }

STATUS - 401 - unauthorized

    {
    "result": "RESULT_FAILURE",
    "message": "401 Unauthorized: [no body]",
    "active": false
    }

STATUS - 403 - Internal server error

    {
    "message": "Access Denied"
    }

Errors

Error_Code Error_Message
403 Access Denied

# POST /users/iam - updateUser

Api to update the user details by user_id.

Request Headers

apikey
Authorization Bearer
Content-Type application/json

Request Body

    mutation {
    updateUser (
        user_id: "a8f51c5f-a55c-4327-ac98-58c49f2d7d1b",
        updateUserInput: {
        accountId: "idx-user-75582",
        appId: "magicplatform",
        productId: "map",
        productType: "app",
        policies: ["DONT_USE_DEV_AK"],
        first_name: "Ashok",
        last_name:"Arumugam"
        }
    ) 
    }

Responses STATUS - 201 - application/json
Example:

    {"data":{"updateUser":"User Details updated succesfully"}}

STATUS - 401 - unauthorized

    {
    "result": "RESULT_FAILURE",
    "message": "401 Unauthorized: [no body]",
    "active": false
    }

STATUS - 403 - Internal server error

    {
    "message": "Access Denied"
    }

Errors

Error_Code Error_Message
403 Access Denied

# POST /users/iam - softDeleteUser

Api to soft delete an user by user_id.

Request Headers

apikey
Authorization Bearer
Content-Type application/json

Request Body

    mutation {
    softDeleteUser (user_id: "cbdd141e-2f7f-4688-aaac-152509896826")
    }

Responses STATUS - 201 - application/json
Example :

    {
    "data": {
        "softDeleteUser": "User Deleted Successfully"
    }
    }

STATUS - 401 - unauthorized

    {
    "result": "RESULT_FAILURE",
    "message": "401 Unauthorized: [no body]",
    "active": false
    }

STATUS - 403 - Internal server error

    {
    "message": "Access Denied"
    }

Errors

Error_Code Error_Message
403 Access Denied

# USERS REST API’s

# POST /users - createUser

Api to Create the User.

Request Headers

apikey
Authorization Bearer
Content-Type application/json

Request Body

    {
        "createUser":{
            "fabric_profile_id":"string",
            "first_name":"string",
            "last_name":"string",
            "org_id":"<uuid>"
        }
    }

Responses
STATUS - 201 - application/json
Example:

    {
        "User Created Successfully"
    }

STATUS - 401 - unauthorized

    {
    "result": "RESULT_FAILURE",
    "message": "401 Unauthorized: [no body]",
    "active": false
    }

STATUS - 403 - Internal server error

    {
    "message": "Access Denied"
    }

Errors

Error_Code Error_Message
403 Access Denied

# POST /users - fetchUser - By org_id

Api to fetch the users details by org_id.

Request Headers

apikey
Authorization Bearer
Content-Type application/json

Request Body

  • select - List of fields to be provided as response from Users
  • relations - List of relation to be established with users entity to provide the relation response
    Example: "relations":["organization"]
  • by - Query by field eg: org_id, fabric_profile_id, user_id
  • includeInActiveUsers - Boolean field to include InActive Users in Response

      {
          "fetchUser":{
              "select":["user_id","org_id","first_name"],
              "by": {
                  "org_id":"<uuid>"
              },
              "includeInActiveUsers":false
          }
    
      }

Responses
STATUS - 200 - application/json
Example :

    [
        {
            "user_id": "<uuid>",
            "first_name": "string",
            "org_id": "<uuid>"
        },
        {...}
    ]

STATUS - 401 - unauthorized

    {
    "result": "RESULT_FAILURE",
    "message": "401 Unauthorized: [no body]",
    "active": false
    }

STATUS - 404 - Internal server error

    {
    "message": "User Not Found"
    }

Errors

Error_Code Error_Message
404 User Not Found
400 Bad Request

# POST /users - fetchUser - By user_id

Api to fetch the users details by user_id.

Request Headers

apikey
Authorization Bearer
Content-Type application/json

Request Body

  • select - List of fields to be provided as response from Users
  • relations - List of relation to be established with users entity to provide the relation response
    Example: "relations":["organization"]
  • by - Query by field eg: org_id, fabric_profile_id, user_id

      {
          "fetchUser":{
              "select":["user_id","org_id","first_name"],
              "by": {
                  "user_id":"<uuid>"
              }
          }
    
      }

Responses
STATUS - 200 - application/json
Example :

    {
        "user_id": "<uuid>",
        "first_name": "string",
        "org_id": "<uuid>"
    }

STATUS - 401 - unauthorized

    {
    "result": "RESULT_FAILURE",
    "message": "401 Unauthorized: [no body]",
    "active": false
    }

STATUS - 404 - Internal server error

    {
    "message": "User Not Found"
    }

Errors

Error_Code Error_Message
404 User Not Found
400 Bad Request

# POST/users - fetchUser - By user_ids

Api to fetch the users details by user_ids.

Request Headers

apikey
Authorization Bearer
Content-Type application/json

Request Body

  • select - List of fields to be provided as response from Users
  • relations - List of relation to be established with users entity to provide the relation response
    Example: "relations":["organization"]
  • by - Query by field eg: org_id, fabric_profile_id, user_id

      {
          "fetchUser":{
              "select":["user_id","org_id","first_name","last_name","status"],
              "by": {
                  "user_ids":["<uuid>","<uuid>"]
              },
              "includeInActiveUsers":true
          }
    
      }

Responses
STATUS - 200 - application/json
Example :

    [
        {
            "user_id": "<uuid>",
            "first_name": "string",
            "last_name": "string",
            "org_id": "<uuid>",
            "status": "inactive"
        },
        {
            "user_id": "<uuid>",
            "first_name": "string",
            "last_name": "string",
            "org_id": "<uuid>",
            "status": "active"
        }
    ]

STATUS - 401 - unauthorized

    {
    "result": "RESULT_FAILURE",
    "message": "401 Unauthorized: [no body]",
    "active": false
    }

STATUS - 400 - Internal server error

    {
    "message": "Bad Request"
    }

Errors

Error_Code Error_Message
404 User Not Found
400 Bad Request

# POST /users - fetchUser - By fabric_profile_id

Api to fetch the users details by fabric_profile_id.

Request Headers

apikey
Authorization Bearer
Content-Type application/json

Request Body

  • select - List of fields to be provided as response from Users
  • relations - List of relation to be established with users entity to provide the relation response
    Example: "relations":["organization"]
  • by - Query by field eg: org_id, fabric_profile_id, user_id

      {
          "fetchUser":{
              "select":["user_id","org_id","first_name"],
              "by": {
                  "fabric_profile_id":"string"
              }
          }
    
      }

Responses
STATUS - 200 - application/json
Example :

    {
        "user_id": "<uuid>",
        "first_name": "string",
        "org_id": "<uuid>"
    }

STATUS - 401 - unauthorized

    {
    "result": "RESULT_FAILURE",
    "message": "401 Unauthorized: [no body]",
    "active": false
    }

STATUS - 404 - Internal server error

    {
    "message": "User Not Found"
    }

Errors

Error_Code Error_Message
404 User Not Found
400 Bad Request

# POST /users - fetchUser - All Users

Api to fetch all the Users Details.

Request Headers

apikey
Authorization Bearer
Content-Type application/json

Request Body

  • select - List of fields to be provided as response from Users
  • relations - List of relation to be established with users entity to provide the relation response
    Example: "relations":["organization"]
  • by - Query by field eg: org_id, fabric_profile_id, user_id
  • includeInActiveUsers - Boolean field to include InActive Users in Response

      {
          "fetchUser":{
              "select":["user_id","org_id","first_name"],
              "includeInActiveUsers":false
          }
      }

Responses
STATUS - 200 - application/json
Example :

    [
        {
            "user_id": "<uuid>",
            "fabric_profile_id": "string",
            "first_name": "string",
            "last_name": "string",
            "org_id": "<uuid>",
            "created_by": "<uuid>",
            "created_date": Date,
            "modified_by": string or null,
            "modified_date": Date or null,
            "status": "string"
        },{...}
    ]

STATUS - 401 - unauthorized

    {
    "result": "RESULT_FAILURE",
    "message": "401 Unauthorized: [no body]",
    "active": false
    }

STATUS - 404 - Internal server error

    {
    "message": "User Not Found"
    }

Errors

Error_Code Error_Message
404 User Not Found

# GET /users - fetchUser - by user_id

Api to fetch active Users Details by user_id.

Request Headers

apikey
Authorization Bearer
Content-Type application/json

Responses
STATUS - 200 - application/json
Example :

    {
            "user_id": "<uuid>",
            "fabric_profile_id": "string",
            "first_name": "string",
            "last_name": "string",
            "org_id": "<uuid>",
            "created_by": "<uuid>",
            "created_date": Date,
            "modified_by": string or null,
            "modified_date": Date or null,
            "status": "string"
    }

STATUS - 401 - unauthorized

    {
    "result": "RESULT_FAILURE",
    "message": "401 Unauthorized: [no body]",
    "active": false
    }

STATUS - 404 - Internal server error

    {
    "message": "User Not Found"
    }

Errors

Error_Code Error_Message
404 User Not Found

# GET /users - fetchUser - All Active Users

Api to fetch all active Users Details

Request Headers

apikey
Authorization Bearer
Content-Type application/json

Responses
STATUS - 200 - application/json
Example :

    [
        {
            "user_id": "<uuid>",
            "fabric_profile_id": "string",
            "first_name": "string",
            "last_name": "string",
            "org_id": "<uuid>",
            "created_by": "<uuid>",
            "created_date": Date,
            "modified_by": string or null,
            "modified_date": Date or null,
            "status": "string"
        }, {...}
    ]

STATUS - 401 - unauthorized

    {
    "result": "RESULT_FAILURE",
    "message": "401 Unauthorized: [no body]",
    "active": false
    }

STATUS - 404 - Internal server error

    {
    "message": "User Not Found"
    }

Errors

Error_Code Error_Message
404 User Not Found

# PATCH /users - update active User by user_id

Api to fetch update the detals of an Active User by user_id.

Request Headers

apikey
Authorization Bearer
Content-Type application/json

Request Body STATUS - 200 - application/json
Example :

    {
            "fabric_profile_id": "string",
            "first_name": "string",
            "last_name": "string",
            "org_id": "<uuid>",
            "status": "string"
    }

Responses
STATUS - 200 - application/json
Example :

    {
            "user_id": "<uuid>",
            "fabric_profile_id": "string",
            "first_name": "string",
            "last_name": "string",
            "org_id": "<uuid>",
            "created_by": "<uuid>",
            "created_date": Date,
            "modified_by": string,
            "modified_date": Date,
            "status": "string"
    }

STATUS - 401 - unauthorized

    {
    "result": "RESULT_FAILURE",
    "message": "401 Unauthorized: [no body]",
    "active": false
    }

STATUS - 404 - Internal server error

    {
    "message": "User Not Found"
    }

Errors

Error_Code Error_Message
404 User Not Found

# DELETE /users - soft delete user by user_id

Api to fetch update the details of a Active User by user_id

Request Headers

apikey
Authorization Bearer
Content-Type application/json

Responses
STATUS - 200 - application/json
Example :

    {
    "User Deleted Succesfully
    }

STATUS - 401 - unauthorized

    {
    "result": "RESULT_FAILURE",
    "message": "401 Unauthorized: [no body]",
    "active": false
    }

STATUS - 404 - Internal server error

    {
    "message": "User Not Found"
    }

Errors

Error_Code Error_Message
404 User Not Found
403 Access Denied

# ORGANIZATION

# POST /organizations - create organization

Api to create organization

Request Headers

apikey
Authorization Bearer
Content-Type application/json

Request Body
STATUS - 200 - application/json
Example :

    {
        "org_name": string
    }

Responses
STATUS - 200 - application/json
Example :

    {
            "org_id": "<uuid>",
            "org_name": "string",
            "created_by": "string",
            "created_date": Date,
            "modified_by": null,
            "modified_date": null,
            "status": "active"
    }

STATUS - 401 - unauthorized

    {
    "result": "RESULT_FAILURE",
    "message": "401 Unauthorized: [no body]",
    "active": false
    }

STATUS - 500 - Internal server error

    {  
    "message": "Technical issue while creating organization"  
    }

# GET /organizations - fetch organization by org_id

API to get organization

Request Headers

apikey
Authorization Bearer
Content-Type application/json

Responses
STATUS - 200 - application/json
Example :

    {
            "org_id": "<uuid>",
            "org_name": "string",
            "created_by": "string",
            "created_date": Date,
            "modified_by": string or null,
            "modified_date": string or null,
            "status": "active"
    }

STATUS - 401 - unauthorized

    {
    "result": "RESULT_FAILURE",
    "message": "401 Unauthorized: [no body]",
    "active": false
    }

STATUS - 404 - Not Found

    {  
    "message": Organization Not Found  
    }

Errors

Error_Code Error_Message
404 User Not Found
403 Access Denied

# GET /organizations - fetch organization by profile_id

API to get organization

Request Headers

apikey
Authorization Bearer
Content-Type application/json

Responses STATUS - 200 - application/json
Example :

    {
            "org_id": "<uuid>",
            "org_name": "string",
            "created_by": "string",
            "created_date": Date,
            "modified_by": string or null,
            "modified_date": string or null,
            "status": "active"
    }

STATUS - 401 - unauthorized

    {
    "result": "RESULT_FAILURE",
    "message": "401 Unauthorized: [no body]",
    "active": false
    }

STATUS - 404 - Not Found

    {
    "message": Organization Not Found
    }

Errors

Error_Code Error_Message
404 User Not Found
403 Access Denied

# PATCH /organizations - update organization by org_id

API to get organization

Request Headers

apikey
Authorization Bearer
Content-Type application/json

Request Body
STATUS - 200 - application/json
Example :

    {
            "org_name": "string",
    },

Responses
STATUS - 200 - application/json
Example :

    {
            "org_id": "<uuid>",
            "org_name": "string",
            "created_by": "string",
            "created_date": Date,
            "modified_by": string,
            "modified_date": Date,
            "status": "active"
    }

STATUS - 401 - unauthorized

    {  
    "result": "RESULT\_FAILURE",  
    "message": "401 Unauthorized: \[no body\]",  
    "active": false  
    }

STATUS - 404 - Not Found

    {  
    "message": Organization Not Found  
    }

Errors

Error_Code Error_Message
404 User Not Found
403 Access Denied

# DELETE /organizations - softdelete organization by org_id

Api to Delete organization and user in the organization

Request Headers

apikey
Authorization Bearer
Content-Type application/json

Responses STATUS - 200 - application/json
Example:

    {  
    Organization Deleted From The Database  
    },

STATUS - 401 - unauthorized

    {  
    "result": "RESULT\_FAILURE",  
    "message": "401 Unauthorized: \[no body\]",  
    "active": false  
    }

STATUS - 404 - Not Found

    {  
    "message": Organization Not Found  
    }

Errors

Error_Code Error_Message
404 User Not Found
403 Access Denied