> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gp.scale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Tracked Artifact Details

> ### Description
Gets the details of an artifact tracked by a knowledge base.

### Details
This API can be used to get information about a single artifact by ID. This response will         contain much more detail about the artifact than show in the         [List Artifacts API](https://scale-egp.readme.io/reference/list_knowledge_base_artifacts_v2)         call. To use this API, pass in the `knowledge_base_id` and `artifact_id` that were returned         from your [List Artifacts API](         https://scale-egp.readme.io/reference/list_knowledge_base_artifacts_v2) call as path         parameters.

#### Compatibility with V1
V2 and V1 Knowledge Bases are entirely separate and not backwards compatible. Users who         have existing V1 knowledge bases will need to migrate their data to V2 knowledge bases.



## OpenAPI

````yaml https://app.stainlessapi.com/api/spec/documented/sgp/openapi.yml get /v4/knowledge-bases/{knowledge_base_id}/artifacts/{artifact_id}
openapi: 3.1.0
info:
  title: EGP API V4
  description: >-
    This is the parent API for all EGP APIs. If you are looking for the EGP API,
    please go to https://api.egp.scale.com/docs.
  contact:
    name: Scale Generative AI Platform
    url: https://scale.com/genai-platform
  version: 0.1.0
servers:
  - url: https://api.egp.scale.com
security: []
tags:
  - name: Models
    description: Model API.
paths:
  /v4/knowledge-bases/{knowledge_base_id}/artifacts/{artifact_id}:
    get:
      tags:
        - Knowledge Bases
      summary: Get Tracked Artifact Details
      description: >-
        ### Description

        Gets the details of an artifact tracked by a knowledge base.


        ### Details

        This API can be used to get information about a single artifact by ID.
        This response will         contain much more detail about the artifact
        than show in the         [List Artifacts
        API](https://scale-egp.readme.io/reference/list_knowledge_base_artifacts_v2)        
        call. To use this API, pass in the `knowledge_base_id` and `artifact_id`
        that were returned         from your [List Artifacts API](        
        https://scale-egp.readme.io/reference/list_knowledge_base_artifacts_v2)
        call as path         parameters.


        #### Compatibility with V1

        V2 and V1 Knowledge Bases are entirely separate and not backwards
        compatible. Users who         have existing V1 knowledge bases will need
        to migrate their data to V2 knowledge bases.
      operationId: GET-V4-/v2/knowledge-bases/{knowledge_base_id}/artifacts/{artifact_id}
      parameters:
        - name: knowledge_base_id
          in: path
          required: true
          schema:
            type: string
            title: Knowledge Base Id
        - name: artifact_id
          in: path
          required: true
          schema:
            title: Artifact Id
            type: string
        - name: status_filter
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Status Filter
        - name: x-selected-account-id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Account ID Header
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetKnowledgeBaseV2ArtifactResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
      x-codeSamples:
        - lang: Python
          source: |-
            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)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stainless-sdks/sgp-go\"\n\t\"github.com/stainless-sdks/sgp-go/option\"\n)\n\nfunc main() {\n\tclient := sgp.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tartifact, err := client.KnowledgeBases.Artifacts.Get(\n\t\tcontext.TODO(),\n\t\t\"knowledge_base_id\",\n\t\t\"artifact_id\",\n\t\tsgp.KnowledgeBaseArtifactGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", artifact.ArtifactID)\n}\n"
components:
  schemas:
    GetKnowledgeBaseV2ArtifactResponse:
      properties:
        artifact_id:
          type: string
          title: Artifact Id
          description: Unique identifier for the artifact.
        artifact_name:
          type: string
          title: Artifact Name
          description: Friendly name for the artifact.
        artifact_uri:
          type: string
          title: Artifact Uri
          description: Location (e.g. URI) of the artifact in the data source.
        artifact_uri_public:
          title: Artifact Uri Public
          description: Public Location (e.g. URI) of the artifact in the data source.
          type: string
        status:
          type: string
          title: Status
          description: Status of the artifact.
        status_reason:
          title: Status Reason
          description: Reason for the artifact's status.
          type: string
        source:
          $ref: '#/components/schemas/ArtifactSource'
          description: Data source of the artifact.
        chunks_status:
          $ref: >-
            #/components/schemas/egp_api_backend__server__api__models__egp_models__ChunksStatus
          description: Number of chunks pending, completed, and failed.
        updated_at:
          title: Updated At
          description: Timestamp at which the artifact was last updated.
          type: string
          format: date-time
        tags:
          title: Tags
          description: Tags associated with the artifact.
          additionalProperties: true
          type: object
        chunks:
          items:
            $ref: '#/components/schemas/ArtifactChunk'
          type: array
          title: Chunks
          description: List of chunks associated with the artifact.
      type: object
      required:
        - artifact_id
        - artifact_name
        - artifact_uri
        - status
        - source
        - chunks_status
        - tags
        - chunks
      title: GetKnowledgeBaseV2ArtifactResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ArtifactSource:
      type: string
      enum:
        - S3
        - Confluence
        - SharePoint
        - SharePointPage
        - GoogleDrive
        - GoogleCloudStorage
        - AzureBlobStorage
        - Slack
        - Snowflake
        - Databricks
        - LocalFile
        - LocalChunks
      title: ArtifactSource
    egp_api_backend__server__api__models__egp_models__ChunksStatus:
      properties:
        chunks_completed:
          type: integer
          title: Chunks Completed
          description: Number of chunks uploaded successfully.
        chunks_pending:
          type: integer
          title: Chunks Pending
          description: Number of chunks awaiting upload.
        chunks_failed:
          type: integer
          title: Chunks Failed
          description: Number of chunks that failed upload.
      type: object
      required:
        - chunks_completed
        - chunks_pending
        - chunks_failed
      title: ChunksStatus
    ArtifactChunk:
      properties:
        chunk_id:
          type: string
          title: Chunk Id
          description: Unique ID of the chunk.
        upload_status:
          $ref: >-
            #/components/schemas/egp_api_backend__server__api__models__egp_models__ChunkUploadStatus
          description: Upload status of the chunk.
        status_reason:
          title: Status Reason
          description: Reason for the chunk's upload status.
          type: string
        text:
          type: string
          title: Text
          description: Associated text of the chunk.
        chunk_position:
          type: integer
          title: Chunk Position
          description: Position of the chunk in the artifact.
        embedding:
          title: Embedding
          description: Vector embedding of the chunk's text. Null if not embedded yet.
          items:
            type: number
          type: array
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
          description: Additional metadata associated with the chunk.
          default: {}
        user_supplied_metadata:
          title: User Supplied Metadata
          description: >-
            Additional metadata associated with the chunk generated by custom
            chunking
          default: {}
          additionalProperties: true
          type: object
      type: object
      required:
        - chunk_id
        - upload_status
        - text
        - chunk_position
      title: ArtifactChunk
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
          additionalProperties: true
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    egp_api_backend__server__api__models__egp_models__ChunkUploadStatus:
      type: string
      enum:
        - Embedding
        - Pending
        - Completed
        - Failed
        - Uploading
      title: ChunkUploadStatus
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````