Lightelligence API (1.0.0)

Download OpenAPI specification:Download

API Specification of OSRAM Lightelligence

Authentication

oAuthSample

Security scheme type: OAuth2
authorizationCode OAuth Flow
Authorization URL: https://id.lightelligence.io/v1/id/auth/realms/olt/protocol/openid-connect/auth
Token URL: https://id.lightelligence.io/v1/id/auth/realms/olt/protocol/openid-connect/token
Scopes:

    bearerAuth

    Security scheme type: HTTP
    HTTP Authorization Scheme bearer

    oauth

    Get basic realm info

    Get basic realm info. This includes the public key, which can be used to ensure a JWT was correctly signed by this idp (identity provider). The provided public_key is not PEM encoded, so for JWT verification it still needs PEM padding. To verify any issued JWT the key can be padded like:

    -----BEGIN PUBLIC KEY-----
    {{ACTUAL KEY}}
    -----END PUBLIC KEY-----

    olt-permissions: []
    Authorizations:

    Responses

    200

    Success

    500

    Internal Server Error response

    get /id/auth/realms/olt

    OAuth2 Production Environment

    https://id.lightelligence.io/v1/id/auth/realms/olt

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "public_key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjD3labyD/J7o6CWrWSbrDg90nY9YD40dAG1IJVixKxHIZc1u/yOUWHFSeGUlf39cuMKZuj82wJpHKuFLDnh/B9ckvq93VebEHtOwv/P1KavaSimoyZQ49k+K3sRX+6zTY0/udK9S+hKQfJOjmFRXM515efUYJyJ5gBgCvw16RAEgDE2IhfXUf6trcOwiJj2OBvIglutup4iSO99SFmMoY+23MQ0zU9fGTx7vbcygBJAhbnHQlFElPCo6pqWpuAl5Wi7xaddIFG7apRESNKFZBJHzLV2JQac/arCMJOX3HRTK19dZpasLbUJ9lwj7XLT8Kk7h9FdBX4ImD+aTryF6CQIDAQAB"
    }

    Get authorization code

    This is the URL endpoint for the Authorization Code Flow to get a temporary code to later exchange for a token. Use this code with the /token endpoint to get a user token.

    Userinfo: provide optional scopes email profile to include more user information in authentication session.
    Next step is to exchange the authorization code for a token at GET /protocol/openid-connect/token

    olt-permissions: []
    Authorizations:
    Request Body schema: application/x-www-form-urlencoded
    client_id
    required
    string

    The ID of the OAuth2 client

    redirect_uri
    required
    string <uri>

    Valid redirect uri for the current client

    scope
    required
    string

    Space delimited list of scopes. When requesting an access token the scope openid must be used to ensure the responding access_token is fully valid.
    Optional scopes:
    email - includes email in auth session.
    profile - includes profile info (eg firstname, lastname) in auth session.

    response_type
    required
    string
    Value: "code"

    Response type for auth grant flow

    response_mode
    required
    string
    Enum: "form_post" "query" "fragment"

    Define how the response should be returned

    nonce
    string

    Required if using "response_mode=form_post"

    Responses

    200

    Success, callback to redirect_uri

    400

    Bad Request response.

    500

    Internal Server Error response

    post /id/auth/realms/olt/protocol/openid-connect/auth

    OAuth2 Production Environment

    https://id.lightelligence.io/v1/id/auth/realms/olt/protocol/openid-connect/auth

    Get access token

    Openid endpoint to get an access token. Based on the grant_type different flows work here.

    When using refresh_token as grant_type the new returned access token will be scoped with the same tenant as the previous one. Optionally the header tenant can be used to obtain a new access token for the user with a different tenant. This may not always work (the user might not be part of the tenant, the application might not be installed to the tenant or other reasons can forbid this operation).

    Tip: Get user information by exchanging the token for userinfo at GET /protocol/openid-connect/userinfo

    olt-permissions: []
    Authorizations:
    header Parameters
    tenant
    string <uuid>

    Set the tenant the token should be valid for. This header is only supported when the grant_type is set to either refresh_token or client_credentials.

    Request Body schema: application/x-www-form-urlencoded
    client_id
    required
    string

    The ID of the OAuth2 client

    client_secret
    string

    Secret to use with your clientId. (Not required if using 'public' client)

    grant_type
    required
    string
    Enum: "authorization_code" "client_credentials" "id_token" "refresh_token"

    OAuth2 grant types supported by OLT

    redirect_uri
    string <uri>

    Valid redirect uri for the current client
    - Required if using authorization_code grant flow

    code
    string

    The Authorization Code if using Authorization Code Flow

    scope
    string

    Space delimited list of scopes. When requesting an access token the scope openid must be used to ensure the responding access_token is fully valid.
    Optional scopes:
    email - includes email in auth session.
    profile - includes profile info (eg firstname, lastname) in auth session.

    Responses

    200

    Success

    400

    Bad Request response.

    500

    Internal Server Error response

    post /id/auth/realms/olt/protocol/openid-connect/token

    OAuth2 Production Environment

    https://id.lightelligence.io/v1/id/auth/realms/olt/protocol/openid-connect/token

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIn0.dozjgNryP4J3jVmNHl0w5N_XgL0n3I9PlFUP0THsR8U",
    • "expires_at": "2019-12-19T23:17:59Z",
    • "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIn0.dozjgNryP4J3jVmNHl0w5N_XgL0n3I9PlFUP0THsR8U",
    • "scope": "openid profile email"
    }

    Get UserInfo for current user

    The UserInfo endpoint is an OAuth 2.0 protected resource where client applications can retrieve consented claims, or assertions, about the logged in end-user. This is retrieved by using a valid access_token for the OLT platform through the Authorization header.

    olt-permissions: []
    Authorizations:

    Responses

    200

    Success

    400

    Bad Request response.

    401

    Unauthorized response.

    500

    Internal Server Error response

    get /id/auth/realms/olt/protocol/openid-connect/userinfo

    OAuth2 Production Environment

    https://id.lightelligence.io/v1/id/auth/realms/olt/protocol/openid-connect/userinfo

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "sub": "123e4567-e89b-12d3-a456-426655440000",
    • "emailVerified": true,
    • "name": "Richard Feynman",
    • "preferred_username": "foo@bar.com",
    • "given_name": "Richard",
    • "family_name": "Feynman",
    • "tenant": "123e4567-e89b-12d3-a456-426655440000",
    • "email": "foo@bar.com",
    • "twoFactorAuthEnabled": true
    }

    notifications

    Notifications are created and configured by users. They use filters to process events and then trigger a notification that is sent to a specific channel (i.e. email) depending on its configuration.

    Retrieve tenant notifications

    Retrieves a list of notifications containing filter information as well as notification template.

    By default the list is sorted by creation datetime in descending order. So, most recently created entry goes first.

    olt-permissions: ["notification:read"]
    Authorizations:
    query Parameters
    page
    integer >= 0
    Default: 0

    The number of the result page starting with 0.

    pageSize
    integer [ 1 .. 100 ]
    Default: 20

    The number of result per page.

    Responses

    200

    Success - A notifications list.

    400

    Bad request

    401

    Authentication required

    403

    Action is forbidden

    500

    Internal Server Error

    get /notifications

    Production Environment

    https://api.lightelligence.io/v1/notifications

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "meta":
      {
      },
    • "data":
      [
      ]
    }

    Create notification

    Request a new notification to be created.

    olt-permissions: ["notification:write"]
    Authorizations:
    Request Body schema: application/json
    notificationTemplate
    required
    object

    Notification template

    notificationFilter
    required
    object

    Filter which allows to receive notifications for specific events; The filter conditions ("deviceEvent", "deviceId", "deviceTag", etc) are treated as an AND, the values provided in the arrays are treated as an OR.

    Responses

    200

    Success - A notification has been created.

    400

    Bad request

    401

    Authentication required

    403

    Action is forbidden

    500

    Internal Server Error

    post /notifications

    Production Environment

    https://api.lightelligence.io/v1/notifications

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "notificationTemplate":
      {
      },
    • "notificationFilter":
      {
      }
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Retrieve notification

    Retrieves the notification containing filter information as well as notification template.

    olt-permissions: ["notification:read"]
    Authorizations:
    path Parameters
    notificationId
    required
    string <uuid>
    Example: 09dc8207-43b8-40b8-a40f-c160bdf4d638

    Notification Id

    Responses

    200

    Success - The notification.

    401

    Authentication required

    403

    Action is forbidden

    404

    Notification is not found

    500

    Internal Server Error

    get /notifications/{notificationId}

    Production Environment

    https://api.lightelligence.io/v1/notifications/{notificationId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Update notification

    Request the notification to be updated.

    With PUT it is expected that the complete notification blob is transferred with the request.

    olt-permissions: ["notification:write"]
    Authorizations:
    path Parameters
    notificationId
    required
    string <uuid>
    Example: 09dc8207-43b8-40b8-a40f-c160bdf4d638

    Notification Id

    Request Body schema: application/json
    active
    required
    boolean
    notificationTemplate
    required
    object

    Notification template

    notificationFilter
    required
    object

    Filter which allows to receive notifications for specific events; The filter conditions ("deviceEvent", "deviceId", "deviceTag", etc) are treated as an AND, the values provided in the arrays are treated as an OR.

    Responses

    204

    Success - The notification has been updated.

    400

    Bad request

    401

    Authentication required

    403

    Action is forbidden

    404

    Notification is not found

    500

    Internal Server Error

    put /notifications/{notificationId}

    Production Environment

    https://api.lightelligence.io/v1/notifications/{notificationId}

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "active": true,
    • "notificationTemplate":
      {
      },
    • "notificationFilter":
      {
      }
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorCode": "NOTIFICATION_BAD_REQUEST",
    • "errorMessage": "Could not parse request payload"
    }

    Update notification

    Request the notification to be updated.

    With PATCH it is expected that a subset of the notification blob is transferred with the request. For example, it could be only eventFilter or it could be combined with notificationTemplate and/or any other field.

    olt-permissions: ["notification:write"]
    Authorizations:
    path Parameters
    notificationId
    required
    string <uuid>
    Example: 09dc8207-43b8-40b8-a40f-c160bdf4d638

    Notification Id

    Request Body schema: application/json
    Any of
    • object
    • object
    active
    boolean

    Responses

    204

    Success - The notification has been updated.

    400

    Bad request

    401

    Authentication required

    403

    Action is forbidden

    404

    Notification is not found

    500

    Internal Server Error

    patch /notifications/{notificationId}

    Production Environment

    https://api.lightelligence.io/v1/notifications/{notificationId}

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "notificationTemplate":
      {
      },
    • "notificationFilter":
      {
      },
    • "active": false
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorCode": "NOTIFICATION_BAD_REQUEST",
    • "errorMessage": "Could not parse request payload"
    }

    Delete notification

    Request the notification to be deleted.

    olt-permissions: ["notification:write"]
    Authorizations:
    path Parameters
    notificationId
    required
    string <uuid>
    Example: 09dc8207-43b8-40b8-a40f-c160bdf4d638

    Notification Id

    Responses

    204

    Success - The notification has been deleted.

    401

    Authentication required

    403

    Action is forbidden

    404

    Notification is not found

    500

    Internal Server Error

    delete /notifications/{notificationId}

    Production Environment

    https://api.lightelligence.io/v1/notifications/{notificationId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorCode": "NOTIFICATION_UNAUTHORIZED",
    • "errorMessage": "Unauthorized"
    }

    Retrieve tenants notification history

    Retrieves a list of all triggered notifications containing timestamp, what triggered notification and notification itself.

    By default the list is sorted by creation datetime in descending order. So, most recently created entry goes first.

    olt-permissions: ["notification:read"]
    Authorizations:
    query Parameters
    page
    integer >= 0
    Default: 0

    The number of the result page starting with 0.

    pageSize
    integer [ 1 .. 100 ]
    Default: 20

    The number of result per page.

    notificationId
    Array of strings
    Example: notificationId=83b8c2a8-2e54-4ad0-8e96-313f99d433e3,abff5e9a-072d-4d4c-94f7-fd3515026bce

    Optional parameter to filter the list for certain notification ids

    Responses

    200

    Success - The notification history for a tenant.

    400

    Bad request

    401

    Authentication required

    403

    Action is forbidden

    500

    Internal Server Error

    get /notifications/history

    Production Environment

    https://api.lightelligence.io/v1/notifications/history

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "meta":
      {
      },
    • "data":
      [
      ]
    }

    tenants

    A Tenant is the entity owning everything except Users in the Lightelligence Platform. Devices, Device Types, Certificates etc. all belong to exactly one Tenant. Users can create Tenants and then add other users to the Tenant created Tenant.

    Create tenant

    Create a new Tenant.

    olt-permissions: []
    Authorizations:
    Request Body schema: application/json
    name
    required
    string [ 3 .. 32 ] characters

    The name of the tenant

    billingContact
    required
    object

    The contact information of the person respnsible for the billing

    billingCompany
    required
    object

    The company information of the billing company

    package
    required
    object

    Package id of a tenant

    payment
    required
    object

    Payment details needed to process a payment with Adyen. Adyen is a global payment company that allows businesses to accept e-commerce, mobile, and point-of-sale payments. For more information about Adyen development you can check their documentation

    contractId
    string <= 127 characters

    Billing related contract id of the tenant

    Responses

    201

    Tenant creation successful

    400

    Bad Request response.

    403

    Forbidden

    409

    Conflict response.

    500

    Internal Server Error response.

    503

    This response means the resource(s) is currently down for maintenance

    post /tenants

    Production Environment

    https://api.lightelligence.io/v1/tenants

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "name": "OSRAM",
    • "billingContact":
      {
      },
    • "billingCompany":
      {
      },
    • "package":
      {
      },
    • "payment":
      {
      },
    • "contractId": "SAP-123"
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Get tenant details

    Get the tenant detailed information including billing information for the supplied tenantId.

    Alternative endpoints:
    Basic information of tenants can be fetched through the user self-management endpoints.
    * /users/{userId}/tenants -> Listing all tenants available for user
    * /users/{userId}/tenants/{tenantId} -> Get tenant with basic data including user roles

    olt-permissions: ["tenant:read"]
    Authorizations:
    path Parameters
    tenantId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The tenant UUID.

    Responses

    200

    Success

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden

    404

    This response means you either do not have access to a specified resource or it does not even exist.

    500

    Internal Server Error response.

    get /tenants/{tenantId}

    Production Environment

    https://api.lightelligence.io/v1/tenants/{tenantId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Update tenant details

    Update the tenant details with the supplied information.

    olt-permissions: ["tenant:write"]
    Authorizations:
    path Parameters
    tenantId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The tenant UUID.

    Request Body schema: application/json
    name
    string [ 3 .. 32 ] characters

    The name of the tenant

    billingContact
    object

    The contact information of the person respnsible for the billing

    billingCompany
    object

    The company information of the billing company

    package
    object

    Package id of a tenant

    payment
    object

    Payment details needed to process a payment with Adyen. Adyen is a global payment company that allows businesses to accept e-commerce, mobile, and point-of-sale payments. For more information about Adyen development you can check their documentation

    contractId
    string <= 127 characters

    Billing related contract id of the tenant

    Responses

    200

    Success

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden

    404

    This response means you either do not have access to a specified resource or it does not even exist.

    500

    Internal Server Error response.

    patch /tenants/{tenantId}

    Production Environment

    https://api.lightelligence.io/v1/tenants/{tenantId}

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "name": "OSRAM",
    • "billingContact":
      {
      },
    • "billingCompany":
      {
      },
    • "package":
      {
      },
    • "payment":
      {
      },
    • "contractId": "SAP-123"
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    List tenant roles Deprecated

    DEPRECATED, Please use GET /roles endpoint
    Get the list of roles of a tenant.

    olt-permissions: ["tenant:read"]
    Authorizations:
    path Parameters
    tenantId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The tenant UUID.

    Responses

    200

    Success

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden

    404

    This response means you either do not have access to a specified resource or it does not even exist.

    500

    Internal Server Error response.

    get /tenants/{tenantId}/roles

    Production Environment

    https://api.lightelligence.io/v1/tenants/{tenantId}/roles

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "meta":
      {
      },
    • "data":
      [
      ]
    }

    users

    The User object represents the data of a human being interacting with the Lightelligence Platform. It includes the name and also the e-mail address. A User can create a Tenant and then take actions inside this Tenant e.g. creating a Device.

    Get user details

    Get the user details for the supplied userId.

    olt-permissions: []
    Authorizations:
    path Parameters
    userId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The user UUID.

    Responses

    200

    Success

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden

    404

    This response means you either do not have access to a specified resource or it does not even exist.

    500

    Internal Server Error response.

    get /users/{userId}

    Production Environment

    https://api.lightelligence.io/v1/users/{userId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    List tenants of user

    Get the tenants of the provided user.

    • Ordered descending by tenant creation date.
    olt-permissions: []
    Authorizations:
    path Parameters
    userId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The user UUID.

    query Parameters
    page
    integer >= 0
    Default: 0

    The number of the result page starting with 0.

    pageSize
    integer [ 1 .. 100 ]
    Default: 20

    The number of results per page.

    Responses

    200

    Success

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden

    404

    This response means you either do not have access to a specified resource or it does not even exist.

    500

    Internal Server Error response.

    get /users/{userId}/tenants

    Production Environment

    https://api.lightelligence.io/v1/users/{userId}/tenants

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "meta":
      {
      },
    • "data":
      [
      ]
    }

    Get tenant information

    Get tenant information for the provided tenant and user. This will only succeed if the user is part of the logged in tenant.

    olt-permissions: []
    Authorizations:
    path Parameters
    userId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The user UUID.

    tenantId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The tenant UUID.

    Responses

    200

    Success

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden

    404

    This response means you either do not have access to a specified resource or it does not even exist.

    500

    Internal Server Error response.

    get /users/{userId}/tenants/{tenantId}

    Production Environment

    https://api.lightelligence.io/v1/users/{userId}/tenants/{tenantId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    List user permissions

    Get the list of permissions for the current user within the logged in tenant.

    olt-permissions: []
    Authorizations:
    path Parameters
    userId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The user UUID.

    Responses

    200

    Success

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden

    404

    This response means you either do not have access to a specified resource or it does not even exist.

    500

    Internal Server Error response.

    get /users/{userId}/permissions

    Production Environment

    https://api.lightelligence.io/v1/users/{userId}/permissions

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    List invites of user

    Get all invites for the current user.

    • Ordered descending by invite creation date.
    olt-permissions: []
    Authorizations:
    path Parameters
    userId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The user UUID.

    query Parameters
    status
    string
    Enum: "open" "accepted" "declined"
    Example: status=open

    The invite status to be filtered by

    page
    integer >= 0
    Default: 0

    The number of the result page starting with 0.

    pageSize
    integer [ 1 .. 100 ]
    Default: 20

    The number of results per page.

    Responses

    200

    Success

    401

    Unauthorized response.

    403

    Forbidden

    500

    Internal Server Error response.

    get /users/{userId}/invites

    Production Environment

    https://api.lightelligence.io/v1/users/{userId}/invites

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "meta":
      {
      },
    • "data":
      [
      ]
    }

    Accept or decline invite

    With this endpoint a user can accept or decline an invite. State changes are only possible for an invite with the status open. For example an already accepted invite can not be declined.

    olt-permissions: []
    Authorizations:
    path Parameters
    userId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The user UUID.

    inviteId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The invite UUID.

    Request Body schema: application/json
    status
    required
    string
    Enum: "open" "accepted" "declined"

    The status shows if the user accepted or declined the invite.

    Responses

    200

    Success - Invite updated

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden

    404

    Not found response.

    500

    Internal Server Error response.

    patch /users/{userId}/invites/{inviteId}

    Production Environment

    https://api.lightelligence.io/v1/users/{userId}/invites/{inviteId}

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "status": "open"
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    user-management

    User management is done within the context of a tenant. Here you can define which user has access to which tenant, by assigning or revoking roles. It's also possible to invite users that aren't registered with OLT yet by email.

    Invite user to tenant

    Invite an user to a tenant.

    • Ordered descending by invite creation date.
    olt-permissions: ["tenant_user_management:write"]
    Authorizations:
    path Parameters
    tenantId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The tenant UUID.

    Request Body schema: application/json
    receiverEmail
    required
    string <email>

    The email address of the invited user.

    roleNames
    Array of strings non-empty
    Deprecated

    Deprecated, please use roles instead

    roles
    Array of objects non-empty

    The IDs of the roles the user should be invited to.

    Responses

    201

    Success - Invite created

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden

    404

    Not found response.

    409

    Conflict response.

    500

    Internal Server Error response.

    post /tenants/{tenantId}/invites

    Production Environment

    https://api.lightelligence.io/v1/tenants/{tenantId}/invites

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "receiverEmail": "iron@man.com",
    • "roleNames":
      [
      ],
    • "roles":
      [
      ]
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    List invites of tenant

    Get all invites to users for the provided tenant.

    olt-permissions: ["tenant_user_management:read"]
    Authorizations:
    path Parameters
    tenantId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The tenant UUID.

    query Parameters
    status
    string
    Enum: "open" "accepted" "declined"
    Example: status=open

    The invite status to be filtered by

    page
    integer >= 0
    Default: 0

    The number of the result page starting with 0.

    pageSize
    integer [ 1 .. 100 ]
    Default: 20

    The number of results per page.

    Responses

    200

    Success

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden

    404

    Not found response.

    500

    Internal Server Error response.

    get /tenants/{tenantId}/invites

    Production Environment

    https://api.lightelligence.io/v1/tenants/{tenantId}/invites

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "meta":
      {
      },
    • "data":
      [
      ]
    }

    Revoke open invite

    Delete/Revoke the invite of a user to the tenant. Only open invites can be deleted.

    olt-permissions: ["tenant_user_management:write"]
    Authorizations:
    path Parameters
    tenantId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The tenant UUID.

    inviteId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The invite UUID.

    Responses

    204

    Success - No content

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden

    404

    Not found response.

    500

    Internal Server Error response.

    delete /tenants/{tenantId}/invites/{inviteId}

    Production Environment

    https://api.lightelligence.io/v1/tenants/{tenantId}/invites/{inviteId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorCode": "ID_VALIDATION",
    • "errorMessage": "Request should follow schema"
    }

    List users of tenant

    Get the list of users associated to a tenant by any role.

    • Ordered descending by date of user-to-tenant assigment
    olt-permissions: ["tenant_user_management:read"]
    Authorizations:
    path Parameters
    tenantId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The tenant UUID.

    query Parameters
    page
    integer >= 0
    Default: 0

    The number of the result page starting with 0.

    pageSize
    integer [ 1 .. 100 ]
    Default: 20

    The number of results per page.

    Responses

    200

    Success

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden

    404

    This response means you either do not have access to a specified resource or it does not even exist.

    500

    Internal Server Error response.

    get /tenants/{tenantId}/users

    Production Environment

    https://api.lightelligence.io/v1/tenants/{tenantId}/users

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "meta":
      {
      },
    • "data":
      [
      ]
    }

    Remove user from tenant

    Remove a user from a tenant.

    olt-permissions: ["tenant_user_management:write"]
    Authorizations:
    path Parameters
    tenantId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The tenant UUID.

    userId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The user UUID.

    Responses

    204

    Success

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden

    404

    This response means you either do not have access to a specified resource or it does not even exist.

    500

    Internal Server Error response.

    delete /tenants/{tenantId}/users/{userId}

    Production Environment

    https://api.lightelligence.io/v1/tenants/{tenantId}/users/{userId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorCode": "ID_VALIDATION",
    • "errorMessage": "Request should follow schema"
    }

    List users in role

    Get the list of users in the role within the tenant.

    • Ordered descending by role assigment date.
    olt-permissions: ["tenant_user_management:read"]
    Authorizations:
    path Parameters
    roleId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The role UUID.

    query Parameters
    page
    integer >= 0
    Default: 0

    The number of the result page starting with 0.

    pageSize
    integer [ 1 .. 100 ]
    Default: 20

    The number of results per page.

    Responses

    200

    Success

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden

    500

    Internal Server Error response.

    get /roles/{roleId}/users

    Production Environment

    https://api.lightelligence.io/v1/roles/{roleId}/users

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "meta":
      {
      },
    • "data":
      [
      ]
    }

    List roles of user

    Get the list of roles for the user within the tenant.

    • Ordered descending by role creation date.
    olt-permissions: ["tenant_user_management:read"]
    Authorizations:
    path Parameters
    tenantId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The tenant UUID.

    userId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The user UUID.

    query Parameters
    page
    integer >= 0
    Default: 0

    The number of the result page starting with 0.

    pageSize
    integer [ 1 .. 100 ]
    Default: 20

    The number of results per page.

    Responses

    200

    Success

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden

    500

    Internal Server Error response.

    get /tenants/{tenantId}/users/{userId}/roles

    Production Environment

    https://api.lightelligence.io/v1/tenants/{tenantId}/users/{userId}/roles

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "meta":
      {
      },
    • "data":
      [
      ]
    }

    Change roles of user

    Change the roles of the user in the tenant.

    olt-permissions: ["tenant_user_management:write"]
    Authorizations:
    path Parameters
    tenantId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The tenant UUID.

    userId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The user UUID.

    Request Body schema: application/json
    Array
    id
    required
    string <uuid>

    UUID of a tenant role

    Responses

    204

    Success - Roles updated

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden

    404

    Not found response.

    500

    Internal Server Error response.

    put /tenants/{tenantId}/users/{userId}/roles

    Production Environment

    https://api.lightelligence.io/v1/tenants/{tenantId}/users/{userId}/roles

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    [
    • {
      }
    ]

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorCode": "ID_VALIDATION",
    • "errorMessage": "Request should follow schema"
    }

    roles-and-permissions

    To interact with the API of OLT, a user needs to have the correct set of permissions. Using these permissions, a tenant can limit what actions a user can access within the Lightelligence Platform.

    List user permissions

    Get the list of permissions for the current user within the logged in tenant.

    olt-permissions: []
    Authorizations:
    path Parameters
    userId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The user UUID.

    Responses

    200

    Success

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden

    404

    This response means you either do not have access to a specified resource or it does not even exist.

    500

    Internal Server Error response.

    get /users/{userId}/permissions

    Production Environment

    https://api.lightelligence.io/v1/users/{userId}/permissions

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    List permissions

    Get the list of permissions for the tenant. Permissions are the permissions which are required and checked within the OLT platform.

    To interact with the API of OLT, the user needs to have the right set of permissions. Using these permissions, a tenant owner can limit what actions a user can access within the Lightelligence Platform.

    olt-permissions: []
    Authorizations:

    Responses

    200

    Success

    400

    Bad Request response.

    403

    Forbidden

    404

    This response means you either do not have access to a specified resource or it does not even exist.

    500

    Internal Server Error response.

    get /permissions

    Production Environment

    https://api.lightelligence.io/v1/permissions

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Create role

    Create a new role connected to the logged in tenant.
    Note: Support of alias in permissions will be dropped in future versions
    All values can be updated after creation with PATCH: Update Role

    olt-permissions: ["tenant_user_management:write"]
    olt-transitive-permissions: ["applications:read"]
    Authorizations:
    Request Body schema: application/json
    name
    required
    string [ 3 .. 32 ] characters ^([a-zA-Z0-9_\- ]+)$

    The name of the role

    description
    string

    Description of the role

    permissions
    Array of objects
    customPermissions
    Array of objects

    Responses

    201

    Success - Role created

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden

    409

    Conflict response.

    500

    Internal Server Error response.

    post /roles

    Production Environment

    https://api.lightelligence.io/v1/roles

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "name": "Devices",
    • "description": "string",
    • "permissions":
      [
      ],
    • "customPermissions":
      [
      ]
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    List roles

    Get the list of roles for the tenant including the list of permissions id's for each role.

    • Ordered descending by role creation date.
    olt-permissions: ["tenant_user_management:read"]
    Authorizations:
    query Parameters
    userId
    string <uuid>
    Example: userId=123e4567-e89b-12d3-a456-426655440000

    The user UUID.

    page
    integer >= 0
    Default: 0

    The number of the result page starting with 0.

    pageSize
    integer [ 1 .. 100 ]
    Default: 20

    The number of results per page.

    Responses

    200

    Success

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden

    500

    Internal Server Error response.

    get /roles

    Production Environment

    https://api.lightelligence.io/v1/roles

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "meta":
      {
      },
    • "data":
      [
      ]
    }

    Get role

    Get details for the role.

    olt-permissions: ["tenant_user_management:read"]
    Authorizations:
    path Parameters
    roleId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The role UUID.

    Responses

    200

    Success

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden

    404

    This response means you either do not have access to a specified resource or it does not even exist.

    500

    Internal Server Error response.

    get /roles/{roleId}

    Production Environment

    https://api.lightelligence.io/v1/roles/{roleId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Delete role

    Delete role for tenant

    olt-permissions: ["tenant_user_management:write"]
    Authorizations:
    path Parameters
    roleId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The role UUID.

    Responses

    204

    Success - No content

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden

    500

    Internal Server Error response.

    delete /roles/{roleId}

    Production Environment

    https://api.lightelligence.io/v1/roles/{roleId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorCode": "ID_VALIDATION",
    • "errorMessage": "Request should follow schema"
    }

    Update role

    Update the properties of a role. Which properties are modifiable can be viewed in the request body schema.
    Note: Support of alias in permissions will be dropped in future versions
    Note: Updating permissions or customPermissions will replace the entire list of permissions.
    At least id or alias are required when updating permissions.

    olt-permissions: ["tenant_user_management:write"]
    Authorizations:
    path Parameters
    roleId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The role UUID.

    Request Body schema: application/json
    name
    string [ 3 .. 32 ] characters ^([a-zA-Z0-9_\- ]+)$

    The name of the role

    description
    string

    Description of the role

    permissions
    Array of objects
    customPermissions
    Array of objects

    Responses

    200

    Success - Role updated

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden

    404

    Not found response.

    409

    Conflict response.

    500

    Internal Server Error response.

    patch /roles/{roleId}

    Production Environment

    https://api.lightelligence.io/v1/roles/{roleId}

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "name": "Devices",
    • "description": "string",
    • "permissions":
      [
      ],
    • "customPermissions":
      [
      ]
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    application-developer

    Create custom permission

    Create a new custom permission for an application. Custom permissions - although managed via the OLT API - have no impact on the OLT platform whatsoever. Their sole purpose is to allow access control management within an application: By assigning a custom permission to a role, an external application can use this permission to allow/restrict resource access within that application. Custom permissions are specified within the scope of an application. A tenant owner can assign custom permissions of all installed application to all available roles within a tenant.

    olt-permissions: ["applications_development:write"]
    olt-transitive-permissions: ["applications_development:read"]
    Authorizations:
    path Parameters
    applicationId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    An application id

    Request Body schema: application/json
    alias
    required
    string [ 3 .. 255 ] characters

    A computer readable identifier for the permission which will be used by the developers application

    category
    required
    string [ 3 .. 32 ] characters ^([a-zA-Z0-9_\- ]+)$

    Used to group related permissions in the Custom Role Management User Interface for better overview

    name
    required
    string [ 3 .. 255 ] characters ^([a-zA-Z0-9_\- ]+)$

    The human readable name of the permission, used in the Permission Management User Interface

    description
    string

    A human readable description of the purpose of the permission, used in the Custom Role Management User Interface

    Responses

    201

    Success

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden

    404

    This response means you either do not have access to a specified resource or it does not even exist.

    409

    Conflict response.

    500

    Internal Server Error response.

    post /application-developer/applications/{applicationId}/custom-permissions

    Production Environment

    https://api.lightelligence.io/v1/application-developer/applications/{applicationId}/custom-permissions

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "alias": "devicetypes:read",
    • "category": "Devices",
    • "name": "Read Device",
    • "description": "string"
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    List custom permissions for an application

    List all created custom permissions for an application.

    • Ordered descending by custom permission creation date.
    olt-permissions: ["applications_development:read"]
    Authorizations:
    path Parameters
    applicationId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    An application id

    query Parameters
    page
    integer >= 0
    Default: 0

    The number of the result page starting with 0.

    pageSize
    integer [ 1 .. 100 ]
    Default: 20

    The number of results per page.

    Responses

    200

    Success

    401

    Unauthorized response.

    403

    Forbidden

    404

    This response means you either do not have access to a specified resource or it does not even exist.

    500

    Internal Server Error response.

    get /application-developer/applications/{applicationId}/custom-permissions

    Production Environment

    https://api.lightelligence.io/v1/application-developer/applications/{applicationId}/custom-permissions

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "meta":
      {
      },
    • "data":
      [
      ]
    }

    Custom permission details

    Get details of a specific custom permission.

    olt-permissions: ["applications_development:read"]
    Authorizations:
    path Parameters
    applicationId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    An application id

    permissionId
    required
    string <uuid>
    Example: 6e0c9341-02a0-43ad-a213-989f8c8a870f

    The permission ID.

    Responses

    200

    Succsess

    401

    Unauthorized response.

    403

    Forbidden

    404

    This response means you either do not have access to a specified resource or it does not even exist.

    500

    Internal Server Error response.

    get /application-developer/applications/{applicationId}/custom-permissions/{permissionId}

    Production Environment

    https://api.lightelligence.io/v1/application-developer/applications/{applicationId}/custom-permissions/{permissionId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Update custom permission

    Update category or description of a specific custom permission. name and alias can only be changed by creating a new custom permission and deleting the old one.

    olt-permissions: ["applications_development:write"]
    olt-transitive-permissions: ["applications_development:read"]
    Authorizations:
    path Parameters
    applicationId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    An application id

    permissionId
    required
    string <uuid>
    Example: 6e0c9341-02a0-43ad-a213-989f8c8a870f

    The permission ID.

    Request Body schema: application/json
    category
    string [ 3 .. 32 ] characters ^([a-zA-Z0-9_\- ]+)$

    Used to group related permissions in the Custom Role Management User Interface for better overview

    description
    string

    A human readable description of the purpose of the permission, used in the Custom Role Management User Interface

    Responses

    200

    Success

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden

    404

    This response means you either do not have access to a specified resource or it does not even exist.

    500

    Internal Server Error response.

    patch /application-developer/applications/{applicationId}/custom-permissions/{permissionId}

    Production Environment

    https://api.lightelligence.io/v1/application-developer/applications/{applicationId}/custom-permissions/{permissionId}

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "category": "Devices",
    • "description": "string"
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Delete custom permission

    Not yet implemented Delete a specific custom permission. Note: Deleting a custom permission will also remove it from any roles it is assigned to.

    olt-permissions: ["applications_development:write"]
    olt-transitive-permissions: ["applications_development:read"]
    Authorizations:
    path Parameters
    applicationId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    An application id

    permissionId
    required
    string <uuid>
    Example: 6e0c9341-02a0-43ad-a213-989f8c8a870f

    The permission ID.

    Responses

    204

    Success (No further content)

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden

    404

    This response means you either do not have access to a specified resource or it does not even exist.

    500

    Internal Server Error response.

    delete /application-developer/applications/{applicationId}/custom-permissions/{permissionId}

    Production Environment

    https://api.lightelligence.io/v1/application-developer/applications/{applicationId}/custom-permissions/{permissionId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorCode": "ID_VALIDATION",
    • "errorMessage": "Request should follow schema"
    }

    Create an application

    This endpoint creates a new application for the tenant. The tenant of the user session will become the "owner" (also referred to as developer tenant) of the application. The redirectUris should be provided as a security mechanism to lock the OAuth2 callback URIs. Once the application got created, the oauth2Client.id of the application can be used as OAuth2 client ID and the oauth2Client.secret of the application must be used as the secret of the OAuth2 client. If the withPublicOauth2Client property was set, the oauth2PublicClient.id can also be used as OAuth2 client ID, but in this case without the secret.

    To actually use the OAuth2 clients of the application a tenant must be added to the allowedTenants of the application and the tenant must install the application. Adding a tenant to the allowedTenants can be achieved by either providing the allowedTenants property directly with this request or later by using the PUT /allowed-tenants endpoint. To install the application the "user" tenant must use the POST /installation endpoint.

    Note: To test the application as "owner", also the developer tenant must follow the steps for adding the developer tenant ID to the allowedTenants and install the application.

    olt-permissions: ["applications_development:write"]
    Authorizations:
    Request Body schema: application/json
    name
    required
    string [ 3 .. 32 ] characters ^([a-zA-Z0-9_\- ]+)$

    The name of the application

    teaserDescription
    string <= 170 characters

    A short description for the application

    url
    string <url> <= 2000 characters

    A URL with more information on the app. E.g. the app homepage. Note: Protocol is required.

    withPublicOauth2Client
    boolean

    The withPublicOauth2Client property indicates whether the application should also be accessible as a public OAuth2 client. Setting this property to true will add the publicOauth2Client property to the application. Setting this property to false will remove the previously created public client. Toggling this property from true to false to true will create a new id for the public client and thus make the first one unusable.

    redirectUris
    Array of strings

    List of redirect URIs. For security reasons, it's not allowed to use wildcards for any of the provided URIs.

    allowedTenants
    Array of objects

    List of allowed tenants for the application

    permissions
    object

    Permissions for this application

    Responses

    201

    Success - Application created

    400

    Bad Request

    401

    Unauthorized

    403

    Forbidden

    409

    Conflict

    500

    Internal Server Error

    post /application-developer/applications

    Production Environment

    https://api.lightelligence.io/v1/application-developer/applications

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "name": "My Great Application",
    • "teaserDescription": "This application is awesome because it just works!",
    • "withPublicOauth2Client": true,
    • "allowedTenants":
      [
      ],
    • "permissions":
      {
      }
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    List developed applications

    This endpoint lists all applications, which are developed by the tenant. The tenant is extracted from the current user session.

    • Ordered descending by createdAt.
    olt-permissions: ["applications_development:read"]
    Authorizations:
    query Parameters
    page
    integer >= 0
    Default: 0

    The requested page

    pageSize
    integer [ 1 .. 100 ]
    Default: 20

    The amount of results per page

    Responses

    200

    Success - List of developed applications

    400

    Bad Request

    401

    Unauthorized

    403

    Forbidden

    500

    Internal Server Error

    get /application-developer/applications

    Production Environment

    https://api.lightelligence.io/v1/application-developer/applications

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "meta":
      {
      },
    • "data":
      [
      ]
    }

    Get details of developed application

    Get detailed information for the developed application.

    olt-permissions: ["applications_development:read"]
    Authorizations:
    path Parameters
    applicationId
    required
    string <uuid>
    Example: 570e0a66-974b-40dd-8108-844da77719e9

    The application ID

    Responses

    200

    Success - Detailed Application Data

    400

    Bad Request

    401

    Unauthorized

    403

    Forbidden

    404

    Not found

    500

    Internal Server Error

    get /application-developer/applications/{applicationId}

    Production Environment

    https://api.lightelligence.io/v1/application-developer/applications/{applicationId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Delete developed application

    Delete the developed application.

    olt-permissions: ["applications_development:write"]
    Authorizations:
    path Parameters
    applicationId
    required
    string <uuid>
    Example: 570e0a66-974b-40dd-8108-844da77719e9

    The application ID

    Responses

    204

    Success - Application deleted

    400

    Bad Request

    401

    Unauthorized

    403

    Forbidden

    404

    Not found

    500

    Internal Server Error

    delete /application-developer/applications/{applicationId}

    Production Environment

    https://api.lightelligence.io/v1/application-developer/applications/{applicationId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorCode": "APP_VALIDATION",
    • "errorMessage": "Request Body has to follow schemas"
    }

    Update developed application

    Update details of the developed application. When the status property of the application is updated to "inactive", the application cannot be installed and does not have access to any tenants' data anymore.

    olt-permissions: ["applications_development:write"]
    Authorizations:
    path Parameters
    applicationId
    required
    string <uuid>
    Example: 570e0a66-974b-40dd-8108-844da77719e9

    The application ID

    Request Body schema: application/json
    name
    string [ 3 .. 32 ] characters ^([a-zA-Z0-9_\- ]+)$

    The name of the application

    teaserDescription
    string <= 170 characters

    A short description for the application

    url
    string <url> <= 2000 characters

    A URL with more information on the app. E.g. the app homepage. Note: Protocol is required.

    withPublicOauth2Client
    boolean

    The withPublicOauth2Client property indicates whether the application should also be accessible as a public OAuth2 client. Setting this property to true will add the publicOauth2Client property to the application. Setting this property to false will remove the previously created public client. Toggling this property from true to false to true will create a new id for the public client and thus make the first one unusable.

    status
    string
    Enum: "active" "inactive"

    Status of the application. An inactive application cannot be installed, nor can the tenant data be accessed.

    redirectUris
    Array of strings

    List of redirect URIs. For security reasons, it's not allowed to use wildcards for any of the provided URIs.

    permissions
    object

    Permissions for this application

    Responses

    200

    Success - Application updated

    400

    Bad Request

    401

    Unauthorized

    403

    Forbidden

    404

    Not found

    500

    Internal Server Error

    patch /application-developer/applications/{applicationId}

    Production Environment

    https://api.lightelligence.io/v1/application-developer/applications/{applicationId}

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "name": "My Great Application",
    • "teaserDescription": "This application is awesome because it just works!",
    • "withPublicOauth2Client": true,
    • "status": "active",
    • "permissions":
      {
      }
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    List allowed tenants

    List tenants that can install the application.

    olt-permissions: ["applications_development:read"]
    Authorizations:
    path Parameters
    applicationId
    required
    string <uuid>
    Example: 570e0a66-974b-40dd-8108-844da77719e9

    The application ID

    query Parameters
    page
    integer >= 0
    Default: 0

    The requested page

    pageSize
    integer [ 1 .. 100 ]
    Default: 20

    The amount of results per page

    Responses

    200

    Success - List of allowed tenants

    400

    Bad Request

    401

    Unauthorized

    403

    Forbidden

    404

    Not found

    500

    Internal Server Error

    get /application-developer/applications/{applicationId}/allowed-tenants

    Production Environment

    https://api.lightelligence.io/v1/application-developer/applications/{applicationId}/allowed-tenants

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "meta":
      {
      },
    • "data":
      [
      ]
    }

    Add allowed tenant

    This endpoint allows a specific tenant to install the application as after creating a new application no tenant is allowed to access it. The passed tenanatId will not be verified for existence, but one may use the comment property, to better identify the tenant. Once the tenant successfully installed the application, the installed flag will be set to true and the tenantName will be available.

    olt-permissions: ["applications_development:write"]
    Authorizations:
    path Parameters
    applicationId
    required
    string <uuid>
    Example: 570e0a66-974b-40dd-8108-844da77719e9

    The application ID

    tenantId
    required
    string <uuid>
    Example: 570e0a66-974b-40dd-8108-844da77719e9

    The tenant ID

    Request Body schema: application/json
    comment
    string [ 0 .. 255 ] characters

    A comment about the allowed tenant. As there is no validation of the tenantId (if the tenant exists), this field can be used as a free text comment.

    Responses

    200

    Success - Allowed tenant added

    400

    Bad Request

    401

    Unauthorized

    403

    Forbidden

    500

    Internal Server Error

    put /application-developer/applications/{applicationId}/allowed-tenants/{tenantId}

    Production Environment

    https://api.lightelligence.io/v1/application-developer/applications/{applicationId}/allowed-tenants/{tenantId}

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "comment": "This should be the tenant \"ABC\", contact is help@abc.com"
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Remove allowed tenant

    Remove access for the tenant to use the application and don't allow the tenant to install the application anymore.

    olt-permissions: ["applications_development:write"]
    Authorizations:
    path Parameters
    applicationId
    required
    string <uuid>
    Example: 570e0a66-974b-40dd-8108-844da77719e9

    The application ID

    tenantId
    required
    string <uuid>
    Example: 570e0a66-974b-40dd-8108-844da77719e9

    The tenant ID

    Responses

    204

    Success - Allowed tenant removed

    400

    Bad Request

    401

    Unauthorized

    403

    Forbidden

    404

    Not found

    500

    Internal Server Error

    delete /application-developer/applications/{applicationId}/allowed-tenants/{tenantId}

    Production Environment

    https://api.lightelligence.io/v1/application-developer/applications/{applicationId}/allowed-tenants/{tenantId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorCode": "APP_VALIDATION",
    • "errorMessage": "Request Body has to follow schemas"
    }

    Regenerate secret for application

    Generate a new secret for the application. Once the new secret is generated the old one will not work anymore.

    olt-permissions: ["applications_development:write"]
    Authorizations:
    path Parameters
    applicationId
    required
    string <uuid>
    Example: 570e0a66-974b-40dd-8108-844da77719e9

    The application ID

    Request Body schema: application/json

    Responses

    201

    Success - Application secret created

    400

    Bad Request

    401

    Unauthorized

    403

    Forbidden

    500

    Internal Server Error

    post /application-developer/applications/{applicationId}/secret

    Production Environment

    https://api.lightelligence.io/v1/application-developer/applications/{applicationId}/secret

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    { }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    applications

    Endpoints for a user to access available applications, install and uninstall these and more for application management to your tenants applications.

    List available applications

    Lists all applications available for the tenant. This includes both the currently installed applications of the tenant and the applications available for installation. By using the installed query parameter the response can be filtered for only installed applications. The tenant is extracted from the current user session.

    • Ordered by the creation date of the applications
    olt-permissions: ["applications:read"]
    Authorizations:
    query Parameters
    installed
    boolean
    Example: installed=true

    Filter for only installed applications

    page
    integer >= 0
    Default: 0

    The requested page

    pageSize
    integer [ 1 .. 100 ]
    Default: 20

    The amount of results per page

    Responses

    200

    Success - List of applications

    400

    Bad Request

    401

    Unauthorized

    403

    Forbidden

    500

    Internal Server Error

    get /applications

    Production Environment

    https://api.lightelligence.io/v1/applications

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "meta":
      {
      },
    • "data":
      [
      ]
    }

    Get details for application

    Get detailed information for the available or installed application.

    olt-permissions: ["applications:read"]
    Authorizations:
    path Parameters
    applicationId
    required
    string <uuid>
    Example: 570e0a66-974b-40dd-8108-844da77719e9

    The application ID

    Responses

    200

    Success - Application Details

    400

    Bad Request

    401

    Unauthorized

    403

    Forbidden

    404

    Not found

    500

    Internal Server Error

    get /applications/{applicationId}

    Production Environment

    https://api.lightelligence.io/v1/applications/{applicationId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Install an application

    Installs the application for the requesting tenant. The request must contain the full set of user and client permissions that are assigned to the application, otherwise the installation will fail. If an installation for that application already exists the request will fail.

    olt-permissions: ["applications:write"]
    Authorizations:
    path Parameters
    applicationId
    required
    string <uuid>
    Example: 570e0a66-974b-40dd-8108-844da77719e9

    The application ID

    Request Body schema: application/json
    permissions
    required
    object

    Permissions for this application

    Responses

    201

    Success - Application installed

    400

    Bad Request

    401

    Unauthorized

    403

    Forbidden

    404

    Not found

    409

    Conflict

    500

    Internal Server Error

    post /applications/{applicationId}/installation

    Production Environment

    https://api.lightelligence.io/v1/applications/{applicationId}/installation

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "permissions":
      {
      }
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Get installation details

    Fetch details of an application installation.

    olt-permissions: ["applications:read"]
    Authorizations:
    path Parameters
    applicationId
    required
    string <uuid>
    Example: 570e0a66-974b-40dd-8108-844da77719e9

    The application ID

    Responses

    200

    Success - Installation details

    400

    Bad Request

    401

    Unauthorized

    403

    Forbidden

    404

    Not found

    500

    Internal Server Error

    get /applications/{applicationId}/installation

    Production Environment

    https://api.lightelligence.io/v1/applications/{applicationId}/installation

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Update an installation

    Updates and re-consents an installation. The request must contain the full set of user and client permissions that are assigned to the application, otherwise the request will fail. If an installation for that application doesn't exist the request will fail.

    olt-permissions: ["applications:write"]
    Authorizations:
    path Parameters
    applicationId
    required
    string <uuid>
    Example: 570e0a66-974b-40dd-8108-844da77719e9

    The application ID

    Request Body schema: application/json
    permissions
    required
    object

    Permissions for this application

    Responses

    200

    Success - Application installation updated

    400

    Bad Request

    401

    Unauthorized

    403

    Forbidden

    404

    Not found

    409

    Conflict

    500

    Internal Server Error

    patch /applications/{applicationId}/installation

    Production Environment

    https://api.lightelligence.io/v1/applications/{applicationId}/installation

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "permissions":
      {
      }
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Uninstall application

    Uninstalls the application assigned to the tenant. Once the application has been uninstalled, it cannot access any data of the tenant anymore.

    olt-permissions: ["applications:write"]
    Authorizations:
    path Parameters
    applicationId
    required
    string <uuid>
    Example: 570e0a66-974b-40dd-8108-844da77719e9

    The application ID

    Responses

    204

    Success - Application uninstalled

    400

    Bad Request

    401

    Unauthorized

    403

    Forbidden

    404

    Not found

    500

    Internal Server Error

    delete /applications/{applicationId}/installation

    Production Environment

    https://api.lightelligence.io/v1/applications/{applicationId}/installation

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorCode": "APP_VALIDATION",
    • "errorMessage": "Request Body has to follow schemas"
    }

    Get permissions for application

    Fetch permissions that is required by application

    olt-permissions: ["applications:read"]
    Authorizations:
    path Parameters
    applicationId
    required
    string <uuid>
    Example: 570e0a66-974b-40dd-8108-844da77719e9

    The application ID

    Responses

    200

    Success - Application permissions

    400

    Bad Request

    401

    Unauthorized

    403

    Forbidden

    404

    Not found

    500

    Internal Server Error

    get /applications/{applicationId}/permissions

    Production Environment

    https://api.lightelligence.io/v1/applications/{applicationId}/permissions

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    application-info

    Endpoints accessible only for your applications. Access by using client_credentials OAuth2 grant flow.

    List of tenants installed for the application

    Lists the tenants installed for the application. This endpoint can only be called from the application itself, with an access token. It gets the access token via the client credentials flow. The access token is not associated with a tenant.

    olt-permissions: []
    Authorizations:
    query Parameters
    page
    integer >= 0
    Default: 0

    The requested page

    pageSize
    integer [ 1 .. 100 ]
    Default: 20

    The amount of results per page

    Responses

    200

    Success - List of installed tenants

    400

    Bad Request

    401

    Unauthorized

    403

    Forbidden

    404

    Not found

    500

    Internal Server Error

    get /application-info/installed-tenants

    Production Environment

    https://api.lightelligence.io/v1/application-info/installed-tenants

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "meta":
      {
      },
    • "data":
      [
      ]
    }

    Get installation details for current application

    Determines the installation details for the client-tenant-combination given by the provided access token. Must be called with access token

    olt-permissions: []
    Authorizations:

    Responses

    200

    Success - Installation details

    401

    Unauthorized

    404

    Not found

    500

    Internal Server Error

    get /application-info/installation

    Production Environment

    https://api.lightelligence.io/v1/application-info/installation

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    devices

    Devices are the things inside of the Lightelligence Platform. Devices reach from a small sensor unit over a mid sized gateway with internet connection to a full blown installation controller. Devices can be connected to the cloud by assigning an certificate or connecting it over another Device.

    Create new device

    Registers a new device for your Lightelligence tenant. If a configuration is provided and the device is connected to a gateway via connectedBy, the gateway will receive a configuration update via MQTT.

    olt-permissions: ["devices_base_data:write"]
    Authorizations:
    Request Body schema: application/json
    info
    required
    object
    configuration
    object

    Object describing the desired device configuration properties. If this is changed, the device will receive an MQTT message containing the new configuration.

    custom
    object

    Place for custom data.

    Responses

    201

    Success - created device.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    409

    The device to use as connectedBy was not found.

    500

    Internal Server Error response.

    post /devices

    Production Environment

    https://api.lightelligence.io/v1/devices

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "info":
      {
      },
    • "configuration":
      {
      },
    • "custom":
      {
      }
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    List available devices

    This endpoint returns a list of devices, ordered by creation date from newest to oldest. The list can be filtered by provided filter. Filter entries can be either provided as query parameters or in the request body, but not both. Each of these filters has to match, so if multiple are provided, the device has to match both filters. For each of the filters, multiple values can be provided. If multiple values are provided, the filter matches if the device matches any of the provided values. So if for example multiple device tags are provided, any device having at least one of the tags is returned.

    olt-permissions: ["devices_base_data:read"]
    Authorizations:
    query Parameters
    page
    integer >= 0
    Default: 0

    The number of the result page starting with 0.

    pageSize
    integer >= 0
    Default: 20

    The number of result per page.

    deviceId
    Array of strings <uuid> non-empty
    Example: deviceId=eba878ba-4a5d-4e67-b9d4-4dfd4e55f32f,be838a54-5f85-4154-b8a6-81fa4cb29561

    A comma separated list of device Ids which you want to use as a filter. Device will be selected if matches at least one item in a list

    deviceTag
    Array of strings non-empty
    Example: deviceTag=tag1,tag1

    Filter the results to contain devices having one of the comma-separated list of tags provided here. Case-insensitive. Surround the tag with * for substring matching. Example: *subString_of_a_tag*,fullMatching-Tag

    deviceTypeId
    Array of strings <uuid> non-empty
    Example: deviceTypeId=e41bcf5e-2a4e-435a-8387-4617cd52b194,f86579db-f403-4ce1-b782-f1978733ef9b

    Filter returning results matching one of the provided device type IDs.

    deviceTypeCategory
    Array of strings <uri> non-empty
    Example: deviceTypeCategory=urn%3Aexample%3Atest1%3Acategory,urn%3Aexample%3Atest2%3Acategory

    Filter the results to contain only entries having at least one of the provided categories. Example: [urn:example:test:category]

    deviceConnectedBy
    Array of strings <uuid> non-empty
    Example: deviceConnectedBy=eba878ba-4a5d-4e67-b9d4-4dfd4e55f32f,be838a54-5f85-4154-b8a6-81fa4cb29561

    Filter the results to contain devices having one of the comma-separated list of 'connected by' provided here.

    deviceName
    Array of strings non-empty
    Example: deviceName=Living%2A,Bad%2A

    Filter the results to contain devices having one of the comma-separated list of names provided here. Case-insensitive. Surround with * for substring matching. Example: subString OR fullMatchingName

    deviceAlias
    Array of strings non-empty
    Example: deviceAlias=Living%2A,Bad%2A

    Filter returning devices matching a one of device aliases. Supports wildcards using '*'. Example: 06-00-00-00-00-00 OR alias

    Request Body schema: application/json
    deviceId
    Array of strings <uuid> non-empty

    A list of device ids

    deviceConnectedBy
    Array of strings <uuid> non-empty

    A list of device ids

    deviceTag
    Array of strings non-empty

    A list of device tags

    deviceName
    Array of strings non-empty

    A list of device names. Supports wildcards using '*'. Case insensitive

    deviceTypeName
    Array of strings non-empty

    A list of device type names. Supports wildcards using '*'. Case insensitive

    deviceTypeCategory
    Array of strings <uri> non-empty

    A list of device type categories

    deviceTypeId
    Array of strings <uuid> non-empty

    A list of device type ids

    deviceAlias
    Array of strings non-empty

    A list of device aliases. Supports wildcards using '*'

    Responses

    200

    Success - requested devices.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    500

    Internal Server Error response.

    get /devices

    Production Environment

    https://api.lightelligence.io/v1/devices

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "deviceId":
      [
      ],
    • "deviceConnectedBy":
      [
      ],
    • "deviceTag":
      [
      ],
    • "deviceName":
      [
      ],
    • "deviceTypeName":
      [
      ],
    • "deviceTypeCategory":
      [
      ],
    • "deviceTypeId":
      [
      ],
    • "deviceAlias":
      [
      ]
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "meta":
      {
      },
    • "data":
      [
      ]
    }

    List tags used in devices

    Provides a list of tags used in your devices.

    olt-permissions: ["devices_base_data:read"]
    Authorizations:

    Responses

    200

    Success - requested device.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    500

    Internal Server Error response.

    get /devices/tags

    Production Environment

    https://api.lightelligence.io/v1/devices/tags

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      [
      ]
    }

    Get device

    Get a device by its UUID.

    olt-permissions: ["devices_base_data:read"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices UUID.

    Responses

    200

    Success - requested device.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    500

    Internal Server Error response.

    get /devices/{deviceId}

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Modify device

    Edit the device's data. Updating the configuration of a device will trigger a configuration synchronization message that will be sent to the device or the gateway, which the device is connected to, via MQTT.

    olt-permissions: ["devices_base_data:write"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices UUID.

    Request Body schema: application/json
    info
    object
    configuration
    object

    Object describing the desired device configuration properties. If this is changed, the device will receive an MQTT message containing the new configuration.

    tags
    Array of strings

    An array of tags to easily sort the devices (case insensitive and will be converted to lowercase).

    custom
    object

    Place for custom data.

    Responses

    200

    Success - edited the devices data.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    500

    Internal Server Error response.

    patch /devices/{deviceId}

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "info":
      {
      },
    • "configuration":
      {
      }
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Remove device

    Delete a device by its UUID.

    olt-permissions: ["devices_base_data:write"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices UUID.

    Responses

    204

    Success - device deleted.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    500

    Internal Server Error response.

    delete /devices/{deviceId}

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorMessage": "Validation of '<field name or path>' failed: <reason>.",
    • "errorCode": "DEVICE_VALIDATION"
    }

    Modify online monitoring rules of device

    Edit the online monitoring configurations for a device by UUID

    olt-permissions: ["devices_base_data:write"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices UUID.

    Request Body schema: application/json
    communicationInterval
    required
    integer [ 0 .. 172800 ] Nullable

    Expected communication interval in seconds for online monitoring of a device. When set to zero the online monitoring is disabled. When set to NULL on a device, the interval value from the associated device type will be inherited. When set to NULL on a device type, it will also disable the monitoring, unless any associated device overrides it with a non-zero value. Non-NULL device interval values always take precedence over device type interval values."

    Responses

    200

    Success - edited online monitoring configuration of device.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden or not found response.

    patch /devices/{deviceId}/onlinemonitoring

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/onlinemonitoring

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "communicationInterval": 60
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Get online monitoring rules of device

    Get the online monitoring configurations for a device by UUID

    olt-permissions: ["devices_base_data:read"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices UUID.

    Responses

    200

    Success - requested online monitoring configurations for a device.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden or not found response.

    get /devices/{deviceId}/onlinemonitoring

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/onlinemonitoring

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Trigger action on device

    The action name and payload will be transmitted to the device via MQTT.

    olt-permissions: ["devices_base_data:write"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices UUID.

    Request Body schema: application/json
    action
    required
    string

    Name of the action

    payload
    required
    object

    Action properties, validated against the schema actions in device type.

    Responses

    202

    Success - action accepted

    400

    Bad Request response.

    401

    Unauthorized response.

    404

    Not Found response.

    500

    Internal Server Error response.

    post /devices/{deviceId}/actions

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/actions

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "action": "raiseTemperature",
    • "payload":
      {
      }
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Trigger actions on devices matching given filter

    The action name and payload will be transmitted to the devices matching the given filter via MQTT. The action will only be sent to the devices where it matches the schema of the device type.

    olt-permissions: ["devices_base_data:write"]
    Authorizations:
    Request Body schema: application/json
    action
    required
    string

    Name of the action

    payload
    required
    object

    Action properties, validated against the schema actions in device type.

    deviceFilter
    required
    object

    Responses

    204

    Bulk actions request was accepted.

    400

    Bad Request response.

    401

    Unauthorized response.

    500

    Internal Server Error response.

    post /devices/actions

    Production Environment

    https://api.lightelligence.io/v1/devices/actions

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "action": "raiseTemperature",
    • "payload":
      {
      },
    • "deviceFilter":
      {
      }
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorMessage": "Validation of '<field name or path>' failed: <reason>.",
    • "errorCode": "DEVICE_VALIDATION"
    }

    Get device state

    Get the current state of a device. Device state contains the latest values for attributes and configuration, as sent by the device.

    olt-permissions: ["devices_states:read"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices uuid.

    Responses

    200

    Success - the device's state.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    500

    Internal Server Error response.

    get /devices/{deviceId}/state

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/state

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Get bulk device states

    Get the current state of each Device which matches the provided filter, ordered by creation date from newest to oldest. The state of a Device contains the latest value of each attribute and configuration.

    olt-permissions: ["devices_states:read"]
    Authorizations:
    query Parameters
    page
    integer >= 0
    Default: 0

    The number of the result page starting with 0.

    pageSize
    integer >= 0
    Default: 20

    The number of result per page.

    deviceId
    Array of strings <uuid> non-empty
    Example: deviceId=eba878ba-4a5d-4e67-b9d4-4dfd4e55f32f,be838a54-5f85-4154-b8a6-81fa4cb29561%22

    A comma separated list of device Ids which you want to use as a filter. Device will be selected if matches at least one item in a list

    deviceTag
    Array of strings non-empty
    Example: deviceTag=tag1,tag1

    Filter the results to contain devices having one of the comma-separated list of tags provided here. Case-insensitive. Surround the tag with * for substring matching. Example: *subString_of_a_tag*,fullMatching-Tag

    deviceTypeId
    Array of strings <uuid> non-empty
    Example: deviceTypeId=e41bcf5e-2a4e-435a-8387-4617cd52b194,f86579db-f403-4ce1-b782-f1978733ef9b

    Filter returning results matching one of the provided device type IDs.

    deviceTypeCategory
    Array of strings <uri> non-empty
    Example: deviceTypeCategory=urn%3Aexample%3Atest1%3Acategory,urn%3Aexample%3Atest2%3Acategory

    Filter the results to contain only entries having at least one of the provided categories. Example: [urn:example:test:category]

    deviceConnectedBy
    Array of strings <uuid> non-empty
    Example: deviceConnectedBy=eba878ba-4a5d-4e67-b9d4-4dfd4e55f32f,be838a54-5f85-4154-b8a6-81fa4cb29561%22

    Filter the results to contain devices having one of the comma-separated list of 'connected by' provided here.

    deviceName
    Array of strings non-empty
    Example: deviceName=Living%2A,Bad%2A

    Filter the results to contain devices having one of the comma-separated list of names provided here. Case-insensitive. Surround with * for substring matching. Example: subString OR fullMatchingName

    deviceAlias
    Array of strings non-empty
    Example: deviceAlias=Living%2A,Bad%2A

    Filter returning devices matching a one of device aliases. Supports wildcards using '*'. Example: 06-00-00-00-00-00 OR alias

    Request Body schema: application/json
    deviceId
    Array of strings <uuid> non-empty

    A list of device ids

    deviceConnectedBy
    Array of strings <uuid> non-empty

    A list of device ids

    deviceTag
    Array of strings non-empty

    A list of device tags

    deviceName
    Array of strings non-empty

    A list of device names. Supports wildcards using '*'. Case insensitive

    deviceTypeName
    Array of strings non-empty

    A list of device type names. Supports wildcards using '*'. Case insensitive

    deviceTypeCategory
    Array of strings <uri> non-empty

    A list of device type categories

    deviceTypeId
    Array of strings <uuid> non-empty

    A list of device type ids

    deviceAlias
    Array of strings non-empty

    A list of device aliases. Supports wildcards using '*'

    Responses

    200

    Success - the requested devices states.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    500

    Internal Server Error response.

    get /devices/states

    Production Environment

    https://api.lightelligence.io/v1/devices/states

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "deviceId":
      [
      ],
    • "deviceConnectedBy":
      [
      ],
    • "deviceTag":
      [
      ],
    • "deviceName":
      [
      ],
    • "deviceTypeName":
      [
      ],
    • "deviceTypeCategory":
      [
      ],
    • "deviceTypeId":
      [
      ],
    • "deviceAlias":
      [
      ]
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "meta":
      {
      },
    • "data":
      [
      ]
    }

    Get last hour of events for device

    Retrieve the events received inside last hour, latest first. Events can be filtered by their type. Note: This endpoint should only be used for debugging.

    olt-permissions: ["devices_historical_data:read"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices uuid.

    query Parameters
    eventTypes
    Array of strings
    Example: eventTypes=type1%2Ctype2%2Ctype3

    A comma separated list of event types used as a filter. So only events with one of these types assigned will be returned.

    Responses

    200

    Success - the device's events.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    500

    Internal Server Error response.

    get /devices/{deviceId}/last-events

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/last-events

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      [
      ]
    }

    Assign certificate to device

    Assign a certificate to a device. The certificate can then be used for authenticating the device when it connects to Lightelligence, for example through MQTT. A certificate can only be assigned to exactly one device.

    olt-permissions: ["device_certificates:write"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices UUID.

    Request Body schema: application/json
    cert
    required
    string

    The certificate

    status
    required
    string
    Default: "valid"
    Enum: "valid" "expired" "revoked" "inactive"

    The status of the certificate.

    Responses

    201

    Success - certificate.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    409

    Resource to create conflicts with an existing one.

    500

    Internal Server Error response.

    post /devices/{deviceId}/certificates

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/certificates

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "cert": "-----BEGIN CERTIFICATE-----<...>-----END CERTIFICATE-----\n",
    • "status": "valid"
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    List certificates assigned to device

    Provides a list of the certificates assigned to this device, ordered by creation date from newest to oldest.

    olt-permissions: ["device_certificates:read"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices UUID.

    query Parameters
    page
    integer >= 0
    Default: 0

    The number of the result page starting with 0.

    pageSize
    integer >= 0
    Default: 20

    The number of result per page.

    Responses

    200

    Success - certificate.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    500

    Internal Server Error response.

    get /devices/{deviceId}/certificates

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/certificates

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "meta":
      {
      },
    • "data":
      [
      ]
    }

    Get device certificate

    Get the details of the certificate associated with a device.

    olt-permissions: ["device_certificates:read"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices UUID.

    certId
    required
    string <uuid>

    The certificate UUID.

    Responses

    200

    Success - certificate.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    500

    Internal Server Error response.

    get /devices/{deviceId}/certificates/{certId}

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/certificates/{certId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Modify device certificate

    Edit the details of the certificate associated with a device.

    olt-permissions: ["device_certificates:write"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices UUID.

    certId
    required
    string <uuid>

    The certificate UUID.

    Request Body schema: application/json
    status
    string
    Default: "valid"
    Enum: "valid" "expired" "revoked" "inactive"

    The status of the certificate.

    Responses

    200

    Success - certificate.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    500

    Internal Server Error response.

    patch /devices/{deviceId}/certificates/{certId}

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/certificates/{certId}

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "status": "valid"
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Remove device certificate

    Delete the certificate associated with a device.

    olt-permissions: ["device_certificates:write"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices UUID.

    certId
    required
    string <uuid>

    The certificate UUID.

    Responses

    204

    Success - certificate deleted.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    500

    Internal Server Error response.

    delete /devices/{deviceId}/certificates/{certId}

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/certificates/{certId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorMessage": "Validation of '<field name or path>' failed: <reason>.",
    • "errorCode": "DEVICECERT_VALIDATION"
    }

    Get device diagnostics

    Get diagnostics data for the last hour, as reported for the device with the given UUID. Device Diagnostics contain errors in handling the data from the device on the cloud side. Data will be returned in descending order.

    olt-permissions: ["devices_base_data:read"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The device to filter for (uuid)

    Responses

    200

    OK

    400

    Bad Request response.

    401

    Unauthorized response.

    404

    Not Found response.

    500

    Internal Server Error response.

    get /devices/{deviceId}/last-diagnostics

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/last-diagnostics

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      [
      ]
    }

    Create firmware installation for device

    This endpoint creates a new firmware installation resource. This resource represents the status of installation into the slot for the specific device. Once it created, the device start receives installation instructions via MQTT.

    olt-permissions: ["firmware:write"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>

    The device ID

    Request Body schema: application/json

    Firmware installation to add to the system.

    firmwareId
    required
    string <uuid>

    The UUID of the firmware.

    slot
    required
    string <= 255 characters ^([a-zA-Z0-9_]+)$

    The name of the slot for firmware installation.

    Responses

    201

    Firmware installation was successfully created.

    400

    Your request could not be processed. This could e.g. mean that the provided JSON is not valid and cannot be parsed or that the object submitted to a POST or PATCH request failed to validate against JSON schema.

    401

    Your request is not authorized. This response means that you are not authorized to get access to the requested resource.

    403

    This response means you either do not have access to a specified resource or it does not even exist. The difference will not be exposed to the user to make iterating that much harder.

    500

    Internal Server Error response.

    post /devices/{deviceId}/firmware-installations

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/firmware-installations

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "firmwareId": "string",
    • "slot": "string"
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Get list of firmware installations for device

    This endpoint returns a list of firmware installations for a device.

    olt-permissions: ["firmware:read"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>

    The device ID

    query Parameters
    latestOnly
    boolean
    Default: false

    The flag that allows returning only the latest successful installation per slot

    Responses

    200

    OK

    401

    Your request is not authorized. This response means that you are not authorized to get access to the requested resource.

    403

    This response means you either do not have access to a specified resource or it does not even exist. The difference will not be exposed to the user to make iterating that much harder.

    500

    Internal Server Error response.

    get /devices/{deviceId}/firmware-installations

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/firmware-installations

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      [
      ]
    }

    Get firmware installation

    This endpoint returns a firmware-installation for the specified UUID.

    olt-permissions: ["firmware:read"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>

    The device ID

    installationId
    required
    string <uuid>

    The firmware installation ID

    Responses

    200

    OK

    401

    Your request is not authorized. This response means that you are not authorized to get access to the requested resource.

    403

    This response means you either do not have access to a specified resource or it does not even exist. The difference will not be exposed to the user to make iterating that much harder.

    500

    Internal Server Error response.

    get /devices/{deviceId}/firmware-installations/{installationId}

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/firmware-installations/{installationId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Update firmware installation status

    This endpoint enables updating the status of firmware installation for a device. This installation status is tracking on the cloud side. Used by devices/gateways/analytics/etc which report statuses of the installation firmware into the slot.

    olt-permissions: ["firmware:read","firmware:write"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>

    The device ID

    installationId
    required
    string <uuid>

    The firmware installation ID

    Request Body schema: application/json
    One of
    • object
    • object
    • object
    startedAt
    required
    string <date-time>

    The date when the firmware installation was started on device-side

    completedAt
    string <date-time>

    The date when the firmware installation was successfully completed on device-side

    rejectedAt
    string <date-time>

    The date when the firmware installation was rejected on device-side, due to some error

    rejectReason
    string <= 255 characters

    The description of firmware installation rejection

    Responses

    200

    OK

    401

    Your request is not authorized. This response means that you are not authorized to get access to the requested resource.

    403

    This response means you either do not have access to a specified resource or it does not even exist. The difference will not be exposed to the user to make iterating that much harder.

    500

    Internal Server Error response.

    patch /devices/{deviceId}/firmware-installations/{installationId}

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/firmware-installations/{installationId}

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "startedAt": "2019-12-19T23:18:00Z",
    • "completedAt": "2019-12-19T23:18:00Z",
    • "rejectedAt": "2019-12-19T23:18:00Z",
    • "rejectReason": "string"
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Get aggregated timeseries for device

    Get aggregated timeseries data for the device with the given UUID. Data will be returned in descending order. Maximum 4000 data points are returned.

    olt-permissions: ["devices_historical_data:read"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices uuid.

    query Parameters
    startTime
    required
    string <date-time>

    The start time of the time frame to request.

    endTime
    required
    string <date-time>

    The end time of the time frame to request.

    frameSize
    string
    Enum: "1m" "5m" "30m" "1h" "1d"

    The time frame size in which the values should be aggregated. By default, no frameSize is set and the data is not grouped by time. This means that the response contains exactly one result. In case frameSize is set and the number of points in the response exceed 4000, an error (400) will be returned.

    aggregation
    required
    string
    Enum: "min" "max" "mean" "sum" "count" "diff" "first" "last"
    Example: aggregation=max

    How should the values be aggregated. Supported values: min, max, mean, sum, count, diff, first, last.

    path
    required
    string
    Example: path=%24.attributes.sensor.brightness

    Path matching to a path defined in the reporting rules of the device's type. (e.g. $.attributes.brightness).

    Responses

    200

    Success - data.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    500

    Internal Server Error response.

    get /devices/{deviceId}/aggregated-timeseries

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/aggregated-timeseries

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      [
      ]
    }

    Get last hour of timeseries for device

    Get timeseries data for the last hour, as reported by the device with the given UUID. Data will be returned in an descending order. Maximum 4000 data points are returned. Note: This endpoint should be used by the user only for debugging his devices and the data they send.

    olt-permissions: ["devices_historical_data:read"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices uuid.

    query Parameters
    path
    required
    string
    Example: path=%24.attributes.sensor.brightness

    Path matching to a path defined in the reporting rules of the device's type. (e.g. $.attributes.brightness).

    Responses

    200

    Success - sensordata.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    500

    Internal Server Error response.

    get /devices/{deviceId}/last-timeseries

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/last-timeseries

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "meta": { },
    • "data":
      [
      ]
    }

    Delete timeseries data of device

    Delete reported timeseries data of a device belonging to the given UUID. This deletes both the timeseries and its aggregation. If no timeframe is provided, all data for the device and path is deleted.

    olt-permissions: ["devices_historical_data:write"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices uuid.

    query Parameters
    path
    required
    string
    Example: path=%24.attributes.sensor.brightness

    Path matching to a path defined in the reporting rules of the device's type. (e.g. $.attributes.brightness).

    startTime
    string <date-time>

    The start time of the time frame to request. (RFC 3339)

    endTime
    string <date-time>

    The end time of the time frame to request. (RFC 3339)

    Responses

    204

    Success.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    500

    Internal Server Error response.

    delete /devices/{deviceId}/timeseries

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/timeseries

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorMessage": "Request Body has to be an Object.",
    • "errorCode": "TIMESERIES_BADREQUEST"
    }

    Request dump of timeseries data for device

    Create a new timeseries dump, as reported by the device with the given UUID. The dump will be created asynchronously, and once completed will be available in the URL returned by this route. If no start and end time are specified, the dump contains all available data.

    olt-permissions: ["devices_historical_data:read"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices uuid.

    Request Body schema: application/json
    path
    required
    string

    Path matching to a path defined in the reporting rules of the device's type. (e.g. $.attributes.brightness).

    startTime
    string <date-time>

    The dump contains data starting with the start time (RFC 3339)

    endTime
    string <date-time>

    The dump contains data starting till to the end time (RFC 3339)

    Responses

    200

    Success

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    500

    Internal Server Error response.

    post /devices/{deviceId}/timeseries-dump

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/timeseries-dump

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "path": "$.attributes.sensor.brightness",
    • "startTime": "2018-07-12T12:18:11.859Z",
    • "endTime": "2018-07-12T12:18:11.859Z"
    }

    Response samples

    Download generated timeseries dump for device

    Return a timeseries dump created asynchronously via a POST request. If the dump is not yet ready, this route will respond with a 404. All created dumps will expire after one hour.

    olt-permissions: ["devices_historical_data:read"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices uuid.

    dumpId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The UUID of the dump

    Responses

    200

    A JSON file

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Dump not found

    500

    Internal Server Error response.

    get /devices/{deviceId}/timeseries-dump/{dumpId}

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/timeseries-dump/{dumpId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    [
    • {
      }
    ]

    Request dump of timeseries data for multiple devices

    Create a new dump of selected timeseries data. The dump will be created asynchronously, and once completed will be available in the URL returned by this route.

    olt-permissions: ["devices_historical_data:read"]
    Authorizations:
    Request Body schema: application/json
    dataFilter
    required
    object
    deviceFilter
    required
    object

    Criteria for filtering data by device. If multiple filters of different types (for example, tags and aliases) are provided, the devices must match each of them. You need to provide at least one device filter.

    Responses

    202

    Success

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    This response means you either do not have access to a specified resource or it does not even exist. The difference will not be exposed to the user to make iterating that much harder.

    500

    Internal Server Error response.

    post /devices/timeseries-dump

    Production Environment

    https://api.lightelligence.io/v1/devices/timeseries-dump

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "dataFilter":
      {
      },
    • "deviceFilter":
      {
      }
    }

    Response samples

    Content type
    application/json

    Download generated timeseries dump for multiple devices

    Return a timeseries dump created asynchronously via a POST request. If the dump is not yet ready, this route will respond with a 404. All created dumps will expire after one hour.

    olt-permissions: ["devices_historical_data:read"]
    Authorizations:
    path Parameters
    dumpId
    required
    string <uuid>
    Example: 07aba39a-ccb3-426f-838e-6d9a9ae330f4

    The UUID of the dump

    Responses

    200

    A JSON file

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    This response means you either do not have access to a specified resource or it does not even exist. The difference will not be exposed to the user to make iterating that much harder.

    404

    Dump not found

    500

    Internal Server Error response.

    get /devices/timeseries-dump/{dumpId}

    Production Environment

    https://api.lightelligence.io/v1/devices/timeseries-dump/{dumpId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    [
    • {
      }
    ]

    Request aggregated timeseries data dump for multiple devices

    Get aggregated timeseries data points for the devices matching the given filters. The data dump will be created asynchronously, and once completed will be available at the URL returned by this route. Data points in the dump will be sorted chronologically from newest to oldest.

    olt-permissions: ["devices_historical_data:read"]
    Authorizations:
    Request Body schema: application/json
    dataFilter
    required
    object
    params
    required
    object
    deviceFilter
    required
    object

    Criteria for filtering data by device. If multiple filters of different types (for example, tags and aliases) are provided, the devices must match each of them. You need to provide at least one device filter.

    Responses

    202

    Request accepted

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    This response means you either do not have access to a specified resource or it does not even exist. The difference will not be exposed to the user to make iterating that much harder.

    500

    Internal Server Error response.

    post /devices/aggregated-timeseries

    Production Environment

    https://api.lightelligence.io/v1/devices/aggregated-timeseries

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "dataFilter":
      {
      },
    • "params":
      {
      },
    • "deviceFilter":
      {
      }
    }

    Response samples

    Content type
    application/json

    Download aggregated timeseries data dump for multiple devices

    Return an aggregated timeseries data dump created asynchronously via a POST request. If the dump is not yet ready, this route will respond with a 404. All created dumps will expire after one hour. Data points in the dump will be sorted chronologically from newest to oldest.

    olt-permissions: ["devices_historical_data:read"]
    Authorizations:
    path Parameters
    dumpId
    required
    string <uuid>
    Example: 07aba39a-ccb3-426f-838e-6d9a9ae330f4

    The UUID of the dump

    Responses

    200

    A JSON file

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    This response means you either do not have access to a specified resource or it does not even exist. The difference will not be exposed to the user to make iterating that much harder.

    404

    Dump not found

    500

    Internal Server Error response.

    get /devices/aggregated-timeseries/{dumpId}

    Production Environment

    https://api.lightelligence.io/v1/devices/aggregated-timeseries/{dumpId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    [
    • {
      }
    ]

    Request new WebSocket streaming connection

    Request a new WebSocket connection URL. If the request and authentication is successful the provided URL from the response can be used to establish a new WebSocket connection.

    The stream capabilities depend on its type.

    • live stream: service starts streaming events once connection is established. When client reconnects again, stream starts from the point of connection. Events that happened when client was disconnected are dropped.

    • buffered stream: service starts buffering events once connected. Events streamed from the persistent storage, so there is might be some latency comparing to live streams. Events stay in the buffer for 2 days. It means if time between reconnections is shorter than 2 days, already consumed events can be deliverd again. The age of events to deliver is specified by options.replayFromTimestamp parameter. If the client wouldn't make any new connections longer than 2 days after last disconnect, the service will stop buffering for the given client.

    Note: The WebSocket connection URL is only valid for 15 seconds. If the url has expired, a new url needs to be requested.

    olt-permissions: ["devices_streaming:read"]
    Authorizations:
    Request Body schema: application/json
    type
    string
    Enum: "live" "buffered"

    Specify the type of streaming connection requested. Defaults to "live". Live connections instantly sends messages received to the WebSocket connection, whereas buffered connection starts buffering messages for tenant on first connection. If connection is lost, messages that are up to two days old can be replayed.

    options
    object

    Specify options for the streaming connection. Not necessary on first connection.

    filter
    required
    object

    Filter which allows to receive updates for specific message types and devices; The five filter conditions ("type", "deviceId", "tag", "attributes" and "configurations") are treated as an AND, the values provided in the arrays are treated as an OR. So the websocket client will receive all messages that contains ONE of the mentioned message types AND originates from ONE of the mentioned device ids.

    Responses

    200

    Success - A new WebSocket connection can be established with the provided WebSocket URL in the response.

    400

    Bad request

    401

    Unauthorized

    403

    Token is not valid

    500

    Internal Server Error

    post /devices/streaming-connections

    Production Environment

    https://api.lightelligence.io/v1/devices/streaming-connections

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "type": "buffered",
    • "options":
      {
      },
    • "filter":
      {
      }
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Open WebSocket Streaming Connection Deprecated

    IMPORTANT NOTE: this path is likely to change, DO NOT RELY ON THE EXACT PATH, just take the URL that is returned from the POST as is.

    • Opens a new WebSocket connection. If the provided token is valid, the request will be upgraded to a WebSocket connection.
    • Once the WebSocket connection is established the client receives updates for all subscribed message types matching the device filter.
    • The following message types are sent to the client (you can find the message specification in the Models section): AttributeUpdate, ConfigurationUpdate and Event.
    • The client has to be aware that the websocket can be closed at any time; in that case the client has to create a new websocket by POSTing to the /devices/streaming-connections endpoint again.
    • The WebSocket API is only used for unidirectional traffic for now. Messages from the client are ignored by the server.
    • Un-ordered messages: Websocket messages can be published un-ordered. Use time to order the messages received in the client.
    olt-permissions: ["devices_streaming:read"]
    olt-transitive-permissions: ["devices_base_data:read"]
    Authorizations:
    path Parameters
    token
    required
    string <string>
    Example: bbdf5d13d9a09ab5cfe5c45536ecf4f432e9c4736aeb6d930ea240904d0ae7d8

    The token used to authenticate the WebSocket connection

    Responses

    403

    Token is not valid

    500

    Internal Server Error

    get /devices/streaming-connections/{token}/ws

    Production Environment

    https://api.lightelligence.io/v1/devices/streaming-connections/{token}/ws

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorCode": "STREAMING_INVALID_TOKEN",
    • "errorMessage": "token is invalid."
    }

    Open WebSocket Streaming Connection

    IMPORTANT NOTE: DO NOT RELY ON THE EXACT PATH, just take the URL that is returned from the POST as is.

    • Opens a new WebSocket connection. If the provided token is valid, the request will be upgraded to a WebSocket connection.
    • Once the WebSocket connection is established the client receives updates for all subscribed message types matching the device filter.
    • The following message types are sent to the client (you can find the message specification in the Models section): AttributeUpdate, ConfigurationUpdate and Event.
    • The client has to be aware that the websocket can be closed at any time; in that case the client has to create a new websocket by POSTing to the /devices/streaming-connections endpoint again.
    • The WebSocket API is only used for unidirectional traffic for now. Messages from the client are ignored by the server.
    • Un-ordered messages: Websocket messages can be published un-ordered. Use time to order the messages received in the client.
    olt-permissions: ["devices_streaming:read"]
    olt-transitive-permissions: ["devices_base_data:read"]
    Authorizations:
    path Parameters
    token
    required
    string <string>
    Example: bbdf5d13d9a09ab5cfe5c45536ecf4f432e9c4736aeb6d930ea240904d0ae7d8

    The token used to authenticate the WebSocket connection

    type
    required
    string
    Enum: "live" "buffered"
    Example: live

    The streaming type

    Responses

    403

    Token is not valid

    500

    Internal Server Error

    get /devices/streaming-connections/{token}/ws/{type}

    Production Environment

    https://api.lightelligence.io/v1/devices/streaming-connections/{token}/ws/{type}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorCode": "STREAMING_INVALID_TOKEN",
    • "errorMessage": "token is invalid."
    }

    device-types

    Device Types are used to describe the behaviour of a Device. This includes the schema of the data a Device reports or receives as well as information like model and description. Furthermore the Device Type specifies, where reported data is saved in the cloud by including reporting rules.

    Create new device type

    Registers a new device type that can be used for Lightelligence devices.

    olt-permissions: ["devicetypes:write"]
    Authorizations:
    Request Body schema: application/json
    name
    required
    string <= 255 characters

    Name of the device type

    manufacturer
    string <= 255 characters

    The manufacurer of the device.

    model
    string <= 255 characters

    The model of the device

    description
    string <= 255 characters

    A descriptive text.

    categories
    Array of strings <uri>

    External specifications the device conforms to

    reportingRules
    Array of objects

    Reporting rules for various attributes or configuration keys of the device. Unless specified, everything is reported to deviceManagement

    schema
    required
    object

    JSON Schemas for the inputs and outputs of the device

    slots
    object

    JSON Slots for device type

    communicationInterval
    integer [ 0 .. 172800 ] Nullable

    Expected communication interval in seconds for online monitoring of a device. When set to zero the online monitoring is disabled. When set to NULL on a device, the interval value from the associated device type will be inherited. When set to NULL on a device type, it will also disable the monitoring, unless any associated device overrides it with a non-zero value. Non-NULL device interval values always take precedence over device type interval values."

    Responses

    201

    Success - device-type added.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    500

    Internal Server Error response.

    post /device-types

    Production Environment

    https://api.lightelligence.io/v1/device-types

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "name": "Extended OSR Light switch",
    • "manufacturer": "OSRAM",
    • "model": "C3PO",
    • "description": "Newest version of the switch.",
    • "categories":
      [
      ],
    • "reportingRules":
      [
      ],
    • "schema":
      {
      },
    • "slots":
      {
      },
    • "communicationInterval": 60
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    List available device types

    Provides a list of device types available for your tenant, ordered by creation date from newest to oldest. The list can be filtered by name, semantic categories or device type ids. Filter entries can be either provided as query parameters or in the request body, but not both.

    olt-permissions: ["devicetypes:read"]
    Authorizations:
    query Parameters
    page
    integer >= 0
    Default: 0

    The number of the result page starting with 0.

    pageSize
    integer >= 0
    Default: 20

    The number of result per page.

    deviceTypeName
    Array of strings non-empty
    Example: deviceTypeName=Living%2A,Bad%2A

    Filter the results to contain device types having one of the comma-separated list of names provided here. Case-insensitive. Surround with * for substring matching. Example: subString OR fullMatchingName

    deviceTypeCategory
    Array of strings <uri> non-empty
    Example: deviceTypeCategory=urn%3Aexample%3Atest1%3Acategory,urn%3Aexample%3Atest2%3Acategory

    Filter the results to contain only entries having at least one of the provided categories. Example: [urn:example:test:category]

    deviceTypeId
    Array of strings <uuid> non-empty
    Example: deviceTypeId=e41bcf5e-2a4e-435a-8387-4617cd52b194,f86579db-f403-4ce1-b782-f1978733ef9b

    Filter returning results matching one of the provided device type IDs.

    Request Body schema: application/json
    deviceTypeName
    Array of strings non-empty

    A list of device type names. Supports wildcards using '*'. Case insensitive

    deviceTypeCategory
    Array of strings <uri> non-empty

    A list of device type categories

    deviceTypeId
    Array of strings <uuid> non-empty

    A list of device type ids

    Responses

    200

    Success - device-types

    400

    Bad Request response.

    401

    Unauthorized response.

    500

    Internal Server Error response.

    get /device-types

    Production Environment

    https://api.lightelligence.io/v1/device-types

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "deviceTypeName":
      [
      ],
    • "deviceTypeCategory":
      [
      ],
    • "deviceTypeId":
      [
      ]
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "meta":
      {
      },
    • "data":
      [
      ]
    }

    List categories used in device types

    Provides a list of semantic categories used in your device types.

    olt-permissions: ["devicetypes:read"]
    Authorizations:

    Responses

    200

    Success - device-types-categories

    400

    Bad Request response.

    401

    Unauthorized response.

    500

    Internal Server Error response.

    get /device-types/categories

    Production Environment

    https://api.lightelligence.io/v1/device-types/categories

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      [
      ]
    }

    Get device type

    Get a specific device type by UUID

    olt-permissions: ["devicetypes:read"]
    Authorizations:
    path Parameters
    deviceTypeId
    required
    string <uuid>

    The device type id.

    Responses

    200

    Success - requested device-type.

    400

    Bad Request response.

    401

    Unauthorized response.

    404

    Not Found response.

    500

    Internal Server Error response.

    get /device-types/{deviceTypeId}

    Production Environment

    https://api.lightelligence.io/v1/device-types/{deviceTypeId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Modify device type

    Edit a specific device type by UUID partially. UUID is not patchable. You can also only patch a single property from your custom data. Provide a null to delete a property.

    olt-permissions: ["devicetypes:write"]
    Authorizations:
    path Parameters
    deviceTypeId
    required
    string <uuid>

    The device type id.

    Request Body schema: application/json
    name
    string [ 1 .. 255 ] characters

    Name of the device type

    manufacturer
    string <= 255 characters Nullable

    The manufacurer of the device.

    model
    string <= 255 characters Nullable

    The model of the device

    description
    string <= 255 characters Nullable

    A descriptive text.

    categories
    Array of strings <uri> Nullable

    External specifications the device conforms to

    reportingRules
    Array of objects Nullable

    Reporting rules for various attributes or configuration keys of the device. Unless specified, everything is reported to deviceManagement

    schema
    object

    JSON Schemas for the inputs and outputs of the device

    slots
    object

    JSON Slots for device type

    communicationInterval
    integer [ 0 .. 172800 ] Nullable

    Expected communication interval in seconds for online monitoring of a device. When set to zero the online monitoring is disabled. When set to NULL on a device, the interval value from the associated device type will be inherited. When set to NULL on a device type, it will also disable the monitoring, unless any associated device overrides it with a non-zero value. Non-NULL device interval values always take precedence over device type interval values."

    Responses

    200

    Success - edited device-type.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    409

    The device to use as connectedBy was not found.

    500

    Internal Server Error response.

    patch /device-types/{deviceTypeId}

    Production Environment

    https://api.lightelligence.io/v1/device-types/{deviceTypeId}

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "name": "Extended OSR Light switch",
    • "manufacturer": "OSRAM",
    • "model": "C3PO",
    • "description": "Newest version of the switch.",
    • "categories":
      [
      ],
    • "reportingRules":
      [
      ],
    • "schema":
      {
      },
    • "slots":
      {
      },
    • "communicationInterval": 60
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Remove device type

    Delete a specific device type by UUID. Device types currently associated with devices cannot be removed.

    olt-permissions: ["devicetypes:write"]
    Authorizations:
    path Parameters
    deviceTypeId
    required
    string <uuid>

    The device type id.

    Responses

    204

    Success - deleted device-type.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    409

    DeviceType can not be deleted. It is being used by active devices.

    500

    Internal Server Error response.

    delete /device-types/{deviceTypeId}

    Production Environment

    https://api.lightelligence.io/v1/device-types/{deviceTypeId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorMessage": "Validation of '<field name or path>' failed: <reason>.",
    • "errorCode": "DEVICE_VALIDATION"
    }

    Modify online monitoring rules of device type

    Edit the online monitoring configurations for a device type by UUID

    olt-permissions: ["devicetypes:write"]
    Authorizations:
    path Parameters
    deviceTypeId
    required
    string <uuid>

    The device type id.

    Request Body schema: application/json
    communicationInterval
    required
    integer [ 0 .. 172800 ] Nullable

    Expected communication interval in seconds for online monitoring of a device. When set to zero the online monitoring is disabled. When set to NULL on a device, the interval value from the associated device type will be inherited. When set to NULL on a device type, it will also disable the monitoring, unless any associated device overrides it with a non-zero value. Non-NULL device interval values always take precedence over device type interval values."

    Responses

    200

    Success - edited online monitoring configuration of device-type.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden or not found response.

    patch /device-types/{deviceTypeId}/onlinemonitoring

    Production Environment

    https://api.lightelligence.io/v1/device-types/{deviceTypeId}/onlinemonitoring

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "communicationInterval": 60
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Get online monitoring rules of device type

    Get the online monitoring configurations for a device type by UUID

    olt-permissions: ["devicetypes:read"]
    Authorizations:
    path Parameters
    deviceTypeId
    required
    string <uuid>

    The device type id.

    Responses

    200

    Success - requested online monitoring configurations for a device-type.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden or not found response.

    get /device-types/{deviceTypeId}/onlinemonitoring

    Production Environment

    https://api.lightelligence.io/v1/device-types/{deviceTypeId}/onlinemonitoring

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Associate firmware with device type slot

    Associate an existing firmware with a slot in the provided device type. After this, the firmware can be installed into the slot on all devices having this device type.

    olt-permissions: ["devicetypes:write"]
    Authorizations:
    path Parameters
    deviceTypeId
    required
    string <uuid>

    The device type id.

    slotName
    required
    string <= 255 characters ^([a-zA-Z0-9_]+)$

    The device type slot name.

    Request Body schema: application/json
    firmwareId
    required
    string <uuid>

    Device firmware UUID

    Responses

    201

    Success - associated device type firmwares.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    409

    The device to use as connectedBy was not found.

    500

    Internal Server Error response.

    post /device-types/{deviceTypeId}/slots/{slotName}/firmware-associations

    Production Environment

    https://api.lightelligence.io/v1/device-types/{deviceTypeId}/slots/{slotName}/firmware-associations

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "firmwareId": "string"
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Get device type firmwares

    Retrieve the list of firmwares associcated with the specified slot on the specified device type. All the firmwares listed here can be installed into the slot on all devices having this device type

    olt-permissions: ["devicetypes:read"]
    Authorizations:
    path Parameters
    deviceTypeId
    required
    string <uuid>

    The device type id.

    slotName
    required
    string <= 255 characters ^([a-zA-Z0-9_]+)$

    The device type slot name.

    Responses

    200

    Success - requested device type firmwares.

    400

    Bad Request response.

    401

    Unauthorized response.

    404

    Not Found response.

    500

    Internal Server Error response.

    get /device-types/{deviceTypeId}/slots/{slotName}/firmware-associations

    Production Environment

    https://api.lightelligence.io/v1/device-types/{deviceTypeId}/slots/{slotName}/firmware-associations

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      [
      ]
    }

    Removal of an association

    Removal of an association for a slot in specified device type. After removal of an association, all existing installation and installation requests will continue to run.

    olt-permissions: ["devicetypes:write"]
    Authorizations:
    path Parameters
    deviceTypeId
    required
    string <uuid>

    The device type id.

    slotName
    required
    string <= 255 characters ^([a-zA-Z0-9_]+)$

    The device type slot name.

    associationId
    required
    string <uuid>

    The association id.

    Responses

    204

    Success - removal of an association.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    500

    Internal Server Error response.

    delete /device-types/{deviceTypeId}/slots/{slotName}/firmware-associations/{associationId}

    Production Environment

    https://api.lightelligence.io/v1/device-types/{deviceTypeId}/slots/{slotName}/firmware-associations/{associationId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorMessage": "Validation of '<field name or path>' failed: <reason>.",
    • "errorCode": "DEVICE_VALIDATION"
    }

    certificates

    Certificates are used to authenticate a Device when it connects to the cloud. Therefore every Device which directly sends data to the cloud needs to have a certificate. If a Device A sends data to a Device B (acting as a gateway) which sends the data to the cloud. Device A does not need a certificate, only device B does.

    Assign certificate to device

    Assign a certificate to a device. The certificate can then be used for authenticating the device when it connects to Lightelligence, for example through MQTT. A certificate can only be assigned to exactly one device.

    olt-permissions: ["device_certificates:write"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices UUID.

    Request Body schema: application/json
    cert
    required
    string

    The certificate

    status
    required
    string
    Default: "valid"
    Enum: "valid" "expired" "revoked" "inactive"

    The status of the certificate.

    Responses

    201

    Success - certificate.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    409

    Resource to create conflicts with an existing one.

    500

    Internal Server Error response.

    post /devices/{deviceId}/certificates

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/certificates

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "cert": "-----BEGIN CERTIFICATE-----<...>-----END CERTIFICATE-----\n",
    • "status": "valid"
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    List certificates assigned to device

    Provides a list of the certificates assigned to this device, ordered by creation date from newest to oldest.

    olt-permissions: ["device_certificates:read"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices UUID.

    query Parameters
    page
    integer >= 0
    Default: 0

    The number of the result page starting with 0.

    pageSize
    integer >= 0
    Default: 20

    The number of result per page.

    Responses

    200

    Success - certificate.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    500

    Internal Server Error response.

    get /devices/{deviceId}/certificates

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/certificates

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "meta":
      {
      },
    • "data":
      [
      ]
    }

    Get device certificate

    Get the details of the certificate associated with a device.

    olt-permissions: ["device_certificates:read"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices UUID.

    certId
    required
    string <uuid>

    The certificate UUID.

    Responses

    200

    Success - certificate.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    500

    Internal Server Error response.

    get /devices/{deviceId}/certificates/{certId}

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/certificates/{certId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Modify device certificate

    Edit the details of the certificate associated with a device.

    olt-permissions: ["device_certificates:write"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices UUID.

    certId
    required
    string <uuid>

    The certificate UUID.

    Request Body schema: application/json
    status
    string
    Default: "valid"
    Enum: "valid" "expired" "revoked" "inactive"

    The status of the certificate.

    Responses

    200

    Success - certificate.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    500

    Internal Server Error response.

    patch /devices/{deviceId}/certificates/{certId}

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/certificates/{certId}

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "status": "valid"
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Remove device certificate

    Delete the certificate associated with a device.

    olt-permissions: ["device_certificates:write"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices UUID.

    certId
    required
    string <uuid>

    The certificate UUID.

    Responses

    204

    Success - certificate deleted.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    500

    Internal Server Error response.

    delete /devices/{deviceId}/certificates/{certId}

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/certificates/{certId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorMessage": "Validation of '<field name or path>' failed: <reason>.",
    • "errorCode": "DEVICECERT_VALIDATION"
    }

    firmwares

    Firmware resources represent files that can be pushed down or pulled by gateways and/or devices. Each firmware resource consists of some metadata, providing additional information like a version or description, and an attached file (blob). These files can be firmwares, bootloaders, configuration files or any binary data you want to manage.

    Creates a new firmware

    This endpoint creates a new firmware resource. Once a firmware is created, arbitrary blob data can be attached to the firmware resource. Blob data can be a firmware file, configuration file or any other binary data. Firmware resources without attached blob data will become invalid after 5 minutes.

    olt-permissions: ["firmware:write"]
    Authorizations:
    Request Body schema: application/json

    Firmware to add to the system

    name
    required
    string [ 1 .. 255 ] characters

    The name of the firmware

    description
    string <= 255 characters Nullable

    Additional description for the firmware

    version
    string <= 255 characters Nullable

    A string that describes the version of the firmware

    Responses

    201

    Firmware was successfully created. Please note, that as long as there is no blob attached to the firmware not all fields in the response are set.

    400

    Your request could not be processed. This could e.g. mean that the provided JSON is not valid and cannot be parsed or that the object submitted to a POST or PATCH request failed to validate against JSON schema.

    401

    Your request is not authorized. This response means that you are not authorized to get access to the requested resource.

    403

    This response means you either do not have access to a specified resource or it does not even exist. The difference will not be exposed to the user to make iterating that much harder.

    500

    Internal Server Error response.

    post /firmwares

    Production Environment

    https://api.lightelligence.io/v1/firmwares

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "name": "string",
    • "description": "string",
    • "version": "string"
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Get all firmwares

    This endpoint returns a list with all available firmwares, ordered by creation date from newest to oldest.

    olt-permissions: ["firmware:read"]
    Authorizations:
    query Parameters
    page
    integer >= 0
    Default: 0

    The number of the result page starting with 0

    pageSize
    integer >= 1
    Default: 20

    The number of items per page

    Responses

    200

    OK

    401

    Your request is not authorized. This response means that you are not authorized to get access to the requested resource.

    403

    This response means you either do not have access to a specified resource or it does not even exist. The difference will not be exposed to the user to make iterating that much harder.

    500

    Internal Server Error response.

    get /firmwares

    Production Environment

    https://api.lightelligence.io/v1/firmwares

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "meta":
      {
      },
    • "data":
      [
      ]
    }

    Get a firmware

    This endpoint returns a firmware for the specified UUID.

    olt-permissions: ["firmware:read"]
    Authorizations:
    path Parameters
    id
    required
    string <uuid>

    The firmware ID

    Responses

    200

    OK

    401

    Your request is not authorized. This response means that you are not authorized to get access to the requested resource.

    403

    This response means you either do not have access to a specified resource or it does not even exist. The difference will not be exposed to the user to make iterating that much harder.

    500

    Internal Server Error response.

    get /firmwares/{id}

    Production Environment

    https://api.lightelligence.io/v1/firmwares/{id}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Deletes a firmware

    This endpoint allows the deletion of a firmware. All blob data associated with this firmware will also be deleted.

    olt-permissions: ["firmware:write"]
    Authorizations:
    path Parameters
    id
    required
    string <uuid>

    The firmware ID

    Responses

    204

    Firmware successfully deleted.

    401

    Your request is not authorized. This response means that you are not authorized to get access to the requested resource.

    403

    This response means you either do not have access to a specified resource or it does not even exist. The difference will not be exposed to the user to make iterating that much harder.

    500

    Internal Server Error response.

    delete /firmwares/{id}

    Production Environment

    https://api.lightelligence.io/v1/firmwares/{id}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorMessage": "string",
    • "errorCode": "FIRMWARE_UNAUTHORIZED"
    }

    Attach a blob to a firmware

    This endpoind allows the attaching of a blob to the specified firmware. Blob data can be a binary firmware file, configuration file or any other binary data is accepted. When a blob is attached to a firmware, a download link for the blob is added to the firmware resource which can be used to download the blob. Please note, that it's only allowed to attach a blob once. In case a blob is attached more than once you will get a 423 status code indicating that the resource is locked.

    olt-permissions: ["firmware:write"]
    Authorizations:
    path Parameters
    id
    required
    string <uuid>

    The firmware ID

    Request Body schema: application/octet-stream

    The blob data. Can be any arbitrary binary data.

    string <binary>

    Binary data

    Responses

    200

    OK - Blob was successfully attached to the firmware.

    400

    Your request could not be processed. This could e.g. mean that the provided JSON is not valid and cannot be parsed or that the object submitted to a POST or PATCH request failed to validate against JSON schema.

    401

    Your request is not authorized. This response means that you are not authorized to get access to the requested resource.

    403

    This response means you either do not have access to a specified resource or it does not even exist. The difference will not be exposed to the user to make iterating that much harder.

    423

    A blob is already attached to the firmware and it's locked. Which means that the blob cannot be changed or replaced with a new blob.

    500

    Internal Server Error response.

    post /firmwares/{id}/blob

    Production Environment

    https://api.lightelligence.io/v1/firmwares/{id}/blob

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Downloads a blob

    This endpoint allows you to dowload an attached blob.

    olt-permissions: ["firmware:read"]
    Authorizations:
    path Parameters
    id
    required
    string <uuid>

    The firmware ID

    Responses

    302

    302 response

    400

    Your request could not be processed. This could e.g. mean that the provided JSON is not valid and cannot be parsed or that the object submitted to a POST or PATCH request failed to validate against JSON schema.

    401

    Your request is not authorized. This response means that you are not authorized to get access to the requested resource.

    403

    This response means you either do not have access to a specified resource or it does not even exist. The difference will not be exposed to the user to make iterating that much harder.

    500

    Internal Server Error response.

    get /firmwares/{id}/blob

    Production Environment

    https://api.lightelligence.io/v1/firmwares/{id}/blob

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorMessage": "string",
    • "errorCode": "FIRMWARE_VALIDATION"
    }

    Create firmware installation for device

    This endpoint creates a new firmware installation resource. This resource represents the status of installation into the slot for the specific device. Once it created, the device start receives installation instructions via MQTT.

    olt-permissions: ["firmware:write"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>

    The device ID

    Request Body schema: application/json

    Firmware installation to add to the system.

    firmwareId
    required
    string <uuid>

    The UUID of the firmware.

    slot
    required
    string <= 255 characters ^([a-zA-Z0-9_]+)$

    The name of the slot for firmware installation.

    Responses

    201

    Firmware installation was successfully created.

    400

    Your request could not be processed. This could e.g. mean that the provided JSON is not valid and cannot be parsed or that the object submitted to a POST or PATCH request failed to validate against JSON schema.

    401

    Your request is not authorized. This response means that you are not authorized to get access to the requested resource.

    403

    This response means you either do not have access to a specified resource or it does not even exist. The difference will not be exposed to the user to make iterating that much harder.

    500

    Internal Server Error response.

    post /devices/{deviceId}/firmware-installations

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/firmware-installations

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "firmwareId": "string",
    • "slot": "string"
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Get list of firmware installations for device

    This endpoint returns a list of firmware installations for a device.

    olt-permissions: ["firmware:read"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>

    The device ID

    query Parameters
    latestOnly
    boolean
    Default: false

    The flag that allows returning only the latest successful installation per slot

    Responses

    200

    OK

    401

    Your request is not authorized. This response means that you are not authorized to get access to the requested resource.

    403

    This response means you either do not have access to a specified resource or it does not even exist. The difference will not be exposed to the user to make iterating that much harder.

    500

    Internal Server Error response.

    get /devices/{deviceId}/firmware-installations

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/firmware-installations

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      [
      ]
    }

    Get firmware installation

    This endpoint returns a firmware-installation for the specified UUID.

    olt-permissions: ["firmware:read"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>

    The device ID

    installationId
    required
    string <uuid>

    The firmware installation ID

    Responses

    200

    OK

    401

    Your request is not authorized. This response means that you are not authorized to get access to the requested resource.

    403

    This response means you either do not have access to a specified resource or it does not even exist. The difference will not be exposed to the user to make iterating that much harder.

    500

    Internal Server Error response.

    get /devices/{deviceId}/firmware-installations/{installationId}

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/firmware-installations/{installationId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Update firmware installation status

    This endpoint enables updating the status of firmware installation for a device. This installation status is tracking on the cloud side. Used by devices/gateways/analytics/etc which report statuses of the installation firmware into the slot.

    olt-permissions: ["firmware:read","firmware:write"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>

    The device ID

    installationId
    required
    string <uuid>

    The firmware installation ID

    Request Body schema: application/json
    One of
    • object
    • object
    • object
    startedAt
    required
    string <date-time>

    The date when the firmware installation was started on device-side

    completedAt
    string <date-time>

    The date when the firmware installation was successfully completed on device-side

    rejectedAt
    string <date-time>

    The date when the firmware installation was rejected on device-side, due to some error

    rejectReason
    string <= 255 characters

    The description of firmware installation rejection

    Responses

    200

    OK

    401

    Your request is not authorized. This response means that you are not authorized to get access to the requested resource.

    403

    This response means you either do not have access to a specified resource or it does not even exist. The difference will not be exposed to the user to make iterating that much harder.

    500

    Internal Server Error response.

    patch /devices/{deviceId}/firmware-installations/{installationId}

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/firmware-installations/{installationId}

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "startedAt": "2019-12-19T23:18:00Z",
    • "completedAt": "2019-12-19T23:18:00Z",
    • "rejectedAt": "2019-12-19T23:18:00Z",
    • "rejectReason": "string"
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    events

    Events can be reported by devices. Typical event could be temperatureHigh or maintainanceNeeded. Events differ from reported data by typically being triggered by reaching a threshold or an event in the Device’s environment. In a future version of the Lightelligence Platform events can be used to trigger notifications etc.

    Get last hour of events for device

    Retrieve the events received inside last hour, latest first. Events can be filtered by their type. Note: This endpoint should only be used for debugging.

    olt-permissions: ["devices_historical_data:read"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices uuid.

    query Parameters
    eventTypes
    Array of strings
    Example: eventTypes=type1%2Ctype2%2Ctype3

    A comma separated list of event types used as a filter. So only events with one of these types assigned will be returned.

    Responses

    200

    Success - the device's events.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    500

    Internal Server Error response.

    get /devices/{deviceId}/last-events

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/last-events

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      [
      ]
    }

    Send device event

    Send an event associated with a device. This endpoint can be used to emulate a real device sending events. The event type must be registered in the device type schema.

    olt-permissions: ["ingest:write"]
    Authorizations:
    Request Body schema: application/json
    One of
    • Device Event
    • Device Event with alias
    type
    required
    string <= 255 characters ^([a-zA-Z0-9_]+)$

    The type of the event is used for filtering. Alphanumeric, may contain underscores.

    value
    object

    The reported event payload as an object.

    createdAt
    string <date-time>

    The date the event were created. If not included it will default to the system time at arrival.

    deviceId
    required
    string <uuid>

    The uuid of the device which emitted this event.

    senderId
    string <uuid>

    The uuid of the device which transmitted this event.

    Responses

    202

    Success - Event has been sent for processing.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    500

    Internal Server Error response.

    post /event-ingest

    Production Environment

    https://api.lightelligence.io/v1/event-ingest

    Request samples

    Content type
    application/json
    Example
    Copy
    Expand all Collapse all
    {
    • "type": "overheated",
    • "value":
      {
      },
    • "createdAt": "2018-07-07T11:50:12+00:00",
    • "deviceId": "550e8400-e29b-11d4-a716-446655440000",
    • "senderId": "550e8400-e29b-11d4-a716-446655440000"
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorMessage": "Validation of '<field name or path>' failed: <reason>.",
    • "errorCode": "DEVICE_VALIDATION"
    }

    firmware-installation

    Create firmware installation for device

    This endpoint creates a new firmware installation resource. This resource represents the status of installation into the slot for the specific device. Once it created, the device start receives installation instructions via MQTT.

    olt-permissions: ["firmware:write"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>

    The device ID

    Request Body schema: application/json

    Firmware installation to add to the system.

    firmwareId
    required
    string <uuid>

    The UUID of the firmware.

    slot
    required
    string <= 255 characters ^([a-zA-Z0-9_]+)$

    The name of the slot for firmware installation.

    Responses

    201

    Firmware installation was successfully created.

    400

    Your request could not be processed. This could e.g. mean that the provided JSON is not valid and cannot be parsed or that the object submitted to a POST or PATCH request failed to validate against JSON schema.

    401

    Your request is not authorized. This response means that you are not authorized to get access to the requested resource.

    403

    This response means you either do not have access to a specified resource or it does not even exist. The difference will not be exposed to the user to make iterating that much harder.

    500

    Internal Server Error response.

    post /devices/{deviceId}/firmware-installations

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/firmware-installations

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "firmwareId": "string",
    • "slot": "string"
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Get list of firmware installations for device

    This endpoint returns a list of firmware installations for a device.

    olt-permissions: ["firmware:read"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>

    The device ID

    query Parameters
    latestOnly
    boolean
    Default: false

    The flag that allows returning only the latest successful installation per slot

    Responses

    200

    OK

    401

    Your request is not authorized. This response means that you are not authorized to get access to the requested resource.

    403

    This response means you either do not have access to a specified resource or it does not even exist. The difference will not be exposed to the user to make iterating that much harder.

    500

    Internal Server Error response.

    get /devices/{deviceId}/firmware-installations

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/firmware-installations

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      [
      ]
    }

    Get firmware installation

    This endpoint returns a firmware-installation for the specified UUID.

    olt-permissions: ["firmware:read"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>

    The device ID

    installationId
    required
    string <uuid>

    The firmware installation ID

    Responses

    200

    OK

    401

    Your request is not authorized. This response means that you are not authorized to get access to the requested resource.

    403

    This response means you either do not have access to a specified resource or it does not even exist. The difference will not be exposed to the user to make iterating that much harder.

    500

    Internal Server Error response.

    get /devices/{deviceId}/firmware-installations/{installationId}

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/firmware-installations/{installationId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Update firmware installation status

    This endpoint enables updating the status of firmware installation for a device. This installation status is tracking on the cloud side. Used by devices/gateways/analytics/etc which report statuses of the installation firmware into the slot.

    olt-permissions: ["firmware:read","firmware:write"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>

    The device ID

    installationId
    required
    string <uuid>

    The firmware installation ID

    Request Body schema: application/json
    One of
    • object
    • object
    • object
    startedAt
    required
    string <date-time>

    The date when the firmware installation was started on device-side

    completedAt
    string <date-time>

    The date when the firmware installation was successfully completed on device-side

    rejectedAt
    string <date-time>

    The date when the firmware installation was rejected on device-side, due to some error

    rejectReason
    string <= 255 characters

    The description of firmware installation rejection

    Responses

    200

    OK

    401

    Your request is not authorized. This response means that you are not authorized to get access to the requested resource.

    403

    This response means you either do not have access to a specified resource or it does not even exist. The difference will not be exposed to the user to make iterating that much harder.

    500

    Internal Server Error response.

    patch /devices/{deviceId}/firmware-installations/{installationId}

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/firmware-installations/{installationId}

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "startedAt": "2019-12-19T23:18:00Z",
    • "completedAt": "2019-12-19T23:18:00Z",
    • "rejectedAt": "2019-12-19T23:18:00Z",
    • "rejectReason": "string"
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    timeseries

    The timeseries data enables the developer to get the data reported by a Device over time. For data to show up in the timeseries data a reportingRule in the Device Type of a Device with the value timeseries is needed.

    Get aggregated timeseries for device

    Get aggregated timeseries data for the device with the given UUID. Data will be returned in descending order. Maximum 4000 data points are returned.

    olt-permissions: ["devices_historical_data:read"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices uuid.

    query Parameters
    startTime
    required
    string <date-time>

    The start time of the time frame to request.

    endTime
    required
    string <date-time>

    The end time of the time frame to request.

    frameSize
    string
    Enum: "1m" "5m" "30m" "1h" "1d"

    The time frame size in which the values should be aggregated. By default, no frameSize is set and the data is not grouped by time. This means that the response contains exactly one result. In case frameSize is set and the number of points in the response exceed 4000, an error (400) will be returned.

    aggregation
    required
    string
    Enum: "min" "max" "mean" "sum" "count" "diff" "first" "last"
    Example: aggregation=max

    How should the values be aggregated. Supported values: min, max, mean, sum, count, diff, first, last.

    path
    required
    string
    Example: path=%24.attributes.sensor.brightness

    Path matching to a path defined in the reporting rules of the device's type. (e.g. $.attributes.brightness).

    Responses

    200

    Success - data.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    500

    Internal Server Error response.

    get /devices/{deviceId}/aggregated-timeseries

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/aggregated-timeseries

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      [
      ]
    }

    Get last hour of timeseries for device

    Get timeseries data for the last hour, as reported by the device with the given UUID. Data will be returned in an descending order. Maximum 4000 data points are returned. Note: This endpoint should be used by the user only for debugging his devices and the data they send.

    olt-permissions: ["devices_historical_data:read"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices uuid.

    query Parameters
    path
    required
    string
    Example: path=%24.attributes.sensor.brightness

    Path matching to a path defined in the reporting rules of the device's type. (e.g. $.attributes.brightness).

    Responses

    200

    Success - sensordata.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    500

    Internal Server Error response.

    get /devices/{deviceId}/last-timeseries

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/last-timeseries

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "meta": { },
    • "data":
      [
      ]
    }

    Delete timeseries data of device

    Delete reported timeseries data of a device belonging to the given UUID. This deletes both the timeseries and its aggregation. If no timeframe is provided, all data for the device and path is deleted.

    olt-permissions: ["devices_historical_data:write"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices uuid.

    query Parameters
    path
    required
    string
    Example: path=%24.attributes.sensor.brightness

    Path matching to a path defined in the reporting rules of the device's type. (e.g. $.attributes.brightness).

    startTime
    string <date-time>

    The start time of the time frame to request. (RFC 3339)

    endTime
    string <date-time>

    The end time of the time frame to request. (RFC 3339)

    Responses

    204

    Success.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    500

    Internal Server Error response.

    delete /devices/{deviceId}/timeseries

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/timeseries

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorMessage": "Request Body has to be an Object.",
    • "errorCode": "TIMESERIES_BADREQUEST"
    }

    Request dump of timeseries data for device

    Create a new timeseries dump, as reported by the device with the given UUID. The dump will be created asynchronously, and once completed will be available in the URL returned by this route. If no start and end time are specified, the dump contains all available data.

    olt-permissions: ["devices_historical_data:read"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices uuid.

    Request Body schema: application/json
    path
    required
    string

    Path matching to a path defined in the reporting rules of the device's type. (e.g. $.attributes.brightness).

    startTime
    string <date-time>

    The dump contains data starting with the start time (RFC 3339)

    endTime
    string <date-time>

    The dump contains data starting till to the end time (RFC 3339)

    Responses

    200

    Success

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    500

    Internal Server Error response.

    post /devices/{deviceId}/timeseries-dump

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/timeseries-dump

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "path": "$.attributes.sensor.brightness",
    • "startTime": "2018-07-12T12:18:11.859Z",
    • "endTime": "2018-07-12T12:18:11.859Z"
    }

    Response samples

    Download generated timeseries dump for device

    Return a timeseries dump created asynchronously via a POST request. If the dump is not yet ready, this route will respond with a 404. All created dumps will expire after one hour.

    olt-permissions: ["devices_historical_data:read"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The devices uuid.

    dumpId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The UUID of the dump

    Responses

    200

    A JSON file

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Dump not found

    500

    Internal Server Error response.

    get /devices/{deviceId}/timeseries-dump/{dumpId}

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/timeseries-dump/{dumpId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    [
    • {
      }
    ]

    Request dump of timeseries data for multiple devices

    Create a new dump of selected timeseries data. The dump will be created asynchronously, and once completed will be available in the URL returned by this route.

    olt-permissions: ["devices_historical_data:read"]
    Authorizations:
    Request Body schema: application/json
    dataFilter
    required
    object
    deviceFilter
    required
    object

    Criteria for filtering data by device. If multiple filters of different types (for example, tags and aliases) are provided, the devices must match each of them. You need to provide at least one device filter.

    Responses

    202

    Success

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    This response means you either do not have access to a specified resource or it does not even exist. The difference will not be exposed to the user to make iterating that much harder.

    500

    Internal Server Error response.

    post /devices/timeseries-dump

    Production Environment

    https://api.lightelligence.io/v1/devices/timeseries-dump

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "dataFilter":
      {
      },
    • "deviceFilter":
      {
      }
    }

    Response samples

    Content type
    application/json

    Download generated timeseries dump for multiple devices

    Return a timeseries dump created asynchronously via a POST request. If the dump is not yet ready, this route will respond with a 404. All created dumps will expire after one hour.

    olt-permissions: ["devices_historical_data:read"]
    Authorizations:
    path Parameters
    dumpId
    required
    string <uuid>
    Example: 07aba39a-ccb3-426f-838e-6d9a9ae330f4

    The UUID of the dump

    Responses

    200

    A JSON file

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    This response means you either do not have access to a specified resource or it does not even exist. The difference will not be exposed to the user to make iterating that much harder.

    404

    Dump not found

    500

    Internal Server Error response.

    get /devices/timeseries-dump/{dumpId}

    Production Environment

    https://api.lightelligence.io/v1/devices/timeseries-dump/{dumpId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    [
    • {
      }
    ]

    Request aggregated timeseries data dump for multiple devices

    Get aggregated timeseries data points for the devices matching the given filters. The data dump will be created asynchronously, and once completed will be available at the URL returned by this route. Data points in the dump will be sorted chronologically from newest to oldest.

    olt-permissions: ["devices_historical_data:read"]
    Authorizations:
    Request Body schema: application/json
    dataFilter
    required
    object
    params
    required
    object
    deviceFilter
    required
    object

    Criteria for filtering data by device. If multiple filters of different types (for example, tags and aliases) are provided, the devices must match each of them. You need to provide at least one device filter.

    Responses

    202

    Request accepted

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    This response means you either do not have access to a specified resource or it does not even exist. The difference will not be exposed to the user to make iterating that much harder.

    500

    Internal Server Error response.

    post /devices/aggregated-timeseries

    Production Environment

    https://api.lightelligence.io/v1/devices/aggregated-timeseries

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "dataFilter":
      {
      },
    • "params":
      {
      },
    • "deviceFilter":
      {
      }
    }

    Response samples

    Content type
    application/json

    Download aggregated timeseries data dump for multiple devices

    Return an aggregated timeseries data dump created asynchronously via a POST request. If the dump is not yet ready, this route will respond with a 404. All created dumps will expire after one hour. Data points in the dump will be sorted chronologically from newest to oldest.

    olt-permissions: ["devices_historical_data:read"]
    Authorizations:
    path Parameters
    dumpId
    required
    string <uuid>
    Example: 07aba39a-ccb3-426f-838e-6d9a9ae330f4

    The UUID of the dump

    Responses

    200

    A JSON file

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    This response means you either do not have access to a specified resource or it does not even exist. The difference will not be exposed to the user to make iterating that much harder.

    404

    Dump not found

    500

    Internal Server Error response.

    get /devices/aggregated-timeseries/{dumpId}

    Production Environment

    https://api.lightelligence.io/v1/devices/aggregated-timeseries/{dumpId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    [
    • {
      }
    ]

    Add timeseries

    Create timeseries for tenant

    olt-permissions: ["timeseries:write"]
    Authorizations:
    Request Body schema: application/json
    name
    required
    string

    Name of the timeseries

    dataType
    required
    object

    JSON schema of timeseries data points.

    metadata
    object

    List of key-value attached to timeseries

    Responses

    201

    Success - timeseries added.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Access forbidden.

    500

    Internal Server Error response.

    post /timeseries

    Production Environment

    https://api.lightelligence.io/v1/timeseries

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "name": "Temperature in the hall",
    • "dataType":
      {
      },
    • "metadata":
      {
      }
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    List all timeseries for tenant

    Get list of available timeseries, ordered by created date descending.

    olt-permissions: ["timeseries:read"]
    Authorizations:
    query Parameters
    page
    integer >= 0
    Default: 0

    The number of the result page starting with 0.

    pageSize
    integer >= 0
    Default: 20

    The number of result per page.

    Request Body schema: application/json
    timeseriesIds
    Array of strings <uuid> non-empty

    Filter timeseries by id (OR filter).

    metadata
    object

    List of key-value attached to timeseries

    Responses

    200

    OK

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Access forbidden.

    500

    Internal Server Error response.

    get /timeseries

    Production Environment

    https://api.lightelligence.io/v1/timeseries

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "timeseriesIds":
      [
      ],
    • "metadata":
      {
      }
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "meta":
      {
      },
    • "data":
      [
      ]
    }

    Get timeseries

    Get a specific timeseries type by UUID

    olt-permissions: ["timeseries:read"]
    Authorizations:
    path Parameters
    timeseriesId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The timeseries UUID.

    Responses

    200

    Success - requested timeseries.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Access forbidden.

    404

    Resounce not found.

    500

    Internal Server Error response.

    get /timeseries/{timeseriesId}

    Production Environment

    https://api.lightelligence.io/v1/timeseries/{timeseriesId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Modify timeseries

    Edit a specific timeseries by UUID partially. UUID is not patchable.

    olt-permissions: ["timeseries:write"]
    Authorizations:
    path Parameters
    timeseriesId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The timeseries UUID.

    Request Body schema: application/json
    name
    string

    Name of the timeseries

    dataType
    object

    JSON schema of timeseries data points.

    metadata
    object

    List of key-value attached to timeseries

    Responses

    200

    Success - edited timeseries.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Access forbidden.

    404

    Resounce not found.

    500

    Internal Server Error response.

    patch /timeseries/{timeseriesId}

    Production Environment

    https://api.lightelligence.io/v1/timeseries/{timeseriesId}

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "name": "Temperature in the hall",
    • "dataType":
      {
      },
    • "metadata":
      {
      }
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Remove timeseries

    Delete a specific timeseries by UUID.

    olt-permissions: ["timeseries:write"]
    Authorizations:
    path Parameters
    timeseriesId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The timeseries UUID.

    Responses

    204

    Success - deleted timeseries.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Access forbidden.

    404

    Resounce not found.

    500

    Internal Server Error response.

    delete /timeseries/{timeseriesId}

    Production Environment

    https://api.lightelligence.io/v1/timeseries/{timeseriesId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorMessage": "string",
    • "errorCode": "TIMESERIES_VALIDATION"
    }

    Add timeseries data points

    Create data points (one or more) for specific timeseries (ingest)

    olt-permissions: ["timeseries_data:write"]
    Authorizations:
    path Parameters
    timeseriesId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The timeseries UUID.

    Request Body schema: application/json
    data
    required
    Array of objects

    Responses

    201

    Success - timeseries data point added.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Access forbidden.

    404

    Resounce not found.

    500

    Internal Server Error response.

    post /timeseries/{timeseriesId}/points

    Production Environment

    https://api.lightelligence.io/v1/timeseries/{timeseriesId}/points

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      [
      ]
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      [
      ]
    }

    Delete data points of timeseries

    Delete reported data points of a timeseries belonging to the given UUID. This deletes both the timeseries and its aggregation. If no timeframe is provided, all data is deleted.

    olt-permissions: ["timeseries_data:write"]
    Authorizations:
    path Parameters
    timeseriesId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The timeseries UUID.

    query Parameters
    startTime
    string <date-time>

    The start time of the time frame to request. (RFC 3339)

    endTime
    string <date-time>

    The end time of the time frame to request. (RFC 3339)

    Responses

    204

    Success.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Access forbidden.

    404

    Resounce not found.

    500

    Internal Server Error response.

    delete /timeseries/{timeseriesId}/points

    Production Environment

    https://api.lightelligence.io/v1/timeseries/{timeseriesId}/points

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorMessage": "string",
    • "errorCode": "TIMESERIES_VALIDATION"
    }

    Get last hour of data points for the timeseries

    Get data points for the last hour, as reported for the timeseries. Data will be returned in an descending order. Maximum 4000 data points are returned. NOTE: This endpoint should be used by the user only for debugging his timeseries.

    olt-permissions: ["timeseries_data:read"]
    Authorizations:
    path Parameters
    timeseriesId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The timeseries UUID.

    Responses

    200

    Success - timeseries data points.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Access forbidden.

    404

    Resounce not found.

    500

    Internal Server Error response.

    get /timeseries/{timeseriesId}/points/last

    Production Environment

    https://api.lightelligence.io/v1/timeseries/{timeseriesId}/points/last

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      [
      ]
    }

    Get aggregated data points for the timeseries

    Get aggregated data points for the timeseries. Data will be returned in an descending order. Each page will contain at most 4000 entries, it might contain less entries if some of the time-frames from the interval did not have any data points.

    olt-permissions: ["timeseries_data:read"]
    Authorizations:
    path Parameters
    timeseriesId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The timeseries UUID.

    query Parameters
    startTime
    required
    string <date-time>

    The start time of the time frame to request.

    endTime
    required
    string <date-time>

    The end time of the time frame to request.

    frameSize
    string
    Enum: "1m" "5m" "15m" "30m" "1h" "1d"

    The time frame size in which the values should be aggregated. By default, no frameSize is set and the data is not grouped by time - this means that the response contains exactly one result.

    aggregation
    required
    string
    Enum: "min" "max" "mean" "sum" "count" "diff" "first" "last"
    Example: aggregation=max

    How should the values be aggregated. Supported values: min, max, mean, sum, count, diff, first, last.

    page
    integer >= 0
    Default: 0

    The number of the result page starting with 0.

    pageSize
    integer >= 0
    Default: 20

    The number of result per page.

    Responses

    200

    Success - timeseries data points.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Access forbidden.

    404

    Resounce not found.

    500

    Internal Server Error response.

    get /timeseries/{timeseriesId}/points/aggregated

    Production Environment

    https://api.lightelligence.io/v1/timeseries/{timeseriesId}/points/aggregated

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "meta":
      {
      },
    • "data":
      [
      ]
    }

    Get aggregated timeseries for matching timeseries

    Get aggregated data points for the timeseries matching the given filters. Data will be returned in descending order.

    olt-permissions: ["timeseries_data:read"]
    Authorizations:
    Request Body schema: application/json
    dataFilter
    required
    object

    Start time and end time filter of the requested timeseries.

    timeseriesFilter
    required
    object

    Filter for timeseries

    params
    required
    object

    Responses

    202

    Request accepted

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Access forbidden.

    404

    Resounce not found.

    500

    Internal Server Error response.

    post /timeseries/aggregated-data

    Production Environment

    https://api.lightelligence.io/v1/timeseries/aggregated-data

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "dataFilter":
      {
      },
    • "timeseriesFilter":
      {
      },
    • "params":
      {
      }
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorMessage": "string",
    • "errorCode": "TIMESERIES_VALIDATION"
    }

    Request raw data points for timeseries

    Request a file with raw data points, as reported by the timeseries matching the given filters.

    olt-permissions: ["timeseries_data:read"]
    Authorizations:
    Request Body schema: application/json
    dataFilter
    required
    object

    Start time and end time filter of the requested timeseries.

    timeseriesFilter
    required
    object

    Filter for timeseries

    Responses

    202

    Request accepted

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Access forbidden.

    404

    Resounce not found.

    500

    Internal Server Error response.

    post /timeseries/raw-data

    Production Environment

    https://api.lightelligence.io/v1/timeseries/raw-data

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "dataFilter":
      {
      },
    • "timeseriesFilter":
      {
      }
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorMessage": "string",
    • "errorCode": "TIMESERIES_VALIDATION"
    }

    Get the status of the raw data point file creation

    Return a status of a timeseries file that's being created asynchronously.

    olt-permissions: ["timeseries_data:read"]
    Authorizations:
    path Parameters
    requestId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The UUID of the request

    Responses

    200

    The file is still being created.

    303

    The file was created.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Access forbidden.

    404

    Resounce not found.

    500

    Internal Server Error response.

    get /timeseries/requests/{requestId}

    Production Environment

    https://api.lightelligence.io/v1/timeseries/requests/{requestId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Download generated file for the matching timeseries

    Return a timeseries file created asynchronously via a POST request. All created files will expire 1 hour after they are created.

    olt-permissions: ["timeseries_data:read"]
    Authorizations:
    path Parameters
    fileId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The UUID of the file

    Responses

    200

    A JSON file

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Access forbidden.

    404

    Resounce not found.

    500

    Internal Server Error response.

    get /timeseries/files/{fileId}

    Production Environment

    https://api.lightelligence.io/v1/timeseries/files/{fileId}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "meta":
      {
      },
    • "data":
      [
      ]
    }

    ingest

    The ingest endpoints are the HTTP equivalent to the platforms MQTT Endpoints, where Devices can report their data. These HTTP endpoints can be used to implement a quick proof of concept. We don’t recommend to use them in deployed Devices.

    Send device event

    Send an event associated with a device. This endpoint can be used to emulate a real device sending events. The event type must be registered in the device type schema.

    olt-permissions: ["ingest:write"]
    Authorizations:
    Request Body schema: application/json
    One of
    • Device Event
    • Device Event with alias
    type
    required
    string <= 255 characters ^([a-zA-Z0-9_]+)$

    The type of the event is used for filtering. Alphanumeric, may contain underscores.

    value
    object

    The reported event payload as an object.

    createdAt
    string <date-time>

    The date the event were created. If not included it will default to the system time at arrival.

    deviceId
    required
    string <uuid>

    The uuid of the device which emitted this event.

    senderId
    string <uuid>

    The uuid of the device which transmitted this event.

    Responses

    202

    Success - Event has been sent for processing.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    404

    Not Found response.

    500

    Internal Server Error response.

    post /event-ingest

    Production Environment

    https://api.lightelligence.io/v1/event-ingest

    Request samples

    Content type
    application/json
    Example
    Copy
    Expand all Collapse all
    {
    • "type": "overheated",
    • "value":
      {
      },
    • "createdAt": "2018-07-07T11:50:12+00:00",
    • "deviceId": "550e8400-e29b-11d4-a716-446655440000",
    • "senderId": "550e8400-e29b-11d4-a716-446655440000"
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorMessage": "Validation of '<field name or path>' failed: <reason>.",
    • "errorCode": "DEVICE_VALIDATION"
    }

    Send device data

    Send data associated with a device. This endpoint can be used to emulate a real device sending data, or to import existing data sets. The payload must be compatible with the device type schema.

    olt-permissions: ["ingest:write"]
    Authorizations:
    Request Body schema: application/json
    One of
    • object
    • object
    senderId
    required
    string <uuid>

    The UUID of the device that sends the data. If the device is sending it by itself, senderId equals deviceId; if the data for the device is sent to the cloud by a gateway, then the senderId is the id of the gateway;

    deviceId
    required
    string <uuid>

    The devices UUID the reported value belongs to. (This means, that this device Id maybe not matches the deviceId of the sending device).

    type
    required
    string
    Enum: "attributes" "configuration"

    Defines the type of the value object you report in the value property, to be able to decide if the reported value belongs to the configuration or the attributes of a device.

    value
    required
    object

    The reported Value as object.

    time
    string <date-time>

    See RFC 3339. If no time is provided, the time the message arrived at the endpoint is used.

    Responses

    202

    Success - Event has been sent for processing.

    400

    Bad Request response.

    401

    Unauthorized response.

    403

    Forbidden response.

    post /data-ingest

    Production Environment

    https://api.lightelligence.io/v1/data-ingest

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "senderId": "123e4567-e89b-12d3-a456-426655440000",
    • "alias": "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
    • "type": "attributes",
    • "value":
      {
      },
    • "time": "2015-08-04T19:05:14.318570484Z",
    • "deviceId": "123e4567-e89b-12d3-a456-426655440001"
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "error":
      {
      }
    }

    streaming

    streaming related endpoints

    Request new WebSocket streaming connection

    Request a new WebSocket connection URL. If the request and authentication is successful the provided URL from the response can be used to establish a new WebSocket connection.

    The stream capabilities depend on its type.

    • live stream: service starts streaming events once connection is established. When client reconnects again, stream starts from the point of connection. Events that happened when client was disconnected are dropped.

    • buffered stream: service starts buffering events once connected. Events streamed from the persistent storage, so there is might be some latency comparing to live streams. Events stay in the buffer for 2 days. It means if time between reconnections is shorter than 2 days, already consumed events can be deliverd again. The age of events to deliver is specified by options.replayFromTimestamp parameter. If the client wouldn't make any new connections longer than 2 days after last disconnect, the service will stop buffering for the given client.

    Note: The WebSocket connection URL is only valid for 15 seconds. If the url has expired, a new url needs to be requested.

    olt-permissions: ["devices_streaming:read"]
    Authorizations:
    Request Body schema: application/json
    type
    string
    Enum: "live" "buffered"

    Specify the type of streaming connection requested. Defaults to "live". Live connections instantly sends messages received to the WebSocket connection, whereas buffered connection starts buffering messages for tenant on first connection. If connection is lost, messages that are up to two days old can be replayed.

    options
    object

    Specify options for the streaming connection. Not necessary on first connection.

    filter
    required
    object

    Filter which allows to receive updates for specific message types and devices; The five filter conditions ("type", "deviceId", "tag", "attributes" and "configurations") are treated as an AND, the values provided in the arrays are treated as an OR. So the websocket client will receive all messages that contains ONE of the mentioned message types AND originates from ONE of the mentioned device ids.

    Responses

    200

    Success - A new WebSocket connection can be established with the provided WebSocket URL in the response.

    400

    Bad request

    401

    Unauthorized

    403

    Token is not valid

    500

    Internal Server Error

    post /devices/streaming-connections

    Production Environment

    https://api.lightelligence.io/v1/devices/streaming-connections

    Request samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "type": "buffered",
    • "options":
      {
      },
    • "filter":
      {
      }
    }

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      {
      }
    }

    Open WebSocket Streaming Connection Deprecated

    IMPORTANT NOTE: this path is likely to change, DO NOT RELY ON THE EXACT PATH, just take the URL that is returned from the POST as is.

    • Opens a new WebSocket connection. If the provided token is valid, the request will be upgraded to a WebSocket connection.
    • Once the WebSocket connection is established the client receives updates for all subscribed message types matching the device filter.
    • The following message types are sent to the client (you can find the message specification in the Models section): AttributeUpdate, ConfigurationUpdate and Event.
    • The client has to be aware that the websocket can be closed at any time; in that case the client has to create a new websocket by POSTing to the /devices/streaming-connections endpoint again.
    • The WebSocket API is only used for unidirectional traffic for now. Messages from the client are ignored by the server.
    • Un-ordered messages: Websocket messages can be published un-ordered. Use time to order the messages received in the client.
    olt-permissions: ["devices_streaming:read"]
    olt-transitive-permissions: ["devices_base_data:read"]
    Authorizations:
    path Parameters
    token
    required
    string <string>
    Example: bbdf5d13d9a09ab5cfe5c45536ecf4f432e9c4736aeb6d930ea240904d0ae7d8

    The token used to authenticate the WebSocket connection

    Responses

    403

    Token is not valid

    500

    Internal Server Error

    get /devices/streaming-connections/{token}/ws

    Production Environment

    https://api.lightelligence.io/v1/devices/streaming-connections/{token}/ws

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorCode": "STREAMING_INVALID_TOKEN",
    • "errorMessage": "token is invalid."
    }

    Open WebSocket Streaming Connection

    IMPORTANT NOTE: DO NOT RELY ON THE EXACT PATH, just take the URL that is returned from the POST as is.

    • Opens a new WebSocket connection. If the provided token is valid, the request will be upgraded to a WebSocket connection.
    • Once the WebSocket connection is established the client receives updates for all subscribed message types matching the device filter.
    • The following message types are sent to the client (you can find the message specification in the Models section): AttributeUpdate, ConfigurationUpdate and Event.
    • The client has to be aware that the websocket can be closed at any time; in that case the client has to create a new websocket by POSTing to the /devices/streaming-connections endpoint again.
    • The WebSocket API is only used for unidirectional traffic for now. Messages from the client are ignored by the server.
    • Un-ordered messages: Websocket messages can be published un-ordered. Use time to order the messages received in the client.
    olt-permissions: ["devices_streaming:read"]
    olt-transitive-permissions: ["devices_base_data:read"]
    Authorizations:
    path Parameters
    token
    required
    string <string>
    Example: bbdf5d13d9a09ab5cfe5c45536ecf4f432e9c4736aeb6d930ea240904d0ae7d8

    The token used to authenticate the WebSocket connection

    type
    required
    string
    Enum: "live" "buffered"
    Example: live

    The streaming type

    Responses

    403

    Token is not valid

    500

    Internal Server Error

    get /devices/streaming-connections/{token}/ws/{type}

    Production Environment

    https://api.lightelligence.io/v1/devices/streaming-connections/{token}/ws/{type}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "errorCode": "STREAMING_INVALID_TOKEN",
    • "errorMessage": "token is invalid."
    }

    diagnostics

    With the diagnostics endpoints it is possible to debug what Device’s messages (reported data, events) are doing in the cloud. As MQTT does not return error messages, this is the way to see what fails in the process.

    Get device diagnostics

    Get diagnostics data for the last hour, as reported for the device with the given UUID. Device Diagnostics contain errors in handling the data from the device on the cloud side. Data will be returned in descending order.

    olt-permissions: ["devices_base_data:read"]
    Authorizations:
    path Parameters
    deviceId
    required
    string <uuid>
    Example: 123e4567-e89b-12d3-a456-426655440000

    The device to filter for (uuid)

    Responses

    200

    OK

    400

    Bad Request response.

    401

    Unauthorized response.

    404

    Not Found response.

    500

    Internal Server Error response.

    get /devices/{deviceId}/last-diagnostics

    Production Environment

    https://api.lightelligence.io/v1/devices/{deviceId}/last-diagnostics

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "data":
      [
      ]
    }

    audit-logs

    Audit logs provide a detailed log on all relevant actions that users initiate via the OLT API.

    Export Audit Logs

    Access available audit logs of your tenant.

    When using a application/json mime type, audit logs with pagination will be returned.

    When using the text/csv mime type, the content is a comma separated csv file, containing all available audit logs, where its first line are the column names. All properties which are available as json are also listed here in the csv.

    olt-permissions: ["audit_logs:read"]
    Authorizations:
    query Parameters
    page
    integer >= 0
    Default: 0

    The requested page

    pageSize
    integer [ 1 .. 100 ]
    Default: 20

    The amount of results per page

    Responses

    200

    Success

    400

    Bad Request

    401

    Unauthorized

    403

    Forbidden

    500

    Internal Server Error

    get /audit-logs

    Production Environment

    https://api.lightelligence.io/v1/audit-logs

    Response samples

    Content type
    Copy
    Expand all Collapse all
    {
    • "meta":
      {
      },
    • "data":
      [
      ]
    }