Retrieve All Members
This topic provides instructions on how to retrieve a hub by its ID and access its members.
You will use the following query in this topic:
Type | Operation | Description |
---|---|---|
Query | hub | Retrieves an object representing a hub. |
Step 1 - Retrieve Members in a Hub
The following steps demonstrate how you can run the hub query to retrieve all the members within a hub.
- Enter the following query in the Query Pane of the Manufacturing Data Model Explorer.
Query
query GetHub($hubId: ID!, $pagination: PaginationInput) { hub(hubId: $hubId) { id name __typename members(pagination: $pagination) { results { role user { id firstName } } pagination { cursor pageSize } } } }
Show More - In the Query Variables Pane, enter the value of the
hubId
. To know how to obtain thehubId
, refer to Retrieve Hubs.Query Variables
{ "hubId": "urn:adsk.ace:beta.scope:e7c7f5a9-a88a-40b4-85f6-ba1454def997" }
- Click Play. A list of members available within a hub is displayed in the response.
Response
{ "data": { "hub": { "id": "urn:adsk.ace:beta.scope:e7c7f5a9-a88a-40b4-85f6-ba1454def997", "name": "stg-hds-test-hub", "__typename": "Hub", "members": { "results": [ { "role": "USER", "user": { "id": "5MF22T98KDZVCXAD", "firstName": "Aditi" } }, { "role": "GUEST", "user": { "id": "VM4JYMC4QEZRZWXK", "firstName": "Amritha" } }, { "role": "USER", "user": { "id": "B4PJ8ZH8KBCUSWJN", "firstName": "Arnab" } }, { "role": "USER", "user": { "id": "XV42K7XEJ3PG7626", "firstName": "Ashish" } }, { "role": "USER", "user": { "id": "MRJJXC4HNJFS2Y8W", "firstName": "Ashutosh" } }, { "role": "USER", "user": { "id": "22223ZSERD2CEJD6", "firstName": "Automation Update User" } }, { "role": "USER", "user": { "id": "VXBAL5H7DN96", "firstName": "Bryce" } }, { "role": "ADMIN", "user": { "id": "MHL2DTVKNTQ27PJE", "firstName": "Chetan" } }, { "role": "USER", "user": { "id": "VWY2B7FJMG96EZTN", "firstName": "cygnus-stg-test" } }, { "role": "USER", "user": { "id": "FFA2264UMAGSEDHF", "firstName": "cygnusstgtestaddmembertogroup" } }, { "role": "GUEST", "user": { "id": "GEA2F8ZMRRDJDGQU", "firstName": "cygnusstgtestfolderoperation" } }, { "role": "USER", "user": { "id": "ZMD2V4TTL8E5W4NB", "firstName": "cygnusstgtesthubdeactivate" } }, { "role": "USER", "user": { "id": "ZBS2ANV2LM5BLUGZ", "firstName": "cygnus" } }, { "role": "USER", "user": { "id": "WPTJM3LXMQ5976QJ", "firstName": "cygnustestaddmembertogroup123" } }, { "role": "USER", "user": { "id": "4EZ25TAZMZ3GPTRE", "firstName": "cygnustestaddmembertogroup" } }, { "role": "USER", "user": { "id": "8C7JRJMPPV9558AT", "firstName": "Dat" } }, { "role": "USER", "user": { "id": "HQSVRXME3XPD", "firstName": "Dev" } }, { "role": "USER", "user": { "id": "QW8JLLNWP3U56QDR", "firstName": "Filip" } }, { "role": "USER", "user": { "id": "5KE2V99KK7VTVT5C", "firstName": "ftchangehubuserrole" } }, { "role": "USER", "user": { "id": "XDGJ3WLMKBPMQ8FU", "firstName": "ftchangeprojectuserrole" } }, { "role": "USER", "user": { "id": "5R32T3CJLW52GJEE", "firstName": "ftremoveprojectuser" } }, { "role": "USER", "user": { "id": "G39JA6NUK7HHZF2L", "firstName": "ftupdatehubuserstatus" } }, { "role": "USER", "user": { "id": "QLL2ZVHTNBYHR5KG", "firstName": "fusion" } }, { "role": "USER", "user": { "id": "UCU2FD75PALAU7FX", "firstName": "fusion" } }, { "role": "USER", "user": { "id": "JY826YZANWTY7WBM", "firstName": "Govinda" } }, { "role": "USER", "user": { "id": "LCXJJMMEKLKVBVTV", "firstName": "GraphQL" } }, { "role": "USER", "user": { "id": "P27JZBT4KHYYMGNS", "firstName": "Hassan" } }, { "role": "USER", "user": { "id": "4DZ2FF5SM7YEXGE2", "firstName": "hub" } }, { "role": "USER", "user": { "id": "GA7JMB8WKLKMAB8Y", "firstName": "Jai" } }, { "role": "USER", "user": { "id": "YSA2NWHCQF7KSPPD", "firstName": "Jean-Frédéric" } } ], "pagination": { "cursor": "MzB-MzA", "pageSize": 30 } } } } }
Show More