Skip to main content

getLiftInfo API Endpoint

Overview

The getLiftInfo endpoint retrieves information about a specific lift, including its lift operating panel (LOP) and car operating panel (COP) devices. The endpoint requires a valid API key for authorization.

Base URL

Endpoint

https://api-lygrxayxsa-uc.a.run.app

Path Parameters

  • liftId (string): The ID of the lift for which information is requested.

Request Headers

  • Authorization (string): The API key for accessing the endpoint. This should be included in the Authorization header.

Response

Success (200)

On a successful request, the response will contain the lift information, including its LOP and COP devices.

  • Status Code: 200 OK
  • Response Body:
    {
    "liftId": "12345",
    "numberOfFloors": 2,
    "lopDevices": [
    {
    "name": "lop1",
    "address": "A0:B1:C2:D3:E4",
    "service_uuid": "12345",
    "char_uuid": "12345"
    },
    {
    "name": "lop2",
    "address": "A0:B1:C2:D3:E4",
    "service_uuid": "12345",
    "char_uuid": "12345"
    }
    ],
    "copDevice": {
    "name": "lop2",
    "address": "A0:B1:C2:D3:E4",
    "service_uuid": "12345",
    "char_uuid": "12345"
    }
    }

Errors

  • Missing Authorization Header:

    • Status Code: 401 Unauthorized
    • Response Body:
      {
      "message": "Missing Authorization header. Access Denied"
      }
  • Invalid API Key:

    • Status Code: 401 Unauthorized
    • Response Body:
      {
      "message": "Invalid API Key. Access Denied"
      }
  • Lift Not Found:

    • Status Code: 404 Not Found
    • Response Body:
      {
      "message": "Lift not found"
      }
  • Internal Server Error:

    • Status Code: 500 Internal Server Error
    • Response Body:
      {
      "message": "Internal Server Error"
      }

Try it out!

We have set up an example lift for you to try

curl -X GET 'https://api-av5vhokaxq-uc.a.run.app/api/lifts/12345/info' -H 'Authorization: Bearer 12345'