Queries
foldersByFolderInHub
Retrieves all subfolders within a specified folder that meet the filter criteria specified by the filter argument.
Template for Query:
query GetFoldersByFolderInHub($hubId: ID!, $folderId: ID!, $filter: FolderFilterInput, $pagination: PaginationInput) {
foldersByFolderInHub(hubId: $hubId, folderId: $folderId, filter: $filter, pagination: $pagination) {
# Folders Fields
}
}
Arguments
| hubId* ID! non-null | The ID of the Hub that contains the item. |
| folderId* ID! non-null | The ID of the folder that contains the subfolders. |
| filter | Specifies how to filter on folders. You can filter by name. |
| pagination | Specifies how to split the response into multiple pages. |
* Required
Possible Returns
| Value Type | Description |
|---|---|
| Folders | A list of Folders returned in response to a query. A folder contains items, such as designs and sub-folders. |
Examples
Example 1
Retrieves all subfolders within a specified folder that meet the filter criteria specified by the filter argument in the hub.
Query:
query FoldersByFolderInHub($hubId: ID!, $folderId: ID!) {
foldersByFolderInHub(hubId: $hubId, folderId: $folderId) {
results {
id
path
name
objectCount
}
}
}
Show More
Query Variables:
{
"hubId": "urn:adsk.ace:beta.scope:02dd340f-3e84-4db8-b6a1-56a964a202c7",
"folderId": "urn:adsk.wipstg:fs.folder:co.quEik8frQn6SJBINysuqJw"
}
Response:
{
"data": {
"foldersByFolderInHub": {
"results": [
{
"id": "urn:adsk.wipstg:fs.folder:co.e1RDpnm3TjaqIr_ZOy9RFA",
"path": "/Espresso Machine/Connectors",
"name": "Folder 01",
"objectCount": 1
}
]
}
}
}
Show More