Get All Accounts for a User
get
/iam/governance/selfservice/api/v1/accounts
Returns a list of all accounts provisioned to user(s). For example: To get a list of accounts provisioned to a user the URI is /account?userid={userKey}. To get all the accounts which are provisioned to an application instance use the URL /accounts?appInstance={applicationInstanceName}.
Request
Supported Media Types
- application/json
Query Parameters
-
appInstance: string
Specify the name of the application instance name to get all the provisioned accounts.
-
fields: string
Attributes to be returned in the result.Comma-separated attributes are accepted. Sample value for attributes is "accountName, accountStatus, accoutType, resource, applicationInstance"
-
q: string
Search filter to get the records. SCIM filter is accepted. There should not be any spaces for attribute value. If you want to pass space in between attribute values then replace it with "::". Sample value for filter is accountStatus eq Provisioned".
-
userid: string
The user ID query parameter enables to get the accounts for the specified user.
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:
-
accountDescription:
string
-
accountType:
string
-
appinstance:
object EntityReference
-
id:
string
-
links:
array links
-
name:
string
-
normalizeData:
-
policyKey:
string
-
processInstanceKey:
string
-
provisionedBy:
object EntityReference
-
provisionedByMechanism:
string
-
provisionedOnDate:
string
-
requestId:
object EntityReference
-
riskSummary:
string
-
status:
string
-
userId:
string
-
validFromDate:
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": [] } ] } ] }