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

# Get a data asset by id

> Get a data asset by id



## OpenAPI

````yaml /api-reference/bundled.yaml get /v0/data-asset/{id}
openapi: 3.1.0
info:
  title: Gable API
  description: >
    API to interact with the Gable platform

    ## Authorization

    All API requests require an API key to be passed in the `X-API-KEY` header.
    For instructions on finding your API key and api endpoint check out the [API
    Key documentation](../docs/api-keys.md).

    Example: `curl -H "X-API-KEY: <your-api-key>"
    https://api-{organization}.gable.ai/v0/ping`
  contact:
    name: Gable Engineering
    url: https://gable.ai
    email: engineers@gable.ai
  version: 1.28.0
servers:
  - url: https://{hostname}.gable.ai
    description: Gable API
    variables:
      hostname:
        default: demo-api
        description: Customer environment assigned by Gable
security:
  - ApiKeyAuth: []
tags:
  - name: action
  - name: api-keys
  - name: auth
  - name: changelog
  - name: config
  - name: contract
  - name: data-asset
  - name: debug
  - name: s3
  - name: settings
  - name: slack
  - name: sso
  - name: webhook
  - name: notifications
  - name: constraints
  - name: telemetry
  - name: component
  - name: components
  - name: sca
  - name: cross-service-components
  - name: lineage
  - name: events
  - name: measurements
  - name: defect-report
  - name: experimental
paths:
  /v0/data-asset/{id}:
    get:
      tags:
        - data-asset
      summary: Get a data asset by id
      description: Get a data asset by id
      operationId: getDataAsset
      parameters:
        - in: path
          name: id
          schema:
            type: string
            format: uuid
          required: true
          description: UUID of the data asset
      responses:
        '200':
          description: Data asset
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataAsset'
        '404':
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    DataAsset:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier for the data asset.
        dataAssetResourceName:
          $ref: '#/components/schemas/DataAssetResourceName'
        domain:
          description: >-
            The domain to which the data asset belongs. Previously referred to
            as "namespace."
          type: string
        path:
          description: >-
            The name or path identifying the data asset. Previously referred to
            as "name."
          type: string
        type:
          $ref: '#/components/schemas/SourceType'
        contractId:
          description: The contract ID associated with the data asset.
          type: string
        versionDetail:
          $ref: '#/components/schemas/DataAssetVersion'
          description: The version details of the data asset.
        createdAt:
          type: string
          format: date-time
          description: The timestamp of when the data asset was initially created.
        updatedAt:
          type: string
          format: date-time
          description: The timestamp of the most recent update to the data asset.
        deletedAt:
          type: string
          format: date-time
          description: >-
            The timestamp indicating when the data asset was deleted, if
            applicable.
      required:
        - id
        - dataAssetResourceName
        - domain
        - path
        - type
        - versionDetail
        - createdAt
        - updatedAt
    ErrorResponse:
      type: object
      required:
        - message
      properties:
        id:
          type: number
        title:
          type: string
        message:
          type: string
    DataAssetResourceName:
      type: string
      pattern: >-
        ^(protobuf|avro|json_schema|java|postgres|mysql|mssql|snowflake|bigquery|python|pyspark|typescript|s3|dataframe|kotlin|swift|php)://(?=.*[a-zA-Z0-9])[a-zA-Z0-9_@\.:/-]+[:/](?=.*[a-zA-Z0-9])[a-zA-Z0-9
        _\./-\{\}\-]+$
      description: >-
        The unique identifier of the data asset. It follows the pattern
        '{data_asset_type}://{data_asset_source}:{data_asset_name}'
    SourceType:
      type: string
      description: >-
        The type of the source data asset, indicating its source or format
        (e.g., postgres, protobuf).
      enum:
        - postgres
        - mysql
        - mssql
        - json_schema
        - avro
        - protobuf
        - python
        - pyspark
        - typescript
        - java
        - s3
        - dataframe
        - kotlin
        - swift
        - php
        - golang
    DataAssetVersion:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier for the version of the data asset.
        dataAssetId:
          type: string
          format: uuid
          description: >-
            The identifier of the parent data asset to which this version
            belongs.
        description:
          type: string
          description: A brief description of this particular version of the data asset.
        rawSchema:
          type: string
          description: >-
            The raw schema of the data asset from the source system. This can be
            the contents of a schema file or data from the information  schema
            of a database. This is used to regenerate the schema of the data
            asset if needed.
        fields:
          description: The fields of the data asset.
          type: array
          items:
            $ref: '#/components/schemas/DataAssetField'
        createdAt:
          type: string
          format: date-time
          description: The timestamp when this version of the data asset was created.
        updatedAt:
          type: string
          format: date-time
          description: The timestamp when this version of the data asset was last updated.
        deletedAt:
          type: string
          format: date-time
          description: >-
            The timestamp when this version of the data asset was marked as
            deleted, if applicable.
        violations:
          description: List of contract violations associated with the data asset version.
          type: array
          items:
            $ref: '#/components/schemas/ContractViolation'
      required:
        - id
        - dataAssetId
        - fields
        - createdAt
        - updatedAt
        - violations
    DataAssetField:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier for the data asset field.
        dataAssetVersionId:
          type: string
          format: uuid
          description: The identifier of the data asset version this field belongs to.
        name:
          type: string
          description: The name of the field.
        description:
          type: string
          description: A brief description of the field.
        order:
          type: integer
          description: The order or position of the field in the data asset.
        nativeDataType:
          type: string
          description: The native data type of the field in the source system.
        type:
          type: object
          additionalProperties: true
          description: >-
            A custom or specific attribute to represent the Gable type of the
            field.
        displayType:
          type: string
          description: The display name of the field.
        parentFieldId:
          type: string
          format: uuid
          description: For nested fields, this is the ID of the parent field.
        createdAt:
          type: string
          format: date-time
          description: The timestamp when the field was created.
        updatedAt:
          type: string
          format: date-time
          description: The timestamp when the field was last updated.
        deletedAt:
          type: string
          format: date-time
          description: The timestamp when the field was marked as deleted.
        piiCategory:
          $ref: '#/components/schemas/PiiCategoryEnum'
        profile:
          $ref: '#/components/schemas/DataAssetFieldProfile'
      required:
        - id
        - dataAssetVersionId
        - name
        - nativeDataType
        - displayType
        - createdAt
        - updatedAt
        - type
    ContractViolation:
      type: object
      properties:
        contractId:
          description: Unique identifier for the contract in UUID format
          type: string
          format: uuid
        contractVersion:
          description: Version of the contract
          type: string
        contractFieldName:
          description: Field of the contract where violation occured
          type: string
        contractName:
          description: Name of the contract
          type: string
        contractDomain:
          description: Domain of the contract
          type: string
        dataAssetFieldProfileId:
          description: Unique identifier for the data asset field in UUID format
          type: string
          format: uuid
        entityType:
          description: The type of entity that the changelog event is associated with.
          type: string
          enum:
            - DATA_CONTRACT
        eventType:
          description: The type of event that occurred
          type: string
          enum:
            - VIOLATION
        violationType:
          $ref: '#/components/schemas/ContractViolationType'
          description: Type of violation
        dataAssetResourceName:
          $ref: '#/components/schemas/DataAssetResourceName'
        expectedValue:
          description: Expected value of the field
          type: string
        actualValue:
          description: actual value of the field
          type: string
        userId:
          description: Unique identifier for the user in UUID format
          type: string
          format: uuid
        prLink:
          description: Link to the pull request associated with the violation
          type: string
      required:
        - contractId
        - contractVersion
        - violationType
        - dataAssetResourceName
        - contractFieldName
        - entityType
        - expectedValue
        - actualValue
    PiiCategoryEnum:
      type: string
      enum:
        - phone
        - email
        - credit_card
        - address
        - person
        - birth_date
        - gender
        - nationality
        - ssn
        - zip_code
        - po_box
        - user_name
        - password
        - religion
        - sexual_orientation
        - drivers_license
        - passport
        - birth_certificate
        - medicare
        - concession_card
        - fingerprint
        - face_scan
        - bank_details
        - contact_details
        - tax_file_number
      description: type of pii detected in the column name
      nullable: true
    DataAssetFieldProfile:
      oneOf:
        - $ref: '#/components/schemas/DataAssetFieldProfileBoolean'
        - $ref: '#/components/schemas/DataAssetFieldProfileNumber'
        - $ref: '#/components/schemas/DataAssetFieldProfileOther'
        - $ref: '#/components/schemas/DataAssetFieldProfileString'
        - $ref: '#/components/schemas/DataAssetFieldProfileUUID'
        - $ref: '#/components/schemas/DataAssetFieldProfileTemporal'
        - $ref: '#/components/schemas/DataAssetFieldProfileUnion'
        - $ref: '#/components/schemas/DataAssetFieldProfileList'
      discriminator:
        propertyName: profileType
        mapping:
          boolean:
            $ref: '#/components/schemas/DataAssetFieldProfileBoolean'
          number:
            $ref: '#/components/schemas/DataAssetFieldProfileNumber'
          other:
            $ref: '#/components/schemas/DataAssetFieldProfileOther'
          string:
            $ref: '#/components/schemas/DataAssetFieldProfileString'
          uuid:
            $ref: '#/components/schemas/DataAssetFieldProfileUUID'
          temporal:
            $ref: '#/components/schemas/DataAssetFieldProfileTemporal'
          union:
            $ref: '#/components/schemas/DataAssetFieldProfileUnion'
          list:
            $ref: '#/components/schemas/DataAssetFieldProfileList'
    ContractViolationType:
      type: string
      enum:
        - MISSING_REQUIRED_PROPERTY
        - INCOMPATIBLE_TYPE
        - GREATER_THAN
        - GREATER_THAN_OR_EQUAL_TO
        - LESS_THAN
        - LESS_THAN_OR_EQUAL_TO
        - IS_NULL
        - IS_NULL_THRESHOLD
        - IS_NOT_EMPTY
        - LENGTH
        - LENGTH_GREATER_THAN
        - LENGTH_GREATER_THAN_OR_EQUAL_TO
        - LENGTH_LESS_THAN
        - LENGTH_LESS_THAN_OR_EQUAL_TO
        - MISSING_DATA_ASSET
        - PII_DETECTED
    DataAssetFieldProfileBoolean:
      allOf:
        - $ref: '#/components/schemas/DataAssetFieldProfileBase'
        - type: object
          description: Data asset field profile for boolean
          required:
            - profileType
            - trueCount
            - falseCount
          properties:
            profileType:
              type: string
              enum:
                - boolean
            trueCount:
              type: integer
              description: Number of true values
            falseCount:
              type: integer
              description: Number of false values
    DataAssetFieldProfileNumber:
      allOf:
        - $ref: '#/components/schemas/DataAssetFieldProfileBase'
        - type: object
          description: Data asset field profile for number
          required:
            - profileType
            - uniqueCount
            - min
            - max
          properties:
            profileType:
              type: string
              enum:
                - number
            uniqueCount:
              type: integer
              description: Number of unique values
            min:
              type: number
              description: Minimum value
            max:
              type: number
              description: Maximum value
    DataAssetFieldProfileOther:
      allOf:
        - $ref: '#/components/schemas/DataAssetFieldProfileBase'
        - type: object
          description: Data asset field profile for unspecified type
          required:
            - profileType
          properties:
            profileType:
              type: string
              enum:
                - other
    DataAssetFieldProfileString:
      allOf:
        - $ref: '#/components/schemas/DataAssetFieldProfileBase'
        - type: object
          description: Data asset field profile for string
          required:
            - profileType
            - uniqueCount
            - minLength
            - maxLength
            - emptyCount
          properties:
            profileType:
              type: string
              enum:
                - string
            uniqueCount:
              type: integer
              description: Number of unique values
            minLength:
              type: integer
              description: Minimum length
            maxLength:
              type: integer
              description: Maximum length
            emptyCount:
              type: integer
              description: Number of empty values
    DataAssetFieldProfileUUID:
      allOf:
        - $ref: '#/components/schemas/DataAssetFieldProfileBase'
        - type: object
          description: Data asset field profile for a UUID
          required:
            - profileType
            - uniqueCount
            - minLength
            - maxLength
            - emptyCount
          properties:
            profileType:
              type: string
              enum:
                - uuid
            uniqueCount:
              type: integer
              description: Number of unique values
            minLength:
              type: integer
              description: Minimum length
            maxLength:
              type: integer
              description: Maximum length
            emptyCount:
              type: integer
              description: Number of empty values
            format:
              type: string
              description: UUID format
            uuidVersion:
              type: integer
              description: UUID version
    DataAssetFieldProfileTemporal:
      allOf:
        - $ref: '#/components/schemas/DataAssetFieldProfileBase'
        - type: object
          description: Data asset field profile for temporal
          required:
            - profileType
            - min
            - max
            - format
          properties:
            profileType:
              type: string
              enum:
                - temporal
            min:
              type: string
              format: date-time
              description: Minimum value
            max:
              type: string
              format: date-time
              description: Maximum value
            format:
              type: string
              description: Temporal format
    DataAssetFieldProfileUnion:
      allOf:
        - $ref: '#/components/schemas/DataAssetFieldProfileBase'
        - type: object
          description: Data asset field profile for union
          required:
            - profileType
            - profiles
          properties:
            profileType:
              type: string
              enum:
                - union
            profiles:
              type: array
              description: List of constituent data asset field profiles
              items:
                $ref: '#/components/schemas/DataAssetFieldProfile'
    DataAssetFieldProfileList:
      allOf:
        - $ref: '#/components/schemas/DataAssetFieldProfileBase'
        - type: object
          description: Data asset field profile for string
          required:
            - profileType
            - minLength
            - maxLength
          properties:
            profileType:
              type: string
              enum:
                - list
            minLength:
              type: integer
              description: Minimum length
            maxLength:
              type: integer
              description: Maximum length
    DataAssetFieldProfileBase:
      type: object
      description: generic data asset field profile
      required:
        - sampledRecordsCount
        - nullable
        - sampledFiles
        - samplingParameters
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the data asset field profile in UUID format
        sampledRecordsCount:
          type: integer
          description: Number of samples
        nullable:
          type: boolean
          description: Whether the data is nullable
        nullCount:
          type: integer
          description: Number of nulls (only defined if nullable is true)
        sampledFiles:
          type: array
          minItems: 1
          items:
            type: string
          description: List of sampled files
        sampledDate:
          description: The date the sample was taken
          type: string
          format: date-time
        samplingParameters:
          $ref: '#/components/schemas/S3SamplingParameters'
    S3SamplingParameters:
      type: object
      description: The parameters used to sample the data
      required:
        - rowSampleCount
      properties:
        rowSampleCount:
          type: integer
          description: Number of rows sampled per file
        recentFileCount:
          type: integer
          description: Number of most recent files whose schemas are sampled per data asset
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````