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

# Get lineage usage

> Downloads a CSV of every resource that depends on an audience, model,
model column, or trait, directly or through other resources, up to 10
steps away. It lists the resources on the resource's Usage tab, with the
same columns as the tab's CSV download. Requires an API key that belongs
to a workspace admin.



## OpenAPI

````yaml https://api.hightouch.io/api/swagger.json get /lineage/usage
openapi: 3.0.0
info:
  title: Hightouch API
  version: 1.0.0
  description: Hightouch Public Rest API to access syncs, models, sources and destinations
  contact:
    name: Hightouch
    url: https://hightouch.com
servers:
  - url: https://api.hightouch.com/api/v1
security: []
paths:
  /lineage/usage:
    get:
      tags:
        - Lineage
      summary: Get lineage usage
      description: |-
        Downloads a CSV of every resource that depends on an audience, model,
        model column, or trait, directly or through other resources, up to 10
        steps away. It lists the resources on the resource's Usage tab, with the
        same columns as the tab's CSV download. Requires an API key that belongs
        to a workspace admin.
      operationId: GetLineageUsage
      parameters:
        - description: >-
            The type of the resource: "audience", "model", "model_column", or
            "trait"
          in: query
          name: resourceType
          required: true
          schema:
            type: string
        - description: >-
            The ID of the resource. A model column's ID is
            `{modelId}/{columnName}`, for example `12/email`. If the column name
            contains `/` or `%`, URL-encode the name first (`12/a%2Fb`), then
            URL-encode the whole value as usual when sending it.
          in: query
          name: resourceId
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            text/csv:
              schema:
                type: string
                format: byte
              examples:
                Example 1:
                  value: >
                    Root Resource ID,Root Resource Type,Root Resource Name,Root
                    Resource URL,Dependent Resource ID,Dependent Resource
                    Type,Dependent Resource Name,Dependent Resource
                    URL,Depth,Dependency Via ID,Dependency Via Type,Dependency
                    Via Name,Dependency Via URL

                    12,model,Users,https://app.hightouch.com/acme/schema/parent-models/12,34,audience,High-value
                    users,https://app.hightouch.com/acme/audiences/34,1,,,,

                    12,model,Users,https://app.hightouch.com/acme/schema/parent-models/12,56,sync,Braze,https://app.hightouch.com/acme/syncs/56,2,34,audience,High-value
                    users,https://app.hightouch.com/acme/audiences/34
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '422':
          description: Validation Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateErrorJSON'
        '500':
          description: Something went wrong
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
        '503':
          description: Lineage is being recalculated or could not be calculated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LineageUnavailable'
          headers:
            Retry-After:
              schema:
                type: string
              required: false
      security:
        - bearerAuth: []
components:
  schemas:
    ValidateErrorJSON:
      properties:
        message:
          type: string
          enum:
            - Validation failed
          nullable: false
        details:
          properties: {}
          additionalProperties: {}
          type: object
      required:
        - message
        - details
      type: object
      additionalProperties: false
    InternalServerError:
      type: string
      enum:
        - Internal Server Error
      nullable: false
    LineageUnavailable:
      description: Lineage cannot be read right now.
      properties:
        message:
          type: string
        status:
          type: string
          enum:
            - REBUILDING
            - FAILED
          description: >-
            "REBUILDING": lineage is being recalculated, so retry after the
            number of

            seconds in the Retry-After header. "FAILED": lineage could not be

            calculated.
      required:
        - message
        - status
      type: object
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Bearer

````