Metabase Collections API

Organize dashboards, questions, and pulses.

OpenAPI Specification

metabase-collections-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Metabase Cards Collections API
  description: The Metabase API provides programmatic access to Metabase, an open source business intelligence and analytics platform. It allows developers to manage dashboards, questions (cards), collections, databases, users, permissions, and to execute queries against connected data sources.
  version: '1.0'
  contact:
    name: Metabase
    url: https://www.metabase.com
  license:
    name: AGPL-3.0
    url: https://www.gnu.org/licenses/agpl-3.0.html
servers:
- url: https://your-metabase-instance.com/api
  description: Self-hosted or cloud Metabase instance
security:
- ApiKeyAuth: []
- SessionAuth: []
tags:
- name: Collections
  description: Organize dashboards, questions, and pulses.
paths:
  /collection:
    get:
      tags:
      - Collections
      summary: List collections
      responses:
        '200':
          description: A list of collections.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Collection'
    post:
      tags:
      - Collections
      summary: Create a collection
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CollectionInput'
      responses:
        '200':
          description: Collection created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Collection'
  /collection/{id}:
    get:
      tags:
      - Collections
      summary: Get a collection
      parameters:
      - $ref: '#/components/parameters/IdParam'
      responses:
        '200':
          description: A collection.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Collection'
components:
  parameters:
    IdParam:
      in: path
      name: id
      required: true
      schema:
        type: integer
  schemas:
    CollectionInput:
      type: object
      required:
      - name
      properties:
        name:
          type: string
        description:
          type: string
        parent_id:
          type: integer
          nullable: true
    Collection:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        slug:
          type: string
        description:
          type: string
        parent_id:
          type: integer
          nullable: true
        archived:
          type: boolean
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
    SessionAuth:
      type: apiKey
      in: header
      name: X-Metabase-Session