Using global node IDs¶
The node id is a globally unique identifier of an object. It is needed when you call the GraphQL query and mutation. In this section, we will go through how to generate the node ID for calling the Admin GraphQL API.
The node id is a base64url encoded string with the format of <NODE_TYPE>:<ID>. For example, in User:97b1c929-842c-415c-a7df-6967efdda160 , the node is "User" while "97b1c929-842c-415c-a7df-6967efdda160" is the ID for a specific user.
1. Generate id for User node type¶
You can use your preferred programming language or tool to encode node IDs to base64url as shown below:
Fetch the User object example¶
The query:
2. Generate id for AuditLog node type ¶
Fetch AuditLog object example¶
Query:
3. Generate id for Session node type¶
Fetch Session object example¶
Query:
{
node(id: "<BASE64URL_ENCODED_SESSION_NODE_ID>") {
... on Session {
id
displayName
type
createdAt
}
}
}
4. Generate id for Authenticator node type¶
Fetch Authenticator object example¶
Query:
{
node(id: "<BASE64URL_ENCODED_AUTHENTICATOR_NODE_ID>") {
id
... on Authenticator {
id
kind
createdAt
}
}
}
5. Generate id for Authorization node type¶
Fetch Authorization object example¶
Query:
{
node(id: "<BASE64URL_ENCODED_AUTHORIZATION_NODE_ID>") {
id
... on Authorization {
id
clientID
scopes
createdAt
}
}
}
6. Generate id for Identity node type¶
Fetch Identity object example¶
Query: