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:

    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.

    x-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.

    404

    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 /users/{userId}

    Production Environment

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

    Response samples

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

    List invites of user

    Get all invites for the current user.

    x-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: 10

    The number of result per page.

    Responses

    200

    Success

    401

    Unauthorized response.

    500

    Internal Server Error response.

    get /users/{userId}/invites

    Production Environment

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

    Response samples

    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.

    x-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
    string
    Default: "open"
    Enum:"open" "declined" "accepted"

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

    Responses

    200

    Success - Invite updated

    400

    Bad Request response.

    401

    Unauthorized response.

    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

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

    Response samples

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

    List users of tenant

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

    x-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: 10

    The number of result per page.

    Responses

    200

    Success

    400

    Bad Request response.

    401

    Unauthorized response.

    404

    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 /tenants/{tenantId}/users

    Production Environment

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

    Response samples

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

    Change user role Deprecated

    Change the roles of a user in a tenant.

    x-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
    roleNames
    required
    Array of string

    List of rolenames

    Responses

    201

    Success, get the patched object

    400

    Bad Request response.

    401

    Unauthorized response.

    404

    Not found response.

    500

    Internal Server Error response.

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

    Production Environment

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

    Request samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "roleNames":
      [
      ]
    }

    Response samples

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

    List user permissions

    Get the list of permissions for the user of the tenant.

    x-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.

    404

    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 /tenants/{tenantId}/users/{userId}/permissions

    Production Environment

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

    Response samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "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.

    List tenants of user

    Get the tenants of the provided user.

    x-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: 10

    The number of result per page.

    Responses

    200

    Success

    400

    Bad Request response.

    401

    Unauthorized response.

    404

    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 /users/{userId}/tenants

    Production Environment

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

    Response samples

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

    Create tenant

    Create a new Tenant.

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

    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

    Responses

    201

    Tenant creation successful

    400

    Bad Request response.

    409

    Conflict response.

    500

    Internal Server Error response.

    post /tenants

    Production Environment

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

    Request samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "name": "OSRAM",
    • "billingContact":
      {
      },
    • "billingCompany":
      {
      },
    • "package":
      {
      }
    }

    Response samples

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

    Get tenant details

    Get the tenant details for the supplied tenantId.

    x-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.

    404

    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 /tenants/{tenantId}

    Production Environment

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

    Response samples

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

    Update tenant details

    Update the tenant details with the supplied information.

    x-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 ^([a-zA-Z0-9_\- ]+)$

    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

    Responses

    200

    Success

    400

    Bad Request response.

    401

    Unauthorized response.

    404

    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 /tenants/{tenantId}

    Production Environment

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

    Request samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "name": "OSRAM",
    • "billingContact":
      {
      },
    • "billingCompany":
      {
      },
    • "package":
      {
      }
    }

    Response samples

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

    List tenant roles Deprecated

    Get the list of roles of a tenant.

    x-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.

    404

    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 /tenants/{tenantId}/roles

    Production Environment

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

    Response samples

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

    Change user role Deprecated

    Change the roles of a user in a tenant.

    x-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
    roleNames
    required
    Array of string

    List of rolenames

    Responses

    201

    Success, get the patched object

    400

    Bad Request response.

    401

    Unauthorized response.

    404

    Not found response.

    500

    Internal Server Error response.

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

    Production Environment

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

    Request samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "roleNames":
      [
      ]
    }

    Response samples

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

    Remove user from tenant

    Remove a user from a tenant.

    x-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.

    404

    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 /tenants/{tenantId}/users/{userId}

    Production Environment

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

    Response samples

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

    Invite user to tenant

    Invite an user to a tenant.

    x-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[a-zA-Z0-9!#$%&'*+\/=?^_{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+\/=?^_{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]

    The email address of the invited user.

    roleNames
    required
    Array of string non-empty

    The names 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

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

    Response samples

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

    List invites of tenant

    Get all invites to users for the provided tenant.

    x-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: 10

    The number of result 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

    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.

    x-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.

    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

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

    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.