Skip to content

Get Scheduled Indexing for Knowledge Base

agents.evaluation_metrics.scheduled_indexing.retrieve(strknowledge_base_uuid) -> ScheduledIndexingRetrieveResponse
get/v2/gen-ai/scheduled-indexing/knowledge-base/{knowledge_base_uuid}

Get Scheduled Indexing for knowledge base using knoweldge base uuid, send a GET request to /v2/gen-ai/scheduled-indexing/knowledge-base/{knowledge_base_uuid}.

ParametersExpand Collapse
knowledge_base_uuid: str
ReturnsExpand Collapse
class ScheduledIndexingRetrieveResponse:
indexing_info: Optional[IndexingInfo]

Metadata for scheduled indexing entries

created_at: Optional[datetime]

Created at timestamp

formatdate-time
days: Optional[List[int]]

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

deleted_at: Optional[datetime]

Deleted at timestamp (if soft deleted)

formatdate-time
is_active: Optional[bool]

Whether the schedule is currently active

knowledge_base_uuid: Optional[str]

Knowledge base uuid associated with this schedule

last_ran_at: Optional[datetime]

Last time the schedule was executed

formatdate-time
next_run_at: Optional[datetime]

Next scheduled run

formatdate-time
time: Optional[str]

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

updated_at: Optional[datetime]

Updated at timestamp

formatdate-time
uuid: Optional[str]

Unique identifier for the scheduled indexing entry

Get Scheduled Indexing for Knowledge Base
from gradient import Gradient

client = Gradient(
    access_token="My Access Token",
)
scheduled_indexing = client.agents.evaluation_metrics.scheduled_indexing.retrieve(
    "\"123e4567-e89b-12d3-a456-426614174000\"",
)
print(scheduled_indexing.indexing_info)
{
  "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"
  }
}