Queries
folderByHubId
Retrieve folder specified by the provided Id.
Template for Query:
query GetFolderByHubId($hubId: ID!, $folderId: ID!) {
folderByHubId(hubId: $hubId, folderId: $folderId) {
# FolderByHubId Fields
}
}
Template for Query Variables:
{
"hubId" : "<SOME-ID-TYPE-SCALAR-VALUE>",
"folderId" : "<SOME-ID-TYPE-SCALAR-VALUE>"
}
Arguments
hubId* ID! non-null | The ID of the Hub that contains the item. |
folderId* ID! non-null | The ID of the item to retrieve. |
* Required
Possible Returns
Value Type | Description |
---|---|
Folder | Represents a folder. A folder is a location for storing files, data, and other folders (sub-folders). |
Examples
Example 1
Retrieves details of the folder by id along with the hub and project details.
Query:
query GetFolder($hubId: ID!, $folderId: ID!) {
folderByHubId(hubId: $hubId, folderId: $folderId) {
id
name
objectCount
createdOn
parentFolder {
name
}
hub {
id
name
}
project {
id
name
alternativeIdentifiers{
dataManagementAPIProjectId
}
}
}
}
Show More
Query Variables:
{
"hubId": "urn:adsk.ace:beta.scope:e7c7f5a9-a88a-40b4-85f6-ba1454def997",
"folderId": "urn:adsk.wipstg:fs.folder:co.JqPba6NRT5-of8Eu7tpuXQ"
}
Response:
{
"data": {
"folderByHubId": {
"id": "urn:adsk.wipstg:fs.folder:co.JqPba6NRT5-of8Eu7tpuXQ",
"name": "queries",
"objectCount": 7,
"createdOn": "2024-02-06T11:57:30.000Z",
"parentFolder": null,
"hub": {
"id": "urn:adsk.ace:beta.scope:e7c7f5a9-a88a-40b4-85f6-ba1454def997",
"name": "stg-hds-test-hub"
},
"project": {
"id": "urn:adsk.workspace:beta.project:e7cc7e8d-5246-4800-b07e-97eee2a0aa07",
"name": "DOCS_STG",
"alternativeIdentifiers": {
"dataManagementAPIProjectId": "a.YnVzaW5lc3M6YXV0b2Rlc2syMzk4IzIwMjQwMTI1Njk4NjE1NTE"
}
}
}
}
}
Show More