Hugging Face Transformers sql-console API

Get information from SQL Console embeds from a dataset.

OpenAPI Specification

hugging-face-transformers-sql-console-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Hub API Endpoints agentic-provisioning sql-console API
  version: 0.0.1
  description: 'We have open endpoints that you can use to retrieve information from the Hub as well as perform certain actions such as creating model, dataset or Space repos. We offer a wrapper Python client, [`huggingface_hub`](https://github.com/huggingface/huggingface_hub), and a JS client, [`huggingface.js`](https://github.com/huggingface/huggingface.js), that allow easy access to these endpoints. We also provide [webhooks](https://huggingface.co/docs/hub/webhooks) to receive real-time incremental info about repos. Enjoy!


    The base URL for those endpoints below is `https://huggingface.co`. For example, to construct the `/api/models` call below, one can call the URL [https://huggingface.co/api/models](https://huggingface.co/api/models).


    If you''re an Agent, you might prefer the [markdown version OpenAPI spec](https://huggingface.co/.well-known/openapi.md).

    '
servers:
- url: https://huggingface.co
  description: Hub
security:
- bearerAuth: []
tags:
- name: sql-console
  x-displayName: SQL Console
  description: Get information from SQL Console embeds from a dataset.
paths:
  /api/{repoType}/{namespace}/{repo}/sql-console/embed/{id}:
    patch:
      description: Update SQL Console embed
      summary: Update embed
      tags:
      - sql-console
      requestBody:
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              properties:
                title:
                  type: string
                  maxLength: 200
                private:
                  type: boolean
                sql:
                  type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  _id:
                    type: string
                    minLength: 24
                    maxLength: 24
                    pattern: ^[0-9a-f]{24}$
                  repoId:
                    type: string
                    minLength: 24
                    maxLength: 24
                    pattern: ^[0-9a-f]{24}$
                  views:
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                        displayName:
                          type: string
                        viewName:
                          type: string
                      required:
                      - key
                      - displayName
                      - viewName
                      additionalProperties: false
                  sql:
                    type: string
                  title:
                    type: string
                  userId:
                    type: string
                    minLength: 24
                    maxLength: 24
                    pattern: ^[0-9a-f]{24}$
                  createdAt:
                    type: string
                    format: date-time
                    pattern: ^((\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\d|3[01])|(0[469]|11)-(0[1-9]|[12]\d|30)|(02)-(0[1-9]|1\d|2[0-8])))T([01]\d|2[0-3]):[0-5]\d:[0-5]\d(\.\d+)?(Z)$
                  slug:
                    type: string
                  private:
                    type: boolean
                  rating:
                    type: number
                  justification:
                    type: string
                required:
                - _id
                - repoId
                - views
                - sql
                - title
                - userId
                - createdAt
                - slug
                additionalProperties: false
          description: Updated SQL console embed
      parameters:
      - name: repoType
        in: path
        required: true
        schema:
          type: string
          enum:
          - datasets
      - name: namespace
        in: path
        required: true
        schema:
          type: string
      - name: repo
        in: path
        required: true
        schema:
          type: string
      - name: id
        in: path
        required: true
        schema:
          type: string
    delete:
      description: Delete SQL Console embed
      summary: Delete embed
      tags:
      - sql-console
      responses:
        '204':
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties: {}
                additionalProperties: false
          description: SQL console embed deleted successfully
      parameters:
      - name: repoType
        in: path
        required: true
        schema:
          type: string
          enum:
          - datasets
      - name: namespace
        in: path
        required: true
        schema:
          type: string
      - name: repo
        in: path
        required: true
        schema:
          type: string
      - name: id
        in: path
        required: true
        schema:
          type: string
  /api/{repoType}/{namespace}/{repo}/sql-console/embed:
    post:
      description: Create SQL Console embed
      summary: Create embed
      tags:
      - sql-console
      requestBody:
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              properties:
                sql:
                  type: string
                title:
                  type: string
                  maxLength: 200
                private:
                  type: boolean
                views:
                  minItems: 1
                  type: array
                  items:
                    type: object
                    properties:
                      key:
                        type: string
                      displayName:
                        type: string
                      viewName:
                        type: string
                    required:
                    - key
                    - displayName
                    - viewName
              required:
              - sql
              - title
              - views
      responses:
        '200':
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  _id:
                    type: string
                    minLength: 24
                    maxLength: 24
                    pattern: ^[0-9a-f]{24}$
                  repoId:
                    type: string
                    minLength: 24
                    maxLength: 24
                    pattern: ^[0-9a-f]{24}$
                  views:
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                        displayName:
                          type: string
                        viewName:
                          type: string
                      required:
                      - key
                      - displayName
                      - viewName
                      additionalProperties: false
                  sql:
                    type: string
                  title:
                    type: string
                  userId:
                    type: string
                    minLength: 24
                    maxLength: 24
                    pattern: ^[0-9a-f]{24}$
                  createdAt:
                    type: string
                    format: date-time
                    pattern: ^((\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\d|3[01])|(0[469]|11)-(0[1-9]|[12]\d|30)|(02)-(0[1-9]|1\d|2[0-8])))T([01]\d|2[0-3]):[0-5]\d:[0-5]\d(\.\d+)?(Z)$
                  slug:
                    type: string
                  private:
                    type: boolean
                  rating:
                    type: number
                  justification:
                    type: string
                required:
                - _id
                - repoId
                - views
                - sql
                - title
                - userId
                - createdAt
                - slug
                additionalProperties: false
          description: Created SQL console embed
      parameters:
      - name: repoType
        in: path
        required: true
        schema:
          type: string
          enum:
          - datasets
      - name: namespace
        in: path
        required: true
        schema:
          type: string
      - name: repo
        in: path
        required: true
        schema:
          type: string
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer