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

# Artifacts - Generate Client Code

> Generates Python client code to download the Artifact version.



## OpenAPI

````yaml /api-specs/cloud/flyte-extensions-api.yaml get /artifacts/{artifact-id}/versions/{execution-name}/code
openapi: 3.1.0
info:
  contact:
    email: support@dominodatalab.com
    name: Domino Data Lab
    url: https://tickets.dominodatalab.com/hc/en-us
  description: "\n\tAdds a number of extended operations to Flyte in support of retrieving artifact\n\tmetadata and bookmarking artifacts from individual executions."
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  termsOfService: >-
    https://tickets.dominodatalab.com/hc/en-us/articles/360060058871-Service-Level-Agreement
  title: Flyte HTTP Gateway
  version: '0.1'
servers:
  - url: https://mycluster.domino.tech/flows/api/artifacts/v1
    description: Replace 'mycluster.domino.tech' with your Domino cluster hostname.
security: []
paths:
  /artifacts/{artifact-id}/versions/{execution-name}/code:
    get:
      summary: Artifacts - Generate Client Code
      description: Generates Python client code to download the Artifact version.
      operationId: artifacts-client-code-gen-download-artifact-version
      parameters:
        - description: Artifact ID
          in: path
          name: artifact-id
          required: true
          schema:
            description: Artifact ID
            type: string
        - description: Name of the execution that produced the artifact
          in: path
          name: execution-name
          required: true
          schema:
            description: Name of the execution that produced the artifact
            type: string
        - description: >-
            If provided, generated code will download just this file within the
            Artifact
          explode: false
          in: query
          name: file_name
          schema:
            description: >-
              If provided, generated code will download just this file within
              the Artifact
            type: string
        - description: >-
            Local directory to download the Artifact to. If omitted, client code
            uses default.
          explode: false
          in: query
          name: local_dir
          schema:
            description: >-
              Local directory to download the Artifact to. If omitted, client
              code uses default.
            type: string
        - description: Project of the workflow execution that produced the artifact
          explode: false
          in: query
          name: project
          schema:
            description: Project of the workflow execution that produced the artifact
            type: string
        - description: Domain of the workflow execution that produced the artifact
          explode: false
          in: query
          name: domain
          schema:
            description: Domain of the workflow execution that produced the artifact
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientCodeArtifactDownload'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
components:
  schemas:
    ClientCodeArtifactDownload:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - /flows/api/artifacts/v1/schemas/ClientCodeArtifactDownload.json
          format: uri
          readOnly: true
          type: string
        client_code:
          description: Generated client code for downloading artifacts
          type: string
      required:
        - client_code
      type: object
    ErrorModel:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - /flows/api/artifacts/v1/schemas/ErrorModel.json
          format: uri
          readOnly: true
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object

````