Skip to content

Create scheduled indexing for knowledge base

post/v2/gen-ai/scheduled-indexing

To create scheduled indexing for a knowledge base, send a POST request to /v2/gen-ai/scheduled-indexing.

Body ParametersExpand Collapse
days: optional array of number

Days for execution (day is represented same as in a cron expression, e.g. Monday begins with 1 )

knowledge_base_uuid: optional string

Knowledge base uuid for which the schedule is created

time: optional string

Time of execution (HH:MM) UTC

ReturnsExpand Collapse
indexing_info: optional object { created_at, days, deleted_at, 7 more }

Metadata for scheduled indexing entries

created_at: optional string

Created at timestamp

formatdate-time
days: optional array of number

Days for execution (day is represented same as in a cron expression, e.g. Monday begins with 1 )

deleted_at: optional string

Deleted at timestamp (if soft deleted)

formatdate-time
is_active: optional boolean

Whether the schedule is currently active

knowledge_base_uuid: optional string

Knowledge base uuid associated with this schedule

last_ran_at: optional string

Last time the schedule was executed

formatdate-time
next_run_at: optional string

Next scheduled run

formatdate-time
time: optional string

Scheduled time of execution (HH:MM:SS format)

updated_at: optional string

Updated at timestamp

formatdate-time
uuid: optional string

Unique identifier for the scheduled indexing entry

Create scheduled indexing for knowledge base
curl https://api.digitalocean.com/v2/gen-ai/scheduled-indexing \
    -X POST \
    -H "Authorization: Bearer $DIGITALOCEAN_ACCESS_TOKEN"
{
  "indexing_info": {
    "created_at": "2023-01-01T00:00:00Z",
    "days": [
      123
    ],
    "deleted_at": "2023-01-01T00:00:00Z",
    "is_active": true,
    "knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000",
    "last_ran_at": "2023-01-01T00:00:00Z",
    "next_run_at": "2023-01-01T00:00:00Z",
    "time": "example string",
    "updated_at": "2023-01-01T00:00:00Z",
    "uuid": "123e4567-e89b-12d3-a456-426614174000"
  }
}
Returns Examples
{
  "indexing_info": {
    "created_at": "2023-01-01T00:00:00Z",
    "days": [
      123
    ],
    "deleted_at": "2023-01-01T00:00:00Z",
    "is_active": true,
    "knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000",
    "last_ran_at": "2023-01-01T00:00:00Z",
    "next_run_at": "2023-01-01T00:00:00Z",
    "time": "example string",
    "updated_at": "2023-01-01T00:00:00Z",
    "uuid": "123e4567-e89b-12d3-a456-426614174000"
  }
}