v1

latestOpenAPI 3.1.02026-07-263911,4691.1 MB
Directory (Sites)

List folders

get/directory/v1/folders

Query parameters

page_sizeinteger

Required. This determines the max number of folders returned in the response.

page_tokenstring

Optional. base64 encoded. If this field is present, the list of folders returned will start from the row after this token.

order_by.sort_field'SORT_FIELD_UNSPECIFIED' | 'SORT_FIELD_NAME' | 'SORT_FIELD_FOLDER_ID' | 'SORT_FIELD_USER_ID' | 'SORT_FIELD_CREATED_AT' | 'SORT_FIELD_MODIFIED_AT'

The field to order by

  • SORT_FIELD_UNSPECIFIED: The sort field is unspecified
  • SORT_FIELD_NAME: Sort the folder by name
  • SORT_FIELD_FOLDER_ID: Sort the folders by folder id
  • SORT_FIELD_USER_ID: Sort the folders by user id
  • SORT_FIELD_CREATED_AT: Sort the folders by created at
  • SORT_FIELD_MODIFIED_AT: Sort the folders by modified at
order_by.sort_order'SORT_ORDER_UNSPECIFIED' | 'SORT_ORDER_ASCENDING' | 'SORT_ORDER_DESCENDING'

The direction to order by

  • SORT_ORDER_UNSPECIFIED: The sort order is not specified
  • SORT_ORDER_ASCENDING: The sort order is asc
  • SORT_ORDER_DESCENDING: The sort order is desc
only_leaf_nodesboolean

Optional. When true, GetFolders will only return leaf node folders. leaf nodes are folders that do not have children Defaults to false.

with_ancestorsboolean

Optional. When true, folders will be returned with a list of their ancestors as well. Defaults to false

include_deletedboolean

When true, deleted folders will also be returned

ignore_folders_disabledboolean

Optional. When true, folders will still be returned when disabled for the organisation

domainstring

domain represents the type/domain/hierarchy for the folder. This is used for getting folders of a certain domain, i.e. getting all template folders or site folders

Response

A successful response.

next_page_tokenstring

Optional. base64 encoded. If this field is present, the value should be used in subsequent calls to GetFolders to get the next page of results. Otherwise, no further calls should be made.

folders_enabledboolean

Whether or not the org settings setting is enabled.

Example response

{
  "folders": [
    {
      "id": "4fb56fa8-fa23-4a9c-907e-8367abc75a2f",
      "name": "Sydney",
      "org_id": "d31e24be-e7a4-4a28-a230-044f850041fc",
      "creator_id": "a3452937-9fa7-4ba2-9ffa-c3bbee3fc947",
      "created_at": "2020-04-28T04:14:31:00Z",
      "modified_at": "2020-04-28T04:14:31:00Z",
      "meta_label": "location"
    }
  ],
  "folders_with_ancestors": [
    {
      "folder": {
        "id": "4fb56fa8-fa23-4a9c-907e-8367abc75a2f",
        "name": "Sydney",
        "org_id": "d31e24be-e7a4-4a28-a230-044f850041fc",
        "creator_id": "a3452937-9fa7-4ba2-9ffa-c3bbee3fc947",
        "created_at": "2020-04-28T04:14:31:00Z",
        "modified_at": "2020-04-28T04:14:31:00Z",
        "meta_label": "location"
      },
      "ancestors": [
        {
          "id": "4fb56fa8-fa23-4a9c-907e-8367abc75a2f",
          "name": "Sydney",
          "org_id": "d31e24be-e7a4-4a28-a230-044f850041fc",
          "creator_id": "a3452937-9fa7-4ba2-9ffa-c3bbee3fc947",
          "created_at": "2020-04-28T04:14:31:00Z",
          "modified_at": "2020-04-28T04:14:31:00Z",
          "meta_label": "location"
        }
      ]
    }
  ]
}