Lightdash Parameters API

The Parameters API from Lightdash — 2 operation(s) for parameters.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

lightdash-parameters-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Lightdash AiAgents Parameters API
  version: 0.3156.1
  description: 'Open API documentation for all public Lightdash API endpoints. # Authentication Before you get started, you might need to create a Personal Access Token to authenticate via the API. You can create a token by following this guide: https://docs.lightdash.com/references/personal_tokens

    '
  license:
    name: MIT
  contact:
    name: Lightdash Support
    email: support@lightdash.com
    url: https://docs.lightdash.com/help-and-contact/contact/contact_info/
servers:
- url: /
tags:
- name: Parameters
paths:
  /api/v2/projects/{projectUuid}/parameters/list:
    get:
      operationId: getProjectParametersList
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiSuccess_ApiGetProjectParametersListResults_'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorPayload'
      description: Get a paginated list of project parameters with search and sorting capabilities.
      summary: List project parameters
      tags:
      - Parameters
      security: []
      parameters:
      - in: path
        name: projectUuid
        required: true
        schema:
          type: string
      - in: query
        name: search
        required: false
        schema:
          type: string
      - in: query
        name: sortBy
        required: false
        schema:
          type: string
          enum:
          - name
      - in: query
        name: sortOrder
        required: false
        schema:
          type: string
          enum:
          - asc
          - desc
      - in: query
        name: page
        required: false
        schema:
          format: double
          type: number
      - in: query
        name: pageSize
        required: false
        schema:
          format: double
          type: number
  /api/v2/projects/{projectUuid}/parameters:
    get:
      operationId: getProjectParameters
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiSuccess_ApiGetProjectParametersResults_'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorPayload'
      description: Get project parameters by names
      summary: Get project parameters
      tags:
      - Parameters
      security: []
      parameters:
      - in: path
        name: projectUuid
        required: true
        schema:
          type: string
      - in: query
        name: names
        required: false
        schema:
          type: array
          items:
            type: string
    put:
      operationId: replaceProjectParameters
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiSuccess_undefined_'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorPayload'
      description: Replace all project parameters
      summary: Replace project parameters
      tags:
      - Parameters
      security: []
      parameters:
      - in: path
        name: projectUuid
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Record_string.LightdashProjectParameter_'
components:
  schemas:
    ParameterValue:
      anyOf:
      - type: string
      - type: number
        format: double
      - items:
          type: string
        type: array
      - items:
          type: number
          format: double
        type: array
    ApiSuccess_ApiGetProjectParametersListResults_:
      properties:
        results:
          $ref: '#/components/schemas/ApiGetProjectParametersListResults'
        status:
          type: string
          enum:
          - ok
          nullable: false
      required:
      - results
      - status
      type: object
    ApiSuccess_ApiGetProjectParametersResults_:
      properties:
        results:
          $ref: '#/components/schemas/ApiGetProjectParametersResults'
        status:
          type: string
          enum:
          - ok
          nullable: false
      required:
      - results
      - status
      type: object
    KnexPaginatedData_ProjectParameterSummary-Array_:
      properties:
        pagination:
          allOf:
          - $ref: '#/components/schemas/KnexPaginateArgs'
          - properties:
              totalResults:
                type: number
                format: double
              totalPageCount:
                type: number
                format: double
            required:
            - totalResults
            - totalPageCount
            type: object
        data:
          items:
            $ref: '#/components/schemas/ProjectParameterSummary'
          type: array
      required:
      - data
      type: object
    ProjectParameterSummary:
      properties:
        modelName:
          type: string
        source:
          type: string
          enum:
          - config
          - model
        config:
          $ref: '#/components/schemas/LightdashProjectParameter'
        name:
          type: string
      required:
      - source
      - config
      - name
      type: object
    AnyType:
      description: 'This AnyType is an alias for any

        The goal is to make it easier to identify any type in the codebase

        without having to eslint-disable all the time

        These are only used on legacy `any` types, don''t use it for new types.

        This is added on a separate file to avoid circular dependencies.'
    ApiErrorPayload:
      properties:
        error:
          properties:
            data:
              $ref: '#/components/schemas/AnyType'
              description: Optional data containing details of the error
            message:
              type: string
              description: A friendly message summarising the error
            name:
              type: string
              description: Unique name for the type of error
            statusCode:
              type: number
              format: integer
              description: HTTP status code
          required:
          - name
          - statusCode
          type: object
        status:
          type: string
          enum:
          - error
          nullable: false
      required:
      - error
      - status
      type: object
      description: 'The Error object is returned from the api any time there is an error.

        The message contains'
    ApiGetProjectParametersListResults:
      $ref: '#/components/schemas/KnexPaginatedData_ProjectParameterSummary-Array_'
    Record_string.LightdashProjectParameter_:
      properties: {}
      additionalProperties:
        $ref: '#/components/schemas/LightdashProjectParameter'
      type: object
      description: Construct a type with a set of properties K of type T
    ParameterDefinitions:
      $ref: '#/components/schemas/Record_string.LightdashProjectParameter_'
    KnexPaginateArgs:
      properties:
        page:
          type: number
          format: double
        pageSize:
          type: number
          format: double
      required:
      - page
      - pageSize
      type: object
    ApiSuccess_undefined_:
      properties:
        results: {}
        status:
          type: string
          enum:
          - ok
          nullable: false
      required:
      - status
      type: object
    ApiGetProjectParametersResults:
      $ref: '#/components/schemas/ParameterDefinitions'
    LightdashProjectParameter:
      properties:
        options_from_dimension:
          properties:
            dimension:
              type: string
            model:
              type: string
          required:
          - dimension
          - model
          type: object
        options:
          anyOf:
          - items:
              type: string
            type: array
          - items:
              type: number
              format: double
            type: array
        allow_custom_values:
          type: boolean
        multiple:
          type: boolean
        default:
          $ref: '#/components/schemas/ParameterValue'
        type:
          type: string
          enum:
          - string
          - number
          - date
        description:
          type: string
        label:
          type: string
      required:
      - label
      type: object
  securitySchemes:
    session_cookie:
      type: apiKey
      in: cookie
      name: connect.sid
    api_key:
      type: apiKey
      in: header
      name: Authorization
      description: Value should be 'ApiKey <your key>'