Tessell Authorization API

The Authorization API from Tessell — 3 operation(s) for authorization.

OpenAPI Specification

tessell-authorization-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Tessell APIs activity-center Authorization API
  contact:
    email: support@tessell.com
    name: Tessell Inc
    url: https://www.tessell.com
  description: Tessell API Documentation
  termsOfService: https://www.tessell.com/terms
  version: '1.0'
servers:
- url: '{server}'
  variables:
    server:
      default: console.tessell.com
tags:
- name: Authorization
paths:
  /iam/authorize:
    post:
      tags:
      - Authorization
      operationId: authorizeApiKey
      security:
      - BearerAuth: []
      parameters:
      - name: tenant-id
        in: header
        description: tenant-id
        required: true
        style: simple
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthorizeApiKeyPayload'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthorizeApiKeyResponse'
        default:
          description: API error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
  /iam/api-keys:
    post:
      tags:
      - Authorization
      operationId: createApiKey
      security:
      - BearerAuth: []
      parameters:
      - name: tenant-id
        in: header
        description: tenant-id
        required: true
        style: simple
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateApiKeyPayload'
      responses:
        '200':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateApiKeyDTO'
        default:
          description: API error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
    get:
      operationId: getApiKeys
      parameters:
      - name: tenant-id
        in: header
        description: tenant-id
        required: true
        style: simple
        schema:
          type: string
      - $ref: '#/components/parameters/pageSize'
      - $ref: '#/components/parameters/pageOffset'
      - $ref: '#/components/parameters/timeZone'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeyApiResponse'
          description: OK
        default:
          description: API error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      summary: Get a list of Tessell Permission
      tags:
      - Authorization
  /iam/api-keys/{label}:
    delete:
      operationId: revokeApiKey
      parameters:
      - $ref: '#/components/parameters/tenantIdMandatory'
      - description: label
        explode: false
        in: path
        name: label
        required: true
        schema:
          type: string
        style: simple
      - name: Authorization
        in: header
        description: Authorization Token
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiStatus'
          description: OK
        '204':
          description: No Content
        default:
          description: API error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      summary: Delete a Tessell api key
      tags:
      - Authorization
components:
  schemas:
    CreateApiKeyPayload:
      title: CreateApiKeyPayload
      type: object
      description: Payload for Creating API Key
      properties:
        label:
          type: string
          description: API key label
          minLength: 1
          maxLength: 256
        description:
          type: string
          description: Description of the API key
          minLength: 0
          maxLength: 512
        maxAge:
          description: Maximum age of the API key in seconds
          type: integer
          format: int64
          default: 0
          minimum: 0
          maximum: 3156000000
        neverExpire:
          type: boolean
          default: false
    apiStatus:
      title: apiStatus
      type: object
      properties:
        status:
          type: string
        message:
          type: string
    ApiError:
      type: object
      description: Common error response object for non 2xx responses
      properties:
        code:
          type: string
          description: Status code for the error response
        message:
          type: string
          description: Error message for API response
        resolution:
          type: string
        timestamp:
          type: string
          format: date-time
        contextId:
          type: string
          description: ContextId of API request
        sessionId:
          type: string
          description: SessionId of API request
        tessellErrorCode:
          type: string
          description: Unique error code specific to Tessell
    ApiKeyDTO:
      type: object
      description: This is a definition for Tessell API key DTO object
      title: ApiKeyDTO
      properties:
        id:
          type: string
          format: uuid
          description: Tessell created unique uuid
        label:
          description: Label of the key
          type: string
        description:
          description: Description of the key
          type: string
        neverExpire:
          type: boolean
          default: false
        status:
          $ref: '#/components/schemas/ApiKeyStatus'
        dateCreated:
          type: string
          description: Date when the feature is created  metadata
          format: date-time
        dateLastUsed:
          type: string
          description: Date when the API key was last used
          format: date-time
        dateExpiry:
          type: string
          description: Expire date of the API key
          format: date-time
    apiPaginationInfo:
      title: apiPaginationInfo
      type: object
      properties:
        pageSize:
          type: integer
          format: int32
        pageOffset:
          type: integer
          format: int32
    ApiKeyStatus:
      title: ApiKeyStatus
      type: string
      description: This is a definition for Tessell API key status object
      enum:
      - ACTIVE
      - REVOKED
      - EXPIRED
    CreateApiKeyDTO:
      type: object
      description: This is a definition for Tessell API key DTO object
      title: CreateApiKeyDTO
      properties:
        id:
          type: string
          format: uuid
          description: Tessell created unique uuid
        label:
          description: Label of the key
          type: string
        apiKey:
          description: Hashed API key
          type: string
        description:
          description: Description of the key
          type: string
        neverExpire:
          type: boolean
          default: false
        dateCreated:
          type: string
          description: Date when the feature is created  metadata
          format: date-time
        dateLastUsed:
          type: string
          description: Date when the API key was last used
          format: date-time
        dateExpiry:
          type: string
          description: Expire date of the API key
          format: date-time
    ApiKeyApiResponse:
      title: ApiKeyApiResponse
      type: object
      properties:
        metadata:
          $ref: '#/components/schemas/apiMetadata'
        response:
          type: array
          items:
            $ref: '#/components/schemas/ApiKeyDTO'
    apiMetadata:
      title: apiMetadata
      type: object
      properties:
        timeZone:
          type: string
        records:
          type: integer
          format: int32
        pagination:
          $ref: '#/components/schemas/apiPaginationInfo'
    AuthorizeApiKeyPayload:
      title: AuthorizeApiKeyPayload
      type: object
      description: Payload for access token from API Key
      properties:
        apiKey:
          type: string
          description: API key
    AuthorizeApiKeyResponse:
      title: AuthorizeApiKeyResponse
      type: object
      description: Response for access token from API Key
      properties:
        accessToken:
          type: string
          description: access token
  parameters:
    timeZone:
      name: time-zone
      in: query
      description: Timezone for return data
      required: false
      schema:
        type: string
        default: UTC
    pageSize:
      name: page-size
      in: query
      description: Page size for get query
      required: false
      schema:
        type: integer
        format: int32
        default: 10
    pageOffset:
      name: page-offset
      in: query
      description: Page offset for get query
      required: false
      schema:
        type: integer
        format: int32
        default: 0
    tenantIdMandatory:
      name: tenant-id
      in: header
      description: Id of the Tenant
      required: true
      schema:
        type: string
        minLength: 1
        maxLength: 128
        example: 12345678-abcd-1234-abcd-1234abcd5678
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer