Directories
Api for directories.
Get directory
Get a directory by id.
GET /api/directories/{id}
Path parameters
id
integer requiredId 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 requiredName 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
stringA query used to find matching items.
tag
stringList items with the specified tag.
trashed
booleanIndicates whether trashed items should be listed (default is
false
). Specifynull
to return both trashed and non-trashed items.
order_by
stringSpecifies the sort order and direction for the listing, e.g. "
name
" or "name+desc
"
top
integerMaximum number of items to return in the listing. Should be a value between
0
and100
. Default is25
.
skip
integerThe number of items to skip. Used together with
top
to return a specific range of items (for pagination).
count
booleanfalse
to skip counting the total number of matching items; default istrue
.
count_only
booleantrue
to only return the number of matching items; when this is specified the response will only contain thecount
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 requiredDirectory id.
Query parameters
suspended
booleanIndicates whether to list suspended members or not,
null
returns all members.
q
stringA query used to find matching items.
tag
stringList items with the specified tag.
trashed
booleanIndicates whether trashed items should be listed (default is
false
). Specifynull
to return both trashed and non-trashed items.
order_by
stringSpecifies the sort order and direction for the listing, e.g. "
name
" or "name+desc
"
top
integerMaximum number of items to return in the listing. Should be a value between
0
and100
. Default is25
.
skip
integerThe number of items to skip. Used together with
top
to return a specific range of items (for pagination).
count
booleanfalse
to skip counting the total number of matching items; default istrue
.
count_only
booleantrue
to only return the number of matching items; when this is specified the response will only contain thecount
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}"