Queries
projects
Retrieves all projects that match the specified filter criteria from a specified hub.
Template for Query:
query GetProjects($hubId: ID!, $filter: ProjectFilterInput, $pagination: PaginationInput, $sort: ProjectSortInput) {
projects(hubId: $hubId, filter: $filter, pagination: $pagination, sort: $sort) {
# Projects Fields
}
}
Arguments
| hubId* ID! non-null | The ID of the hub that contains the projects. |
| filter | Specifies how to filter a list of projects. You can filter by name or archived status. |
| pagination | Specifies how to split the response into multiple pages. |
| sort | Specifies how to order the list of projects. If you don’t specify sort, the order is unspecified. |
* Required
Possible Returns
| Value Type | Description |
|---|---|
| Projects | Contains a list of projects returned in response to a query. |
Examples
Example 1
Retrieves the project under the hub and filtered by the input.
Query:
query GetProjects($hubId: ID!, $filter: ProjectFilterInput) {
projects(hubId: $hubId, filter: $filter) {
results {
id
name
__typename
alternativeIdentifiers{
dataManagementAPIProjectId
}
}
}
}
Show More
Query Variables:
{
"hubId": "urn:adsk.ace:beta.scope:02dd340f-3e84-4db8-b6a1-56a964a202c7",
"filter" : {
"name": "Espresso Machine"
}
}
Response:
{
"data": {
"projects": {
"results": [
{
"id": "urn:adsk.workspace:beta.project:99497e80-4c1f-4ca7-8132-4bf1735e4d68",
"name": "Espresso Machine",
"__typename": "Project",
"alternativeIdentifiers": {
"dataManagementAPIProjectId": "a.YnVzaW5lc3M6eW9wbWFpbDkxNjMjMjAyNjAxMTYxMzMwOTc1MDE"
}
}
]
}
}
}
Show More