Content APIs
The content APIs allow you to interact with both documents and folders in Omni through a unified interface.
Content object
Represents either a document or folder in Omni. The specific fields available depend on the type
field.
- Example
- Fields
{
"type": "document",
"identifier": "doc123",
"name": "Monthly Metrics",
"scope": "organization",
"owner": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Jane Smith"
},
"connectionId": "789e0123-e45b-67d8-a456-426614174000",
"deleted": false,
"folder": null
}
Field | Type | Description |
---|---|---|
type | string | Content type, either document or folder |
id | string | Unique identifier of the content |
name | string | Name of the content |
scope | string | Content scope:
|
owner | object | Owner details |
owner.id | string | UUID of the owner |
owner.name | string | Name of the owner |
Document-specific fields (when type is "document") | ||
identifier | string | Unique identifier of the document |
connectionId | string | ID of the connection the document uses |
deleted | boolean | Whether the document has been deleted |
folder | object|null | Folder details, null if not in a folder |
Folder-specific fields (when type is "folder") | ||
path | string | Path of the folder |
labels | array | Array of label objects |
List content
Retrieves a paginated list of documents and folders. This endpoint supports filtering, sorting, and cursor-based pagination.
- Basic request
- With includes
- Filters & sorting
GET /api/v1/content
curl -L 'https://myorg.omniapp.co/api/v1/content' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json'
GET /api/v1/content?include=_count,labels
curl -L 'https://myorg.omniapp.co/api/v1/content?include=_count,labels' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json'
GET /api/v1/content?labels=<labels>&scope=<scope>&sortField=<field>
curl -L 'https://myorg.omniapp.co/api/v1/content?labels=finance,marketing&scope=organization&sortField=favorites' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json'
Parameters
Note: All parameters must be provided as query parameters.
Loading parameters...
Response
200 OK
Successful requests return a 200 OK
status and a response body similar to:
{
"records": [
{
"type": "folder",
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Analytics",
"path": "analytics",
"scope": "organization",
"owner": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Jane Smith"
},
"labels": [
{
"name": "reports",
"verified": true
}
]
},
{
"type": "document",
"identifier": "doc123",
"name": "Monthly Metrics",
"scope": "organization",
"owner": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Jane Smith"
},
"connectionId": "789e0123-e45b-67d8-a456-426614174000",
"deleted": false,
"folder": null
}
],
"pageInfo": {
"hasNextPage": true,
"nextCursor": "Product Analytics",
"pageSize": 20,
"totalRecords": 45
}
}
400 Bad Request
Results from invalid request parameters. Response bodies will be similar to:
{
"detail": "Bad Request: <errorReason>",
"status": 400
}
Common error causes:
- Page size must be at least 1
- Page size cannot exceed 100
- Invalid
sort
field creatorId
required whenscope
isrestricted
- Unrecognized query parameters
folderId
andpath
used together
404 Not Found
Returned when the specified creator cannot be found:
{
"detail": "User with id <uuid> does not exist",
"status": 404
}
429 Too Many Requests
Results from too many requests in a given time frame. Refer to the Rate limiting documentation for more information.