GET
/
v4
/
knowledge-bases
/
{knowledge_base_id}
/
async-jobs
import SGPClient from 'sgp';

const client = new SGPClient({
  apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});

async function main() {
  // Automatically fetches more pages as needed.
  for await (const asyncJobListResponse of client.knowledgeBases.asyncJobs.list('knowledge_base_id')) {
    console.log(asyncJobListResponse.id);
  }
}

main();
[
  {
    "job_type": "evaluation-auto-eval",
    "parent_job_id": "<string>",
    "status": "<string>",
    "progress": {},
    "job_metadata": {},
    "id": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "account_id": "<string>",
    "updated_at": "2023-11-07T05:31:56Z",
    "created_by_user_id": "<string>"
  }
]

Authorizations

x-api-key
string
header
required

Path Parameters

knowledge_base_id
string
required

Query Parameters

status
default:
Active

Optional search by status type

Available options:
Active,
All
page
integer
default:
1

Page number for pagination to be returned by the given endpoint. Starts at page 1

Required range: x > 1
limit
integer
default:
100

Maximum number of artifacts to be returned by the given endpoint. Defaults to 100 and cannot be greater than 10k.

Required range: 1 < x < 10000

Response

200
application/json
Successful Response
job_type
enum<string>
required
Available options:
evaluation-auto-eval,
evaluation-test-cases-result-gen,
evaluation-metrics-gen,
evaluation-builder,
evaluation-dataset-generation,
knowledge_base_upload,
application-variant-report-generation,
application-interaction-evaluation,
deploy-inference-model,
update-inference-model
status
string
required
id
string
required

The unique identifier of the entity.

created_at
string
required

The date and time when the entity was created in ISO format.

account_id
string
required

The ID of the account that owns the given entity.

updated_at
string
required

The date and time when the entity was last updated in ISO format.

parent_job_id
string
progress
object
job_metadata
object
created_by_user_id
string

The user who originally created the entity.