Queries
itemsByProject
Retrieves all top level items under a specified project that meet the filter criteria specified by the filter
argument.
Template for Query:
query GetItemsByProject($projectId: ID!, $filter: ItemFilterInput, $pagination: PaginationInput) {
itemsByProject(projectId: $projectId, filter: $filter, pagination: $pagination) {
# ItemsByProject Fields
}
}
Template for Query Variables:
{
"projectId" : "<SOME-ID-TYPE-SCALAR-VALUE>",
"filter" : "<SOME-ITEMFILTER-INPUT-TYPE-VALUE>",
"pagination" : "<SOME-PAGINATION-INPUT-TYPE-VALUE>"
}
Arguments
projectId* ID! non-null | The ID of the project 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 type.
Query:
query GetFolderItemsByProject($projectId: ID!) {
itemsByProject(projectId: $projectId) {
results {
__typename
id
name
}
}
}
Show More
Query Variables:
{
"projectId": "urn:adsk.workspace:beta.project:e7cc7e8d-5246-4800-b07e-97eee2a0aa07"
}
Response:
{
"data": {
"itemsByProject": {
"results": [
{
"__typename": "DesignItem",
"id": "urn:adsk.wipstg:dm.lineage:rMH4VQEFQrms39D9HNB4-g",
"name": "ItemInProject"
}
]
}
}
}
Show More