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

    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.

    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 scopes openid and olt-applications must be used to ensure the responding access_token is fully valid.

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

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

    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 scopes openid and olt-applications must be used to ensure the responding access_token is fully valid.

    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

    application/json
    Copy
    Expand all Collapse all
    {
    • "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIn0.dozjgNryP4J3jVmNHl0w5N_XgL0n3I9PlFUP0THsR8U",
    • "expires_at": "2019-05-22T10:29:51Z",
    • "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIn0.dozjgNryP4J3jVmNHl0w5N_XgL0n3I9PlFUP0THsR8U",
    • "scope": "openid profile email olt-applications"
    }

    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

    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"
    }

    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 ^([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

    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

    Responses

    201

    Tenant creation successful

    400

    Bad Request response.

    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

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

    Response samples

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

    Get tenant details

    Get the tenant details for the supplied tenantId.

    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.

    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

    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

    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":
      {
      },
    • "payment":
      {
      }
    }

    Response samples

    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.

    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

    DEPRECATED, Please use PUT /tenants/{tenantId}/users/{userId}/roles endpoint
    Change the roles of a user in 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.

    Request Body schema: application/json
    roleNames
    required
    Array of strings

    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":
      {
      }
    }

    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.

    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 tenants of user

    Get the tenants of the provided user.

    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":
      [
      ]
    }