Skip to content

Get Scheduled Indexing for Knowledge Base

client.Agents.EvaluationMetrics.ScheduledIndexing.Get(ctx, knowledgeBaseUuid) (*AgentEvaluationMetricScheduledIndexingGetResponse, error)
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
knowledgeBaseUuid string
ReturnsExpand Collapse
type AgentEvaluationMetricScheduledIndexingGetResponse struct{…}
IndexingInfo AgentEvaluationMetricScheduledIndexingGetResponseIndexingInfooptional

Metadata for scheduled indexing entries

CreatedAt Timeoptional

Created at timestamp

formatdate-time
Days []int64optional

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

DeletedAt Timeoptional

Deleted at timestamp (if soft deleted)

formatdate-time
IsActive booloptional

Whether the schedule is currently active

KnowledgeBaseUuid stringoptional

Knowledge base uuid associated with this schedule

LastRanAt Timeoptional

Last time the schedule was executed

formatdate-time
NextRunAt Timeoptional

Next scheduled run

formatdate-time
Time stringoptional

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

UpdatedAt Timeoptional

Updated at timestamp

formatdate-time
Uuid stringoptional

Unique identifier for the scheduled indexing entry

Get Scheduled Indexing for Knowledge Base
package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/-go"
  "github.com/stainless-sdks/-go/option"
)

func main() {
  client := gradient.NewClient(
    option.WithAccessToken("My Access Token"),
  )
  scheduledIndexing, err := client.Agents.EvaluationMetrics.ScheduledIndexing.Get(context.TODO(), `"123e4567-e89b-12d3-a456-426614174000"`)
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", scheduledIndexing.IndexingInfo)
}
{
  "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"
  }
}