Directories

Api for directories.

Get directory

Get a directory by id.

GET /api/directories/{id}
Path parameters
id integer required

Id of directory.

Response codes

200 Success

{
  "id": "integer",
  "name": "string",
  "member_count": "integer"
}

404 Not Found

Code sample
curl https://{WEAVY-SERVER}/api/directories/1
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"

Get directory by name

Get a directory by name.

GET /api/directories/{name}
Path parameters
name string required

Name of directory.

Response codes

200 Success

{
  "id": "integer",
  "name": "string",
  "member_count": "integer"
}
Code sample
curl https://{WEAVY-SERVER}/api/directories/directory-1
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"

List directories

List directories.

GET /api/directories
Query parameters
q string

A query used to find matching items.

tag string

List items with the specified tag.

trashed boolean

Indicates whether trashed items should be listed (default is false). Specify null to return both trashed and non-trashed items.

order_by string

Specifies the sort order and direction for the listing, e.g. "name" or "name+desc"

top integer

Maximum number of items to return in the listing. Should be a value between 0 and 100. Default is 25.

skip integer

The number of items to skip. Used together with top to return a specific range of items (for pagination).

count boolean

false to skip counting the total number of matching items; default is true.

count_only boolean

true to only return the number of matching items; when this is specified the response will only contain the count property.

Response codes

200 Success

{
  "data": [
    "object"
  ],
  "start": "integer",
  "end": "integer",
  "count": "integer"
}
Code sample
curl https://{WEAVY-SERVER}/api/directories?top=10&q=acme
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"

List directory members

List the members of a directory.

GET /api/directories/{id}/members
Path parameters
id integer required

Directory id.

Query parameters
suspended boolean

Indicates whether to list suspended members or not, null returns all members.

q string

A query used to find matching items.

tag string

List items with the specified tag.

trashed boolean

Indicates whether trashed items should be listed (default is false). Specify null to return both trashed and non-trashed items.

order_by string

Specifies the sort order and direction for the listing, e.g. "name" or "name+desc"

top integer

Maximum number of items to return in the listing. Should be a value between 0 and 100. Default is 25.

skip integer

The number of items to skip. Used together with top to return a specific range of items (for pagination).

count boolean

false to skip counting the total number of matching items; default is true.

count_only boolean

true to only return the number of matching items; when this is specified the response will only contain the count property.

Response codes

200 Success

{
  "data": [
    "object"
  ],
  "start": "integer",
  "end": "integer",
  "count": "integer"
}
Code sample
curl https://{WEAVY-SERVER}/api/directories/1/members
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Weavy Docs