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
- application/json
Path Parameters
-
accountid: string
Target Account ID
Query Parameters
-
fields(optional): string
Attributes to be returned in the result.Comma-separated attributes are accepted. Sample value for attributes is "accountName, accountStatus, accoutType, resource, applicationInstance"
Response
Supported Media Types
- application/json
200 Response
Successful
Headers
-
ResponseTime: string
Captures the time in milliseconds taken for processing the request.
Nested Schema : BulkAccountGetResponseInstance
Type:
Show Source
object
-
accountData(optional):
-
accountDescription(optional):
string
-
accountType(optional):
string
-
appinstance(optional):
object EntityReference
-
id(optional):
string
-
links(optional):
array links
-
name(optional):
string
-
normalizeData(optional):
-
policyKey(optional):
string
-
processInstanceKey(optional):
string
-
provisionedBy(optional):
object EntityReference
-
provisionedByMechanism(optional):
string
-
provisionedOnDate(optional):
string
-
requestId(optional):
object EntityReference
-
riskSummary(optional):
string
-
status(optional):
string
-
userId(optional):
string
-
validFromDate(optional):
string
401 Response
Unauthorized
404 Response
Resource not found
500 Response
Internal Server Error
Default Response
Unexpected error
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": [] } ] } ] }