Querying Data
When accessing data via the IdentityX GraphQL API, all requests (except those to retrieve user and organization authorization) must include an organization identifier or application identifier header with the request, in order to identify which segment of data should be accessed.
Active User
Once authenticated, the activeUser mutation can be used to verify authentication status and see details of the authenticated OrgUser.
POST /graphql HTTP/1.1
Content-Type: application/json
Host: identity-x.parameter1.com
Authorization: Bearer OrgUser <org-user-api-token>
{"query":"query { activeUser { id email } }"}User Organizations
To list the available organizations for the currently authenticated user, use the userOrganizations query:
POST /graphql HTTP/1.1
Content-Type: application/json
Host: identity-x.parameter1.com
Authorization: Bearer OrgUser <org-user-api-token>
{"query":"query { userOrganizations { id role organization { id name } } }"}Organization Applications
To list the available applications for the current organization, use the organizationApplications query:
query {
organizationApplications {
id
name
description
}
}Application Users
To list users for the current application, use the appUsers query.
This API requires the use of cursor pagination. While limit and skip are supported pagination inputs, the maximum allowed value for limit is 200. For queries iterating over large results, use cursor pagination for improved performance.
query ListAppUsers($input: AppUsersQueryInput!) {
appUsers(input: $input) {
totalCount
pageInfo {
hasNextPage
endCursor
}
edges {
node {
id
email
# ...other user fields
}
}
}
}When using cursor pagination, send the supplied endCursor value as the pagination.after parameter. While hasNextPage is true, the endCursor will indicate where the next page of results should start:
query ListAppUsers($input: AppUsersQueryInput!) {
appUsers(input: {
pagination: {
after: "<previous-end-cursor-value">
}
}) {
totalCount
pageInfo {
hasNextPage
endCursor
}
edges {
node {
id
email
# ...other user fields
}
}
}
}Last updated