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) {
projects(hubId: $hubId, filter: $filter, pagination: $pagination) {
# Projects Fields
}
}
Template for Query Variables:
{
"hubId" : "<SOME-ID-TYPE-SCALAR-VALUE>",
"filter" : "<SOME-PROJECTFILTER-INPUT-TYPE-VALUE>",
"pagination" : "<SOME-PAGINATION-INPUT-TYPE-VALUE>"
}
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. |
pagination | Specifies how to split the response into multiple pages. |
* 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:e7c7f5a9-a88a-40b4-85f6-ba1454def997",
"filter" : {
"name": "DOCS_STG"
}
}
Response:
{
"data": {
"projects": {
"results": [
{
"id": "urn:adsk.workspace:beta.project:e7cc7e8d-5246-4800-b07e-97eee2a0aa07",
"name": "DOCS_STG",
"__typename": "Project",
"alternativeIdentifiers": {
"dataManagementAPIProjectId": "a.YnVzaW5lc3M6YXV0b2Rlc2syMzk4IzIwMjQwMTI1Njk4NjE1NTE"
}
}
]
}
}
}
Show More