versioned_docs/version-0.8.0-incubating/open-api/openapi.yaml [173:540]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
components:

  schemas:

    Audit:
      type: object
      description: Audit information for a Gravitino resource.
      properties:
        creator:
          type: string
          description: The user who created the resource
        createTime:
          type: string
          format: date-time
          description: The time the resource was created
        lastModifier:
          type: string
          description: The user who last modified the resource
        lastModifiedTime:
          type: string
          format: date-time
          description: The time the resource was last modified

    ErrorModel:
      type: object
      description: JSON error payload returned in a response with further details on the error
      required:
        - message
        - type
        - code
      properties:
        code:
          type: integer
          minimum: 1000
          maximum: 1100
          description: HTTP response code
          example: 1002
        type:
          type: string
          description: Internal type definition of the error
        message:
          type: string
          description: A human-readable message
        stack:
          type: array
          items:
            type: string

    NameIdentifier:
      type: object
      description: A identifier for an entity
      required:
        - namespace
        - name
      properties:
        namespace:
          type: array
          description: The namespace of the entity may be with multiple levels
          items:
            type: string
        name:
          type: string
          description: The name of the entity

    NameListResponse:
      type: object
      properties:
        code:
          type: integer
          format: int32
          description: Status code of the response
          enum:
            - 0
        names:
          type: array
          items:
            type: string

  responses:
    EntityListResponse:
      description: A list of entities
      content:
        application/vnd.gravitino.v1+json:
          schema:
            type: object
            properties:
              code:
                type: integer
                format: int32
                description: Status code of the response
                enum:
                  - 0
                example: 0
              identifiers:
                type: array
                description: A list of NameIdentifier objects
                items:
                  $ref: "#/components/schemas/NameIdentifier"
          examples:
            CatalogListResponse:
              $ref: "./catalogs.yaml#/components/examples/CatalogListResponse"
            SchemaListResponse:
              $ref: "./schemas.yaml#/components/examples/SchemaListResponse"
            TableListResponse:
              $ref: "./tables.yaml#/components/examples/TableListResponse"


    BadRequestErrorResponse:
      description:
        Indicates a bad request error. It could be caused by an unexpected request
        body format or other forms of request validation failure, such as invalid json.
        Usually serves application/json content, although in some cases simple text/plain content might
        be returned by the server's middleware.
      content:
        application/vnd.gravitino.v1+json:
          schema:
            $ref: '#/components/schemas/ErrorModel'
          example: {
            "code": 1003,
            "type": "BadRequestException",
            "message": "Malformed request"
          }

    ServerErrorResponse:
      description:
        A server-side problem that might not be addressable from the client
        side. Used for server 5xx errors without more specific documentation in
        individual routes.
      content:
        application/vnd.gravitino.v1+json:
          schema:
            $ref: "#/components/schemas/ErrorModel"
          example: {
            "code": 1002,
            "type": "RuntimeException",
            "message": "Internal Server Error",
            "stack": [
              "java.lang.RuntimeException: Internal Server Error"
            ]
          }

    DropResponse:
      description: Represents a response for a drop operation
      content:
        application/vnd.gravitino.v1+json:
          schema:
            type: object
            properties:
              code:
                type: integer
                format: int32
                description: Status code of the response
                enum:
                  - 0
              dropped:
                type: boolean
                description: Whether the drop operation was successful

    RemoveResponse:
      description: Represents a response for a remove operation
      content:
        application/vnd.gravitino.v1+json:
          schema:
            type: object
            properties:
              code:
                type: integer
                format: int32
                description: Status code of the response
                enum:
                  - 0
              removed:
                type: boolean
                description: Whether the remove operation was successful

    DeleteResponse:
      description: Represents a response for a delete operation
      content:
        application/vnd.gravitino.v1+json:
          schema:
            type: object
            properties:
              code:
                type: integer
                format: int32
                description: Status code of the response
                enum:
                  - 0
              deleted:
                type: boolean
                description: Whether the delete operation was successful

    SetResponse:
      description: Represents a response for a set operation
      content:
        application/vnd.gravitino.v1+json:
          schema:
            type: object
            properties:
              code:
                type: integer
                format: int32
                description: Status code of the response
                enum:
                  - 0
              set:
                type: boolean
                description: Whether the set operation was successful

    BaseResponse:
      description: Represents a response for a base operation
      content:
        application/vnd.gravitino.v1+json:
          schema:
            type: object
            required:
              - code
            properties:
              code:
                type: integer
                format: int32
                description: Status code of the response
                enum:
                  - 0
          example: {
            "code": 0
          }

  parameters:
    metalake:
      name: metalake
      in: path
      description: The name of the metalake
      required: true
      schema:
        type: string

    catalog:
      name: catalog
      in: path
      description: The name of the catalog
      required: true
      schema:
        type: string

    schema:
      name: schema
      in: path
      description: The name of the schema
      required: true
      schema:
        type: string

    table:
      name: table
      in: path
      description: The name of the table
      required: true
      schema:
        type: string

    fileset:
      name: fileset
      in: path
      description: The name of the fileset
      required: true
      schema:
        type: string

    topic:
      name: topic
      in: path
      description: The name of the topic
      required: true
      schema:
        type: string

    model:
      name: model
      in: path
      description: The name of the model
      required: true
      schema:
        type: string

    tag:
      name: tag
      in: path
      description: The name of the tag
      required: true
      schema:
        type: string

    user:
      name: user
      in: path
      description: The name of the user
      required: true
      schema:
        type: string

    group:
      name: group
      in: path
      description: The name of the group
      required: true
      schema:
          type: string
    role:
      name: role
      in: path
      description: The name of the role
      required: true
      schema:
        type: string

    metadataObjectType:
      name: metadataObjectType
      in: path
      description: The type of the metadata object
      required: true
      schema:
        type: string
        enum:
          - "METALAKE"
          - "CATALOG"
          - "SCHEMA"
          - "TABLE"
          - "COLUMN"
          - "FILESET"
          - "TOPIC"
          - "MODEL"
          - "ROLE"
    metadataObjectFullName:
      name: metadataObjectFullName
      in: path
      description: The full name of the metadata object
      required: true
      schema:
        type: string

    force:
      name: force
      in: query
      description: Force the operation to be executed
      required: false
      schema:
        type: boolean
        default: false

  securitySchemes:

    OAuth2WithJWT:
      type: oauth2
      description: OAuth2 with JWT
      flows:
        clientCredentials:
          tokenUrl: https://external-oauth-server.com/token
          scopes:
            serviceAudience: The audience name when Gravitino uses OAuth as the authenticator.

    BasicAuth:
      type: http
      scheme: basic

    KerberosAuth:
      type: http
      scheme: negotiate
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



versioned_docs/version-0.9.0-incubating/open-api/openapi.yaml [176:543]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
components:

  schemas:

    Audit:
      type: object
      description: Audit information for a Gravitino resource.
      properties:
        creator:
          type: string
          description: The user who created the resource
        createTime:
          type: string
          format: date-time
          description: The time the resource was created
        lastModifier:
          type: string
          description: The user who last modified the resource
        lastModifiedTime:
          type: string
          format: date-time
          description: The time the resource was last modified

    ErrorModel:
      type: object
      description: JSON error payload returned in a response with further details on the error
      required:
        - message
        - type
        - code
      properties:
        code:
          type: integer
          minimum: 1000
          maximum: 1100
          description: HTTP response code
          example: 1002
        type:
          type: string
          description: Internal type definition of the error
        message:
          type: string
          description: A human-readable message
        stack:
          type: array
          items:
            type: string

    NameIdentifier:
      type: object
      description: A identifier for an entity
      required:
        - namespace
        - name
      properties:
        namespace:
          type: array
          description: The namespace of the entity may be with multiple levels
          items:
            type: string
        name:
          type: string
          description: The name of the entity

    NameListResponse:
      type: object
      properties:
        code:
          type: integer
          format: int32
          description: Status code of the response
          enum:
            - 0
        names:
          type: array
          items:
            type: string

  responses:
    EntityListResponse:
      description: A list of entities
      content:
        application/vnd.gravitino.v1+json:
          schema:
            type: object
            properties:
              code:
                type: integer
                format: int32
                description: Status code of the response
                enum:
                  - 0
                example: 0
              identifiers:
                type: array
                description: A list of NameIdentifier objects
                items:
                  $ref: "#/components/schemas/NameIdentifier"
          examples:
            CatalogListResponse:
              $ref: "./catalogs.yaml#/components/examples/CatalogListResponse"
            SchemaListResponse:
              $ref: "./schemas.yaml#/components/examples/SchemaListResponse"
            TableListResponse:
              $ref: "./tables.yaml#/components/examples/TableListResponse"


    BadRequestErrorResponse:
      description:
        Indicates a bad request error. It could be caused by an unexpected request
        body format or other forms of request validation failure, such as invalid json.
        Usually serves application/json content, although in some cases simple text/plain content might
        be returned by the server's middleware.
      content:
        application/vnd.gravitino.v1+json:
          schema:
            $ref: '#/components/schemas/ErrorModel'
          example: {
            "code": 1003,
            "type": "BadRequestException",
            "message": "Malformed request"
          }

    ServerErrorResponse:
      description:
        A server-side problem that might not be addressable from the client
        side. Used for server 5xx errors without more specific documentation in
        individual routes.
      content:
        application/vnd.gravitino.v1+json:
          schema:
            $ref: "#/components/schemas/ErrorModel"
          example: {
            "code": 1002,
            "type": "RuntimeException",
            "message": "Internal Server Error",
            "stack": [
              "java.lang.RuntimeException: Internal Server Error"
            ]
          }

    DropResponse:
      description: Represents a response for a drop operation
      content:
        application/vnd.gravitino.v1+json:
          schema:
            type: object
            properties:
              code:
                type: integer
                format: int32
                description: Status code of the response
                enum:
                  - 0
              dropped:
                type: boolean
                description: Whether the drop operation was successful

    RemoveResponse:
      description: Represents a response for a remove operation
      content:
        application/vnd.gravitino.v1+json:
          schema:
            type: object
            properties:
              code:
                type: integer
                format: int32
                description: Status code of the response
                enum:
                  - 0
              removed:
                type: boolean
                description: Whether the remove operation was successful

    DeleteResponse:
      description: Represents a response for a delete operation
      content:
        application/vnd.gravitino.v1+json:
          schema:
            type: object
            properties:
              code:
                type: integer
                format: int32
                description: Status code of the response
                enum:
                  - 0
              deleted:
                type: boolean
                description: Whether the delete operation was successful

    SetResponse:
      description: Represents a response for a set operation
      content:
        application/vnd.gravitino.v1+json:
          schema:
            type: object
            properties:
              code:
                type: integer
                format: int32
                description: Status code of the response
                enum:
                  - 0
              set:
                type: boolean
                description: Whether the set operation was successful

    BaseResponse:
      description: Represents a response for a base operation
      content:
        application/vnd.gravitino.v1+json:
          schema:
            type: object
            required:
              - code
            properties:
              code:
                type: integer
                format: int32
                description: Status code of the response
                enum:
                  - 0
          example: {
            "code": 0
          }

  parameters:
    metalake:
      name: metalake
      in: path
      description: The name of the metalake
      required: true
      schema:
        type: string

    catalog:
      name: catalog
      in: path
      description: The name of the catalog
      required: true
      schema:
        type: string

    schema:
      name: schema
      in: path
      description: The name of the schema
      required: true
      schema:
        type: string

    table:
      name: table
      in: path
      description: The name of the table
      required: true
      schema:
        type: string

    fileset:
      name: fileset
      in: path
      description: The name of the fileset
      required: true
      schema:
        type: string

    topic:
      name: topic
      in: path
      description: The name of the topic
      required: true
      schema:
        type: string

    model:
      name: model
      in: path
      description: The name of the model
      required: true
      schema:
        type: string

    tag:
      name: tag
      in: path
      description: The name of the tag
      required: true
      schema:
        type: string

    user:
      name: user
      in: path
      description: The name of the user
      required: true
      schema:
        type: string

    group:
      name: group
      in: path
      description: The name of the group
      required: true
      schema:
          type: string
    role:
      name: role
      in: path
      description: The name of the role
      required: true
      schema:
        type: string

    metadataObjectType:
      name: metadataObjectType
      in: path
      description: The type of the metadata object
      required: true
      schema:
        type: string
        enum:
          - "METALAKE"
          - "CATALOG"
          - "SCHEMA"
          - "TABLE"
          - "COLUMN"
          - "FILESET"
          - "TOPIC"
          - "MODEL"
          - "ROLE"
    metadataObjectFullName:
      name: metadataObjectFullName
      in: path
      description: The full name of the metadata object
      required: true
      schema:
        type: string

    force:
      name: force
      in: query
      description: Force the operation to be executed
      required: false
      schema:
        type: boolean
        default: false

  securitySchemes:

    OAuth2WithJWT:
      type: oauth2
      description: OAuth2 with JWT
      flows:
        clientCredentials:
          tokenUrl: https://external-oauth-server.com/token
          scopes:
            serviceAudience: The audience name when Gravitino uses OAuth as the authenticator.

    BasicAuth:
      type: http
      scheme: basic

    KerberosAuth:
      type: http
      scheme: negotiate
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



