> ## 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.

# List Tracked Artifacts

> ### Description
List all artifacts tracked by a knowledge base.

### Details
This API can be used to list all artifacts that are currently tracked in a knowledge base.         This API will return the details of all artifacts including their IDs, names, the source they         originated from, their current upload statuses, and the timestamps for their creation and
last-updated time.

This list should be consistent with the state of the data source at the time of start of the         latest upload. If the state is not consistent, create a new upload to update the knowledge         base to reflect the latest state of the data source.



## OpenAPI

````yaml https://app.stainlessapi.com/api/spec/documented/sgp/openapi.yml get /v4/knowledge-bases/{knowledge_base_id}/artifacts
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:
    get:
      tags:
        - Knowledge Bases
      summary: List Tracked Artifacts
      description: >-
        ### Description

        List all artifacts tracked by a knowledge base.


        ### Details

        This API can be used to list all artifacts that are currently tracked in
        a knowledge base.         This API will return the details of all
        artifacts including their IDs, names, the source they         originated
        from, their current upload statuses, and the timestamps for their
        creation and

        last-updated time.


        This list should be consistent with the state of the data source at the
        time of start of the         latest upload. If the state is not
        consistent, create a new upload to update the knowledge         base to
        reflect the latest state of the data source.
      operationId: GET-V4-/knowledge-bases/{knowledge_base_id}/artifacts
      parameters:
        - name: knowledge_base_id
          in: path
          required: true
          schema:
            type: string
            title: Knowledge Base Id
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - $ref: >-
                  #/components/schemas/egp_api_backend__server__api__models__egp_models__ArtifactUploadStatus
              - type: 'null'
            description: >-
              Get artifacts only with the specified status. Accepted values are:
              Pending, Completed, Failed, Uploading, Deleting
            title: Status
          description: >-
            Get artifacts only with the specified status. Accepted values are:
            Pending, Completed, Failed, Uploading, Deleting
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            description: >-
              Page number for pagination to be returned by the given endpoint.
              Starts at page 1
            default: 1
            title: Page
          description: >-
            Page number for pagination to be returned by the given endpoint.
            Starts at page 1
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 10000
            minimum: 1
            description: >-
              Maximum number of artifacts to be returned by the given endpoint.
              Defaults to 100 and cannot be greater than 10k.
            default: 100
            title: Limit
          description: >-
            Maximum number of artifacts to be returned by the given endpoint.
            Defaults to 100 and cannot be greater than 10k.
        - 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/PaginatedArtifactInfo'
        '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
            )
            page = client.knowledge_bases.artifacts.list(
                knowledge_base_id="knowledge_base_id",
            )
            page = page.items[0]
            print(page.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\tpage, err := client.KnowledgeBases.Artifacts.List(\n\t\tcontext.TODO(),\n\t\t\"knowledge_base_id\",\n\t\tsgp.KnowledgeBaseArtifactListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n"
components:
  schemas:
    egp_api_backend__server__api__models__egp_models__ArtifactUploadStatus:
      type: string
      enum:
        - Pending
        - Completed
        - Failed
        - Uploading
        - Deleting
      title: ArtifactUploadStatus
    PaginatedArtifactInfo:
      properties:
        items:
          items:
            $ref: >-
              #/components/schemas/egp_api_backend__server__internal__entities__ArtifactInfo
          type: array
          title: Items
          description: The data returned for the current page.
        total_item_count:
          type: integer
          title: Total Item Count
          description: The total number of items of the query
        current_page:
          type: integer
          title: Current Page
          description: The current page number.
        items_per_page:
          type: integer
          title: Items Per Page
          description: The number of items per page.
      type: object
      required:
        - items
        - total_item_count
        - current_page
        - items_per_page
      title: PaginatedArtifactInfo
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    egp_api_backend__server__internal__entities__ArtifactInfo:
      properties:
        artifact_id:
          title: Artifact Id
          type: string
        artifact_name:
          type: string
          title: Artifact Name
        artifact_uri:
          type: string
          title: Artifact Uri
        artifact_uri_public:
          title: Artifact Uri Public
          type: string
        status:
          $ref: >-
            #/components/schemas/egp_api_backend__server__internal__entities__ArtifactUploadStatus
        status_reason:
          title: Status Reason
          type: string
        source:
          $ref: '#/components/schemas/DataSource'
        chunks_status:
          $ref: >-
            #/components/schemas/egp_api_backend__server__internal__entities__ChunksStatus
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          title: Updated At
          type: string
          format: date-time
        tags:
          title: Tags
          additionalProperties: true
          type: object
      type: object
      required:
        - artifact_id
        - artifact_name
        - artifact_uri
        - status
        - source
        - chunks_status
      title: ArtifactInfo
    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__internal__entities__ArtifactUploadStatus:
      type: string
      enum:
        - Pending
        - Chunking
        - Uploading
        - Completed
        - Failed
        - Deleting
        - Canceled
        - Embedding
      title: ArtifactUploadStatus
    DataSource:
      type: string
      enum:
        - S3
        - SharePoint
        - SharePointPage
        - LocalFile
        - LocalChunks
        - GoogleDrive
        - AzureBlobStorage
        - GoogleCloudStorage
        - Confluence
        - Slack
        - Snowflake
        - Databricks
        - SQLDatabase
        - MongoDB
        - BigQuery
      title: DataSource
    egp_api_backend__server__internal__entities__ChunksStatus:
      properties:
        chunks_completed:
          type: integer
          title: Chunks Completed
        chunks_pending:
          type: integer
          title: Chunks Pending
        chunks_failed:
          type: integer
          title: Chunks Failed
      type: object
      required:
        - chunks_completed
        - chunks_pending
        - chunks_failed
      title: ChunksStatus
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````