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

# Get a billing datasource



## OpenAPI

````yaml /api-reference/openapi.json get /terraform/billingDatasources/{id}
openapi: 3.0.0
info:
  title: Costory
  version: '1.0'
  description: API Documentation
servers:
  - url: https://app-api.costory.io
security: []
paths:
  /terraform/billingDatasources/{id}:
    get:
      tags:
        - Admin Billing Datasources
      summary: Get a billing datasource
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
      responses:
        '200':
          description: Billing datasource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminBillingDatasourceRead'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
      security:
        - bearerAuth: []
        - apiKeyAuth: []
components:
  schemas:
    AdminBillingDatasourceRead:
      oneOf:
        - type: object
          properties:
            name:
              type: string
            type:
              type: string
              enum:
                - GCP
            bqUri:
              type: string
            startDate:
              type: string
              nullable: true
              format: date-time
            endDate:
              type: string
              nullable: true
              format: date-time
            isDetailedBilling:
              type: boolean
            status:
              type: string
          required:
            - name
            - type
            - bqUri
        - type: object
          properties:
            name:
              type: string
            type:
              type: string
              enum:
                - Azure
            storageAccountName:
              type: string
            containerName:
              type: string
            actualsPath:
              type: string
            amortizedPath:
              type: string
            status:
              type: string
          required:
            - name
            - type
            - storageAccountName
            - containerName
            - actualsPath
        - type: object
          properties:
            name:
              type: string
            type:
              type: string
              enum:
                - AWS
            bucketName:
              type: string
            roleArn:
              type: string
            prefix:
              type: string
            eksSplitDataEnabled:
              type: boolean
              default: false
            startDate:
              type: string
              nullable: true
              format: date-time
            endDate:
              type: string
              nullable: true
              format: date-time
            eksSplit:
              type: boolean
            status:
              type: string
          required:
            - name
            - type
            - bucketName
            - roleArn
            - prefix
        - type: object
          properties:
            name:
              type: string
            type:
              type: string
              enum:
                - Cursor
            bqTableUri:
              type: string
            startDate:
              type: string
              nullable: true
              format: date-time
            endDate:
              type: string
              nullable: true
              format: date-time
            status:
              type: string
          required:
            - name
            - type
            - bqTableUri
        - type: object
          properties:
            name:
              type: string
            type:
              type: string
              enum:
                - Anthropic
            bqTableUri:
              type: string
            startDate:
              type: string
              nullable: true
              format: date-time
            endDate:
              type: string
              nullable: true
              format: date-time
            status:
              type: string
          required:
            - name
            - type
            - bqTableUri
        - type: object
          properties:
            name:
              type: string
            type:
              type: string
              enum:
                - ElasticCloud
            bqTableUri:
              type: string
            startDate:
              type: string
              nullable: true
              format: date-time
            status:
              type: string
          required:
            - name
            - type
            - bqTableUri
        - type: object
          properties:
            name:
              type: string
            type:
              type: string
              enum:
                - ClickHouseCloud
            bqTableUri:
              type: string
            startDate:
              type: string
              nullable: true
              format: date-time
            status:
              type: string
          required:
            - name
            - type
            - bqTableUri
      discriminator:
        propertyName: type
    Unauthorized:
      type: object
      properties:
        error:
          type: string
          description: Unauthorized error message
      required:
        - error
    NotFound:
      type: object
      properties:
        error:
          type: string
          description: Resource not found error code
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT or Clerk ak_* API key
      description: >-
        Send `Authorization: Bearer <credential>` using either a Clerk session
        JWT or a Clerk API key (`ak_*`). API keys may identify a user (`user_*`)
        or organization (`org_*`) principal and are generated in the Clerk
        Dashboard under API keys.
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-token
      description: >-
        API token for authentication (or Admin API key). The token is scoped per
        organization and can be retrieved in the Organization Switcher.

````