Skip to main content
GET
/
v4
/
knowledge-bases
/
{knowledge_base_id}
/
artifacts
/
{artifact_id}
Python
import os
from scale_gp import SGPClient

client = SGPClient(
    api_key=os.environ.get("SGP_API_KEY"),  # This is the default and can be omitted
)
artifact = client.knowledge_bases.artifacts.retrieve(
    artifact_id="artifact_id",
    knowledge_base_id="knowledge_base_id",
)
print(artifact.artifact_id)
{
  "artifact_id": "<string>",
  "artifact_name": "<string>",
  "artifact_uri": "<string>",
  "status": "<string>",
  "source": "S3",
  "chunks_status": {
    "chunks_completed": 123,
    "chunks_pending": 123,
    "chunks_failed": 123
  },
  "tags": {},
  "chunks": [
    {
      "chunk_id": "<string>",
      "upload_status": "Embedding",
      "text": "<string>",
      "chunk_position": 123,
      "status_reason": "<string>",
      "embedding": [
        123
      ],
      "metadata": {},
      "user_supplied_metadata": {}
    }
  ],
  "artifact_uri_public": "<string>",
  "status_reason": "<string>",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

x-api-key
string
header
required

Path Parameters

knowledge_base_id
string
required
artifact_id
string
required

Query Parameters

status_filter
string | null

Response

Successful Response

artifact_id
string
required

Unique identifier for the artifact.

artifact_name
string
required

Friendly name for the artifact.

artifact_uri
string
required

Location (e.g. URI) of the artifact in the data source.

status
string
required

Status of the artifact.

source
enum<string>
required

Data source of the artifact.

Available options:
S3,
Confluence,
SharePoint,
SharePointPage,
GoogleDrive,
GoogleCloudStorage,
AzureBlobStorage,
Slack,
Snowflake,
Databricks,
LocalFile,
LocalChunks
chunks_status
ChunksStatus · object
required

Number of chunks pending, completed, and failed.

tags
Tags · object
required

Tags associated with the artifact.

chunks
ArtifactChunk · object[]
required

List of chunks associated with the artifact.

artifact_uri_public
string

Public Location (e.g. URI) of the artifact in the data source.

status_reason
string

Reason for the artifact's status.

updated_at
string<date-time>

Timestamp at which the artifact was last updated.