Request

Response

    Queries

    foldersByProject

    query

    Retrieves all top level folders under a specified project that meet the filter criteria specified by the filter argument.

    Template for Query:

    query GetFoldersByProject($projectId: ID!, $filter: FolderFilterInput, $pagination: PaginationInput) {
      foldersByProject(projectId: $projectId, filter: $filter, pagination: $pagination) {
        # FoldersByProject Fields
      }
    }
    

    Arguments

    projectId*
    ID! non-null
    The ID of the project that contains the items.
    filterSpecifies how to filter on folders. You can filter by name.
    paginationSpecifies how to split the response into multiple pages.
    * Required

    Possible Returns

    Value TypeDescription
    Folders A list of Folders returned in response to a query. A folder contains items, such as designs and sub-folders.


    Examples

    Example 1

    Retrieves all folders under the given project.

    Query:

    query GetFoldersByProject($projectId: ID!) {
           foldersByProject(projectId: $projectId) {
               pagination {
                   cursor
                   pageSize
               }
               results {
                   id
                   name
                   objectCount
               }
           }
     }
    
    Show More

    Query Variables:

    {
     "projectId": "urn:adsk.workspace:beta.project:e7cc7e8d-5246-4800-b07e-97eee2a0aa07"
    }
    

    Response:

    {
       "data": {
           "foldersByProject": {
               "pagination": {
                   "cursor": null,
                   "pageSize": 2
               },
               "results": [
                   {
                       "id": "urn:adsk.wipstg:fs.folder:co.75-EpQPXQ_ynLYL0bOxSIg",
                       "name": "extensibility",
                       "objectCount": 5
                   },
                   {
                       "id": "urn:adsk.wipstg:fs.folder:co.JqPba6NRT5-of8Eu7tpuXQ",
                       "name": "queries",
                       "objectCount": 7
                   }
               ]
           }
       }
    }
    
    Show More