GET
/
v4
/
knowledge-bases
/
{knowledge_base_id}
/
artifacts
/
{artifact_id}
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() {
  const artifact = await client.knowledgeBases.artifacts.retrieve('knowledge_base_id', 'artifact_id');

  console.log(artifact.artifact_id);
}

main();
{
  "artifact_id": "<string>",
  "artifact_name": "<string>",
  "artifact_uri": "<string>",
  "artifact_uri_public": "<string>",
  "status": "<string>",
  "status_reason": "<string>",
  "source": "S3",
  "chunks_status": {
    "chunks_completed": 123,
    "chunks_pending": 123,
    "chunks_failed": 123
  },
  "updated_at": "2023-11-07T05:31:56Z",
  "tags": {},
  "chunks": [
    {
      "chunk_id": "<string>",
      "upload_status": "Embedding",
      "status_reason": "<string>",
      "text": "<string>",
      "chunk_position": 123,
      "embedding": [
        123
      ],
      "metadata": {},
      "user_supplied_metadata": {}
    }
  ]
}

Authorizations

x-api-key
string
header
required

Path Parameters

knowledge_base_id
string
required
artifact_id
string
required

Query Parameters

status_filter
string

Response

200
application/json

Successful Response

The response is of type object.