Lithium Khorosapi API

The Khorosapi API from Lithium — 1 operation(s) for khorosapi.

OpenAPI Specification

lithium-khorosapi-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: agent-states-api-v2 AccountSet Khorosapi API
  version: '1.1'
servers:
- url: https://{instance}.response.lithium.com/api/v2/agentstate
  variables:
    instance:
      default: instance
security:
- {}
tags:
- name: Khorosapi
paths:
  /khorosapi/ownerId/{ownerId}:
    get:
      summary: Return entity JWT status
      description: Return whether a JWT exists for an entity
      operationId: tokenskhorosapiowneridownerid-get
      parameters:
      - name: ownerId
        in: path
        description: The owner of the token (this is the `appId` provided in the registration payload)
        schema:
          type: string
        required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: "{\n    \"status\": \"success\",\n    \"data\": {\n        \"token\": \"<JWT>\",\n        \"expiresAtMillis: \": 1557163788687\n    }\n}\n\n"
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      token:
                        type: string
                        example: <JWT>
                      'expiresAtMillis: ':
                        type: integer
                        example: 1557163788687
                        default: 0
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
      security: []
      x-readme:
        code-samples:
        - language: curl
          code: 'curl -u username:password -XGET \

            ''https://your.response.instance.com/api/v2/tokens/khorosapi/ownerId/[OWNER ID]'' \

            '
        samples-languages:
        - curl
      tags:
      - Khorosapi
    post:
      summary: Create JWT token
      description: Generate a JWT token
      operationId: tokenskhorosapiowneridownerid-post
      parameters:
      - name: ownerId
        in: path
        description: The owner of the token (this is the `appId` provided in the registration payload)
        schema:
          type: string
        required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: "{  \n  \"status\":\"success\",\n  \"data\":{  \n    \"token\":\"<JWT>\",\n    \"expiresAtMillis: \":1557163788687\n  }\n}"
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      token:
                        type: string
                        example: <JWT>
                      'expiresAtMillis: ':
                        type: integer
                        example: 1557163788687
                        default: 0
        '401':
          description: '401'
          content:
            application/json:
              examples:
                Result:
                  value: "{\n    \"status\": \"fail\",\n    \"message\": \"Unauthorized\"\n}"
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: fail
                  message:
                    type: string
                    example: Unauthorized
        '409':
          description: '409'
          content:
            application/json:
              examples:
                Result:
                  value: "{\n  \"status\":\"fail\",\n  \"message\":\"A token at this path already exists.\"\n}\n"
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: fail
                  message:
                    type: string
                    example: A token at this path already exists.
      deprecated: false
      security: []
      x-readme:
        code-samples:
        - language: curl
          code: 'curl -u username:password -XPOST \

            https://[SERVER URL]/api/v2/tokens/khorosapi/ownerId/[OWNER ID] \

            '
        samples-languages:
        - curl
      tags:
      - Khorosapi
x-readme:
  headers: []
  explorer-enabled: false
  proxy-enabled: false
x-readme-fauxas: true