Documentation

# Expert Agent Studio APIs

Fetching Agents API
Creating New Agent API
Updating the Agent API
Getting Access Token API
Invoking Agent API
Viewing Transaction Details API

# Fetching Agents API

POST - getAssetEntity - to fetch Agents by ID

Request Headers

apikey
Authorization Bearer
Content-Type application/json

Request Body

STATUS - 200 - application/json

    query{  
    getAssetEntity(   
        asset\_version\_id: "7abd8e1f-7a2a-4a81-a581-9e7a268d8907",  
        entity\_id:"c5af9538-4fe2-4f80-9832-87878d265a90"){  
        entity\_id,  
        schema\_id,  
        entity\_name,  
        display\_name,  
        data\_type,  
        mandatory,  
        hidden,  
        accepted\_values,  
        group\_id,  
        is\_array,  
        properties,  
    }   
    }

Example:

    {  
    "data": {  
        "getAssetEntity": {  
        "entity\_id": "c5af9538-4fe2-4f80-9832-87878d265a90",  
        "schema\_id": "450168cb-4c22-420e-9d28-64ce7f84ad86",  
        "entity\_name": "text1",  
        "display\_name": "Text",  
        "data\_type": "string",  
        "mandatory": false,  
        "hidden": false,  
        "accepted\_values": null,  
        "group\_id": null,  
        "is\_array": false,  
        "properties": {  
            "label": "Provide name",  
            "component": "input",  
            "help\_text": "Specify the name",  
            "parameter": true,  
            "value\_key": "name",  
            "placeholder": "Enter name",  
            "display\_order": 1  
        }  
        }  
    }  
    }

Errors

S.No Error_Code Error_Message
1 401 Request failed with status code 401
2 409 duplicate key value violates unique constraint "UQ_119b2d1c1bdccc42057c303c44f\
3 NA Query Validation Failed
4 NA User Not Found

# Creating New Agent

POST CreateAssetEntity - To create a new Agent

Request Headers

apikey
Authorization Bearer
Content-Type application/json

Request Body
STATUS - 200 - application/json

    mutation {  
    createAssetEntity(  
        asset\_version\_id: "7abd8e1f-7a2a-4a81-a581-9e7a268d8907",  
        assetEntityInput: {  
        schema\_id:"450168cb-4c22-420e-9d28-64ce7f84ad86",  
        entity\_name:"text1",  
        display\_name:"Text",  
            data\_type: STRING,  
            mandatory: false,                         
            properties: {	  
            component: "input",  
            label: "Provide name",  
            help\_text: "Specify the name",  
            parameter: true,  
            value\_key: "name",  
            placeholder: "Enter name",  
            display\_order: 1,  
        },}  
    ) {  
        entity\_id,  
        schema\_id,  
        entity\_name,  
        display\_name,  
        data\_type,  
        mandatory,  
        hidden,  
        accepted\_values,  
        group\_id,  
        is\_array,  
        properties,  
    }  
    }

Example:

    {  
    "data": {  
        "createAssetEntity": {  
        "entity\_id": "c5af9538-4fe2-4f80-9832-87878d265a90",  
        "schema\_id": "450168cb-4c22-420e-9d28-64ce7f84ad86",  
        "entity\_name": "text1",  
        "display\_name": "Text",  
        "data\_type": "string",  
        "mandatory": false,  
        "hidden": false,  
        "accepted\_values": null,  
        "group\_id": null,  
        "is\_array": false,  
        "properties": {  
            "component": "input",  
            "label": "Provide name",  
            "help\_text": "Specify the name",  
            "parameter": true,  
            "value\_key": "name",  
            "placeholder": "Enter name",  
            "display\_order": 1  
        }  
        }  
    }  
    }

Errors

S.No Error_Code Error_Message
1 401 Request failed with status code 401
2 409 duplicate key value violates unique constraint "UQ_119b2d1c1bdccc42057c303c44f\
3 NA Query Validation Failed
4 NA User Not Found

# Updating the Agent

POST updateAssetEntity - to update an agent

Request Headers

apikey
Authorization Bearer
Content-Type application/json

Request Body
STATUS - 200 - application/json

    mutation{  
    updateAssetEntity(  
        asset\_version\_id:"7abd8e1f-7a2a-4a81-a581-9e7a268d8907",  
        entity\_id:"c5af9538-4fe2-4f80-9832-87878d265a90",  
        assetEntityUpdateInput:{  
        entity\_name:"name122",  
        data\_type: STRING,  
        mandatory: false,   
        accepted\_values: null,  
        is\_array: false,  
        properties: {	  
            component: "input",  
            label: "Provide name",  
            help\_text: "Specify the name",  
            parameter: true,  
            value\_key: "name",  
            placeholder: "Enter name",  
            display\_order: 1,  
        },  
        }  
    ){  
        entity\_id,  
        schema\_id,  
        entity\_name,  
        display\_name,  
        data\_type,  
        mandatory,  
        hidden,  
        accepted\_values,  
        group\_id,  
        is\_array,  
        properties,  
    }  
    }

Example:

    {  
    "data": {  
        "updateAssetEntity": {  
        "entity\_id": "c5af9538-4fe2-4f80-9832-87878d265a90",  
        "schema\_id": "450168cb-4c22-420e-9d28-64ce7f84ad86",  
        "entity\_name": "name122",  
        "display\_name": "Text",  
        "data\_type": "string",  
        "mandatory": false,  
        "hidden": false,  
        "accepted\_values": null,  
        "group\_id": null,  
        "is\_array": false,  
        "properties": {  
            "label": "Provide name",  
            "component": "input",  
            "help\_text": "Specify the name",  
            "parameter": true,  
            "value\_key": "name",  
            "placeholder": "Enter name",  
            "display\_order": 1  
        }  
        }  
    }  
    }

Errors

S.No Error_Code Error_Message
1 401 Request failed with status code 401
2 409 duplicate key value violates unique constraint "UQ_119b2d1c1bdccc42057c303c44f\
3 NA Query Validation Failed
4 NA User Not Found

# Get Access Token

GET/accesstoken/

Request Headers

apikey
username
password
Content-Type application/json

Request Body
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  
    }

# Invoking Agent API

POST/http:///idxp/mapinvokeasset-svc/magicplatform/v1/invokeasset/// - Api to Upload Documents File

Request Headers

apikey
Authorization Bearer
Content-Type multi-part/Form-Data

Request Body

    {  
    images:\<Array of Buffer Data\>  
    }

Response
STATUS - 200 - application/json

Example:

    {  
        "trace\_id": "f80f539f-5204-4969-b309-6f84758d8491",  
        "message": "Files Uploaded Successfully. Scan In Progress"  
    }

Errors

S.No Error_Code Error_Message
1 401 Request failed with status code 401
2 500 Internal server error

# Viewing Transaction Details

POST/assetTransactionDetails - API to get asset transaction details

Request Headers

apikey
Authorization Bearer
Content-Type multi-part/Form-Data

Request Body

    query{  
    assetTransactionDetails{  
        enabled\_assets  
        total\_documents  
        transaction\_processed  
        total\_pages\_processed  
        transaction\_by\_status{  
            completed  
            in\_progress  
            in\_queue  
            in\_review  
            failed  
            exception  
        }  
    }  
    }

Response
STATUS - 200 - application/json

Example

    {  
    "data": {  
        "assetTransactionDetails": {  
        "enabled\_assets": Int,  
        "total\_documents": Int,  
        "transaction\_processed": Int,  
        "total\_pages\_processed": Int  
        "transaction\_by\_status": {  
            "completed": int,  
            "in\_progress": int,  
            "in\_queue": int,  
            "in\_review": int,  
            "failed": int,  
            "exception": int  
            },  
        }  
    }  
    }

Errors

S.No Error_Code Error_Message
1 401 Request failed with status code 401
2 500 Internal server error