Queries
itemsByFolder
Retrieves all items within a specified folder that meet the filter criteria specified by the filter
argument.
Template for Query:
query GetItemsByFolder($hubId: ID!, $folderId: ID!, $filter: ItemFilterInput, $pagination: PaginationInput) {
itemsByFolder(hubId: $hubId, folderId: $folderId, filter: $filter, pagination: $pagination) {
# ItemsByFolder Fields
}
}
Template for Query Variables:
{
"hubId" : "<SOME-ID-TYPE-SCALAR-VALUE>",
"folderId" : "<SOME-ID-TYPE-SCALAR-VALUE>",
"filter" : "<SOME-ITEMFILTER-INPUT-TYPE-VALUE>",
"pagination" : "<SOME-PAGINATION-INPUT-TYPE-VALUE>"
}
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 items. |
filter | Specifies how to filter the content of a folder. You can filter by name. |
pagination | Specifies how to split the response into multiple pages. |
* Required
Possible Returns
Value Type | Description |
---|---|
Items | Contains a list of items returned in response to a query. An item refers to a file or sub-folder that exists within a folder. |
Examples
Example 1
Retrieves all items under a folder with filtering by item name.
Query:
query GetFolderItemsByFolder($hubId: ID!, $folderId: ID!, $filter: ItemFilterInput) {
itemsByFolder(hubId: $hubId, folderId: $folderId, filter: $filter) {
results {
__typename
id
name
}
}
}
Show More
Query Variables:
{
"hubId": "urn:adsk.ace:beta.scope:e7c7f5a9-a88a-40b4-85f6-ba1454def997",
"folderId": "urn:adsk.wipstg:fs.folder:co.JqPba6NRT5-of8Eu7tpuXQ",
"filter": {
"name": "3D_Arm_Scan"
}
}
Response:
{
"data": {
"itemsByFolder": {
"results": [
{
"__typename": "DesignItem",
"id": "urn:adsk.wipstg:dm.lineage:2T9wT3rFSZW0SJkfo139PQ",
"name": "3D_Arm_Scan"
}
]
}
}
}
Show More