Get Account Based on Account ID

get

/iam/governance/selfservice/api/v1/accounts

Returns the account details of the specified account id. The attributes that are to be returned can be specified as part of the query parameter named "fields". For example: The URI to get the user name attribute only for a particular account is /accounts/{accountid}?fields=name. The attributes are to be spcified in a Comma-separated list.

Request

Supported Media Types
Path Parameters
Query Parameters
  • Attributes to be returned in the result.Comma-separated attributes are accepted. Sample value for attributes is "accountName, accountStatus, accoutType, resource, applicationInstance"
Back to Top

Response

Supported Media Types

200 Response

Successful
Headers
Body ()
Root Schema : BulkAccountGetResponse
Type: object
Show Source
Nested Schema : account
Type: array
Show Source
Nested Schema : BulkAccountGetResponseInstance
Type: object
Show Source
Nested Schema : EntityReference
Type: object
Show Source
Nested Schema : LinkDataInstances
Type: object
Show Source

401 Response

Unauthorized

404 Response

Resource not found

500 Response

Internal Server Error

Default Response

Unexpected error
Back to Top

Examples

This example retrieves all the accounts for a given user. The information shown here is against a pseudo system and serves as a prototype.

cURL Example

curl  -H "Content-Type: application/json"  -X GET  -u username:password  
https://pseudo.com/iam/governance/selfservice/api/v1/accounts?userId=82

Example of Response Body

The following example shows the contents of the response body in JSON format.

{
    "links": [
        {
            "rel": "self",
            "href": "http://pseudo.com/iam/governance/selfservice/api/v1/accounts?
userId=82&offset=1&limit=10"
        },
        {
            "rel": "first",
            "href": "http://pseudo.com/iam/governance/selfservice/api/v1/accounts?
userId=82&offset=1&limit=10"
        }
    ],
    "count": 2
    "hasMore": false,
    "totalResult": -1,
    "accounts": [
        {
            "links": [
                {
                    "rel": "self",
                    "href": "http://pseudo.com/iam/governance/selfservice/api/v1/accounts/2"
                }
            ],
            "id": "2",
            "name": "Test5520190311",
            "userId": "82",
            "appInstanceId": "1",
            "requestId": "",
            "fields": [
                {
                    "name": "Status",
                    "value": "Provisioned"
                },
                {
                    "name": "Policy Key",
                    "value": ""
                },
                {
                    "name": "Provisioned By",
                    "value": "1"
                },
                {
                    "name": "Risk Summary",
                    "value": 0
                },
                {
                    "name": "Account Data",
                    "value": []
                },
                {
                    "name": "Provisioned-On Date",
                    "value": "2019-03-11T22:43:11Z"
                },
                {
                    "name": "Process Instance Key",
                    "value": "201"
                },
                {
                    "name": "Valid From Date",
                    "value": "2019-03-11T22:43:11Z"
                },
                {
                    "name": "Account Description",
                    "value": "Test5520190311"
                },
                {
                    "name": "Account Type",
                    "value": "Primary"
                },
                {
                    "name": "Normalize Data",
                    "value": []
                }
            ]
        },
        {
            "links": [
                {
                    "rel": "self",
                    "href": "http://pseudo.com/iam/governance/selfservice/api/v1/accounts/1"
                }
            ],
            "id": "1",
            "name": "test5520180311",
            "userId": "82",
            "appInstanceId": "2",
            "requestId": "",
            "fields": [
                {
                    "name": "Status",
                    "value": "Provisioning"
                },
                {
                    "name": "Policy Key",
                    "value": ""
                },
                {
                    "name": "Provisioned By",
                    "value": "1"
                },
                {
                    "name": "Risk Summary",
                    "value": 0
                },
                {
                    "name": "Account Data",
                    "value": []
                },
                {
                    "name": "Provisioned-On Date",
                    "value": "2019-03-11T22:42:01Z"
                },
                {
                    "name": "Process Instance Key",
                    "value": "200"
                },
                {
                    "name": "Valid From Date",
                    "value": "2019-03-11T22:42:01Z"
                },
                {
                    "name": "Account Description",
                    "value": "test5520180311"
                },
                {
                    "name": "Account Type",
                    "value": "Unknown"
                },
                {
                    "name": "Normalize Data",
                    "value": []
                }
            ]
        }
    ]
}
Back to Top