Queries
foldersByProject
Retrieves all top level folders under a specified project that meet the filter criteria specified by the filter argument.
Template for Query:
query GetFoldersByProject($projectId: ID!, $filter: FolderFilterInput, $pagination: PaginationInput) {
foldersByProject(projectId: $projectId, filter: $filter, pagination: $pagination) {
# FoldersByProject Fields
}
}
Arguments
| projectId* ID! non-null | The ID of the project that contains the items. |
| 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 folders under the given project.
Query:
query GetFoldersByProject($projectId: ID!) {
foldersByProject(projectId: $projectId) {
pagination {
cursor
pageSize
}
results {
id
name
objectCount
}
}
}
Show More
Query Variables:
{
"projectId": "urn:adsk.workspace:beta.project:c1c2aaed-78a4-44b0-8b39-465157b25ee9"
}
Response:
{
"data": {
"foldersByProject": {
"pagination": {
"cursor": null,
"pageSize": 2
},
"results": [
{
"id": "urn:adsk.wipstg:fs.folder:co.Jvrx_RGTQIaa8tUcd0rYRg",
"name": "Folder-02",
"objectCount": 0
},
{
"id": "urn:adsk.wipstg:fs.folder:co.gfAzBAtYQBG1rLltqLUHcg",
"name": "Folder-01",
"objectCount": 2
}
]
}
}
}
Show More


