Retrieve Hubs
This topic provides instructions on the following:
- Run a query using the Manufacturing Data Model Explorer.
- Retrieve all the hubs that you have access to.
You will use the following query in this topic:
Type | Operation | Description |
---|---|---|
Query | hubs | Retrieves all hubs accessible to you. |
Step 1 - Request a list of Hubs
The following steps demonstrate how you can run the hubs query to retrieve a list of Hubs that you have access to.
- Enter the following query in the Query Pane of the Manufacturing Data Model Explorer.
Query
query GetHubs { hubs{ pagination { cursor pageSize } results { id name alternativeIdentifiers{ dataManagementAPIHubId } } } }
Show More - Click Play. The response will display a list of hubs to which you have access.
Response
{ "data": { "hubs": { "pagination": { "cursor": null, "pageSize": 2 }, "results": [ { "id": "urn:adsk.ace:prod.scope:5ef7cc13-e774-461a-8124-403f58122488", "name": "Ashutosh_Hub_Prd", "alternativeIdentifiers": { "dataManagementAPIHubId": "a.YnVzaW5lc3M6YXV0b2Rlc2s3MzIx" } }, { "id": "urn:adsk.ace:prod.scope:42db5214-7dfe-431a-8275-2ea47d5686d5", "name": "L2-Forge-Data-Team", "alternativeIdentifiers": { "dataManagementAPIHubId": "a.YnVzaW5lc3M6YXV0b2Rlc2s2MTA0" } } ] } } }
Show MoreThe hub ID is essential for querying the list of
projects
within a specific hub.
Once the query runs successfully, your explorer should resemble the following image: