Entitlements GraphQL API
Query content, users, groups, and roles, and see how they relate: which groups can access a content item, and which content and roles a user has.
Your GraphQL endpoint is https://tenant-name.is.here.io/here/api/graphql
contents and users return a connection. A connection has a totalCount and a list of edges. Each edge has a node, which holds the record, and an optional cursor, which marks the record's position in the list.
Contents and groups
contents lists content items. Each item has uuid, id, name, type, active, and customLabel. customLabel is null when unset.
Add groups(directOnly: false) to an item to list the groups that can access it. Each group has uuid, id, displayName, description, metadata, and revoked. A group's id is its name.
Example
query Contents {
contents {
totalCount
edges {
cursor
node {
uuid
id
name
type
active
customLabel
groups(directOnly: false) {
totalCount
edges {
node {
uuid
id
displayName
description
metadata
revoked
}
}
}
}
}
}
}
{
"data": {
"contents": {
"totalCount": 16,
"edges": [
{
"cursor": "eyJpZCI6ImZhODc0NDc0LWYwYmMtNDMyNS1hZGVkLTUzN2Y4MTdhZTM1ZCJ9",
"node": {
"uuid": "fa874474-f0bc-4325-aded-537f817ae35d",
"id": "salesforce",
"name": "Salesforce",
"type": "WEB",
"active": false,
"customLabel": null,
"groups": {
"totalCount": 1,
"edges": [
{
"node": {
"uuid": "b416ae4b-a6a4-4c9d-9863-9aa6aa1e4474",
"id": "all-users",
"displayName": "All Users",
"description": "This group contains all users that will be accessing resources in this organization.",
"metadata": {
"meta": "data"
},
"revoked": false
}
}
]
}
}
},
{
"cursor": "eyJpZCI6ImQ1NzkwYWVkLWYyNTUtNGM5NS04ZGRmLTJkYTJmNjcyZmMzMyJ9",
"node": {
"uuid": "d5790aed-f255-4c95-8ddf-2da2f672fc33",
"id": "here-transforming-enterprise-productivity",
"name": "HERE | Transforming Enterprise Productivity",
"type": "WEB",
"active": true,
"customLabel": "here-custom label",
"groups": {
"totalCount": 1,
"edges": [
{
"node": {
"uuid": "957cb533-6924-4d5b-ad84-92dca3d41511",
"id": "bbc-home",
"displayName": "BBC - Home",
"description": "",
"metadata": {},
"revoked": false
}
}
]
}
}
},
...
Users, content, and roles
users lists users. Each user has uuid, id, firstName, lastName, email, and active. A user's id is their username, which is often an email address. email is a separate field and can be null.
Add content to a user to list their content, with the same fields as in Contents and groups. Add roles to list their roles, with the same fields as a group.
Example
The response below is truncated.
query Users {
users {
totalCount
edges {
node {
uuid
id
firstName
lastName
email
active
content {
totalCount
edges {
cursor
node {
uuid
id
name
type
active
customLabel
}
}
}
roles {
totalCount
edges {
cursor
node {
uuid
id
displayName
description
metadata
revoked
}
}
}
}
}
}
}
{
"data": {
"users": {
"totalCount": 7,
"edges": [
{
"node": {
"uuid": "1375d728-9fe2-4e9d-8b9b-809f1e29d2cb",
"id": "john.smith+1@here.io",
"firstName": "John",
"lastName": "Smith",
"email": null,
"active": true,
"content": {
"totalCount": 16,
"edges": [
{
"cursor": "eyJpZCI6IjUwNTkxYTMwLTRjMzMtNDhhOC05ZGNjLTRjZWQ2YjU3YTE1MyJ9",
"node": {
"uuid": "50591a30-4c33-48a8-9dcc-4ced6b57a153",
"id": "here-transforming-enterprise-productivity",
"name": "HERE | Transforming Enterprise Productivity",
"type": "WEB",
"active": true,
"customLabel": null
}
},
{
"cursor": "eyJpZCI6IjU4MzExY2YwLTc3ZDYtNGU5OC04ODFiLWFlZjQ3NWY4NTZhZCJ9",
"node": {
"uuid": "58311cf0-77d6-4e98-881b-aef475f856ad",
"id": "bbc-home",
"name": "BBC - Home",
"type": "WEB",
"active": true,
"customLabel": null
}
},
...