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) {
# Items Fields
}
}
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 project by project ID.
Query:
query GetItemsByProject($projectId: ID!) {
itemsByProject(projectId: $projectId) {
results {
__typename
id
name
}
}
}
Show More
Query Variables:
{
"projectId": "urn:adsk.workspace:beta.project:99497e80-4c1f-4ca7-8132-4bf1735e4d68"
}
Response:
{
"data": {
"itemsByProject": {
"results": [
{
"__typename": "DesignItem",
"id": "urn:adsk.wipstg:dm.lineage:0ekABZFJSE6xKd40ncQrkA",
"name": "Controls"
},
{
"__typename": "DesignItem",
"id": "urn:adsk.wipstg:dm.lineage:7c4K3ausTxuqDOMBSV4A8Q",
"name": "Pump"
},
{
"__typename": "DesignItem",
"id": "urn:adsk.wipstg:dm.lineage:84JwZ2pPSQuRxqaflA7e1w",
"name": "Sump"
},
{
"__typename": "DesignItem",
"id": "urn:adsk.wipstg:dm.lineage:94bB13tiRJCwS927QYQeRQ",
"name": "Transparent Cup"
},
{
"__typename": "DesignItem",
"id": "urn:adsk.wipstg:dm.lineage:AzYY2dZNRO6YFpn6dMP6Kg",
"name": "Frother Mechanism"
},
{
"__typename": "DrawingItem",
"id": "urn:adsk.wipstg:dm.lineage:F47COEIuTxqb8xizLl_qdQ",
"name": "Controls Drawing"
},
{
"__typename": "DesignItem",
"id": "urn:adsk.wipstg:dm.lineage:UAKt_HxxR--d71JIQLj4HQ",
"name": "Frother"
},
{
"__typename": "DesignItem",
"id": "urn:adsk.wipstg:dm.lineage:bsozNB1bQ6S4qIR-uoIAzQ",
"name": "Generator"
},
{
"__typename": "DesignItem",
"id": "urn:adsk.wipstg:dm.lineage:l1_i-KOsQ0uwYQNE-xtNDQ",
"name": "Espresso Machine"
},
{
"__typename": "DesignItem",
"id": "urn:adsk.wipstg:dm.lineage:nP1nOY0WTq2_nnadCvlx9w",
"name": "Cup"
},
{
"__typename": "DesignItem",
"id": "urn:adsk.wipstg:dm.lineage:tYmSBLUeTQWx7HgsTnPZ4w",
"name": "Valve"
}
]
}
}
}
Show More