hub
Retrieves an object representing a hub.
A Hub is a container of projects, shared resources, and users with a common context.
Template for Query:
query GetHub($hubId: ID!) {
hub(hubId: $hubId) {
# Hub Fields
}
}
Template for Query Variables:
{
"hubId" : "<SOME-ID-TYPE-SCALAR-VALUE>"
}
Arguments
hubId* ID! non-null | The ID of the hub to return. |
Possible Returns
Value Type | Description |
---|---|
Hub | Represents a hub. A hub is a container of projects, shared resources, and users with a common context. |
Examples
Example 1
Retrieves a hub by ID.
Query:
query GetHub($hubId: ID!) {
hub(hubId: $hubId) {
id
name
__typename
alternativeIdentifiers{
dataManagementAPIHubId
}
}
}
Query Variables:
{
"hubId": "urn:adsk.ace:beta.scope:e7c7f5a9-a88a-40b4-85f6-ba1454def997"
}
Response:
{
"data": {
"hub": {
"id": "urn:adsk.ace:beta.scope:e7c7f5a9-a88a-40b4-85f6-ba1454def997",
"name": "stg-hds-test-hub",
"__typename": "Hub",
"alternativeIdentifiers": {
"dataManagementAPIHubId": "a.YnVzaW5lc3M6YXV0b2Rlc2syMzk4"
}
}
}
}
Example 2
Retrieves a hub by ID , along with the propertyDefinitionCollection by its id as a filter.
Query:
query hub($hubId: ID!, $filter: PropertyDefinitionCollectionFilterInput, $pagination: PaginationInput) {
hub(hubId: $hubId) {
id
name
... on Hub {
propertyDefinitionCollections(filter: $filter, pagination: $pagination) {
results {
id
name
description
definitions {
results {
id
name
isHidden
isReadOnly
isArchived
shouldCopy
description
specification
propertyBehavior
units {
id
name
}
collection {
id
}
}
}
}
}
}
}
}
Query Variables:
{
"hubId": "urn:adsk.ace:beta.scope:e7c7f5a9-a88a-40b4-85f6-ba1454def997",
"filter" : {
"id": "cHJvcGRlZmNvbH5DZlhvYUM0SzUzU1R3YjZUbklyWFhaVEFJRWRkRzlBcn5DZlhvYUM0SzUzU1R3YjZUbklyWFhaVEFJRWRkRzlBcn5wcm9wX2RlZl9jb2xfMTcxODA4OTI5ODcxMA"
},
"pagination" :{
"limit":1
}
}
Response:
{
"data": {
"hub": {
"id": "urn:adsk.ace:beta.scope:e7c7f5a9-a88a-40b4-85f6-ba1454def997",
"name": "stg-hds-test-hub",
"propertyDefinitionCollections": {
"results": [
{
"id": "cHJvcGRlZmNvbH5DZlhvYUM0SzUzU1R3YjZUbklyWFhaVEFJRWRkRzlBcn5DZlhvYUM0SzUzU1R3YjZUbklyWFhaVEFJRWRkRzlBcn5wcm9wX2RlZl9jb2xfMTcxODA4OTI5ODcxMA",
"name": "prop_def_col_1718089298710",
"description": "Create PDC test with description",
"definitions": {
"results": [
{
"id": "cHJvcGRlZn5DZlhvYUM0SzUzU1R3YjZUbklyWFhaVEFJRWRkRzlBcn5DZlhvYUM0SzUzU1R3YjZUbklyWFhaVEFJRWRkRzlBcn5wcm9wX2RlZl9jb2xfMTcxODA4OTI5ODcxMH5wYXJhbWV0ZXJzLkNmWG9hQzRLNTNTVHdiNlRuSXJYWFpUQUlFZGRHOUFyOmM4ODczOGZmYzA3NTQ1YTFiYjViZmIzYmM1YTFlNmI3LTEuMC4w",
"name": "property definition name 1718089303789",
"isHidden": false,
"isReadOnly": false,
"isArchived": false,
"shouldCopy": false,
"description": "description updated",
"specification": "STRING",
"propertyBehavior": "DYNAMIC_AT_VERSION",
"units": null,
"collection": {
"id": "cHJvcGRlZmNvbH5DZlhvYUM0SzUzU1R3YjZUbklyWFhaVEFJRWRkRzlBcn5DZlhvYUM0SzUzU1R3YjZUbklyWFhaVEFJRWRkRzlBcn5wcm9wX2RlZl9jb2xfMTcxODA4OTI5ODcxMA"
}
}
]
}
}
]
}
}
}
}
Example 3
Retrieves a hub by ID along with its members.
Query:
query GetHub($hubId: ID!, $pagination: PaginationInput) {
hub(hubId: $hubId) {
id
name
__typename
members(pagination: $pagination) {
results {
role
user {
id
firstName
}
}
pagination {
cursor
pageSize
}
}
}
}
Query Variables:
{
"hubId": "urn:adsk.ace:beta.scope:e7c7f5a9-a88a-40b4-85f6-ba1454def997"
}
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": "JJR24HA7RCH2BWR5",
"firstName": "cygnusstgtesthubresendandwithdrawinvite"
}
},
{
"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"
}
}
],
"pagination": {
"cursor": "MzB-MzA",
"pageSize": 30
}
}
}
}
}
Example 4
Retrieves a hub by ID along with its member filter by member status.
Query:
query GetHub($hubId: ID!, $filter: HubMemberFilterInput, $pagination: PaginationInput) {
hub(hubId: $hubId) {
id
name
__typename
members(filter: $filter, pagination: $pagination) {
results {
user {
id
firstName
lastModifiedOn
}
}
pagination {
cursor
pageSize
}
}
}
}
Query Variables:
{
"hubId": "urn:adsk.ace:beta.scope:e7c7f5a9-a88a-40b4-85f6-ba1454def997",
"filter":{
"status": "ACTIVE"
},
"pagination": {
"cursor": "MH41"
}
}
Response:
{
"data": {
"hub": {
"id": "urn:adsk.ace:beta.scope:e7c7f5a9-a88a-40b4-85f6-ba1454def997",
"name": "stg-hds-test-hub",
"__typename": "Hub",
"members": {
"results": [
{
"user": {
"id": "5MF22T98KDZVCXAD",
"firstName": "Aditi",
"lastModifiedOn": "2023-03-10T21:09:09.000Z"
}
},
{
"user": {
"id": "VM4JYMC4QEZRZWXK",
"firstName": "Amritha",
"lastModifiedOn": "2022-05-16T09:50:17.000Z"
}
},
{
"user": {
"id": "B4PJ8ZH8KBCUSWJN",
"firstName": "Arnab",
"lastModifiedOn": "2022-09-07T20:28:10.000Z"
}
},
{
"user": {
"id": "XV42K7XEJ3PG7626",
"firstName": "Ashish",
"lastModifiedOn": "2022-04-08T06:53:33.000Z"
}
},
{
"user": {
"id": "MRJJXC4HNJFS2Y8W",
"firstName": "Ashutosh",
"lastModifiedOn": "2022-09-07T20:27:40.000Z"
}
}
],
"pagination": {
"cursor": "NX41",
"pageSize": 5
}
}
}
}
}
Example 5
Retrieves the current role of a hub member.
Query:
query Query($hubId: ID!, $pagination: PaginationInput) {
hub(hubId: $hubId) {
members(pagination: $pagination) {
results {
role
user {
id
firstName
}
status
}
pagination{
cursor,
pageSize
}
}
}
}
Query Variables:
{
"hubId": "urn:adsk.ace:beta.scope:e7c7f5a9-a88a-40b4-85f6-ba1454def997",
"filter": {
"status": "ACTIVE"
},
"pagination": {
"cursor": "MH41"
}
}
Response:
{
"data": {
"hub": {
"members": {
"results": [
{
"role": "USER",
"user": {
"id": "5MF22T98KDZVCXAD",
"firstName": "Aditi"
},
"status": "ACTIVE"
},
{
"role": "GUEST",
"user": {
"id": "VM4JYMC4QEZRZWXK",
"firstName": "Amritha"
},
"status": "ACTIVE"
},
{
"role": "USER",
"user": {
"id": "B4PJ8ZH8KBCUSWJN",
"firstName": "Arnab"
},
"status": "ACTIVE"
},
{
"role": "USER",
"user": {
"id": "XV42K7XEJ3PG7626",
"firstName": "Ashish"
},
"status": "ACTIVE"
},
{
"role": "USER",
"user": {
"id": "MRJJXC4HNJFS2Y8W",
"firstName": "Ashutosh"
},
"status": "ACTIVE"
}
],
"pagination": {
"cursor": "NX41",
"pageSize": 5
}
}
}
}
}
Example 6
Retrieves a hub by ID along with its groups.
Query:
query GetHub($hubId: ID!, $pagination: PaginationInput) {
hub(hubId: $hubId) {
id
name
__typename
groups(pagination: $pagination) {
results {
id
name
}
pagination {
cursor
pageSize
}
}
}
}
Query Variables:
{
"hubId": "urn:adsk.ace:beta.scope:e7c7f5a9-a88a-40b4-85f6-ba1454def997",
"pagination": {"cursor":"MH41"}
}
Response:
{
"data": {
"hub": {
"id": "urn:adsk.ace:beta.scope:e7c7f5a9-a88a-40b4-85f6-ba1454def997",
"name": "stg-hds-test-hub",
"__typename": "Hub",
"groups": {
"results": [
{
"id": "110434919",
"name": "admins"
},
{
"id": "172187115",
"name": "DocGroup"
},
{
"id": "172326565",
"name": "DocGroup1724649196884"
},
{
"id": "172326711",
"name": "DocGroup1724650047501"
},
{
"id": "172346188",
"name": "DocGroup1724669655450"
}
],
"pagination": {
"cursor": "NX41",
"pageSize": 5
}
}
}
}
}
Example 7
Retrieves the Fusion web URL that will redirect to the Fusion web.
Query:
query hub($hubId: ID!) {
hub(hubId: $hubId) {
id
name
fusionWebUrl
}
}
Query Variables:
{
"hubId": "urn:adsk.ace:beta.scope:e7c7f5a9-a88a-40b4-85f6-ba1454def997"
}
Response:
{
"data": {
"hub": {
"id": "urn:adsk.ace:beta.scope:e7c7f5a9-a88a-40b4-85f6-ba1454def997",
"name": "stg-hds-test-hub",
"fusionWebUrl": "https://autodesk2398.staging.autodesk360.com"
}
}
}
Example 8
Check if the hub is a manage-extension hub or not.
Query:
query hub($hubId: ID!) {
hub(hubId: $hubId) {
id
name
manage {
isManageExtensionEnabled
manageExtensionTenantId
}
}
}
Query Variables:
{
"hubId": "urn:adsk.ace:beta.scope:e7c7f5a9-a88a-40b4-85f6-ba1454def997"
}
Response:
{
"data": {
"hub": {
"id": "urn:adsk.ace:beta.scope:e7c7f5a9-a88a-40b4-85f6-ba1454def997",
"name": "stg-hds-test-hub",
"manage": {
"isManageExtensionEnabled": true,
"manageExtensionTenantId": "urn:adsk.fusion.FLC:space:1fb1af97-3b1d-4055-9a8e-f01bad79194c"
}
}
}
}