Queries
hubs
Retrieves all hubs that match the specified criteria.
A Hub is a container of projects, shared resources, and users with a common context.
Template for Query:
query GetHubs($filter: HubFilterInput, $pagination: PaginationInput) {
hubs(filter: $filter, pagination: $pagination) {
# Hubs Fields
}
}
Template for Query Variables:
{
"filter" : "<SOME-HUBFILTER-INPUT-TYPE-VALUE>",
"pagination" : "<SOME-PAGINATION-INPUT-TYPE-VALUE>"
}
Arguments
filter | Specifies how to filter a list of hubs. You can filter by name. |
pagination | Specifies how to split the response into multiple pages. |
Possible Returns
Value Type | Description |
---|---|
Hubs | Contains a list of hubs returned in response to a query. A hub is a container of projects, shared resources, and users with a common context. |
Examples
Example 1
Retrieves all hubs you have access to.
Query:
query GetHubs {
hubs{
pagination {
cursor
pageSize
}
results {
id
name
alternativeIdentifiers{
dataManagementAPIHubId
}
}
}
}
Show More
Response:
{
"data": {
"hubs": {
"pagination": {
"cursor": null,
"pageSize": 7
},
"results": [
{
"id": "urn:adsk.ace:beta.scope:f2981dcb-6937-46a3-8368-75b233c6fdf2",
"name": "L2-Forge-Data-Team",
"alternativeIdentifiers": {
"dataManagementAPIHubId": "a.YnVzaW5lc3M6YXV0b2Rlc2syMDA2"
}
},
{
"id": "urn:adsk.ace:beta.scope:9cb54d49-d7c3-425e-91b1-f6bfef701b39",
"name": "L2-Forge-Data-Team-Ext",
"alternativeIdentifiers": {
"dataManagementAPIHubId": "a.YnVzaW5lc3M6YXV0b2Rlc2syMTQ0"
}
},
{
"id": "urn:adsk.ace:beta.scope:13133400-4a16-4702-9f3a-5779ae66eb45",
"name": "L2-SAMIR-HUB-TEST",
"alternativeIdentifiers": {
"dataManagementAPIHubId": "a.YnVzaW5lc3M6YXV0b2Rlc2syMzc1"
}
},
{
"id": "urn:adsk.ace:beta.scope:0132de0e-cbfe-4a86-9547-446aae3afa20",
"name": "ME STG - FLC STG",
"alternativeIdentifiers": {
"dataManagementAPIHubId": "a.YnVzaW5lc3M6c3RnenptYW5hZ2VleHQ"
}
},
{
"id": "urn:adsk.ace:beta.scope:333cbb4d-fcc6-4aba-90ec-3ee46790faea",
"name": "Pegasus",
"alternativeIdentifiers": {
"dataManagementAPIHubId": "b.22edf5b5-ecf7-4753-82a1-ddba7795a65d"
}
},
{
"id": "urn:adsk.ace:beta.scope:e7c7f5a9-a88a-40b4-85f6-ba1454def997",
"name": "stg-hds-test-hub",
"alternativeIdentifiers": {
"dataManagementAPIHubId": "a.YnVzaW5lc3M6YXV0b2Rlc2syMzk4"
}
},
{
"id": "urn:adsk.ace:beta.scope:eaf7848d-362d-4383-8e5d-5dcf01960a2b",
"name": "UATTestingLinkHub",
"alternativeIdentifiers": {
"dataManagementAPIHubId": "a.YnVzaW5lc3M6YXV0b2Rlc2syNDQ3"
}
}
]
}
}
}
Show More
Example 2
Retrieves the hub based on the name provided in the filter.
Query:
query GetHubs($hubName : String, $projectName: String) {
hubs(filter: {name: $hubName}) {
pagination {
cursor
pageSize
}
results {
name
id
__typename
projects(filter: {name: $projectName}) {
results {
id
name
__typename
}
}
}
}
}
Show More
Query Variables:
{
"hubName": "stg-hds-test-hub",
"projectName": "DOCS_STG"
}
Response:
{
"data": {
"hubs": {
"pagination": {
"cursor": null,
"pageSize": 1
},
"results": [
{
"name": "stg-hds-test-hub",
"id": "urn:adsk.ace:beta.scope:e7c7f5a9-a88a-40b4-85f6-ba1454def997",
"__typename": "Hub",
"projects": {
"results": [
{
"id": "urn:adsk.workspace:beta.project:e7cc7e8d-5246-4800-b07e-97eee2a0aa07",
"name": "DOCS_STG",
"__typename": "Project"
}
]
}
}
]
}
}
}
Show More