Queries
group
Retrieves an object representing a Group from a specified hub.
Template for Query:
query GetGroup($hubId: ID!, $groupId: ID!) {
group(hubId: $hubId, groupId: $groupId) {
# Group Fields
}
}
Arguments
| hubId* ID! non-null | The ID of the hub that contains the group. |
| groupId* ID! non-null | The ID of the group to retrieve. |
* Required
Possible Returns
| Value Type | Description |
|---|---|
| Group | Type Group Represents an object containing group information. |
Examples
Example 1
Get group by id.
Query:
query Group($groupId: ID!, $hubId:ID!) {
group(groupId: $groupId, hubId: $hubId) {
id
name
}
}
Query Variables:
{
"groupId": "566929135",
"hubId": "urn:adsk.ace:beta.scope:02dd340f-3e84-4db8-b6a1-56a964a202c7"
}
Response:
{
"data": {
"group": {
"id": "566929135",
"name": "DocGroup1793373238084"
}
}
}
Show More
Example 2
Retrieve members of a group.
Query:
query Group($groupId: ID!, $hubId:ID!) {
group(groupId: $groupId, hubId: $hubId) {
id
name
members {
results{
status
user {
firstName
lastName
}
}
}
}
}
Show More
Query Variables:
{
"groupId": "566929135",
"hubId": "urn:adsk.ace:beta.scope:02dd340f-3e84-4db8-b6a1-56a964a202c7"
}
Response:
{
"data": {
"group": {
"id": "566929135",
"name": "DocGroup1793373238084",
"members": {
"results": [
{
"status": "PENDING",
"user": {
"firstName": "J",
"lastName": "Y"
}
},
{
"status": "ACTIVE",
"user": {
"firstName": "Raghav",
"lastName": "Patel"
}
},
{
"status": "ACTIVE",
"user": {
"firstName": "Shubham",
"lastName": "Kasar"
}
}
]
}
}
}
}
Show More
Example 3
Filter members of Group by name.
Query:
query Group($groupId: ID!, $hubId:ID!) {
group(groupId: $groupId, hubId: $hubId) {
id
name
members(filter: { name: "shubham"}) {
results{
status
user {
firstName
lastName
}
}
}
}
}
Show More
Query Variables:
{
"groupId": "566929135",
"hubId": "urn:adsk.ace:beta.scope:02dd340f-3e84-4db8-b6a1-56a964a202c7"
}
Response:
{
"data": {
"group": {
"id": "566929135",
"name": "DocGroup1793373238084",
"members": {
"results": [
{
"status": "ACTIVE",
"user": {
"firstName": "Shubham",
"lastName": "Kasar"
}
}
]
}
}
}
}
Show More