NewAPI2

LIXI2 Open API Specification

LIXI2 OpenAPI Specification

Posted on: November 3, 2020



LIXI has developed an OpenAPI specification (v3) that defines an API endpoint that accepts a LIXI2 message (XML or JSON) in the payload and returns a LIXI2 message (XML or JSON) in response. We have deployed a demo API based on this specification that demonstrates a range of submissions and responses that you can try out for yourself. This API has been designed for specifically for third-party integrations, rather than internal implementations where you will be more likely to expose detail within the LIXI message as different rest endpoint resources or using GraphQL.

The specification makes third party data integrations using LIXI2 incredibly easy - it can be used by a client to submit a LIXI2 payload to the API using one of many available tools. The specification includes the URL of the LIXI Demo API (https://tq37v46y73.execute-api.ap-southeast-2.amazonaws.com/api/). You can submit messages to this API to see the kinds of responses you would expect.


Getting Started with the LIXI2 Demo API

LIXI Viewer & Editor

Open the LIXI2 Editor and Viewer for the relevant standard CAL 2.6.32, VAL 0.1.3, DAS 2.2.32 or CNZ 2.1.5, and a call to the API is embedded in the form. Just enter your API Key and you can use the Viewer and Editor to create a LIXI message and send it to the Demo API.

Swagger Online Editor

The LIXI2 OpenAPI specification can be copied into the Swagger Online Editor and by simply updating the embedded URL to the address of your API endpoint, and using the right API-Key, a user can submit a LIXI Package.

Postman

Postman offers a range of API testing tools, so we have published a LIXI2 Postman collection in our LIXILab repository here. Simply configure your environment with the URL and the API Key and you're done.


Here is the specification - we appreciate any feedback from the LIXI community.

openapi: 3.0.3
info:
  title: LIXI2 Open API
  description: LIXI2 Open API Standard Specification
  version: 0.0.1
servers:
  - url: https://tq37v46y73.execute-api.ap-southeast-2.amazonaws.com/api/
    description: Demo server (non-production) 
paths:
  /submit:
    post:
      description: Submit a LIXI package
      operationId: submit
      parameters:
      - description: The API key associated with this API 
        in: header
        name: x-api-key
        required: true
        schema:
          type: string
      requestBody:
        description: Submit a LIXI Package
        required: true
        content:
          application/xml:
            schema:
              "$ref": "#/components/schemas/Package"
          application/json:
            schema:
              "$ref": "#/components/schemas/JSONPackage"
      responses:
        '200':    
          description: LIXI Package has been submitted successfully
          content:
            application/xml:
              schema:
                "$ref": "#/components/schemas/Package"
            application/json:
              schema:
                "$ref": "#/components/schemas/JSONPackage"
        '400':
          description: Package has been submitted but an error has occured
          content:
            application/xml:
              schema:
                "$ref": "#/components/schemas/Package"
            application/json:
              schema:
                "$ref": "#/components/schemas/JSONPackage"
        '415':
          description: Unsupported Media Type
components:
  schemas:
    Package:
      type: object
    JSONPackage:
      type: object
      properties:
        Package:
          type: object



Written by:
John Matthews, LIXI Technical Lead
Published: November 3, 2020