v1

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

Search folders

post/directory/v1/folders/search

Request body

querystring

Optional. The search value to query folders with when provided. When not provided, either all of the organisations folders or users folders will be returned in a paginated way

only_assigned_foldersboolean

When true, SearchFolders will only return folders that are assigned to the user making the request. Defaults to false

only_leaf_nodesboolean

When true, SearchFolders will only search location folders. Defaults to false.

include_members_countboolean

Whether to return the directly associated members count with the folders. Defaults to false.

include_folders_countboolean

Whether to return the total number of folders discovered in the query. Defaults to false

include_deleted_foldersboolean

Whether to return both deleted and non-deleted folders. Defaults to false

limitinteger

The number of results to be returned. maximum 1500, default 500

page_tokenstring

The offset used for pagination. The starting number for the next query

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

Example request

{
  "order_by": {
    "sort_field": 1,
    "sort_order": 1
  }
}

Response

A successful response.

folder_countinteger

The total number of folders found for the search query

next_page_tokenstring

Optional. base64 encoded. If this field is present, the value should be used in subsequent calls to SearchFolders 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": [
    {
      "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"
        }
      ]
    }
  ]
}