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
}
}
Template for Query Variables:
{
"hubId" : "<SOME-ID-TYPE-SCALAR-VALUE>",
"groupId" : "<SOME-ID-TYPE-SCALAR-VALUE>"
}
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": "173816631",
"hubId": "urn:adsk.ace:beta.scope:e7c7f5a9-a88a-40b4-85f6-ba1454def997"
}
Response:
{
"data": {
"group": {
"id": "173816631",
"name": "DocGroup1725880690106"
}
}
}
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": "173816631",
"hubId": "urn:adsk.ace:beta.scope:e7c7f5a9-a88a-40b4-85f6-ba1454def997"
}
Response:
{
"data": {
"group": {
"id": "173816631",
"name": "DocGroup1725880690106",
"members": {
"results": [
{
"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": "173816631",
"hubId": "urn:adsk.ace:beta.scope:e7c7f5a9-a88a-40b4-85f6-ba1454def997"
}
Response:
{
"data": {
"group": {
"id": "173816631",
"name": "DocGroup1725880690106",
"members": {
"results": [
{
"status": "ACTIVE",
"user": {
"firstName": "Shubham",
"lastName": "Kasar"
}
}
]
}
}
}
}
Show More