Kaa releases
Shortcuts

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Table of Contents

CSS Stylesheet
.codeContent .syntaxhighlighter table td.code .container .line {
    white-space: pre-wrap !important;
}

.highlight-body {  
	background-color: #f8f8f8;    
	border: 1px solid #ddd;
    border-radius: 3px;
    margin: 0;
    padding: 5px 5px;     
    font-family: monospace;
	font-size: 12px;
}

User

Get user authentication status

Returns information about the current authorized user.

  • URL 
    /kaaAdmin/rest/api/auth/checkAuth
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    None

  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "authResult": "OK",
          "authority": "TENANT_DEVELOPER",
          "displayName": "devuser (Tenant Developer)",
          "username": "devuser"
      }
     
  • Error response:

    Status codesDescription
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/auth/checkAuth" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "authResult": "OK",
        "authority": "TENANT_DEVELOPER",
        "displayName": "devuser (Tenant Developer)",
        "username": "devuser"
    }

Create user with KAA_ADMIN role

Creates a user with the KAA_ADMIN role.

  • URL 
    /kaaAdmin/rest/api/auth/createKaaAdmin?username&password
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    ParameterValueDescription
    usernamestringA user name of the Kaa admin user
    passwordstringA user password of the Kaa admin user; it must be no shorter than 6 characters
  • Data params

    None

  • Success response:

    • Code: 200 

  • Error response:

    Status codesDescription
    403 ForbiddenA user with the KAA_ADMIN role already exists
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -X POST "http://localhost:8080/kaaAdmin/rest/api/auth/createKaaAdmin?username=kaa&password=kaa" | python -mjson.tool

Change user password

Changes the password of a user.

  • URL 
    /kaaAdmin/rest/api/auth/changePassword?username&oldPassword&newPassword
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    ParameterValueDescription
    usernamestringA user name of the user whose password is to be changed
    oldPasswordstringAn old password of the user
    newPasswordstringA new password of the user; it must be no shorter than 6 characters
  • Data params

    None

  • Success response:

    • Code: 200 
    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      "OK"
  • Error response:

    Status codesDescription
    400 Bad RequestThe specified parameters are not valid
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST "http://localhost:8080/kaaAdmin/rest/api/auth/changePassword?username=devuser&oldPassword=devuser123&newPassword=devuser12345" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    "OK"

Get user profile

Returns the user profile of the current user. Only authorized users are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/userProfile
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    None

  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "authority": "TENANT_DEVELOPER",
          "externalUid": "3",
          "firstName": "Tenant",
          "id": null,
          "lastName": "Developer",
          "mail": "[email protected]",
          "tempPassword": null,
          "tenantId": null,
          "username": "devuser"
      }
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/userProfile" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "authority": "TENANT_DEVELOPER",
        "externalUid": "3",
        "firstName": "Tenant",
        "id": null,
        "lastName": "Developer",
        "mail": "[email protected]",
        "tempPassword": null,
        "tenantId": null,
        "username": "devuser"
    }
    

Edit user profile

Edits the user profile. Only authorized users are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/userProfile
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    None

  • Data params

    Expand
    titleRequest body

    Example:

    Code Block
    languagejs
    {"username":"devuser","firstName":"Dow","lastName":"Jones","mail":"[email protected]","authority":"TENANT_DEVELOPER"}
  • Success response:

    • Code: 200 
    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "authority": "TENANT_DEVELOPER",
          "externalUid": "3",
          "firstName": "Dow",
          "id": null,
          "lastName": "Jones",
          "mail": "[email protected]",
          "tempPassword": null,
          "tenantId": null,
          "username": "devuser"
      }

 

  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST -H 'Content-Type: application/json' -d'{"username":"devuser","firstName":"Dow","lastName":"Jones","mail":"[email protected]","authority":"TENANT_DEVELOPER"}' "http://localhost:8080/kaaAdmin/rest/api/userProfile" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "authority": "TENANT_DEVELOPER",
        "externalUid": "3",
        "firstName": "Dow",
        "id": null,
        "lastName": "Jones",
        "mail": "[email protected]",
        "tempPassword": null,
        "tenantId": null,
        "username": "devuser"
    }

Get all users

Returns a list of all users associated with the current authorized user: users whose Tenant ID values match the Tenant ID of the request submitter. Only users with the TENANT_ADMIN role are allowed to submit this request.

  • URL 
    /kaaAdmin/rest/api/users
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    None

  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "authority": "TENANT_DEVELOPER",
              "externalUid": "3",
              "firstName": "Dow",
              "id": "21",
              "lastName": "Jones",
              "mail": "[email protected]",
              "tempPassword": null,
              "tenantId": "10",
              "username": "devuser"
          }
      ]
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_ADMIN)
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u admin:admin123 -X GET "http://localhost:8080/kaaAdmin/rest/api/users" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "authority": "TENANT_DEVELOPER",
            "externalUid": "3",
            "firstName": "Dow",
            "id": "21",
            "lastName": "Jones",
            "mail": "[email protected]",
            "tempPassword": null,
            "tenantId": "10",
            "username": "devuser"
        }
    ]

Get user

 Returns a user. Only users with the TENANT_ADMIN role are allowed to submit this request. The Tenant ID of requested user must be identical to the Tenant ID of the submitter.

  • URL 
    /kaaAdmin/rest/api/user/{userId}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    userIdstringThe user ID of the requested user
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "authority": "TENANT_DEVELOPER",
          "externalUid": "3",
          "firstName": "Dow",
          "id": "21",
          "lastName": "Jones",
          "mail": "[email protected]",
          "tempPassword": null,
          "tenantId": "10",
          "username": "devuser"
      }
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_ADMIN) or the Tenant ID of the requested user does not match the Tenant ID of the authenticated user
    404 Not FoundThe user with the specified userId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
     curl -v -S -u admin:admin123 -X GET "http://localhost:8080/kaaAdmin/rest/api/user/21" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "authority": "TENANT_DEVELOPER",
        "externalUid": "3",
        "firstName": "Dow",
        "id": "21",
        "lastName": "Jones",
        "mail": "[email protected]",
        "tempPassword": null,
        "tenantId": "10",
        "username": "devuser"
    }
    

Create/Edit user

Creates or edits a user. If a user with the specified ID does not exist, it will be created, and its Tenant ID will be set to the Tenant ID of the request submitter. A random password will be generated and sent to the user’s Email. If a user with the specified ID exists, the user will be updated. Only users with the TENANT_ADMIN role can perform this operation.

  • URL 
    /kaaAdmin/rest/api/user
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    None

  • Data params

    Expand
    titleRequest body

    Example:

    Code Block
    languagejs
    {"username":"chucknorris","firstName":"Chuck","lastName":"Norris","mail":"[email protected]","authority":"TENANT_USER"}
  • Success response:

    • Code: 200 
    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "authority": "TENANT_USER",
          "externalUid": "5",
          "firstName": "Chuck",
          "id": "211",
          "lastName": "Norris",
          "mail": "[email protected]",
          "tempPassword": "rmOZgpw1morE",
          "tenantId": "10",
          "username": "chucknorris"
      }
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_ADMIN) or the Tenant ID of the editing user does not match the Tenant ID of the authenticated user
    404 Not FoundThe user to be edited with the specified userId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call to create user:

    Code Block
    languagejava
    curl -v -S -u admin:admin123 -X POST -H 'Content-Type: application/json' -d'{"username":"chucknorris","firstName":"Chuck","lastName":"Norris","mail":"[email protected]","authority":"TENANT_USER"}' "http://localhost:8080/kaaAdmin/rest/api/user" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "authority": "TENANT_USER",
        "externalUid": "5",
        "firstName": "Chuck",
        "id": "211",
        "lastName": "Norris",
        "mail": "[email protected]",
        "tempPassword": "rmOZgpw1morE",
        "tenantId": "10",
        "username": "chucknorris"
    }
  • Sample call to edit user:

    Code Block
    languagejava
    curl -v -S -u admin:admin123 -X POST -H 'Content-Type: application/json' -d'{"id":"211","username":"chuck","firstName":"Chuck","lastName":"Norris","mail":"[email protected]","authority":"TENANT_USER"}' "http://localhost:8080/kaaAdmin/rest/api/user" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "authority": "TENANT_USER",
        "externalUid": "7",
        "firstName": "Chuck",
        "id": "211",
        "lastName": "Norris",
        "mail": "[email protected]",
        "tempPassword": "rmOZgpw1morE",
        "tenantId": "10",
        "username": "chuck"
    }

Tenant

Get all tenants

Returns all tenants existing in the system. Only Kaa admin is allowed to submit this request.

  • URL 
    /kaaAdmin/rest/api/tenants
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    None

  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "authority": "TENANT_ADMIN",
              "externalUid": "2",
              "firstName": "Tenant",
              "id": "20",
              "lastName": "Admin",
              "mail": "[email protected]",
              "tempPassword": null,
              "tenantId": "10",
              "tenantName": "Demo Tenant",
              "username": "admin"
          }
      ]
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the KAA_ADMIN role
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u kaa:kaa123 -X GET "http://localhost:8080/kaaAdmin/rest/api/tenants" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "authority": "TENANT_ADMIN",
            "externalUid": "2",
            "firstName": "Tenant",
            "id": "20",
            "lastName": "Admin",
            "mail": "[email protected]",
            "tempPassword": null,
            "tenantId": "10",
            "tenantName": "Demo Tenant",
            "username": "admin"
        }
    ]
    

Get tenant

Returns tenant by associated userId.

  • URL 
    /kaaAdmin/rest/api/tenant/{userId}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    userIdstringThe ID of the user associated with the requested tenant
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "authority": "TENANT_ADMIN",
          "externalUid": "2",
          "firstName": "Tenant",
          "id": "20",
          "lastName": "Admin",
          "mail": "[email protected]",
          "tempPassword": null,
          "tenantId": "10",
          "tenantName": "Demo Tenant",
          "username": "admin"
      }
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the KAA_ADMIN role
    404 Not FoundA tenant with the specified userId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u kaa:kaa123 -X GET "http://localhost:8080/kaaAdmin/rest/api/tenant/20" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "authority": "TENANT_ADMIN",
        "externalUid": "2",
        "firstName": "Tenant",
        "id": "20",
        "lastName": "Admin",
        "mail": "[email protected]",
        "tempPassword": null,
        "tenantId": "10",
        "tenantName": "Demo Tenant",
        "username": "admin"
    }
    

Create/Edit tenant

Creates or edits a tenant. If a tenant with the specified ID does not exist, it will be created. If a tenant with the specified ID exists, it will be updated.

  • URL 
    /kaaAdmin/rest/api/tenant
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    None

  • Data params

    Expand
    titleRequest body

    Example:

    Code Block
    languagejs
    {"tenantName":"Demo Tenant 2","username":"admin2","authority":"TENANT_ADMIN","mail":"[email protected]"}
  • Success response:

    • Code: 200 
    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "authority": "TENANT_ADMIN",
          "externalUid": "4",
          "firstName": null,
          "id": "210",
          "lastName": null,
          "mail": "[email protected]",
          "tempPassword": "at28lc23Nhxm",
          "tenantId": "200",
          "tenantName": "Demo Tenant 2",
          "username": "admin2"
      }
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the KAA_ADMIN role
    404 Not FoundA tenant with the specified userId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call to create tenant:

    Code Block
    languagejava
    curl -v -S -u kaa:kaa123 -X POST -H 'Content-Type: application/json' -d'{"tenantName":"Demo Tenant 2","username":"admin2","authority":"TENANT_ADMIN","mail":"[email protected]"}' "http://localhost:8080/kaaAdmin/rest/api/tenant" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "authority": "TENANT_ADMIN",
        "externalUid": "4",
        "firstName": null,
        "id": "210",
        "lastName": null,
        "mail": "[email protected]",
        "tempPassword": "at28lc23Nhxm",
        "tenantId": "200",
        "tenantName": "Demo Tenant 2",
        "username": "admin2"
    }
  • Sample call to edit tenant:

    Code Block
    languagejava
    curl -v -S -u kaa:kaa123 -X POST -H 'Content-Type: application/json' -d'{"id":"210","tenantId":"200","tenantName":"Demo Tenant 2","username":"admin3","authority":"TENANT_ADMIN","mail":"[email protected]"}' "http://localhost:8080/kaaAdmin/rest/api/tenant" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "authority": "TENANT_ADMIN",
        "externalUid": "4",
        "firstName": null,
        "id": "210",
        "lastName": null,
        "mail": "[email protected]",
        "tempPassword": "at28lc23Nhxm",
        "tenantId": "200",
        "tenantName": "Demo Tenant 2",
        "username": "admin3"
    }

Delete tenant

Deletes a tenant by associated User ID.

  • URL 
    /kaaAdmin/rest/api/delTenant?userId
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    ParameterValueDescription
    userIdstringThe ID of the user associated with the tenant to be deleted
  • Data params

    None

  • Success response:

    • Code: 200 

  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the  KAA_ADMIN role
    404 Not FoundA tenant with the specified userId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u kaa:kaa123 -X POST "http://localhost:8080/kaaAdmin/rest/api/delTenant?userId=210" | python -mjson.tool

Application

Get all applications

Returns all applications for the current authorized user within the current tenant. The current user must have one of the following roles: TENANT_ADMIN, TENANT_DEVELOPER, or TENANT_USER.

  • URL 
    /kaaAdmin/rest/api/applications
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    None

  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "applicationToken": "358849227911747",
              "id": "70",
              "name": "Player",
              "sequenceNumber": 2,
              "tenantId": "10"
          },
          {
              "applicationToken": "989414255707149",
              "id": "71",
              "name": "Smart House",
              "sequenceNumber": 2,
              "tenantId": "10"
          },
          {
              "applicationToken": "561087972707255",
              "id": "72",
              "name": "Test Flume Appender",
              "sequenceNumber": 2,
              "tenantId": "10"
          }
      ]
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_ADMIN, TENANT_DEVELOPER, or TENANT_USER)
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/applications" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "applicationToken": "358849227911747",
            "id": "70",
            "name": "Player",
            "sequenceNumber": 2,
            "tenantId": "10"
        },
        {
            "applicationToken": "989414255707149",
            "id": "71",
            "name": "Smart House",
            "sequenceNumber": 2,
            "tenantId": "10"
        },
        {
            "applicationToken": "561087972707255",
            "id": "72",
            "name": "Test Flume Appender",
            "sequenceNumber": 2,
            "tenantId": "10"
        }
    ]
    

Get application

Returns an application by application ID

  • URL 
    /kaaAdmin/rest/api/application/{applicationId}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    applicationIdstringThe ID of the application
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "applicationToken": "989414255707149",
          "id": "71",
          "name": "Smart House",
          "sequenceNumber": 2,
          "tenantId": "10"
      }
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_ADMIN, TENANT_DEVELOPER, or TENANT_USER) or Tenant ID of the application does not match the Tenant ID of the user
    404 Not FoundAn application with the specified applicationId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/application/71" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationToken": "989414255707149",
        "id": "71",
        "name": "Smart House",
        "sequenceNumber": 2,
        "tenantId": "10"
    }
    

Get application by its token

Returns an application by applicationToken

  • URL 
    /kaaAdmin/rest/api/application/token/{applicationToken}
  • Method: 

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    applicationTokenstringThe token of the application
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "applicationToken": "989414255707149",
          "id": "71",
          "name": "Smart House",
          "sequenceNumber": 2,
          "tenantId": "10"
      }
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_ADMIN, TENANT_DEVELOPER, or TENANT_USER) or Tenant ID of the application does not match the Tenant ID of the user
    404 Not FoundAn application with the specified applicationToken does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/application/token/989414255707149" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationToken": "989414255707149",
        "id": "71",
        "name": "Smart House",
        "sequenceNumber": 2,
        "tenantId": "10"
    }
    

Create/Edit application

Creates or edits an application. If the application with the specified ID does not exist, it will be created. If the application with the specified ID exists, it will be updated. Only users with the TENANT_ADMIN role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/application
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    None

  • Data params

    Expand
    titleRequest body

    Example:

    Code Block
    languagejs
    {"name":"Application 1","tenantId":"10"}
  • Success response:

    • Code: 200 
    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "applicationToken": "094302219096310",
          "id": "220",
          "name": "Application 1",
          "sequenceNumber": 0,
          "tenantId": "10"
      }
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_ADMIN) or the Tenant ID of the application to be edited does not match the Tenant ID of the user
    404 Not FoundAn application to be edited with the specified applicationId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call to create application:

    Code Block
    languagejava
    curl -v -S -u admin:admin123 -X POST -H 'Content-Type: application/json' -d'{"name":"Application 1","tenantId":"10"}' "http://localhost:8080/kaaAdmin/rest/api/application" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationToken": "094302219096310",
        "id": "220",
        "name": "Application 1",
        "sequenceNumber": 0,
        "tenantId": "10"
    }
  • Sample call to edit application:

    Code Block
    languagejava
    curl -v -S -u admin:admin123 -X POST -H 'Content-Type: application/json' -d'{"id":"220","applicationToken":"094302219096310","name":"Application 1 v2","tenantId":"10"}' "http://localhost:8080/kaaAdmin/rest/api/application" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationToken": "094302219096310",
        "id": "220",
        "name": "Application 1 v2",
        "sequenceNumber": 0,
        "tenantId": "10"
    }

Common Type Library

Create CTL schema

Creates a CTL schema. Only authorized users are allowed to perform this operation.

  • URL
    /kaaAdmin/rest/api/CTL/saveSchema
  • Method: 

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    ParameterValueDescription
    bodystringThe CTL schema structure
    tenantIdstringThe ID of the tenant
    applicationIdstringThe ID of the application
  • Data params

    None

  • Success response:

    • Code: 200
    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "body": "{\n  \"type\" : \"record\",\n  \"name\" : \"ExampleSchema\",\n  \"namespace\" : \"org.kaaproject.kaa.examples\",\n  \"version\" : 1,\n  \"fields\" : [ {\n    \"type\" : \"int\",\n    \"name\" : \"exampleField\"\n  } ]\n}",
          "createdTime": 1456133956680,
          "createdUsername": null,
          "defaultRecord": "{\"exampleField\":0}",
          "dependencySet": [],
          "id": "530",
          "metaInfo": {
              "applicationId": null,
              "fqn": "org.kaaproject.kaa.examples.ExampleSchema",
              "id": "520",
              "tenantId": "70",
              "versions": null
          },
          "version": 1
      }
  • Error response:

    Status codesDescription
    400 Bad RequestThe CTL schema body provided is invalid
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe Tenant ID of the CTL schema does not match the Tenant ID of the authenticated user
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST "http://localhost:8080/kaaAdmin/rest/api/CTL/saveSchema" -d "body={\"type\":\"record\",\"name\":\"ExampleSchema\",\"namespace\":\"org.kaaproject.kaa.examples\",\"version\":1,\"fields\":[{\"type\":\"int\",\"name\":\"exampleField\"}]}&tenantId=70" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    {
        "body": "{\n  \"type\" : \"record\",\n  \"name\" : \"ExampleSchema\",\n  \"namespace\" : \"org.kaaproject.kaa.examples\",\n  \"version\" : 1,\n  \"fields\" : [ {\n    \"type\" : \"int\",\n    \"name\" : \"exampleField\"\n  } ]\n}",
        "createdTime": 1456133956680,
        "createdUsername": null,
        "defaultRecord": "{\"exampleField\":0}",
        "dependencySet": [],
        "id": "530",
        "metaInfo": {
            "applicationId": null,
            "fqn": "org.kaaproject.kaa.examples.ExampleSchema",
            "id": "520",
            "tenantId": "70",
            "versions": null
        },
        "version": 1
    }

Delete CTL schema

Deletes a CTL schema. Only authorized users are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/CTL/deleteSchema?fqn={fqn}&version={version}&tenantId={tenantId}&applicationId={applicationId}
  • Method: 

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    ParameterValueDescription
    fqnstringThe fully qualified name of the CTL schema
    versionintegerThe version number of the CTL schema
    tenantIdstringThe ID of the tenant
    applicationIdstringThe ID of the application
  • Data params

    None

  • Success response:

     

    • Code: 200 

  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe Tenant ID of the CTL schema does not match the Tenant ID of the authenticated user
    404 Not FoundA CTL schema with the specified fully qualified name, version number, tenant and application identifiers does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST "http://localhost:8080/kaaAdmin/rest/api/CTL/deleteSchema?fqn=org.kaaproject.kaa.examples.ExampleSchema&version=1&tenantId=70" | python -mjson.tool

Get CTL schema

 Returns a CTL schema. Only authorized users are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/CTL/getSchema?fqn={fqn}&version={version}&tenantId={tenantId}&applicationId={applicationId}
  • Method: 

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    fqnstringThe fully qualified name of the CTL schema
    versionintegerThe version number of the CTL schema
    tenantIdstringThe ID of the tenant
    applicationIdstringThe ID of the application
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "body": "{\n  \"type\" : \"record\",\n  \"name\" : \"ExampleSchema\",\n  \"namespace\" : \"org.kaaproject.kaa.examples\",\n  \"version\" : 1,\n  \"fields\" : [ {\n    \"type\" : \"int\",\n    \"name\" : \"exampleField\"\n  } ]\n}",
          "createdTime": 1456135829812,
          "createdUsername": null,
          "defaultRecord": "{\"exampleField\":0}",
          "dependencySet": [],
          "id": "531",
          "metaInfo": {
              "applicationId": null,
              "fqn": "org.kaaproject.kaa.examples.ExampleSchema",
              "id": "521",
              "tenantId": "70",
              "versions": null
          },
          "version": 1
      }
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe Tenant ID of the CTL schema does not match the Tenant ID of the authenticated user
    404 Not FoundA CTL schema with the specified fully qualified name and version number does not exist.
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/CTL/getSchema?fqn=org.kaaproject.kaa.examples.ExampleSchema&version=1&tenantId=70" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    {
        "body": "{\n  \"type\" : \"record\",\n  \"name\" : \"ExampleSchema\",\n  \"namespace\" : \"org.kaaproject.kaa.examples\",\n  \"version\" : 1,\n  \"fields\" : [ {\n    \"type\" : \"int\",\n    \"name\" : \"exampleField\"\n  } ]\n}",
        "createdTime": 1456135829812,
        "createdUsername": null,
        "defaultRecord": "{\"exampleField\":0}",
        "dependencySet": [],
        "id": "531",
        "metaInfo": {
            "applicationId": null,
            "fqn": "org.kaaproject.kaa.examples.ExampleSchema",
            "id": "521",
            "tenantId": "70",
            "versions": null
        },
        "version": 1
    }

Check CTL schema FQN

 Checks if CTL schema with same fqn is already exists in the sibling application. Only authorized users are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/CTL/checkFqn?fqn={fqn}&tenantId={tenantId}&applicationId={applicationId}
  • Method: 

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    fqnstringThe fully qualified name of the CTL schema
    tenantIdstringThe ID of the tenant
    applicationIdstringThe ID of the application
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      true
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe Tenant ID of the CTL schema does not match the Tenant ID of the authenticated user
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/CTL/checkFqn?fqn=org.kaaproject.kaa.examples.ExampleSchema&tenantId=70&applicationId=119" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    true

Update CTL schema scope

Updates existing CTL schema meta info scope by the given CTL schema meta info object. Only authorized users are allowed to perform this operation.

 

  • URL 
    /kaaAdmin/rest/api/CTL/updateScope
  • Method: 

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    None

  • Data params

    Expand
    titleRequest body

    Example:

    Code Block
    languagejs
    { "id": "522", "fqn": "org.kaaproject.kaa.examples.ExampleSchema", "tenantId": "70", "applicationId": null }
  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "applicationId": null,
          "fqn": "org.kaaproject.kaa.examples.ExampleSchema",
          "id": "522",
          "tenantId": "70",
          "versions": null
      }
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe Tenant ID of the CTL schema does not match the Tenant ID of the authenticated user
    500 Internal Server ErrorAn unexpected error occurred on the server side

     

  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST -H 'Content-Type: application/json' -d'{ "id": "522", "fqn": "org.kaaproject.kaa.examples.ExampleSchema", "tenantId": "70", "applicationId": null }' "http://localhost:8080/kaaAdmin/rest/api/CTL/updateScope" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationId": null,
        "fqn": "org.kaaproject.kaa.examples.ExampleSchema",
        "id": "522",
        "tenantId": "70",
        "versions": null
    }

Get system CTL schemas

Returns a list of available system CTL schemas metadata. Only authorized users are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/CTL/getSystemSchemas
  • Method: 

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    None

  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "applicationId": null,
              "fqn": "org.kaaproject.kaa.schema.system.EmptyData",
              "id": "130",
              "tenantId": null,
              "versions": [
                  1
              ]
          }
      ]
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/CTL/getSystemSchemas" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "applicationId": null,
            "fqn": "org.kaaproject.kaa.schema.system.EmptyData",
            "id": "130",
            "tenantId": null,
            "versions": [
                1
            ]
        }
    ]

Get tenant CTL schemas

Returns a list of available CTL schemas metadata for current tenant. Only authorized users are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/CTL/getTenantSchemas
  • Method: 

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    None

  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "applicationId": null,
              "fqn": "org.kaaproject.kaa.examples.ExampleSchema",
              "id": "522",
              "tenantId": "70",
              "versions": [
                  1
              ]
          },
          {
              "applicationId": null,
              "fqn": "org.kaaproject.kaa.schema.system.EmptyData",
              "id": "130",
              "tenantId": null,
              "versions": [
                  1
              ]
          }
      ]
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/CTL/getTenantSchemas" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "applicationId": null,
            "fqn": "org.kaaproject.kaa.examples.ExampleSchema",
            "id": "522",
            "tenantId": "70",
            "versions": [
                1
            ]
        },
        {
            "applicationId": null,
            "fqn": "org.kaaproject.kaa.schema.system.EmptyData",
            "id": "130",
            "tenantId": null,
            "versions": [
                1
            ]
        }
    ]

Get application CTL schemas

Returns a list of available CTL schemas metadata for an application. Only authorized users are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/CTL/getApplicationSchemas/{applicationId}
  • Method: 

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    applicationIdstringThe ID of the application
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "applicationId": "113",
              "fqn": "org.kaaproject.kaa.examples.ExampleSchema",
              "id": "523",
              "tenantId": "70",
              "versions": [
                  1
              ]
          },
          {
              "applicationId": null,
              "fqn": "org.kaaproject.kaa.schema.system.EmptyData",
              "id": "130",
              "tenantId": null,
              "versions": [
                  1
              ]
          }
      ]
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER, or TENANT_USER) or Tenant ID of the application does not match the Tenant ID of the user
    404 Not FoundAn application with the specified applicationId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/CTL/getApplicationSchemas/113" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "applicationId": "113",
            "fqn": "org.kaaproject.kaa.examples.ExampleSchema",
            "id": "523",
            "tenantId": "70",
            "versions": [
                1
            ]
        },
        {
            "applicationId": null,
            "fqn": "org.kaaproject.kaa.schema.system.EmptyData",
            "id": "130",
            "tenantId": null,
            "versions": [
                1
            ]
        }
    ]

Export CTL schema

Exports a CTL schema and, depending on the export method specified, all of its dependencies. Only authorized users are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/CTL/exportSchema?fqn={fqn}&version={version}&method={method}&applicationId={applicationId}
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    ParameterValueDescription
    fqnstringThe fully qualified name of the CTL schema
    versionintegerThe version number of the CTL schema
    methodstringThe schema export method (either SHALLOW, FLAT, DEEP or LIBRARY)
    applicationIdstringThe ID of the application
  • Data params

    None

  • Success response:

    • Code: 200 
    • CTL schema file data: application/json - for SHALLOW or FLAT; application/zip - for DEEP; application/java-archive - for LIBRARY.

       

  • Error response:

    Status codesDescription
    400 Bad RequestUnknown export method specified
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application does not match the Tenant ID of the authenticated user
    404 Not FoundThe CTL schema with the given fqn, version and application Id does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST "http://localhost:8080/kaaAdmin/rest/api/CTL/exportSchema?fqn=org.kaaproject.kaa.examples.ExampleSchema&version=1&method=SHALLOW&applicationId=113"

SDK profiles

Create SDK profile

Creates an SDK profile for further endpoint SDK generation. (Requires TENANT_DEVELOPER or TENANT_USER to perform this operation).

 

  • URL 
    /kaaAdmin/rest/api/createSdkProfile
  • Method: 

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    None

  • Data params

    Expand
    titleRequest body

    Example:

    Code Block
    languagejs
    { "applicationId": "115", "configurationSchemaVersion": 2, "logSchemaVersion": 1, "name": "Example", "notificationSchemaVersion": 1, "profileSchemaVersion": 0 }'
  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "aefMapIds": [],
          "applicationId": "115",
          "applicationToken": "17497963573225574853",
          "configurationSchemaVersion": 2,
          "createdTime": 1455817115823,
          "createdUsername": "devuser",
          "defaultVerifierToken": null,
          "endpointCount": 0,
          "id": "490",
          "logSchemaVersion": 1,
          "name": "Example",
          "notificationSchemaVersion": 1,
          "profileSchemaVersion": 0,
          "token": "7cxPLrAmsdGFU-3EIR5r3I5mgnI"
      }
  • Error response:

     

  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST -H 'Content-Type: application/json' -d'{ "applicationId": "115", "configurationSchemaVersion": 2, "logSchemaVersion": 1, "name": "Example", "notificationSchemaVersion": 1, "profileSchemaVersion": 0 }' "http://localhost:8080/kaaAdmin/rest/api/createSdkProfile" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "aefMapIds": [],
        "applicationId": "115",
        "applicationToken": "17497963573225574853",
        "configurationSchemaVersion": 2,
        "createdTime": 1455817115823,
        "createdUsername": "devuser",
        "defaultVerifierToken": null,
        "endpointCount": 0,
        "id": "490",
        "logSchemaVersion": 1,
        "name": "Example",
        "notificationSchemaVersion": 1,
        "profileSchemaVersion": 0,
        "token": "7cxPLrAmsdGFU-3EIR5r3I5mgnI"
    }

Delete SDK profile

Deletes an SDK profile from the database. (Requires TENANT_DEVELOPER or TENANT_USER to perform this operation).

 

  • URL 
    /kaaAdmin/rest/api/deleteSdkProfile?sdkProfileId={sdkProfileId}
  • Method: 

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    ParameterValueDescription
    sdkProfileIdstringAn SDK profile ID
  • Data params

    None

  • Success response:

     

    • Code: 200

  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application does not match the Tenant ID of the authenticated user
    404 Not FoundThe SDK profile with the specified ID does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side

     

  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST "http://localhost:8080/kaaAdmin/rest/api/deleteSdkProfile?sdkProfileId=490"

Get SDK profiles for application

Returns a list of SDK profiles for the given application. (Requires TENANT_DEVELOPER or TENANT_USER to request this information).

 

  • URL 
    /kaaAdmin/rest/api/sdkProfiles/{applicationId}
  • Method: 

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    applicationIdstringAn application ID
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "aefMapIds": [],
              "applicationId": "115",
              "applicationToken": "17497963573225574853",
              "configurationSchemaVersion": 2,
              "createdTime": 1455817115823,
              "createdUsername": "devuser",
              "defaultVerifierToken": null,
              "endpointCount": 0,
              "id": "490",
              "logSchemaVersion": 1,
              "name": "Example",
              "notificationSchemaVersion": 1,
              "profileSchemaVersion": 0,
              "token": "7cxPLrAmsdGFU-3EIR5r3I5mgnI"
          }
      ]
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application does not match the Tenant ID of the authenticated user
    404 Not FoundThe application with the specified ID does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side

     

  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/sdkProfiles/115" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "aefMapIds": [],
            "applicationId": "115",
            "applicationToken": "17497963573225574853",
            "configurationSchemaVersion": 2,
            "createdTime": 1455817115823,
            "createdUsername": "devuser",
            "defaultVerifierToken": null,
            "endpointCount": 0,
            "id": "490",
            "logSchemaVersion": 1,
            "name": "Example",
            "notificationSchemaVersion": 1,
            "profileSchemaVersion": 0,
            "token": "7cxPLrAmsdGFU-3EIR5r3I5mgnI"
        }
    ]

Get specific SDK profile

Returns the SDK profile by its identifier. (Requires TENANT_DEVELOPER or TENANT_USER to request this information).


  • URL 
    /kaaAdmin/rest/api/sdkProfile/{sdkProfileId}
  • Method: 

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    sdkProfileIdstringAn SDK profile ID
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "aefMapIds": [],
          "applicationId": "115",
          "applicationToken": "17497963573225574853",
          "configurationSchemaVersion": 2,
          "createdTime": 1455817115823,
          "createdUsername": "devuser",
          "defaultVerifierToken": null,
          "endpointCount": 0,
          "id": "490",
          "logSchemaVersion": 1,
          "name": "Example",
          "notificationSchemaVersion": 1,
          "profileSchemaVersion": 0,
          "token": "7cxPLrAmsdGFU-3EIR5r3I5mgnI"
      }

       

  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application does not match the Tenant ID of the authenticated user
    404 Not FoundThe SDK profile with the specified ID does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/sdkProfile/490" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "aefMapIds": [],
        "applicationId": "115",
        "applicationToken": "17497963573225574853",
        "configurationSchemaVersion": 2,
        "createdTime": 1455817115823,
        "createdUsername": "devuser",
        "defaultVerifierToken": null,
        "endpointCount": 0,
        "id": "490",
        "logSchemaVersion": 1,
        "name": "Example",
        "notificationSchemaVersion": 1,
        "profileSchemaVersion": 0,
        "token": "7cxPLrAmsdGFU-3EIR5r3I5mgnI"
    }

Generate endpoint SDK

Generates the endpoint SDK based on the SDK profile. (Requires TENANT_DEVELOPER or TENANT_USER to perform this operation).

  • URL 
    /kaaAdmin/rest/api/sdk?sdkProfileId={sdkProfileId}&targetPlatform={targetPlatform}
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    ParameterValueDescription
    sdkProfileIdstringThe SDK profile's ID
    targetPlatformstringThe target platform's name (either JAVA, ANDROID, CPP, C or OBJC)
  • Data params

    None

  • Success response:

    • Code: 200 
    • SDK file raw data

       

  • Error response:

    Status codesDescription
    400 Bad RequestAn unknown target platform was specified
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application does not match the Tenant ID of the authenticated user
    404 Not FoundThe SDK profile with the given ID does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call (for android or java client file extension must be .jar):

    Code Block
    curl -v -o dir_to_sdk/sdk_name.jar -S -u devuser:devuser123 -X POST "http://127.0.0.1:8080/kaaAdmin/rest/api/sdk?sdkProfileId=210&targetPlatform=ANDROID"

    for another platforms extension must be .tar.gz:

     

    Code Block
    curl -v -o sdk_name.tar.gz -S -u devuser:devuser123 -X POST "http://10.2.1.65:8080/kaaAdmin/rest/api/sdk?sdkProfileId=820&targetPlatform=CPP"
    
    

     

     

Profiling

Get client-side endpoint profile schemas

Returns the client-side endpoint profile schemas for an application. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information. A users can only request schemas for applications associated with the same user.

  • URL 
    /kaaAdmin/rest/api/profileSchemas/{applicationId}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    applicationIdstringthe ID of the application.
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "applicationId": "404",
              "createdTime": 1455895447046,
              "createdUsername": "admin",
              "ctlSchemaId": "140",
              "description": null,
              "id": "389",
              "name": "Generated",
              "version": 0
          },
          {
              "applicationId": "404",
              "createdTime": 1455895447620,
              "createdUsername": "devuser",
              "ctlSchemaId": "142",
              "description": "Profile schema describing city guide application profile",
              "id": "451",
              "name": "City guide profile schema",
              "version": 1
          }
      ]
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application does not match the Tenant ID of the authenticated user
    404 Not FoundApplication with the specified applicationId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/profileSchemas/404" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "applicationId": "404",
            "createdTime": 1455895447046,
            "createdUsername": "admin",
            "ctlSchemaId": "140",
            "description": null,
            "id": "389",
            "name": "Generated",
            "version": 0
        },
        {
            "applicationId": "404",
            "createdTime": 1455895447620,
            "createdUsername": "devuser",
            "ctlSchemaId": "142",
            "description": "Profile schema describing city guide application profile",
            "id": "451",
            "name": "City guide profile schema",
            "version": 1
        }
    ]
    

Get client-side endpoint profile schema

Returns the client-side endpoint profile schema by Profile Schema ID. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/profileSchema/{profileSchemaId}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    profileSchemaIdstringthe ID of the client-side endpoint profile schema
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "applicationId": "404",
          "createdTime": 1455895447620,
          "createdUsername": "devuser",
          "ctlSchemaId": "142",
          "description": "Profile schema describing city guide application profile",
          "id": "451",
          "name": "City guide profile schema",
          "version": 1
      }
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the profile schema does not match the Tenant ID of the authenticated user
    404 Not FoundClient-side endpoint profile schema with the specified profileSchemaId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/profileSchema/451" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationId": "404",
        "createdTime": 1455895447620,
        "createdUsername": "devuser",
        "ctlSchemaId": "142",
        "description": "Profile schema describing city guide application profile",
        "id": "451",
        "name": "City guide profile schema",
        "version": 1
    }
    

Create client-side endpoint profile schema

Uploads a client-side endpoint profile schema. A unique version number will be generated (incrementally) for the uploaded schema, and the createdUsername field of the schema will be set to the name of the user who uploaded it. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/saveProfileSchema
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    None

  • Data params

    Expand
    titleRequest body

    Example:

    Code Block
    languagejs
    {"applicationId":"404", "ctlSchemaId":"142", "name":"Test profile schema","description":"Profile Schema Description"}
  • Success response:

    • Code: 200 
    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "applicationId": "404",
          "createdTime": 1456216290966,
          "createdUsername": "devuser",
          "ctlSchemaId": "142",
          "description": "Profile Schema Description",
          "id": "541",
          "name": "Test profile schema",
          "version": 2
      }

 

  • Error response:

    Status codesDescription
    400 Bad RequestSpecified request body is not valid
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the profile schema does not match the Tenant ID of the authenticated user
    404 Not FoundApplication or referenced CT schema is not found
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST -H 'Content-Type: application/json' -d'{"applicationId":"404", "ctlSchemaId":"142", "name":"Test profile schema","description":"Profile Schema Description"}' "http://localhost:8080/kaaAdmin/rest/api/saveProfileSchema" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationId": "404",
        "createdTime": 1456216290966,
        "createdUsername": "devuser",
        "ctlSchemaId": "142",
        "description": "Profile Schema Description",
        "id": "541",
        "name": "Test profile schema",
        "version": 2
    }

Get server-side endpoint profile schemas

Returns the server-side endpoint profile schemas for an application. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information. A users can only request schemas for applications associated with the same user.

  • URL 
    /kaaAdmin/rest/api/serverProfileSchemas/{applicationId}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    applicationIdstringthe ID of the application.
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "applicationId": "110",
              "createdTime": 1455895431918,
              "createdUsername": "admin",
              "ctlSchemaId": "140",
              "description": null,
              "id": "151",
              "name": "Generated",
              "version": 0
          },
          {
              "applicationId": "110",
              "createdTime": 1455895432717,
              "createdUsername": "devuser",
              "ctlSchemaId": "141",
              "description": "Server profile schema describing activation application profile",
              "id": "152",
              "name": "Endpoint activation server profile schema",
              "version": 1
          }
      ]
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application does not match the Tenant ID of the authenticated user
    404 Not FoundApplication with the specified applicationId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/serverProfileSchemas/110" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "applicationId": "110",
            "createdTime": 1455895431918,
            "createdUsername": "admin",
            "ctlSchemaId": "140",
            "description": null,
            "id": "151",
            "name": "Generated",
            "version": 0
        },
        {
            "applicationId": "110",
            "createdTime": 1455895432717,
            "createdUsername": "devuser",
            "ctlSchemaId": "141",
            "description": "Server profile schema describing activation application profile",
            "id": "152",
            "name": "Endpoint activation server profile schema",
            "version": 1
        }
    ]
    

Get server-side endpoint profile schema

Returns the server-side endpoint profile schema by Server Profile Schema ID. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/serverProfileSchema/{serverProfileSchemaId}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    serverProfileSchemaIdstringthe ID of the server-side endpoint profile schema
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "applicationId": "110",
          "createdTime": 1455895432717,
          "createdUsername": "devuser",
          "ctlSchemaId": "141",
          "description": "Server profile schema describing activation application profile",
          "id": "152",
          "name": "Endpoint activation server profile schema",
          "version": 1
      }
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the profile schema does not match the Tenant ID of the authenticated user
    404 Not FoundServer-side endpoint profile schema with the specified serverProfileSchemaId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/serverProfileSchema/152" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationId": "110",
        "createdTime": 1455895432717,
        "createdUsername": "devuser",
        "ctlSchemaId": "141",
        "description": "Server profile schema describing activation application profile",
        "id": "152",
        "name": "Endpoint activation server profile schema",
        "version": 1
    }
    

Create server-side endpoint profile schema

Uploads a server-side endpoint profile schema. A unique version number will be generated (incrementally) for the uploaded schema, and the createdUsername field of the schema will be set to the name of the user who uploaded it. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/saveServerProfileSchema
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    None

  • Data params

    Expand
    titleRequest body

    Example:

    Code Block
    languagejs
    {"applicationId":"110", "ctlSchemaId":"141", "name":"Test server profile schema","description":"Server Profile Schema Description"}
  • Success response:

    • Code: 200 
    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "applicationId": "110",
          "createdTime": 1456217786856,
          "createdUsername": "devuser",
          "ctlSchemaId": "141",
          "description": "Server Profile Schema Description",
          "id": "542",
          "name": "Test server profile schema",
          "version": 2
      }

 

  • Error response:

    Status codesDescription
    400 Bad RequestSpecified request body is not valid
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the profile schema does not match the Tenant ID of the authenticated user
    404 Not FoundApplication or referenced CT schema is not found
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST -H 'Content-Type: application/json' -d'{"applicationId":"110", "ctlSchemaId":"141", "name":"Test server profile schema","description":"Server Profile Schema Description"}' "http://localhost:8080/kaaAdmin/rest/api/saveServerProfileSchema" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationId": "110",
        "createdTime": 1456217786856,
        "createdUsername": "devuser",
        "ctlSchemaId": "141",
        "description": "Server Profile Schema Description",
        "id": "542",
        "name": "Test server profile schema",
        "version": 2
    }

Update server-side endpoint profile

Update a server-side endpoint profile. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/updateServerProfile?endpointProfileKey&version&serverProfileBody
  • Method: 

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    ParameterValueDescription
    endpointProfileKeystringthe key hash of the endpoint in Base64 URL safe format.
    versionintthe version of the server-side endpoint profile schema
    serverProfileBodystringthe server-side endpoint profile body
  • Data params

    Expand
    titleRequest body

    Example:

    Code Block
    languagejs
    {\"name\": {\"string\":\"Kaa\"}}
  • Success response:

    • Code: 200 
    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "accessToken": "f816c31a-c533-49d8-83db-85fc7a2a4b93",
          "applicationId": "114",
          "clientProfileBody": "{\"id\":{\"string\":\"id\"}}",
          "clientProfileVersion": 3,
          "configurationHash": "qEYpdSOEPuS47sCjzWveaq/eILY=",
          "configurationVersion": 1,
          "ecfVersionStates": [],
          "endpointKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmjhTOSrQVQJjFt+662032imr/H3D9M2lMjS34gSnckyC9hckWRzRrCQQYgSXLuE3ct0iWO6D7wh1FMFTHa+85Ce+08j7ybQrGrg7ht6j4/Hj3u5BCMjytcway5vwiqkTm8bOfzm18m9AY6LaggFTwq1aUST29v8fNjKe/3lXwMn0OmCM5hJ//z9TSEWEqfPPfX6wHCqLY3rH+cCLhZWi8jUNtpGEEZce8f1t/sIOL1hDGpwMgUytL74tnYOZfc6zTQQklLCGDTUPyN/1kBZxqu8zKXIcDp7PqDjOM4Hc+9l52IIbApMbXUB8vVBYM+0cadhdjsuDIbtiFAy6v1zK4QIDAQAB",
          "endpointKeyHash": "L3QD/AVcphcYaA1IAwENqfpdOu0=",
          "endpointUserId": null,
          "groupState": [
              {
                  "configurationId": "212",
                  "endpointGroupId": "126",
                  "profileFilterId": null
              }
          ],
          "id": "0x2f7403fc055ca61718680d4803010da9fa5d3aed",
          "logSchemaVersion": 2,
          "notificationVersion": 0,
          "profileHash": "Cm4NuHq02kDyLE2IhQO3Zf9ameo=",
          "sdkToken": "vi9TW-1EXmpjZfQspszvBrMpiQ4",
          "sequenceNumber": 1,
          "serverHash": null,
          "serverProfileBody": "{\"name\": {\"string\":\"Kaa\"}}",
          "serverProfileVersion": 2,
          "simpleTopicHash": 1,
          "subscriptions": null,
          "systemNfVersion": 0,
          "topicHash": "2jmj7l5rSw0yVb/vlWAYkK/YBwk=",
          "userConfigurationHash": null,
          "userNfVersion": 1,
          "version": 26
      }

 

  • Error response:

    Status codesDescription
    400 Bad RequestSpecified server-side profile body is not valid
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER)
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST "http://localhost:8080/kaaAdmin/rest/api/updateServerProfile?endpointProfileKey=L3QD_AVcphcYaA1IAwENqfpdOu0=&version=2&" -d "serverProfileBody={\"name\": {\"string\":\"Kaa\"}}" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "accessToken": "f816c31a-c533-49d8-83db-85fc7a2a4b93",
        "applicationId": "114",
        "clientProfileBody": "{\"id\":{\"string\":\"id\"}}",
        "clientProfileVersion": 3,
        "configurationHash": "qEYpdSOEPuS47sCjzWveaq/eILY=",
        "configurationVersion": 1,
        "ecfVersionStates": [],
        "endpointKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmjhTOSrQVQJjFt+662032imr/H3D9M2lMjS34gSnckyC9hckWRzRrCQQYgSXLuE3ct0iWO6D7wh1FMFTHa+85Ce+08j7ybQrGrg7ht6j4/Hj3u5BCMjytcway5vwiqkTm8bOfzm18m9AY6LaggFTwq1aUST29v8fNjKe/3lXwMn0OmCM5hJ//z9TSEWEqfPPfX6wHCqLY3rH+cCLhZWi8jUNtpGEEZce8f1t/sIOL1hDGpwMgUytL74tnYOZfc6zTQQklLCGDTUPyN/1kBZxqu8zKXIcDp7PqDjOM4Hc+9l52IIbApMbXUB8vVBYM+0cadhdjsuDIbtiFAy6v1zK4QIDAQAB",
        "endpointKeyHash": "L3QD/AVcphcYaA1IAwENqfpdOu0=",
        "endpointUserId": null,
        "groupState": [
            {
                "configurationId": "212",
                "endpointGroupId": "126",
                "profileFilterId": null
            }
        ],
        "id": "0x2f7403fc055ca61718680d4803010da9fa5d3aed",
        "logSchemaVersion": 2,
        "notificationVersion": 0,
        "profileHash": "Cm4NuHq02kDyLE2IhQO3Zf9ameo=",
        "sdkToken": "vi9TW-1EXmpjZfQspszvBrMpiQ4",
        "sequenceNumber": 1,
        "serverHash": null,
        "serverProfileBody": "{\"name\": {\"string\":\"Kaa\"}}",
        "serverProfileVersion": 2,
        "simpleTopicHash": 1,
        "subscriptions": null,
        "systemNfVersion": 0,
        "topicHash": "2jmj7l5rSw0yVb/vlWAYkK/YBwk=",
        "userConfigurationHash": null,
        "userNfVersion": 1,
        "version": 26
    }

Get profile based on endpoint key

Returns the endpoint profile based on endpoint key hash. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/endpointProfile/{endpointProfileKey}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    endpointProfileKeystringthe key hash of the endpoint in Base64 URL safe format.
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "accessToken": "65084702-d3bd-4712-a065-57fdc0db8b4a",
          "applicationId": "114",
          "clientProfileBody": "{\"id\":{\"string\":\"id\"}}",
          "clientProfileVersion": 3,
          "configurationHash": "qEYpdSOEPuS47sCjzWveaq/eILY=",
          "configurationVersion": 1,
          "ecfVersionStates": [],
          "endpointKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmjhTOSrQVQJjFt+662032imr/H3D9M2lMjS34gSnckyC9hckWRzRrCQQYgSXLuE3ct0iWO6D7wh1FMFTHa+85Ce+08j7ybQrGrg7ht6j4/Hj3u5BCMjytcway5vwiqkTm8bOfzm18m9AY6LaggFTwq1aUST29v8fNjKe/3lXwMn0OmCM5hJ//z9TSEWEqfPPfX6wHCqLY3rH+cCLhZWi8jUNtpGEEZce8f1t/sIOL1hDGpwMgUytL74tnYOZfc6zTQQklLCGDTUPyN/1kBZxqu8zKXIcDp7PqDjOM4Hc+9l52IIbApMbXUB8vVBYM+0cadhdjsuDIbtiFAy6v1zK4QIDAQAB",
          "endpointKeyHash": "L3QD/AVcphcYaA1IAwENqfpdOu0=",
          "endpointUserId": null,
          "groupState": [
              {
                  "configurationId": "212",
                  "endpointGroupId": "126",
                  "profileFilterId": null
              }
          ],
          "id": "0x2f7403fc055ca61718680d4803010da9fa5d3aed",
          "logSchemaVersion": 2,
          "notificationVersion": 0,
          "profileHash": "ciRmuB+nulmi+5VCflJGoqA0cmU=",
          "sdkToken": "vi9TW-1EXmpjZfQspszvBrMpiQ4",
          "sequenceNumber": 1,
          "serverHash": null,
          "serverProfileBody": "{\"name\":null}",
          "serverProfileVersion": 2,
          "simpleTopicHash": 1,
          "subscriptions": null,
          "systemNfVersion": 0,
          "topicHash": "2jmj7l5rSw0yVb/vlWAYkK/YBwk=",
          "userConfigurationHash": null,
          "userNfVersion": 1,
          "version": 3
      }
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application does not match the Tenant ID of the authenticated user
    404 Not FoundApplication with the specified applicationId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/endpointProfile/L3QD_AVcphcYaA1IAwENqfpdOu0=" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "accessToken": "65084702-d3bd-4712-a065-57fdc0db8b4a",
        "applicationId": "114",
        "clientProfileBody": "{\"id\":{\"string\":\"id\"}}",
        "clientProfileVersion": 3,
        "configurationHash": "qEYpdSOEPuS47sCjzWveaq/eILY=",
        "configurationVersion": 1,
        "ecfVersionStates": [],
        "endpointKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmjhTOSrQVQJjFt+662032imr/H3D9M2lMjS34gSnckyC9hckWRzRrCQQYgSXLuE3ct0iWO6D7wh1FMFTHa+85Ce+08j7ybQrGrg7ht6j4/Hj3u5BCMjytcway5vwiqkTm8bOfzm18m9AY6LaggFTwq1aUST29v8fNjKe/3lXwMn0OmCM5hJ//z9TSEWEqfPPfX6wHCqLY3rH+cCLhZWi8jUNtpGEEZce8f1t/sIOL1hDGpwMgUytL74tnYOZfc6zTQQklLCGDTUPyN/1kBZxqu8zKXIcDp7PqDjOM4Hc+9l52IIbApMbXUB8vVBYM+0cadhdjsuDIbtiFAy6v1zK4QIDAQAB",
        "endpointKeyHash": "L3QD/AVcphcYaA1IAwENqfpdOu0=",
        "endpointUserId": null,
        "groupState": [
            {
                "configurationId": "212",
                "endpointGroupId": "126",
                "profileFilterId": null
            }
        ],
        "id": "0x2f7403fc055ca61718680d4803010da9fa5d3aed",
        "logSchemaVersion": 2,
        "notificationVersion": 0,
        "profileHash": "ciRmuB+nulmi+5VCflJGoqA0cmU=",
        "sdkToken": "vi9TW-1EXmpjZfQspszvBrMpiQ4",
        "sequenceNumber": 1,
        "serverHash": null,
        "serverProfileBody": "{\"name\":null}",
        "serverProfileVersion": 2,
        "simpleTopicHash": 1,
        "subscriptions": null,
        "systemNfVersion": 0,
        "topicHash": "2jmj7l5rSw0yVb/vlWAYkK/YBwk=",
        "userConfigurationHash": null,
        "userNfVersion": 1,
        "version": 3
    }

 

Get client-side endpoint profile body based on endpoint key

Returns the client-side endpoint profile body based on endpoint key hash. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/endpointProfileBody/{endpointProfileKey}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    endpointProfileKeystringthe key hash of the endpoint in Base64 URL safe format.
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "endpointKeyHash": "JoAki4oIrvP4sfhFLwjuOeUAurM=",
          "profile": "{ \"id\" : \"id\" , \"os\" : \"Linux\" , \"os_version\" : \"3.17\" , \"build\" : \"0.0.1-SNAPSHOT\"}"
      }
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application does not match the Tenant ID of the authenticated user
    404 Not FoundApplication with the specified applicationId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/endpointProfileBody/JoAki4oIrvP4sfhFLwjuOeUAurM=" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "endpointKeyHash": "JoAki4oIrvP4sfhFLwjuOeUAurM=",
        "profile": "{ \"id\" : \"id\" , \"os\" : \"Linux\" , \"os_version\" : \"3.17\" , \"build\" : \"0.0.1-SNAPSHOT\"}"
    }
    

Get client-side endpoint profiles by owner ID

NOTE: This method will be available in Kaa v0.8.1

Returns a list of client-side endpoint profiles by the ID of the endpoint owner. (Requires TENANT_DEVELOPER or TENANT_USER to request this information).

  • URL 
    /kaaAdmin/rest/api/endpointProfiles?userIduserExternalId={userId}
  • Method: 

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    userIduserExternalIdstringThe ID of the endpoint owner
  • Data params

    None

  • Success response:
     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "id": "56cc0ef7b6478f0776249b34",
              "applicationId": "114",
              "endpointKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmKLjCs/ct/9repE34ctt5xbLMLA7jHgC5MJJ3g2xgUnjSkBHzHXunRB0n50IwSEZZZ33f677Za9Tu2399hxNlSu1iL4SllUO7PLJyVRgby5x89s9i3wtE8iZIhOm8+rHPO9zd3U/0fgJYdGRMPaWpW+dqaQFV7Hvt4Hm77AOwzOA5k8ybtg49nii+v0yMjwIjQIF4zuAe4XV58a+lkeAGKzaZnablpZyd0WSDZP1zLIcEN9nbnEAzdf7UMeJE1faUqF9cKoDFKfWdmy+HQqvMJ2DuHuIksaOhDJLXcjbe/YhAFjoEbAjsO/JQiZ1pSWdMRrgcLj131JesLpbl+FHkwIDAQAB",
              "endpointKeyHash": "HBlhGPuZtsoPR+bakQiPZJg8zF0=",
              "endpointUserId": "56cc254eb6478f0776249b35",
              "accessToken": "cf17084f-e151-44de-b24f-ab2d5a47b858",
              "sequenceNumber": 1,
              "groupState": [
                  {
                      "endpointGroupId": "530",
                      "profileFilterId": null,
                      "configurationId": "560"
                  }
              ],
              "subscriptions": null,
              "simpleTopicHash": 1,
              "topicHash": "2jmj7l5rSw0yVb/vlWAYkK/YBwk=",
              "clientProfileBody": {
                  "number": 42
              },
              "serverProfileBody": "",
              "profileHash": "wsU9ZpSCFCWKJsqcqEXXrAwX+Oc=",
              "configurationHash": "GL0OoZMIrbGI0QUeSYVcuuPHW4A=",
              "userConfigurationHash": null,
              "clientProfileVersion": 1,
              "serverProfileVersion": 0,
              "configurationVersion": 1,
              "notificationVersion": 0,
              "systemNfVersion": 0,
              "userNfVersion": 1,
              "logSchemaVersion": 1,
              "ecfVersionStates": [],
              "serverHash": null,
              "sdkToken": "qQbxQ-GnP4BbUXqeuyba9KDev_k",
              "version": 4
          }
      ]

       

  • Error response:

    Status codesDescription
    400 Bad RequestInvalid endpoint user ID provided
    401 UnauthorizedThe user is not authenticated or invalid credentials provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application does not match the Tenant ID of the authenticated user
    404 Not FoundNo endpoint user with the given ID found
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/endpointProfiles?userIduserExternalId=56cc254eb6478f0776249b35" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "id": "56cc0ef7b6478f0776249b34",
            "applicationId": "114",
            "endpointKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmKLjCs/ct/9repE34ctt5xbLMLA7jHgC5MJJ3g2xgUnjSkBHzHXunRB0n50IwSEZZZ33f677Za9Tu2399hxNlSu1iL4SllUO7PLJyVRgby5x89s9i3wtE8iZIhOm8+rHPO9zd3U/0fgJYdGRMPaWpW+dqaQFV7Hvt4Hm77AOwzOA5k8ybtg49nii+v0yMjwIjQIF4zuAe4XV58a+lkeAGKzaZnablpZyd0WSDZP1zLIcEN9nbnEAzdf7UMeJE1faUqF9cKoDFKfWdmy+HQqvMJ2DuHuIksaOhDJLXcjbe/YhAFjoEbAjsO/JQiZ1pSWdMRrgcLj131JesLpbl+FHkwIDAQAB",
            "endpointKeyHash": "HBlhGPuZtsoPR+bakQiPZJg8zF0=",
            "endpointUserId": "56cc254eb6478f0776249b35",
            "accessToken": "cf17084f-e151-44de-b24f-ab2d5a47b858",
            "sequenceNumber": 1,
            "groupState": [
                {
                    "endpointGroupId": "530",
                    "profileFilterId": null,
                    "configurationId": "560"
                }
            ],
            "subscriptions": null,
            "simpleTopicHash": 1,
            "topicHash": "2jmj7l5rSw0yVb/vlWAYkK/YBwk=",
            "clientProfileBody": {
                "number": 42
            },
            "serverProfileBody": "",
            "profileHash": "wsU9ZpSCFCWKJsqcqEXXrAwX+Oc=",
            "configurationHash": "GL0OoZMIrbGI0QUeSYVcuuPHW4A=",
            "userConfigurationHash": null,
            "clientProfileVersion": 1,
            "serverProfileVersion": 0,
            "configurationVersion": 1,
            "notificationVersion": 0,
            "systemNfVersion": 0,
            "userNfVersion": 1,
            "logSchemaVersion": 1,
            "ecfVersionStates": [],
            "serverHash": null,
            "sdkToken": "qQbxQ-GnP4BbUXqeuyba9KDev_k",
            "version": 4
        }
    ]

Grouping

Get endpoint groups

Returns all endpoint groups for the specified application. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/endpointGroups/{applicationId}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    applicationIdstringthe ID of the application.
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "applicationId": "71",
              "createdTime": 1408705246400,
              "createdUsername": "admin",
              "description": null,
              "id": "81",
              "name": "All",
              "sequenceNumber": 0,
              "topics": [],
              "weight": 0
          }
      ]
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application does not match the Tenant ID of the authenticated user
    404 Not FoundApplication with the specified applicationId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/endpointGroups/71" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "applicationId": "71",
            "createdTime": 1408705246400,
            "createdUsername": "admin",
            "description": null,
            "id": "81",
            "name": "All",
            "sequenceNumber": 0,
            "topics": [],
            "weight": 0
        }
    ]
    

Get endpoint group

Returns an endpoint group by Endpoint Group ID. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/endpointGroup/{endpointGroupId}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    endpointGroupIdstringthe id of the endpoint group
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "applicationId": "71",
          "createdTime": 1408705246400,
          "createdUsername": "admin",
          "description": null,
          "id": "81",
          "name": "All",
          "sequenceNumber": 0,
          "topics": [],
          "weight": 0
      }
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with endpoint group does not match the Tenant ID of the authenticated user
    404 Not FoundAn endpoint group with the specified endpointGroupId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/endpointGroup/81" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationId": "71",
        "createdTime": 1408705246400,
        "createdUsername": "admin",
        "description": null,
        "id": "81",
        "name": "All",
        "sequenceNumber": 0,
        "topics": [],
        "weight": 0
    }
    

Create/Edit endpoint group

Creates or edits an endpoint group. If you don't specify ID, new endpoint group will be created. If an endpoint group with the specified ID exists, it will be updated. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/endpointGroup
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    None

  • Data params

    Expand
    titleRequest body

    Example:

    Code Block
    languagejs
    {"applicationId":"71","name":"Test Endpoint Group","description":"Test Endpoint Group Description","weight":"1"}
  • Success response:

    • Code: 200 
    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "applicationId": "71",
          "createdTime": 1408711565372,
          "createdUsername": "devuser",
          "description": "Test Endpoint Group Description",
          "id": "82",
          "name": "Test Endpoint Group",
          "sequenceNumber": 0,
          "topics": [],
          "weight": 1
      }
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with endpoint group does not match the Tenant ID of the authenticated user
    404 Not FoundAn endpoint group to be edited with the specified endpointGroupId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call to create endpoint group:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST -H 'Content-Type: application/json' -d'{"applicationId":"71","name":"Test Endpoint Group","description":"Test Endpoint Group Description","weight":"1"}' "http://localhost:8080/kaaAdmin/rest/api/endpointGroup" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationId": "71",
        "createdTime": 1408711565372,
        "createdUsername": "devuser",
        "description": "Test Endpoint Group Description",
        "id": "82",
        "name": "Test Endpoint Group",
        "sequenceNumber": 0,
        "topics": [],
        "weight": 1
    }

     

     

  • Sample call to edit endpoint group:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST -H 'Content-Type: application/json' -d'{"id":"82","applicationId":"71","name":"Test Endpoint Group v2","description":"Test Endpoint Group Description","weight":"1"}' "http://localhost:8080/kaaAdmin/rest/api/endpointGroup" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationId": "71",
        "createdTime": 1408711571489,
        "createdUsername": "devuser",
        "description": "Test Endpoint Group Description",
        "id": "82",
        "name": "Test Endpoint Group v2",
        "topics": [],
        "weight": 1
    }

Delete endpoint group

Deletes an endpoint group specified by Endpoint Group ID. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/delEndpointGroup?endpointGroupId
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    ParameterValueDescription
    endpointGroupIdstringThe ID of the endpoint group to be deleted
  • Data params

    None

  • Success response:

    • Code: 200 

  • Error response:

    Status codesDescription
    400 Bad RequestThe endpointGroupId parameter is empty
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the endpoint group does not match the Tenant ID of the authenticated user
    404 Not FoundAn endpoint group with the specified endpointGroupId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST "http://localhost:8080/kaaAdmin/rest/api/delEndpointGroup?endpointGroupId=82" | python -mjson.tool

Get profile filter records

Returns all profile filter records for the specified endpoint group. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/profileFilterRecords?endpointGroupId&includeDeprecated
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    endpointGroupIdstringThe ID of the endpoint group
    includeDeprecatedstring[“true” or ”false”] if “true”, all profile filter records will be returned, including deprecated ones. If “false”, only active and inactive profile filter records will be returned
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "activeProfileFilter": {
                  "activatedTime": 1408705246444,
                  "activatedUsername": "admin",
                  "applicationId": "71",
                  "body": "true",
                  "createdTime": 1408705246433,
                  "createdUsername": null,
                  "deactivatedTime": 0,
                  "deactivatedUsername": null,
                  "description": null,
                  "endpointCount": 0,
                  "endpointGroupId": "81",
                  "id": "102",
                  "lastModifyTime": 1408705246433,
                  "majorVersion": 1,
                  "minorVersion": 0,
                  "modifiedUsername": null,
                  "schemaId": "93",
                  "sequenceNumber": 1,
                  "status": "ACTIVE"
              },
              "inactiveProfileFilter": null
          }
      ]
      
     
  • Error response:

    Status codesDescription
    400 Bad RequestThe endpointGroupId parameter is empty
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the endpoint group does not match the Tenant ID of the authenticated user
    404 Not FoundAn endpoint group with the specified endpointGroupId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/profileFilterRecords?endpointGroupId=81&includeDeprecated=true" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "activeProfileFilter": {
                "activatedTime": 1408705246444,
                "activatedUsername": "admin",
                "applicationId": "71",
                "body": "true",
                "createdTime": 1408705246433,
                "createdUsername": null,
                "deactivatedTime": 0,
                "deactivatedUsername": null,
                "description": null,
                "endpointCount": 0,
                "endpointGroupId": "81",
                "id": "102",
                "lastModifyTime": 1408705246433,
                "majorVersion": 1,
                "minorVersion": 0,
                "modifiedUsername": null,
                "schemaId": "93",
                "sequenceNumber": 1,
                "status": "ACTIVE"
            },
            "inactiveProfileFilter": null
        }
    ]
    

Get profile filter record

Returns the profile filter record for the specified endpoint group and profile schema. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/profileFilterRecord?endpointGroupId&endpointProfileSchemaId&serverProfileSchemaId
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    endpointGroupIdstringthe ID of the endpoint group
    endpointProfileSchemaIdstringthe ID of the endpoint profile schema
    serverProfileSchemaIdstringthe ID of the server profile schema

    Note: endpointProfileSchemaId and serverProfileSchemaId are optional parameters but but both of them could not be empty.

     

  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
      	"activeStructureDto": {
      		"activatedTime": 1457972918712,
      		"activatedUsername": "devuser",
      		"applicationId": "110",
      		"body": "#sp.active != null and #sp.active == true",
      		"createdTime": 1457972918604,
      		"createdUsername": "devuser",
      		"deactivatedTime": 0,
      		"deactivatedUsername": null,
      		"description": "Profile filter for active devices",
      		"endpointCount": 0,
      		"endpointGroupId": "121",
      		"endpointProfileSchemaId": null,
      		"endpointProfileSchemaVersion": null,
      		"id": "174",
      		"lastModifyTime": 1457972918604,
      		"modifiedUsername": null,
      		"sequenceNumber": 1,
      		"serverProfileSchemaId": "152",
      		"serverProfileSchemaVersion": 1,
      		"status": "ACTIVE",
      		"version": 1
      	},
      	"inactiveStructureDto": null
      }
      
     
  • Error response:

    Status codesDescription
    400 Bad RequestendpointGroupId parameter is empty
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the endpoint group does not match the Tenant ID of the authenticated user
    404 Not FoundAn endpoint group with the specified endpointGroupId does not exist or endpoint group does not have the specified profile filter record
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/profileFilterRecord?schemaId=93&endpointGroupId=81" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "activeStructureDto": {
    		"activatedTime": 1457972918712,
    		"activatedUsername": "devuser",
    		"applicationId": "110",
    		"body": "#sp.active != null and #sp.active == true",
    		"createdTime": 1457972918604,
    		"createdUsername": "devuser",
    		"deactivatedTime": 0,
    		"deactivatedUsername": null,
    		"description": "Profile filter for active devices",
    		"endpointCount": 0,
    		"endpointGroupId": "121",
    		"endpointProfileSchemaId": null,
    		"endpointProfileSchemaVersion": null,
    		"id": "174",
    		"lastModifyTime": 1457972918604,
    		"modifiedUsername": null,
    		"sequenceNumber": 1,
    		"serverProfileSchemaId": "152",
    		"serverProfileSchemaVersion": 1,
    		"status": "ACTIVE",
    		"version": 1
    	},
    	"inactiveStructureDto": null
    }
    

Get vacant profile schemas

Returns all vacant (not being used by endpoint group profile filters) profile schemas for the specified endpoint group. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/vacantProfileSchemas?endpointGroupId
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    endpointGroupIdstringthe id of the endpoint group
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "id": "93",
              "majorVersion": 1,
              "minorVersion": 0
          },
          {
              "id": "99",
              "majorVersion": 2,
              "minorVersion": 0
          }
      ]
      
     
  • Error response:

    Status codesDescription
    400 Bad RequestendpointGroupId parameter is empty
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the endpoint group does not match the Tenant ID of the authenticated user
    404 Not FoundAn endpoint group with the specified endpointGroupId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/vacantProfileSchemas?endpointGroupId=83" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "id": "93",
            "majorVersion": 1,
            "minorVersion": 0
        },
        {
            "id": "99",
            "majorVersion": 2,
            "minorVersion": 0
        }
    ]
    

Create/edit profile filter

Anchor
Create/edit profile filter
Create/edit profile filter

Creates or updates a profile filter. If a profile filter with the specified ID does not exist, then it will be created and its createUsername field will be set to the name of the user who has created it. f a profile filter with the specified ID exists, the profile filter will be updated and its modifyUsername will be set to the user who has submited the request. Only users with the  TENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation. Note, that you have to specify correct profile filter record version to perform editing.

  • URL 
    /kaaAdmin/rest/api/profileFilter
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    None

  • Data params

    Expand
    titleRequest body

    Example:

    Code Block
    languagejs
    {"applicationId":"114","endpointProfileSchemaId":"610","serverProfileSchemaId":"611","endpointGroupId":"580","endpointProfileSchemaVersion":"1","serverProfileSchemaVersion":"1","description":"Test Profile Filter","body":"true","status":"INACTIVE"}
  • Success response:

    • Code: 200 
    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "activatedTime": 0,
          "activatedUsername": null,
          "applicationId": "114",
          "body": "true",
          "createdTime": 1460565893620,
          "createdUsername": "devuser",
          "deactivatedTime": 0,
          "deactivatedUsername": null,
          "description": "Test Profile Filter",
          "endpointCount": 0,
          "endpointGroupId": "580",
          "endpointProfileSchemaId": "610",
          "endpointProfileSchemaVersion": 1,
          "id": "620",
          "lastModifyTime": 1460565893620,
          "modifiedUsername": null,
          "sequenceNumber": 0,
          "serverProfileSchemaId": "611",
          "serverProfileSchemaVersion": 1,
          "status": "INACTIVE",
          "version": 0
      }
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the endpoint group does not match the Tenant ID of the authenticated user
    404 Not FoundAn endpoint group with the specified endpointGroupId does not exist or existing profile filter with the specified profileFilterId not found
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST -H 'Content-Type: application/json' -d'{"applicationId":"114","endpointProfileSchemaId":"610","serverProfileSchemaId":"611","endpointGroupId":"580","endpointProfileSchemaVersion":"1","serverProfileSchemaVersion":"1","description":"Test Profile Filter","body":"true","status":"INACTIVE"}' "http://localhost:8080/kaaAdmin/rest/api/profileFilter" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "activatedTime": 0,
        "activatedUsername": null,
        "applicationId": "114",
        "body": "true",
        "createdTime": 1460565893620,
        "createdUsername": "devuser",
        "deactivatedTime": 0,
        "deactivatedUsername": null,
        "description": "Test Profile Filter",
        "endpointCount": 0,
        "endpointGroupId": "580",
        "endpointProfileSchemaId": "610",
        "endpointProfileSchemaVersion": 1,
        "id": "620",
        "lastModifyTime": 1460565893620,
        "modifiedUsername": null,
        "sequenceNumber": 0,
        "serverProfileSchemaId": "611",
        "serverProfileSchemaVersion": 1,
        "status": "INACTIVE",
        "version": 0
    }

Activate profile filter

Activates a profile filter. Sets the status field of the profile filter to ACTIVE, increments the sequenceNumber field value by 1, and sets the activateUsername and activatedTime fields to the name of the user who submitted the request and the activation time, respectively Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/activateProfileFilter
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    None

  • Data params

    Expand
    titleRequest body

    Example:

    Code Block
    languagejs
    620
  • Success response:

    • Code: 200 
    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "activatedTime": 1460566525434,
          "activatedUsername": "devuser",
          "applicationId": "114",
          "body": "true",
          "createdTime": 1460565893620,
          "createdUsername": "devuser",
          "deactivatedTime": 0,
          "deactivatedUsername": null,
          "description": "Test Profile Filter",
          "endpointCount": 0,
          "endpointGroupId": "580",
          "endpointProfileSchemaId": "610",
          "endpointProfileSchemaVersion": 1,
          "id": "620",
          "lastModifyTime": 1460565893620,
          "modifiedUsername": null,
          "sequenceNumber": 1,
          "serverProfileSchemaId": "611",
          "serverProfileSchemaVersion": 1,
          "status": "ACTIVE",
          "version": 1
      }
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the endpoint group does not match the Tenant ID of the authenticated user
    404 Not FoundProfile filter with the specified profileFilterId not found
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST -H 'Content-Type: text/plain' -d'620' "http://localhost:8080/kaaAdmin/rest/api/activateProfileFilter" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "activatedTime": 1460566525434,
        "activatedUsername": "devuser",
        "applicationId": "114",
        "body": "true",
        "createdTime": 1460565893620,
        "createdUsername": "devuser",
        "deactivatedTime": 0,
        "deactivatedUsername": null,
        "description": "Test Profile Filter",
        "endpointCount": 0,
        "endpointGroupId": "580",
        "endpointProfileSchemaId": "610",
        "endpointProfileSchemaVersion": 1,
        "id": "620",
        "lastModifyTime": 1460565893620,
        "modifiedUsername": null,
        "sequenceNumber": 1,
        "serverProfileSchemaId": "611",
        "serverProfileSchemaVersion": 1,
        "status": "ACTIVE",
        "version": 1
    }

Deactivate profile filter

Deactivates a profile filter. Sets the status field of the profile filter to DEPRECATED, sets the deactivatedTime field value to the time of the deactivation request, and sets the deactivateUsername field to the name of the user who has submitted the request. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/deactivateProfileFilter
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    None

  • Data params

    Expand
    titleRequest body

    Example:

    Code Block
    languagejs
    620
  • Success response:

    • Code: 200 
    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "activatedTime": 1460566525434,
          "activatedUsername": "devuser",
          "applicationId": "114",
          "body": "true",
          "createdTime": 1460565893620,
          "createdUsername": "devuser",
          "deactivatedTime": 1460566657289,
          "deactivatedUsername": "devuser",
          "description": "Test Profile Filter",
          "endpointCount": 0,
          "endpointGroupId": "580",
          "endpointProfileSchemaId": "610",
          "endpointProfileSchemaVersion": 1,
          "id": "620",
          "lastModifyTime": 1460565893620,
          "modifiedUsername": null,
          "sequenceNumber": 1,
          "serverProfileSchemaId": "611",
          "serverProfileSchemaVersion": 1,
          "status": "DEPRECATED",
          "version": 2
      }
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the endpoint group does not match the Tenant ID of the authenticated user
    404 Not FoundProfile filter with the specified profileFilterId not found
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST -H 'Content-Type: text/plain' -d'620' "http://localhost:8080/kaaAdmin/rest/api/deactivateProfileFilter" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "activatedTime": 1460566525434,
        "activatedUsername": "devuser",
        "applicationId": "114",
        "body": "true",
        "createdTime": 1460565893620,
        "createdUsername": "devuser",
        "deactivatedTime": 1460566657289,
        "deactivatedUsername": "devuser",
        "description": "Test Profile Filter",
        "endpointCount": 0,
        "endpointGroupId": "580",
        "endpointProfileSchemaId": "610",
        "endpointProfileSchemaVersion": 1,
        "id": "620",
        "lastModifyTime": 1460565893620,
        "modifiedUsername": null,
        "sequenceNumber": 1,
        "serverProfileSchemaId": "611",
        "serverProfileSchemaVersion": 1,
        "status": "DEPRECATED",
        "version": 2
    }

Delete profile filter record

Deletes a profile filter record by profile schema ID and endpoint group ID. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/delProfileFilterRecord?schemaId&endpointGroupId
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    ParameterValueDescription
    serverProfileSchemaIdstringthe ID of the server-side endpoint profile schema
     endpointProfileSchemaIdstring the ID of the client-side endpoint profile schema
    endpointGroupId
    stringthe ID of the endpoint group
  • Data params

    None

  • Success response:

    • Code: 200 

  • Error response:

    Status codesDescription
    400 Bad RequestendpointGroupId parameter is empty
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the endpoint group does not match the Tenant ID of the authenticated user
    404 Not FoundAn endpoint group with the specified endpointGroupId does not exist or the endpoint group does not have the specified profile filter record
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST "http://localhost:8080/kaaAdmin/rest/api/delProfileFilterRecord?serverProfileSchemaId=611&endpointProfileSchemaId=610&endpointGroupId=580" | python -mjson.tool

 

Get profiles based on endpoint group id

Returns the endpoint profiles based on endpoint group id. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.
Default limit value equals "20", default offset value equals "0". Maximum limit value is "500".

  • URL 
    /kaaAdmin/rest/api/endpointProfileByGroupId?endpointGroupId&limit&offset
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    endpointGroupIdstringthe id of the endpoint group.
    limitstringmaximum number of shown profiles. (optional parameter)
    offsetstringoffset from beginning of profiles list. (optional parameter)
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "endpointProfiles": [
              {
                  "accessToken": "66368128-ee00-46e2-9e53-c2c93a5d5262",
                  "applicationId": "110",
                  "cfGroupStates": [
                      {
                          "configurationId": "141",
                          "endpointGroupId": "120",
                          "profileFilterId": "142"
                      }
                  ],
                  "cfSequenceNumber": 3,
                  "changedFlag": false,
                  "configurationHash": "A9fqz21JoQ35laFYCyXWpKJFRko=",
                  "configurationVersion": 1,
                  "ecfVersionStates": [],
                  "endpointKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxiLE5sfsd+EqNHdVKYemc/EQ4VaY3Ra8VYT1t8fVZ4TFJi/T6tGmPAPg7nmz+YglU5rcnYblFTOl4lT4W3CDt0Del2avdz9h/YLPxklOtn7aZrPhtPXE0PmTI0wxwFadmkgvroZruxs6/GedVgRsbn/Sn9kBslOvCcG8/eFhbpQHNhKuCzUdPeLdKoOCpJGgG5HVlCP2n/gpF1IYdyultv/qhFufBP2VbI4hRj9eYvtoiDj+pDU3x7TIUpx3HpxT1b2Q3o8ZMP18Hg6mFsphvoWi9xlU53/zuGsJX4vhC92KKB7gZ4B+3lXzttBLAZ3LfyQsf3fKlft/wL1xea6jXQIDAQAB",
                  "endpointKeyHash": "aMEEDLIrrI42yppI8q6JLq69Dhc=",
                  "endpointUserId": null,
                  "id": "5640a6d1b2f5605ac7696d2e",
                  "logSchemaVersion": 1,
                  "nfGroupStates": [
                      {
                          "configurationId": "141",
                          "endpointGroupId": "120",
                          "profileFilterId": "142"
                      }
                  ],
                  "nfSequenceNumber": 3,
                  "notificationVersion": 0,
                  "ntHash": null,
                  "profile": "{ \"id\" : \"id\" , \"os\" : \"Linux\" , \"os_version\" : \"3.17\" , \"build\" : \"0.0.1-SNAPSHOT\"}",
                  "profileHash": "pvRRvLFNBX0eOIMB0GpSmSxKKSo=",
                  "profileSchemaId": null,
                  "profileVersion": 2,
                  "serverHash": "L3OFM6ZDpaAUKu1pCLzJCpgXurQ=",
                  "subscriptions": null,
                  "systemNfVersion": 0,
                  "userConfigurationHash": null,
                  "userNfVersion": 1
              },
              {
                  "accessToken": "bbea7b50-37aa-4956-9b33-91795717e9eb",
                  "applicationId": "110",
                  "cfGroupStates": [
                      {
                          "configurationId": "141",
                          "endpointGroupId": "120",
                          "profileFilterId": "142"
                      }
                  ],
                  "cfSequenceNumber": 3,
                  "changedFlag": false,
                  "configurationHash": "A9fqz21JoQ35laFYCyXWpKJFRko=",
                  "configurationVersion": 1,
                  "ecfVersionStates": [],
                  "endpointKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlkxm9jO8L80gx3o5AFVTnixx4AxdU9WLtCQFDcpcbDKR9sjUBhiiQxmDJKNMLZzeFdm57Dep7JuvcJVGsJ55USRCH5MfU/BbKIYDfauXO8uBtxCU5EW9yJRMuAh61dboH280uKQxnSZHifT+dN3fLAtaMuICE3LME40o/y5HWbXIIpWwgL0rjWGkTN45tRlf6sRBJqUUXmDye/m3XUOeaPh40MCPWId9+ay/rZ/kiSYctPnCWAw/JnfoXFK+RRr3Mm5N7DjZ0leUdTPZyDY09Ox9tgDhxn/dlL4WXDJ0tV1GV0gUhTC5QRvrsrKX+csVTPxeIR4Rm9VyI26A89skswIDAQAB",
                  "endpointKeyHash": "JoAki4oIrvP4sfhFLwjuOeUAurM=",
                  "endpointUserId": null,
                  "id": "5640a74ab2f5605ac7696d2f",
                  "logSchemaVersion": 1,
                  "nfGroupStates": [
                      {
                          "configurationId": "141",
                          "endpointGroupId": "120",
                          "profileFilterId": "142"
                      }
                  ],
                  "nfSequenceNumber": 3,
                  "notificationVersion": 0,
                  "ntHash": null,
                  "profile": "{ \"id\" : \"id\" , \"os\" : \"Linux\" , \"os_version\" : \"3.17\" , \"build\" : \"0.0.1-SNAPSHOT\"}",
                  "profileHash": "pvRRvLFNBX0eOIMB0GpSmSxKKSo=",
                  "profileSchemaId": null,
                  "profileVersion": 2,
                  "serverHash": "L3OFM6ZDpaAUKu1pCLzJCpgXurQ=",
                  "subscriptions": null,
                  "systemNfVersion": 0,
                  "userConfigurationHash": null,
                  "userNfVersion": 1
              }
          ],
          "next": "http://localhost:8080/kaaAdmin/rest/api/endpointProfileByGroupId?endpointGroupId=120&limit=2&offset=2"
      }
      
     
    • Error response:

      Status codesDescription
      401 UnauthorizedThe user is not authenticated or invalid credentials were provided
      403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application does not match the Tenant ID of the authenticated user
      404 Not FoundApplication with the specified applicationId does not exist
      500 Internal Server ErrorAn unexpected error occurred on the server side
    • Sample call:

      Code Block
      languagejava
      curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/endpointProfileByGroupId?endpointGroupId=120&limit=2&offset=0" | python -mjson.tool
      Expand
      titleExample result
      Code Block
      languagejs
      {
          "endpointProfiles": [
              {
                  "accessToken": "66368128-ee00-46e2-9e53-c2c93a5d5262",
                  "applicationId": "110",
                  "cfGroupStates": [
                      {
                          "configurationId": "141",
                          "endpointGroupId": "120",
                          "profileFilterId": "142"
                      }
                  ],
                  "cfSequenceNumber": 3,
                  "changedFlag": false,
                  "configurationHash": "A9fqz21JoQ35laFYCyXWpKJFRko=",
                  "configurationVersion": 1,
                  "ecfVersionStates": [],
                  "endpointKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxiLE5sfsd+EqNHdVKYemc/EQ4VaY3Ra8VYT1t8fVZ4TFJi/T6tGmPAPg7nmz+YglU5rcnYblFTOl4lT4W3CDt0Del2avdz9h/YLPxklOtn7aZrPhtPXE0PmTI0wxwFadmkgvroZruxs6/GedVgRsbn/Sn9kBslOvCcG8/eFhbpQHNhKuCzUdPeLdKoOCpJGgG5HVlCP2n/gpF1IYdyultv/qhFufBP2VbI4hRj9eYvtoiDj+pDU3x7TIUpx3HpxT1b2Q3o8ZMP18Hg6mFsphvoWi9xlU53/zuGsJX4vhC92KKB7gZ4B+3lXzttBLAZ3LfyQsf3fKlft/wL1xea6jXQIDAQAB",
                  "endpointKeyHash": "aMEEDLIrrI42yppI8q6JLq69Dhc=",
                  "endpointUserId": null,
                  "id": "5640a6d1b2f5605ac7696d2e",
                  "logSchemaVersion": 1,
                  "nfGroupStates": [
                      {
                          "configurationId": "141",
                          "endpointGroupId": "120",
                          "profileFilterId": "142"
                      }
                  ],
                  "nfSequenceNumber": 3,
                  "notificationVersion": 0,
                  "ntHash": null,
                  "profile": "{ \"id\" : \"id\" , \"os\" : \"Linux\" , \"os_version\" : \"3.17\" , \"build\" : \"0.0.1-SNAPSHOT\"}",
                  "profileHash": "pvRRvLFNBX0eOIMB0GpSmSxKKSo=",
                  "profileSchemaId": null,
                  "profileVersion": 2,
                  "serverHash": "L3OFM6ZDpaAUKu1pCLzJCpgXurQ=",
                  "subscriptions": null,
                  "systemNfVersion": 0,
                  "userConfigurationHash": null,
                  "userNfVersion": 1
              },
              {
                  "accessToken": "bbea7b50-37aa-4956-9b33-91795717e9eb",
                  "applicationId": "110",
                  "cfGroupStates": [
                      {
                          "configurationId": "141",
                          "endpointGroupId": "120",
                          "profileFilterId": "142"
                      }
                  ],
                  "cfSequenceNumber": 3,
                  "changedFlag": false,
                  "configurationHash": "A9fqz21JoQ35laFYCyXWpKJFRko=",
                  "configurationVersion": 1,
                  "ecfVersionStates": [],
                  "endpointKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlkxm9jO8L80gx3o5AFVTnixx4AxdU9WLtCQFDcpcbDKR9sjUBhiiQxmDJKNMLZzeFdm57Dep7JuvcJVGsJ55USRCH5MfU/BbKIYDfauXO8uBtxCU5EW9yJRMuAh61dboH280uKQxnSZHifT+dN3fLAtaMuICE3LME40o/y5HWbXIIpWwgL0rjWGkTN45tRlf6sRBJqUUXmDye/m3XUOeaPh40MCPWId9+ay/rZ/kiSYctPnCWAw/JnfoXFK+RRr3Mm5N7DjZ0leUdTPZyDY09Ox9tgDhxn/dlL4WXDJ0tV1GV0gUhTC5QRvrsrKX+csVTPxeIR4Rm9VyI26A89skswIDAQAB",
                  "endpointKeyHash": "JoAki4oIrvP4sfhFLwjuOeUAurM=",
                  "endpointUserId": null,
                  "id": "5640a74ab2f5605ac7696d2f",
                  "logSchemaVersion": 1,
                  "nfGroupStates": [
                      {
                          "configurationId": "141",
                          "endpointGroupId": "120",
                          "profileFilterId": "142"
                      }
                  ],
                  "nfSequenceNumber": 3,
                  "notificationVersion": 0,
                  "ntHash": null,
                  "profile": "{ \"id\" : \"id\" , \"os\" : \"Linux\" , \"os_version\" : \"3.17\" , \"build\" : \"0.0.1-SNAPSHOT\"}",
                  "profileHash": "pvRRvLFNBX0eOIMB0GpSmSxKKSo=",
                  "profileSchemaId": null,
                  "profileVersion": 2,
                  "serverHash": "L3OFM6ZDpaAUKu1pCLzJCpgXurQ=",
                  "subscriptions": null,
                  "systemNfVersion": 0,
                  "userConfigurationHash": null,
                  "userNfVersion": 1
              }
          ],
          "next": "http://localhost:8080/kaaAdmin/rest/api/endpointProfileByGroupId?endpointGroupId=120&limit=2&offset=2"
      }
      

Get client-side profiles bodies based on endpoint group id

Returns the client-side endpoint profiles bodies based on endpoint group id. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.
Default limit value equals "20", default offset value equals "0". Maximum limit value is "500".

  • URL 
    /kaaAdmin/rest/api/endpointProfileBodyByGroupId?endpointGroupId&limit&offset
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    endpointGroupIdstringthe id of the endpoint group.
    limitstringmaximum number of shown profiles. (optional parameter)
    offsetstringoffset from beginning of profiles list. (optional parameter)
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "endpointProfilesBody": [
              {
                  "clientSideProfile": "{ \"id\" : { \"string\" : \"id\"}}",
                  "endpointKeyHash": "L3QD/AVcphcYaA1IAwENqfpdOu0=",
                  "serverSideProfile": "{\"name\":null}"
              },
              {
                  "clientSideProfile": null,
                  "endpointKeyHash": "+O3NlmBltOqsalV6hwnwI4Cz2fc=",
                  "serverSideProfile": "{\"name\":null}"
              }
          ],
          "next": "http://10.2.1.110:8080/kaaAdmin/rest/api/endpointProfileBodyByGroupId?endpointGroupId=126&limit=2&offset=2"
      }
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application does not match the Tenant ID of the authenticated user
    404 Not FoundApplication with the specified applicationId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/endpointProfileBodyByGroupId?endpointGroupId=126&limit=2&offset=0" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "endpointProfilesBody": [
            {
                "clientSideProfile": "{ \"id\" : { \"string\" : \"id\"}}",
                "endpointKeyHash": "L3QD/AVcphcYaA1IAwENqfpdOu0=",
                "serverSideProfile": "{\"name\":null}"
            },
            {
                "clientSideProfile": null,
                "endpointKeyHash": "+O3NlmBltOqsalV6hwnwI4Cz2fc=",
                "serverSideProfile": "{\"name\":null}"
            }
        ],
        "next": "http://10.2.1.110:8080/kaaAdmin/rest/api/endpointProfileBodyByGroupId?endpointGroupId=126&limit=2&offset=2"
    }

Configuration

Get configuration schemas

Returns all configuration schemas for the specified application. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation. The application must be associated with the user who has submitted the request.

  • URL 
    /kaaAdmin/rest/api/configurationSchemas/{applicationId}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    applicationIdstringthe ID of the application.
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "applicationId": "71",
              "baseSchema": "{\"type\":\"record\",\"name\":\"ConfigurationSchema\",\"namespace\":\"org.kaa.config\",\"fields\":[{\"name\":\"Properties\",\"type\":{\"type\":\"array\",\"items\":{\"name\":\"ConfigurationProperty\",\"namespace\":\"config.system\",\"type\":\"record\",\"fields\":[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"value\",\"type\":\"string\"},{\"name\":\"__uuid\",\"type\":[{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"},\"null\"]}]}}},{\"name\":\"__uuid\",\"type\":[\"org.kaaproject.configuration.uuidT\",\"null\"]}]}",
              "createdTime": 1408638999001,
              "createdUsername": "admin",
              "description": null,
              "endpointCount": 0,
              "id": "94",
              "majorVersion": 1,
              "minorVersion": 0,
              "name": "Generated",
              "overrideSchema": "{\"type\":\"record\",\"name\":\"ConfigurationSchema\",\"namespace\":\"org.kaa.config\",\"fields\":[{\"name\":\"Properties\",\"type\":[{\"type\":\"array\",\"items\":{\"name\":\"ConfigurationProperty\",\"namespace\":\"config.system\",\"type\":\"record\",\"fields\":[{\"name\":\"name\",\"type\":[\"string\",{\"symbols\":[\"unchanged\"],\"name\":\"unchangedT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"}]},{\"name\":\"value\",\"type\":[\"string\",\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":[{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"},\"null\"]}]}},\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":[\"org.kaaproject.configuration.uuidT\",\"null\"]}]}",
              "protocolSchema": "{\"items\":{\"name\":\"deltaT\",\"type\":\"record\",\"fields\":[{\"name\":\"delta\",\"type\":[{\"type\":\"record\",\"name\":\"ConfigurationSchema\",\"namespace\":\"org.kaa.config\",\"fields\":[{\"name\":\"Properties\",\"type\":[{\"type\":\"array\",\"items\":[{\"name\":\"ConfigurationProperty\",\"namespace\":\"config.system\",\"type\":\"record\",\"fields\":[{\"name\":\"name\",\"type\":[\"string\",{\"symbols\":[\"unchanged\"],\"name\":\"unchangedT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"}]},{\"name\":\"value\",\"type\":[\"string\",\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"}}]},\"org.kaaproject.configuration.uuidT\"]},{\"symbols\":[\"reset\"],\"name\":\"resetT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"},\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":\"org.kaaproject.configuration.uuidT\"}]},\"config.system.ConfigurationProperty\"]}],\"namespace\":\"org.kaaproject.configuration\"},\"type\":\"array\"}",
              "schema": "{\r\n    \"type\": \"record\",\r\n    \"name\": \"ConfigurationSchema\",\r\n    \"namespace\": \"org.kaa.config\",\r\n    \"fields\": [\r\n        {\r\n            \"name\": \"Properties\",\r\n            \"type\": {\r\n                \"type\": \"array\",\r\n                \"items\": {\r\n                    \"name\": \"ConfigurationProperty\",\r\n                    \"namespace\": \"config.system\",\r\n                    \"type\": \"record\",\r\n                    \"fields\": [\r\n                        {\r\n                            \"name\": \"name\",\r\n                            \"type\": \"string\"\r\n                        },\r\n                        {\r\n                            \"name\": \"value\",\r\n                            \"type\": \"string\"\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        }\r\n    ]\r\n}",
              "status": null
          }
      ]
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application does not match the Tenant ID of the authenticated user
    404 Not FoundApplication with the specified applicationId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/configurationSchemas/71" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "applicationId": "71",
            "baseSchema": "{\"type\":\"record\",\"name\":\"ConfigurationSchema\",\"namespace\":\"org.kaa.config\",\"fields\":[{\"name\":\"Properties\",\"type\":{\"type\":\"array\",\"items\":{\"name\":\"ConfigurationProperty\",\"namespace\":\"config.system\",\"type\":\"record\",\"fields\":[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"value\",\"type\":\"string\"},{\"name\":\"__uuid\",\"type\":[{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"},\"null\"]}]}}},{\"name\":\"__uuid\",\"type\":[\"org.kaaproject.configuration.uuidT\",\"null\"]}]}",
            "createdTime": 1408638999001,
            "createdUsername": "admin",
            "description": null,
            "endpointCount": 0,
            "id": "94",
            "majorVersion": 1,
            "minorVersion": 0,
            "name": "Generated",
            "overrideSchema": "{\"type\":\"record\",\"name\":\"ConfigurationSchema\",\"namespace\":\"org.kaa.config\",\"fields\":[{\"name\":\"Properties\",\"type\":[{\"type\":\"array\",\"items\":{\"name\":\"ConfigurationProperty\",\"namespace\":\"config.system\",\"type\":\"record\",\"fields\":[{\"name\":\"name\",\"type\":[\"string\",{\"symbols\":[\"unchanged\"],\"name\":\"unchangedT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"}]},{\"name\":\"value\",\"type\":[\"string\",\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":[{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"},\"null\"]}]}},\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":[\"org.kaaproject.configuration.uuidT\",\"null\"]}]}",
            "protocolSchema": "{\"items\":{\"name\":\"deltaT\",\"type\":\"record\",\"fields\":[{\"name\":\"delta\",\"type\":[{\"type\":\"record\",\"name\":\"ConfigurationSchema\",\"namespace\":\"org.kaa.config\",\"fields\":[{\"name\":\"Properties\",\"type\":[{\"type\":\"array\",\"items\":[{\"name\":\"ConfigurationProperty\",\"namespace\":\"config.system\",\"type\":\"record\",\"fields\":[{\"name\":\"name\",\"type\":[\"string\",{\"symbols\":[\"unchanged\"],\"name\":\"unchangedT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"}]},{\"name\":\"value\",\"type\":[\"string\",\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"}}]},\"org.kaaproject.configuration.uuidT\"]},{\"symbols\":[\"reset\"],\"name\":\"resetT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"},\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":\"org.kaaproject.configuration.uuidT\"}]},\"config.system.ConfigurationProperty\"]}],\"namespace\":\"org.kaaproject.configuration\"},\"type\":\"array\"}",
            "schema": "{\r\n    \"type\": \"record\",\r\n    \"name\": \"ConfigurationSchema\",\r\n    \"namespace\": \"org.kaa.config\",\r\n    \"fields\": [\r\n        {\r\n            \"name\": \"Properties\",\r\n            \"type\": {\r\n                \"type\": \"array\",\r\n                \"items\": {\r\n                    \"name\": \"ConfigurationProperty\",\r\n                    \"namespace\": \"config.system\",\r\n                    \"type\": \"record\",\r\n                    \"fields\": [\r\n                        {\r\n                            \"name\": \"name\",\r\n                            \"type\": \"string\"\r\n                        },\r\n                        {\r\n                            \"name\": \"value\",\r\n                            \"type\": \"string\"\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        }\r\n    ]\r\n}",
            "status": null
        }
    ]
    

Get configuration schema

Returns a configuration schema by configuration schema ID. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/configurationSchema/{configurationSchemaId}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    configurationSchemaIdstringthe ID of the configuration schema
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "applicationId": "71",
          "baseSchema": "{\"type\":\"record\",\"name\":\"ConfigurationSchema\",\"namespace\":\"org.kaa.config\",\"fields\":[{\"name\":\"Properties\",\"type\":{\"type\":\"array\",\"items\":{\"name\":\"ConfigurationProperty\",\"namespace\":\"config.system\",\"type\":\"record\",\"fields\":[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"value\",\"type\":\"string\"},{\"name\":\"__uuid\",\"type\":[{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"},\"null\"]}]}}},{\"name\":\"__uuid\",\"type\":[\"org.kaaproject.configuration.uuidT\",\"null\"]}]}",
          "createdTime": 1408638999001,
          "createdUsername": "admin",
          "description": null,
          "endpointCount": 0,
          "id": "94",
          "majorVersion": 1,
          "minorVersion": 0,
          "name": "Generated",
          "overrideSchema": "{\"type\":\"record\",\"name\":\"ConfigurationSchema\",\"namespace\":\"org.kaa.config\",\"fields\":[{\"name\":\"Properties\",\"type\":[{\"type\":\"array\",\"items\":{\"name\":\"ConfigurationProperty\",\"namespace\":\"config.system\",\"type\":\"record\",\"fields\":[{\"name\":\"name\",\"type\":[\"string\",{\"symbols\":[\"unchanged\"],\"name\":\"unchangedT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"}]},{\"name\":\"value\",\"type\":[\"string\",\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":[{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"},\"null\"]}]}},\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":[\"org.kaaproject.configuration.uuidT\",\"null\"]}]}",
          "protocolSchema": "{\"items\":{\"name\":\"deltaT\",\"type\":\"record\",\"fields\":[{\"name\":\"delta\",\"type\":[{\"type\":\"record\",\"name\":\"ConfigurationSchema\",\"namespace\":\"org.kaa.config\",\"fields\":[{\"name\":\"Properties\",\"type\":[{\"type\":\"array\",\"items\":[{\"name\":\"ConfigurationProperty\",\"namespace\":\"config.system\",\"type\":\"record\",\"fields\":[{\"name\":\"name\",\"type\":[\"string\",{\"symbols\":[\"unchanged\"],\"name\":\"unchangedT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"}]},{\"name\":\"value\",\"type\":[\"string\",\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"}}]},\"org.kaaproject.configuration.uuidT\"]},{\"symbols\":[\"reset\"],\"name\":\"resetT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"},\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":\"org.kaaproject.configuration.uuidT\"}]},\"config.system.ConfigurationProperty\"]}],\"namespace\":\"org.kaaproject.configuration\"},\"type\":\"array\"}",
          "schema": "{\r\n    \"type\": \"record\",\r\n    \"name\": \"ConfigurationSchema\",\r\n    \"namespace\": \"org.kaa.config\",\r\n    \"fields\": [\r\n        {\r\n            \"name\": \"Properties\",\r\n            \"type\": {\r\n                \"type\": \"array\",\r\n                \"items\": {\r\n                    \"name\": \"ConfigurationProperty\",\r\n                    \"namespace\": \"config.system\",\r\n                    \"type\": \"record\",\r\n                    \"fields\": [\r\n                        {\r\n                            \"name\": \"name\",\r\n                            \"type\": \"string\"\r\n                        },\r\n                        {\r\n                            \"name\": \"value\",\r\n                            \"type\": \"string\"\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        }\r\n    ]\r\n}",
          "status": null
      }
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the configuration schema does not match the Tenant ID of the authenticated user
    404 Not FoundConfiguration schema with the specified configurationSchemaId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/configurationSchema/94" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationId": "71",
        "baseSchema": "{\"type\":\"record\",\"name\":\"ConfigurationSchema\",\"namespace\":\"org.kaa.config\",\"fields\":[{\"name\":\"Properties\",\"type\":{\"type\":\"array\",\"items\":{\"name\":\"ConfigurationProperty\",\"namespace\":\"config.system\",\"type\":\"record\",\"fields\":[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"value\",\"type\":\"string\"},{\"name\":\"__uuid\",\"type\":[{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"},\"null\"]}]}}},{\"name\":\"__uuid\",\"type\":[\"org.kaaproject.configuration.uuidT\",\"null\"]}]}",
        "createdTime": 1408638999001,
        "createdUsername": "admin",
        "description": null,
        "endpointCount": 0,
        "id": "94",
        "majorVersion": 1,
        "minorVersion": 0,
        "name": "Generated",
        "overrideSchema": "{\"type\":\"record\",\"name\":\"ConfigurationSchema\",\"namespace\":\"org.kaa.config\",\"fields\":[{\"name\":\"Properties\",\"type\":[{\"type\":\"array\",\"items\":{\"name\":\"ConfigurationProperty\",\"namespace\":\"config.system\",\"type\":\"record\",\"fields\":[{\"name\":\"name\",\"type\":[\"string\",{\"symbols\":[\"unchanged\"],\"name\":\"unchangedT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"}]},{\"name\":\"value\",\"type\":[\"string\",\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":[{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"},\"null\"]}]}},\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":[\"org.kaaproject.configuration.uuidT\",\"null\"]}]}",
        "protocolSchema": "{\"items\":{\"name\":\"deltaT\",\"type\":\"record\",\"fields\":[{\"name\":\"delta\",\"type\":[{\"type\":\"record\",\"name\":\"ConfigurationSchema\",\"namespace\":\"org.kaa.config\",\"fields\":[{\"name\":\"Properties\",\"type\":[{\"type\":\"array\",\"items\":[{\"name\":\"ConfigurationProperty\",\"namespace\":\"config.system\",\"type\":\"record\",\"fields\":[{\"name\":\"name\",\"type\":[\"string\",{\"symbols\":[\"unchanged\"],\"name\":\"unchangedT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"}]},{\"name\":\"value\",\"type\":[\"string\",\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"}}]},\"org.kaaproject.configuration.uuidT\"]},{\"symbols\":[\"reset\"],\"name\":\"resetT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"},\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":\"org.kaaproject.configuration.uuidT\"}]},\"config.system.ConfigurationProperty\"]}],\"namespace\":\"org.kaaproject.configuration\"},\"type\":\"array\"}",
        "schema": "{\r\n    \"type\": \"record\",\r\n    \"name\": \"ConfigurationSchema\",\r\n    \"namespace\": \"org.kaa.config\",\r\n    \"fields\": [\r\n        {\r\n            \"name\": \"Properties\",\r\n            \"type\": {\r\n                \"type\": \"array\",\r\n                \"items\": {\r\n                    \"name\": \"ConfigurationProperty\",\r\n                    \"namespace\": \"config.system\",\r\n                    \"type\": \"record\",\r\n                    \"fields\": [\r\n                        {\r\n                            \"name\": \"name\",\r\n                            \"type\": \"string\"\r\n                        },\r\n                        {\r\n                            \"name\": \"value\",\r\n                            \"type\": \"string\"\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        }\r\n    ]\r\n}",
        "status": null
    }
    

Create configuration schema

Uploads a configuration schema. A unique version number will be generated (incrementally) for the uploaded schema, and the createUsername field of the schema will be set to the name of the user who uploaded it. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/configurationSchema
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    None

  • Data params

    Multipart/form-data encoding. Fields:

    Expand
    titleconfigurationSchema (content-type: application/json)

    Example:

    Code Block
    languagejs
    {"applicationId":"71","name":"Test configuration schema","description":"Configuration Schema Description"}
    Expand
    titlefile (content-type: application/octet-stream)

    File contents example:

    Code Block
    languagejs
    {
        "type": "record",
        "name": "TestConfigurationSchema",
        "namespace": "org.kaa.config.test",
        "fields": [
            {
                "name": "Properties",
                "type": {
                    "type": "array",
                    "items": {
                        "name": "ConfigurationProperty",
                        "namespace": "config.system",
                        "type": "record",
                        "fields": [
                            {
                                "name": "name",
                                "type": "string"
                            },
                            {
                                "name": "value",
                                "type": "string"
                            }
                        ]
                    }
                }
            }
        ]
    }
  • Success response:

    • Code: 200 
    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "applicationId": "71",
          "baseSchema": "{\"type\":\"record\",\"name\":\"TestConfigurationSchema\",\"namespace\":\"org.kaa.config.test\",\"fields\":[{\"name\":\"Properties\",\"type\":{\"type\":\"array\",\"items\":{\"name\":\"ConfigurationProperty\",\"namespace\":\"config.system\",\"type\":\"record\",\"fields\":[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"value\",\"type\":\"string\"},{\"name\":\"__uuid\",\"type\":[{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"},\"null\"]}]}}},{\"name\":\"__uuid\",\"type\":[\"org.kaaproject.configuration.uuidT\",\"null\"]}]}",
          "createdTime": 1408705295749,
          "createdUsername": "devuser",
          "description": "Configuration Schema Description",
          "endpointCount": 0,
          "id": "96",
          "majorVersion": 2,
          "minorVersion": 0,
          "name": "Test configuration schema",
          "overrideSchema": "{\"type\":\"record\",\"name\":\"TestConfigurationSchema\",\"namespace\":\"org.kaa.config.test\",\"fields\":[{\"name\":\"Properties\",\"type\":[{\"type\":\"array\",\"items\":{\"name\":\"ConfigurationProperty\",\"namespace\":\"config.system\",\"type\":\"record\",\"fields\":[{\"name\":\"name\",\"type\":[\"string\",{\"symbols\":[\"unchanged\"],\"name\":\"unchangedT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"}]},{\"name\":\"value\",\"type\":[\"string\",\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":[{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"},\"null\"]}]}},\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":[\"org.kaaproject.configuration.uuidT\",\"null\"]}]}",
          "protocolSchema": "{\"items\":{\"name\":\"deltaT\",\"type\":\"record\",\"fields\":[{\"name\":\"delta\",\"type\":[{\"type\":\"record\",\"name\":\"TestConfigurationSchema\",\"namespace\":\"org.kaa.config.test\",\"fields\":[{\"name\":\"Properties\",\"type\":[{\"type\":\"array\",\"items\":[{\"name\":\"ConfigurationProperty\",\"namespace\":\"config.system\",\"type\":\"record\",\"fields\":[{\"name\":\"name\",\"type\":[\"string\",{\"symbols\":[\"unchanged\"],\"name\":\"unchangedT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"}]},{\"name\":\"value\",\"type\":[\"string\",\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"}}]},\"org.kaaproject.configuration.uuidT\"]},{\"symbols\":[\"reset\"],\"name\":\"resetT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"},\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":\"org.kaaproject.configuration.uuidT\"}]},\"config.system.ConfigurationProperty\"]}],\"namespace\":\"org.kaaproject.configuration\"},\"type\":\"array\"}",
          "schema": "{\n    \"type\": \"record\",\n    \"name\": \"TestConfigurationSchema\",\n    \"namespace\": \"org.kaa.config.test\",\n    \"fields\": [\n        {\n            \"name\": \"Properties\",\n            \"type\": {\n                \"type\": \"array\",\n                \"items\": {\n                    \"name\": \"ConfigurationProperty\",\n                    \"namespace\": \"config.system\",\n                    \"type\": \"record\",\n                    \"fields\": [\n                        {\n                            \"name\": \"name\",\n                            \"type\": \"string\"\n                        },\n                        {\n                            \"name\": \"value\",\n                            \"type\": \"string\"\n                        }\n                    ]\n                }\n            }\n        }\n    ]\n}",
          "status": null
      }

 

  • Error response:

    Status codesDescription
    400 Bad RequestSpecified configuration schema is not a valid avro schema
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the configuration schema does not match the Tenant ID of the authenticated user
    404 Not FoundFile with a schema not found in the form data
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -F'configurationSchema={"applicationId":"71","name":"Test configuration schema","description":"Configuration Schema Description"};type=application/json' -F [email protected]_schema.json "http://localhost:8080/kaaAdmin/rest/api/configurationSchema" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationId": "71",
        "baseSchema": "{\"type\":\"record\",\"name\":\"TestConfigurationSchema\",\"namespace\":\"org.kaa.config.test\",\"fields\":[{\"name\":\"Properties\",\"type\":{\"type\":\"array\",\"items\":{\"name\":\"ConfigurationProperty\",\"namespace\":\"config.system\",\"type\":\"record\",\"fields\":[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"value\",\"type\":\"string\"},{\"name\":\"__uuid\",\"type\":[{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"},\"null\"]}]}}},{\"name\":\"__uuid\",\"type\":[\"org.kaaproject.configuration.uuidT\",\"null\"]}]}",
        "createdTime": 1408705295749,
        "createdUsername": "devuser",
        "description": "Configuration Schema Description",
        "endpointCount": 0,
        "id": "96",
        "majorVersion": 2,
        "minorVersion": 0,
        "name": "Test configuration schema",
        "overrideSchema": "{\"type\":\"record\",\"name\":\"TestConfigurationSchema\",\"namespace\":\"org.kaa.config.test\",\"fields\":[{\"name\":\"Properties\",\"type\":[{\"type\":\"array\",\"items\":{\"name\":\"ConfigurationProperty\",\"namespace\":\"config.system\",\"type\":\"record\",\"fields\":[{\"name\":\"name\",\"type\":[\"string\",{\"symbols\":[\"unchanged\"],\"name\":\"unchangedT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"}]},{\"name\":\"value\",\"type\":[\"string\",\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":[{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"},\"null\"]}]}},\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":[\"org.kaaproject.configuration.uuidT\",\"null\"]}]}",
        "protocolSchema": "{\"items\":{\"name\":\"deltaT\",\"type\":\"record\",\"fields\":[{\"name\":\"delta\",\"type\":[{\"type\":\"record\",\"name\":\"TestConfigurationSchema\",\"namespace\":\"org.kaa.config.test\",\"fields\":[{\"name\":\"Properties\",\"type\":[{\"type\":\"array\",\"items\":[{\"name\":\"ConfigurationProperty\",\"namespace\":\"config.system\",\"type\":\"record\",\"fields\":[{\"name\":\"name\",\"type\":[\"string\",{\"symbols\":[\"unchanged\"],\"name\":\"unchangedT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"}]},{\"name\":\"value\",\"type\":[\"string\",\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"}}]},\"org.kaaproject.configuration.uuidT\"]},{\"symbols\":[\"reset\"],\"name\":\"resetT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"},\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":\"org.kaaproject.configuration.uuidT\"}]},\"config.system.ConfigurationProperty\"]}],\"namespace\":\"org.kaaproject.configuration\"},\"type\":\"array\"}",
        "schema": "{\n    \"type\": \"record\",\n    \"name\": \"TestConfigurationSchema\",\n    \"namespace\": \"org.kaa.config.test\",\n    \"fields\": [\n        {\n            \"name\": \"Properties\",\n            \"type\": {\n                \"type\": \"array\",\n                \"items\": {\n                    \"name\": \"ConfigurationProperty\",\n                    \"namespace\": \"config.system\",\n                    \"type\": \"record\",\n                    \"fields\": [\n                        {\n                            \"name\": \"name\",\n                            \"type\": \"string\"\n                        },\n                        {\n                            \"name\": \"value\",\n                            \"type\": \"string\"\n                        }\n                    ]\n                }\n            }\n        }\n    ]\n}",
        "status": null
    }

Get configuration records

Returns all configuration records for the specified endpoint group. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/configurationRecords?endpointGroupId&includeDeprecated
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    endpointGroupIdstringthe ID of the endpoint group
    includeDeprecatedstring[“true” or ”false”] if “true”, all configuration records will be returned, including deprecated ones. If “false”, only active and inactive configuration records will be returned
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "activeConfiguration": {
                  "activatedTime": 1408705246553,
                  "activatedUsername": "admin",
                  "applicationId": "71",
                  "body": "{\"Properties\":[],\"__uuid\":{\"org.kaaproject.configuration.uuidT\":\"k\u00ff\u00ca\u00f6~OI\\u0018\u00b5\u00bb\u00bcI\u00dc\u0094\u00acB\"}}",
                  "createdTime": 1408705246535,
                  "createdUsername": "admin",
                  "deactivatedTime": 0,
                  "deactivatedUsername": null,
                  "description": "Generated",
                  "endpointCount": 0,
                  "endpointGroupId": "81",
                  "id": "103",
                  "lastModifyTime": 1408705246539,
                  "majorVersion": 1,
                  "minorVersion": 0,
                  "modifiedUsername": null,
                  "protocolSchema": "{\"items\":{\"name\":\"deltaT\",\"type\":\"record\",\"fields\":[{\"name\":\"delta\",\"type\":[{\"type\":\"record\",\"name\":\"ConfigurationSchema\",\"namespace\":\"org.kaa.config\",\"fields\":[{\"name\":\"Properties\",\"type\":[{\"type\":\"array\",\"items\":[{\"name\":\"ConfigurationProperty\",\"namespace\":\"config.system\",\"type\":\"record\",\"fields\":[{\"name\":\"name\",\"type\":[\"string\",{\"symbols\":[\"unchanged\"],\"name\":\"unchangedT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"}]},{\"name\":\"value\",\"type\":[\"string\",\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"}}]},\"org.kaaproject.configuration.uuidT\"]},{\"symbols\":[\"reset\"],\"name\":\"resetT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"},\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":\"org.kaaproject.configuration.uuidT\"}]},\"config.system.ConfigurationProperty\"]}],\"namespace\":\"org.kaaproject.configuration\"},\"type\":\"array\"}",
                  "schemaId": "94",
                  "sequenceNumber": 1,
                  "status": "ACTIVE"
              },
              "inactiveConfiguration": null
          },
          {
              "activeConfiguration": {
                  "activatedTime": 1408705295840,
                  "activatedUsername": "devuser",
                  "applicationId": "71",
                  "body": "{\"Properties\":[],\"__uuid\":{\"org.kaaproject.configuration.uuidT\":\"\\rV\u00efRG\u009aC\u00fe\u00a9 5\u00d3S\u00d9lA\"}}",
                  "createdTime": 1408705295819,
                  "createdUsername": "devuser",
                  "deactivatedTime": 0,
                  "deactivatedUsername": null,
                  "description": "Generated",
                  "endpointCount": 0,
                  "endpointGroupId": "81",
                  "id": "104",
                  "lastModifyTime": 1408705295824,
                  "majorVersion": 2,
                  "minorVersion": 0,
                  "modifiedUsername": null,
                  "protocolSchema": "{\"items\":{\"name\":\"deltaT\",\"type\":\"record\",\"fields\":[{\"name\":\"delta\",\"type\":[{\"type\":\"record\",\"name\":\"TestConfigurationSchema\",\"namespace\":\"org.kaa.config.test\",\"fields\":[{\"name\":\"Properties\",\"type\":[{\"type\":\"array\",\"items\":[{\"name\":\"ConfigurationProperty\",\"namespace\":\"config.system\",\"type\":\"record\",\"fields\":[{\"name\":\"name\",\"type\":[\"string\",{\"symbols\":[\"unchanged\"],\"name\":\"unchangedT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"}]},{\"name\":\"value\",\"type\":[\"string\",\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"}}]},\"org.kaaproject.configuration.uuidT\"]},{\"symbols\":[\"reset\"],\"name\":\"resetT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"},\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":\"org.kaaproject.configuration.uuidT\"}]},\"config.system.ConfigurationProperty\"]}],\"namespace\":\"org.kaaproject.configuration\"},\"type\":\"array\"}",
                  "schemaId": "96",
                  "sequenceNumber": 1,
                  "status": "ACTIVE"
              },
              "inactiveConfiguration": null
          },
          {
              "activeConfiguration": {
                  "activatedTime": 1408705339202,
                  "activatedUsername": "devuser",
                  "applicationId": "71",
                  "body": "{\"Properties\":[],\"__uuid\":{\"org.kaaproject.configuration.uuidT\":\"+\\u0016r\u00b8\u00f7*Nt\u0098+\\u001C'\\n\u00f9\u00e5\u00cb\"}}",
                  "createdTime": 1408705339183,
                  "createdUsername": "devuser",
                  "deactivatedTime": 0,
                  "deactivatedUsername": null,
                  "description": "Generated",
                  "endpointCount": 0,
                  "endpointGroupId": "81",
                  "id": "105",
                  "lastModifyTime": 1408705339188,
                  "majorVersion": 3,
                  "minorVersion": 0,
                  "modifiedUsername": null,
                  "protocolSchema": "{\"items\":{\"name\":\"deltaT\",\"type\":\"record\",\"fields\":[{\"name\":\"delta\",\"type\":[{\"type\":\"record\",\"name\":\"TestConfigurationSchema\",\"namespace\":\"org.kaa.config.test\",\"fields\":[{\"name\":\"Properties\",\"type\":[{\"type\":\"array\",\"items\":[{\"name\":\"ConfigurationProperty\",\"namespace\":\"config.system\",\"type\":\"record\",\"fields\":[{\"name\":\"name\",\"type\":[\"string\",{\"symbols\":[\"unchanged\"],\"name\":\"unchangedT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"}]},{\"name\":\"value\",\"type\":[\"string\",\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"}}]},\"org.kaaproject.configuration.uuidT\"]},{\"symbols\":[\"reset\"],\"name\":\"resetT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"},\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":\"org.kaaproject.configuration.uuidT\"}]},\"config.system.ConfigurationProperty\"]}],\"namespace\":\"org.kaaproject.configuration\"},\"type\":\"array\"}",
                  "schemaId": "97",
                  "sequenceNumber": 1,
                  "status": "ACTIVE"
              },
              "inactiveConfiguration": null
          }
      ]
      
     
  • Error response:

    Status codesDescription
    400 Bad RequestendpointGroupId parameter is empty
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the endpoint group does not match the Tenant ID of the authenticated user
    404 Not FoundAn endpoint group with the specified endpointGroupId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/configurationRecords?endpointGroupId=81&includeDeprecated=true" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "activeConfiguration": {
                "activatedTime": 1408705246553,
                "activatedUsername": "admin",
                "applicationId": "71",
                "body": "{\"Properties\":[],\"__uuid\":{\"org.kaaproject.configuration.uuidT\":\"k\u00ff\u00ca\u00f6~OI\\u0018\u00b5\u00bb\u00bcI\u00dc\u0094\u00acB\"}}",
                "createdTime": 1408705246535,
                "createdUsername": "admin",
                "deactivatedTime": 0,
                "deactivatedUsername": null,
                "description": "Generated",
                "endpointCount": 0,
                "endpointGroupId": "81",
                "id": "103",
                "lastModifyTime": 1408705246539,
                "majorVersion": 1,
                "minorVersion": 0,
                "modifiedUsername": null,
                "protocolSchema": "{\"items\":{\"name\":\"deltaT\",\"type\":\"record\",\"fields\":[{\"name\":\"delta\",\"type\":[{\"type\":\"record\",\"name\":\"ConfigurationSchema\",\"namespace\":\"org.kaa.config\",\"fields\":[{\"name\":\"Properties\",\"type\":[{\"type\":\"array\",\"items\":[{\"name\":\"ConfigurationProperty\",\"namespace\":\"config.system\",\"type\":\"record\",\"fields\":[{\"name\":\"name\",\"type\":[\"string\",{\"symbols\":[\"unchanged\"],\"name\":\"unchangedT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"}]},{\"name\":\"value\",\"type\":[\"string\",\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"}}]},\"org.kaaproject.configuration.uuidT\"]},{\"symbols\":[\"reset\"],\"name\":\"resetT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"},\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":\"org.kaaproject.configuration.uuidT\"}]},\"config.system.ConfigurationProperty\"]}],\"namespace\":\"org.kaaproject.configuration\"},\"type\":\"array\"}",
                "schemaId": "94",
                "sequenceNumber": 1,
                "status": "ACTIVE"
            },
            "inactiveConfiguration": null
        },
        {
            "activeConfiguration": {
                "activatedTime": 1408705295840,
                "activatedUsername": "devuser",
                "applicationId": "71",
                "body": "{\"Properties\":[],\"__uuid\":{\"org.kaaproject.configuration.uuidT\":\"\\rV\u00efRG\u009aC\u00fe\u00a9 5\u00d3S\u00d9lA\"}}",
                "createdTime": 1408705295819,
                "createdUsername": "devuser",
                "deactivatedTime": 0,
                "deactivatedUsername": null,
                "description": "Generated",
                "endpointCount": 0,
                "endpointGroupId": "81",
                "id": "104",
                "lastModifyTime": 1408705295824,
                "majorVersion": 2,
                "minorVersion": 0,
                "modifiedUsername": null,
                "protocolSchema": "{\"items\":{\"name\":\"deltaT\",\"type\":\"record\",\"fields\":[{\"name\":\"delta\",\"type\":[{\"type\":\"record\",\"name\":\"TestConfigurationSchema\",\"namespace\":\"org.kaa.config.test\",\"fields\":[{\"name\":\"Properties\",\"type\":[{\"type\":\"array\",\"items\":[{\"name\":\"ConfigurationProperty\",\"namespace\":\"config.system\",\"type\":\"record\",\"fields\":[{\"name\":\"name\",\"type\":[\"string\",{\"symbols\":[\"unchanged\"],\"name\":\"unchangedT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"}]},{\"name\":\"value\",\"type\":[\"string\",\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"}}]},\"org.kaaproject.configuration.uuidT\"]},{\"symbols\":[\"reset\"],\"name\":\"resetT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"},\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":\"org.kaaproject.configuration.uuidT\"}]},\"config.system.ConfigurationProperty\"]}],\"namespace\":\"org.kaaproject.configuration\"},\"type\":\"array\"}",
                "schemaId": "96",
                "sequenceNumber": 1,
                "status": "ACTIVE"
            },
            "inactiveConfiguration": null
        },
        {
            "activeConfiguration": {
                "activatedTime": 1408705339202,
                "activatedUsername": "devuser",
                "applicationId": "71",
                "body": "{\"Properties\":[],\"__uuid\":{\"org.kaaproject.configuration.uuidT\":\"+\\u0016r\u00b8\u00f7*Nt\u0098+\\u001C'\\n\u00f9\u00e5\u00cb\"}}",
                "createdTime": 1408705339183,
                "createdUsername": "devuser",
                "deactivatedTime": 0,
                "deactivatedUsername": null,
                "description": "Generated",
                "endpointCount": 0,
                "endpointGroupId": "81",
                "id": "105",
                "lastModifyTime": 1408705339188,
                "majorVersion": 3,
                "minorVersion": 0,
                "modifiedUsername": null,
                "protocolSchema": "{\"items\":{\"name\":\"deltaT\",\"type\":\"record\",\"fields\":[{\"name\":\"delta\",\"type\":[{\"type\":\"record\",\"name\":\"TestConfigurationSchema\",\"namespace\":\"org.kaa.config.test\",\"fields\":[{\"name\":\"Properties\",\"type\":[{\"type\":\"array\",\"items\":[{\"name\":\"ConfigurationProperty\",\"namespace\":\"config.system\",\"type\":\"record\",\"fields\":[{\"name\":\"name\",\"type\":[\"string\",{\"symbols\":[\"unchanged\"],\"name\":\"unchangedT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"}]},{\"name\":\"value\",\"type\":[\"string\",\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"}}]},\"org.kaaproject.configuration.uuidT\"]},{\"symbols\":[\"reset\"],\"name\":\"resetT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"},\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":\"org.kaaproject.configuration.uuidT\"}]},\"config.system.ConfigurationProperty\"]}],\"namespace\":\"org.kaaproject.configuration\"},\"type\":\"array\"}",
                "schemaId": "97",
                "sequenceNumber": 1,
                "status": "ACTIVE"
            },
            "inactiveConfiguration": null
        }
    ]
    

Get configuration record

Returns the configuration record for the specified endpoint group and configuration schema. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/configurationRecord?schemaId&endpointGroupId
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    schemaIdstringthe ID of the configuration schema
    endpointGroupId
    stringthe ID of the endpoint group
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "activeConfiguration": {
              "activatedTime": 1408705339202,
              "activatedUsername": "devuser",
              "applicationId": "71",
              "body": "{\"Properties\":[],\"__uuid\":{\"org.kaaproject.configuration.uuidT\":\"+\\u0016r\u00b8\u00f7*Nt\u0098+\\u001C'\\n\u00f9\u00e5\u00cb\"}}",
              "createdTime": 1408705339183,
              "createdUsername": "devuser",
              "deactivatedTime": 0,
              "deactivatedUsername": null,
              "description": "Generated",
              "endpointCount": 0,
              "endpointGroupId": "81",
              "id": "105",
              "lastModifyTime": 1408705339188,
              "majorVersion": 3,
              "minorVersion": 0,
              "modifiedUsername": null,
              "protocolSchema": "{\"items\":{\"name\":\"deltaT\",\"type\":\"record\",\"fields\":[{\"name\":\"delta\",\"type\":[{\"type\":\"record\",\"name\":\"TestConfigurationSchema\",\"namespace\":\"org.kaa.config.test\",\"fields\":[{\"name\":\"Properties\",\"type\":[{\"type\":\"array\",\"items\":[{\"name\":\"ConfigurationProperty\",\"namespace\":\"config.system\",\"type\":\"record\",\"fields\":[{\"name\":\"name\",\"type\":[\"string\",{\"symbols\":[\"unchanged\"],\"name\":\"unchangedT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"}]},{\"name\":\"value\",\"type\":[\"string\",\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"}}]},\"org.kaaproject.configuration.uuidT\"]},{\"symbols\":[\"reset\"],\"name\":\"resetT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"},\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":\"org.kaaproject.configuration.uuidT\"}]},\"config.system.ConfigurationProperty\"]}],\"namespace\":\"org.kaaproject.configuration\"},\"type\":\"array\"}",
              "schemaId": "97",
              "sequenceNumber": 1,
              "status": "ACTIVE"
          },
          "inactiveConfiguration": null
      }
      
     
  • Error response:

    Status codesDescription
    400 Bad RequestendpointGroupId parameter is empty
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the endpoint group does not match the Tenant ID of the authenticated user
    404 Not FoundAn endpoint group with the specified endpointGroupId does not exist or the endpoint group does not have the requested configuration record
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/configurationRecord?schemaId=97&endpointGroupId=81" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "activeConfiguration": {
            "activatedTime": 1408705339202,
            "activatedUsername": "devuser",
            "applicationId": "71",
            "body": "{\"Properties\":[],\"__uuid\":{\"org.kaaproject.configuration.uuidT\":\"+\\u0016r\u00b8\u00f7*Nt\u0098+\\u001C'\\n\u00f9\u00e5\u00cb\"}}",
            "createdTime": 1408705339183,
            "createdUsername": "devuser",
            "deactivatedTime": 0,
            "deactivatedUsername": null,
            "description": "Generated",
            "endpointCount": 0,
            "endpointGroupId": "81",
            "id": "105",
            "lastModifyTime": 1408705339188,
            "majorVersion": 3,
            "minorVersion": 0,
            "modifiedUsername": null,
            "protocolSchema": "{\"items\":{\"name\":\"deltaT\",\"type\":\"record\",\"fields\":[{\"name\":\"delta\",\"type\":[{\"type\":\"record\",\"name\":\"TestConfigurationSchema\",\"namespace\":\"org.kaa.config.test\",\"fields\":[{\"name\":\"Properties\",\"type\":[{\"type\":\"array\",\"items\":[{\"name\":\"ConfigurationProperty\",\"namespace\":\"config.system\",\"type\":\"record\",\"fields\":[{\"name\":\"name\",\"type\":[\"string\",{\"symbols\":[\"unchanged\"],\"name\":\"unchangedT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"}]},{\"name\":\"value\",\"type\":[\"string\",\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"}}]},\"org.kaaproject.configuration.uuidT\"]},{\"symbols\":[\"reset\"],\"name\":\"resetT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"},\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":\"org.kaaproject.configuration.uuidT\"}]},\"config.system.ConfigurationProperty\"]}],\"namespace\":\"org.kaaproject.configuration\"},\"type\":\"array\"}",
            "schemaId": "97",
            "sequenceNumber": 1,
            "status": "ACTIVE"
        },
        "inactiveConfiguration": null
    }
    

Get vacant configuration schemas

Returns all vacant (not being used by endpoint group configurations) configuration schemas for the specified endpoint group. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/vacantConfigurationSchemas?endpointGroupId
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    endpointGroupIdstringthe ID of the endpoint group
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "id": "94",
              "majorVersion": 1,
              "minorVersion": 0
          },
          {
              "id": "96",
              "majorVersion": 2,
              "minorVersion": 0
          },
          {
              "id": "97",
              "majorVersion": 3,
              "minorVersion": 0
          }
      ]
      
     
  • Error response:

    Status codesDescription
    400 Bad RequestendpointGroupId parameter is empty
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the endpoint group does not match the Tenant ID of the authenticated user
    404 Not FoundAn endpoint group with the specified endpointGroupId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/vacantConfigurationSchemas?endpointGroupId=83" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "id": "94",
            "majorVersion": 1,
            "minorVersion": 0
        },
        {
            "id": "96",
            "majorVersion": 2,
            "minorVersion": 0
        },
        {
            "id": "97",
            "majorVersion": 3,
            "minorVersion": 0
        }
    ]
    

Create/Edit configuration

Anchor
Create/edit configuration
Create/edit configuration

Creates or updates a configuration. If a configuration with the specified ID does not exist, then it will be created and its createUsername field will be set to the name of the user who has uploaded it. If a configuration with the specified ID exists, the configuration will be updated and its modifyUsername will be set to the user who has submitted the request. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/configuration
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    None

  • Data params

    Expand
    titleRequest body

    Example:

    Code Block
    languagejs
    {"applicationId":"71","schemaId":"200","endpointGroupId":"83","majorVersion":"4","minorVersion":"0","description":"Test Configuration","body":"{\"testField1\": {\"string\": \"abc\"},\"testField2\": {\"org.kaaproject.configuration.unchangedT\": \"unchanged\"},\"__uuid\": null}","status":"INACTIVE"}
  • Success response:

    • Code: 200 
    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "activatedTime": 0,
          "activatedUsername": null,
          "applicationId": "71",
          "body": "{\"testField1\":{\"string\":\"abc\"},\"testField2\":{\"org.kaaproject.configuration.unchangedT\":\"unchanged\"},\"__uuid\":{\"org.kaaproject.configuration.uuidT\":\"4\\u001D\\u0005\\u001D\u00b5\u0094H\u00e0\u009e\u00b32\u00b0\u00d7I\u008d6\"}}",
          "createdTime": 1408722949496,
          "createdUsername": "devuser",
          "deactivatedTime": 0,
          "deactivatedUsername": null,
          "description": "Test Configuration",
          "endpointCount": 0,
          "endpointGroupId": "83",
          "id": "109",
          "lastModifyTime": 1408722949504,
          "majorVersion": 4,
          "minorVersion": 0,
          "modifiedUsername": null,
          "protocolSchema": "{\"items\":{\"name\":\"deltaT\",\"type\":\"record\",\"fields\":[{\"name\":\"delta\",\"type\":[{\"name\":\"testT\",\"type\":\"record\",\"addressable\":true,\"fields\":[{\"name\":\"testField1\",\"type\":[\"string\",{\"symbols\":[\"unchanged\"],\"name\":\"unchangedT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"}],\"by_default\":\"\"},{\"optional\":true,\"name\":\"testField2\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"testRecordT\",\"namespace\":\"org.kaa.config\",\"fields\":[{\"name\":\"testField3\",\"type\":[\"int\",\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"}}]},\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":\"org.kaaproject.configuration.uuidT\"}],\"namespace\":\"org.kaa.config\"},\"org.kaa.config.testRecordT\"]}],\"namespace\":\"org.kaaproject.configuration\"},\"type\":\"array\"}",
          "schemaId": "200",
          "sequenceNumber": 0,
          "status": "INACTIVE"
      }
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the endpoint group does not match the Tenant ID of the authenticated user
    404 Not FoundAn endpoint group with the specified endpointGroupId does not exist or a configuration with the specified configurationId not found
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST -H 'Content-Type: application/json' -d'{"applicationId":"71","schemaId":"200","endpointGroupId":"83","majorVersion":"4","minorVersion":"0","description":"Test Configuration","body":"{\"testField1\": {\"string\": \"abc\"},\"testField2\": {\"org.kaaproject.configuration.unchangedT\": \"unchanged\"},\"__uuid\": null}","status":"INACTIVE"}' "http://localhost:8080/kaaAdmin/rest/api/configuration" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "activatedTime": 0,
        "activatedUsername": null,
        "applicationId": "71",
        "body": "{\"testField1\":{\"string\":\"abc\"},\"testField2\":{\"org.kaaproject.configuration.unchangedT\":\"unchanged\"},\"__uuid\":{\"org.kaaproject.configuration.uuidT\":\"4\\u001D\\u0005\\u001D\u00b5\u0094H\u00e0\u009e\u00b32\u00b0\u00d7I\u008d6\"}}",
        "createdTime": 1408722949496,
        "createdUsername": "devuser",
        "deactivatedTime": 0,
        "deactivatedUsername": null,
        "description": "Test Configuration",
        "endpointCount": 0,
        "endpointGroupId": "83",
        "id": "109",
        "lastModifyTime": 1408722949504,
        "majorVersion": 4,
        "minorVersion": 0,
        "modifiedUsername": null,
        "protocolSchema": "{\"items\":{\"name\":\"deltaT\",\"type\":\"record\",\"fields\":[{\"name\":\"delta\",\"type\":[{\"name\":\"testT\",\"type\":\"record\",\"addressable\":true,\"fields\":[{\"name\":\"testField1\",\"type\":[\"string\",{\"symbols\":[\"unchanged\"],\"name\":\"unchangedT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"}],\"by_default\":\"\"},{\"optional\":true,\"name\":\"testField2\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"testRecordT\",\"namespace\":\"org.kaa.config\",\"fields\":[{\"name\":\"testField3\",\"type\":[\"int\",\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"}}]},\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":\"org.kaaproject.configuration.uuidT\"}],\"namespace\":\"org.kaa.config\"},\"org.kaa.config.testRecordT\"]}],\"namespace\":\"org.kaaproject.configuration\"},\"type\":\"array\"}",
        "schemaId": "200",
        "sequenceNumber": 0,
        "status": "INACTIVE"
    }

Activate configuration

Activates a configuration. Sets the status field of the configuration to ACTIVE, increments the sequenceNumber field value by 1, and sets the activateUsername and activatedTime fields to the name of the user who has submitted the request and the activation time, respectively.Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/activateConfiguration
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    None

  • Data params

    Expand
    titleRequest body

    Example:

    Code Block
    languagejs
    109
  • Success response:

    • Code: 200 
    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "activatedTime": 1408723122998,
          "activatedUsername": "devuser",
          "applicationId": "71",
          "body": "{\"testField1\":{\"string\":\"abc\"},\"testField2\":{\"org.kaaproject.configuration.unchangedT\":\"unchanged\"},\"__uuid\":{\"org.kaaproject.configuration.uuidT\":\"4\\u001D\\u0005\\u001D\u00b5\u0094H\u00e0\u009e\u00b32\u00b0\u00d7I\u008d6\"}}",
          "createdTime": 1408722949496,
          "createdUsername": "devuser",
          "deactivatedTime": 0,
          "deactivatedUsername": null,
          "description": "Test Configuration",
          "endpointCount": 0,
          "endpointGroupId": "83",
          "id": "109",
          "lastModifyTime": 1408722949504,
          "majorVersion": 4,
          "minorVersion": 0,
          "modifiedUsername": null,
          "protocolSchema": "{\"items\":{\"name\":\"deltaT\",\"type\":\"record\",\"fields\":[{\"name\":\"delta\",\"type\":[{\"name\":\"testT\",\"type\":\"record\",\"addressable\":true,\"fields\":[{\"name\":\"testField1\",\"type\":[\"string\",{\"symbols\":[\"unchanged\"],\"name\":\"unchangedT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"}],\"by_default\":\"\"},{\"optional\":true,\"name\":\"testField2\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"testRecordT\",\"namespace\":\"org.kaa.config\",\"fields\":[{\"name\":\"testField3\",\"type\":[\"int\",\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"}}]},\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":\"org.kaaproject.configuration.uuidT\"}],\"namespace\":\"org.kaa.config\"},\"org.kaa.config.testRecordT\"]}],\"namespace\":\"org.kaaproject.configuration\"},\"type\":\"array\"}",
          "schemaId": "200",
          "sequenceNumber": 1,
          "status": "ACTIVE"
      }
  • Error rsponse:

    Statues codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not required the role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the endpoint group does not match the Tenant ID of the authenticated user
    404 Not FoundConfiguration with the specified configurationId not found
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST -H 'Content-Type: text/plain' -d'109' "http://localhost:8080/kaaAdmin/rest/api/activateConfiguration" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "activatedTime": 1408723122998,
        "activatedUsername": "devuser",
        "applicationId": "71",
        "body": "{\"testField1\":{\"string\":\"abc\"},\"testField2\":{\"org.kaaproject.configuration.unchangedT\":\"unchanged\"},\"__uuid\":{\"org.kaaproject.configuration.uuidT\":\"4\\u001D\\u0005\\u001D\u00b5\u0094H\u00e0\u009e\u00b32\u00b0\u00d7I\u008d6\"}}",
        "createdTime": 1408722949496,
        "createdUsername": "devuser",
        "deactivatedTime": 0,
        "deactivatedUsername": null,
        "description": "Test Configuration",
        "endpointCount": 0,
        "endpointGroupId": "83",
        "id": "109",
        "lastModifyTime": 1408722949504,
        "majorVersion": 4,
        "minorVersion": 0,
        "modifiedUsername": null,
        "protocolSchema": "{\"items\":{\"name\":\"deltaT\",\"type\":\"record\",\"fields\":[{\"name\":\"delta\",\"type\":[{\"name\":\"testT\",\"type\":\"record\",\"addressable\":true,\"fields\":[{\"name\":\"testField1\",\"type\":[\"string\",{\"symbols\":[\"unchanged\"],\"name\":\"unchangedT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"}],\"by_default\":\"\"},{\"optional\":true,\"name\":\"testField2\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"testRecordT\",\"namespace\":\"org.kaa.config\",\"fields\":[{\"name\":\"testField3\",\"type\":[\"int\",\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"}}]},\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":\"org.kaaproject.configuration.uuidT\"}],\"namespace\":\"org.kaa.config\"},\"org.kaa.config.testRecordT\"]}],\"namespace\":\"org.kaaproject.configuration\"},\"type\":\"array\"}",
        "schemaId": "200",
        "sequenceNumber": 1,
        "status": "ACTIVE"
    }

Deactivate configuration

Deactivates a configuration. Sets the status field of the configuration to DEPRECATED, sets the deactivatedTime field value to the time of the deactivation request, and sets the deactivateUsername field to the name of the user who has submitted the request. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/deactivateConfiguration
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    None

  • Data params

    Expand
    titleRequest body

    Example:

    Code Block
    languagejs
    109
  • Success response:

    • Code: 200 
    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "activatedTime": 1408723122998,
          "activatedUsername": "devuser",
          "applicationId": "71",
          "body": "{\"testField1\":{\"string\":\"abc\"},\"testField2\":{\"org.kaaproject.configuration.unchangedT\":\"unchanged\"},\"__uuid\":{\"org.kaaproject.configuration.uuidT\":\"4\\u001D\\u0005\\u001D\u00b5\u0094H\u00e0\u009e\u00b32\u00b0\u00d7I\u008d6\"}}",
          "createdTime": 1408722949496,
          "createdUsername": "devuser",
          "deactivatedTime": 1408723248810,
          "deactivatedUsername": "devuser",
          "description": "Test Configuration",
          "endpointCount": 0,
          "endpointGroupId": "83",
          "id": "109",
          "lastModifyTime": 1408722949504,
          "majorVersion": 4,
          "minorVersion": 0,
          "modifiedUsername": null,
          "protocolSchema": "{\"items\":{\"name\":\"deltaT\",\"type\":\"record\",\"fields\":[{\"name\":\"delta\",\"type\":[{\"name\":\"testT\",\"type\":\"record\",\"addressable\":true,\"fields\":[{\"name\":\"testField1\",\"type\":[\"string\",{\"symbols\":[\"unchanged\"],\"name\":\"unchangedT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"}],\"by_default\":\"\"},{\"optional\":true,\"name\":\"testField2\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"testRecordT\",\"namespace\":\"org.kaa.config\",\"fields\":[{\"name\":\"testField3\",\"type\":[\"int\",\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"}}]},\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":\"org.kaaproject.configuration.uuidT\"}],\"namespace\":\"org.kaa.config\"},\"org.kaa.config.testRecordT\"]}],\"namespace\":\"org.kaaproject.configuration\"},\"type\":\"array\"}",
          "schemaId": "200",
          "sequenceNumber": 1,
          "status": "DEPRECATED"
      }
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the endpoint group does not match the Tenant ID of the authenticated user
    404 Not FoundConfiguration with the specified configurationId not found
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST -H 'Content-Type: text/plain' -d'109' "http://localhost:8080/kaaAdmin/rest/api/deactivateConfiguration" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "activatedTime": 1408723122998,
        "activatedUsername": "devuser",
        "applicationId": "71",
        "body": "{\"testField1\":{\"string\":\"abc\"},\"testField2\":{\"org.kaaproject.configuration.unchangedT\":\"unchanged\"},\"__uuid\":{\"org.kaaproject.configuration.uuidT\":\"4\\u001D\\u0005\\u001D\u00b5\u0094H\u00e0\u009e\u00b32\u00b0\u00d7I\u008d6\"}}",
        "createdTime": 1408722949496,
        "createdUsername": "devuser",
        "deactivatedTime": 1408723248810,
        "deactivatedUsername": "devuser",
        "description": "Test Configuration",
        "endpointCount": 0,
        "endpointGroupId": "83",
        "id": "109",
        "lastModifyTime": 1408722949504,
        "majorVersion": 4,
        "minorVersion": 0,
        "modifiedUsername": null,
        "protocolSchema": "{\"items\":{\"name\":\"deltaT\",\"type\":\"record\",\"fields\":[{\"name\":\"delta\",\"type\":[{\"name\":\"testT\",\"type\":\"record\",\"addressable\":true,\"fields\":[{\"name\":\"testField1\",\"type\":[\"string\",{\"symbols\":[\"unchanged\"],\"name\":\"unchangedT\",\"type\":\"enum\",\"namespace\":\"org.kaaproject.configuration\"}],\"by_default\":\"\"},{\"optional\":true,\"name\":\"testField2\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"testRecordT\",\"namespace\":\"org.kaa.config\",\"fields\":[{\"name\":\"testField3\",\"type\":[\"int\",\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":{\"name\":\"uuidT\",\"type\":\"fixed\",\"size\":16,\"namespace\":\"org.kaaproject.configuration\"}}]},\"org.kaaproject.configuration.unchangedT\"]},{\"name\":\"__uuid\",\"type\":\"org.kaaproject.configuration.uuidT\"}],\"namespace\":\"org.kaa.config\"},\"org.kaa.config.testRecordT\"]}],\"namespace\":\"org.kaaproject.configuration\"},\"type\":\"array\"}",
        "schemaId": "200",
        "sequenceNumber": 1,
        "status": "DEPRECATED"
    }

Delete configuration record

Deletes a configuration record by configuration schema ID and endpoint group ID. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/delConfigurationRecord?schemaId&endpointGroupId
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    ParameterValueDescription
    schemaIdstringthe ID of the configuration schema
    endpointGroupId
    stringthe ID of the endpoint group
  • Data params

    None

  • Success response:

    • Code: 200 

  • Error response:

    Status codesDescription
    400 Bad RequestendpointGroupId parameter is empty
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the endpoint group does not match the Tenant ID of the authenticated user
    404 Not FoundAn endpoint group with the specified endpointGroupId does not exist or the endpoint group does not have the requested configuration record
    500 Internal Server ErrorAn unexpected error occurred on the server side

 

  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST "http://localhost:8080/kaaAdmin/rest/api/delConfigurationRecord?schemaId=200&endpointGroupId=83" | python -mjson.tool

 

 

Notifications

 

Get notification schemas

Returns notification schemas for an application. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information. The Tenant ID value of the application must match the Tenant ID of the request submitter.

  • URL 
    /kaaAdmin/rest/api/notificationSchemas/{applicationId}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    applicationIdstringthe ID of the application.
  • Data params

    None

  • Success response:

     

    • Code: 200 

      Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "applicationId": "71",
              "createdTime": 1408705246572,
              "createdUsername": "admin",
              "description": null,
              "endpointCount": 0,
              "id": "53f722dee4b0ac13c6a8634d",
              "majorVersion": 1,
              "minorVersion": 0,
              "name": "Generated",
              "schema": "{\r\n    \"type\": \"record\",\r\n    \"name\": \"Notification\",\r\n    \"namespace\": \"org.kaa.config\",\r\n    \"fields\": [\r\n        {\r\n            \"name\": \"message\",\r\n            \"type\": \"string\"\r\n        }\r\n    ]\r\n}",
              "type": "USER"
          }
      ]
      
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the equired role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application does not match the Tenant ID of the authenticated user
    404 Not FoundApplication with the specified applicationId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/notificationSchemas/71" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "applicationId": "71",
            "createdTime": 1408705246572,
            "createdUsername": "admin",
            "description": null,
            "endpointCount": 0,
            "id": "53f722dee4b0ac13c6a8634d",
            "majorVersion": 1,
            "minorVersion": 0,
            "name": "Generated",
            "schema": "{\r\n    \"type\": \"record\",\r\n    \"name\": \"Notification\",\r\n    \"namespace\": \"org.kaa.config\",\r\n    \"fields\": [\r\n        {\r\n            \"name\": \"message\",\r\n            \"type\": \"string\"\r\n        }\r\n    ]\r\n}",
            "type": "USER"
        }
    ]
    

Get user notification schemas

Returns user notification schemas for an application. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/userNotificationSchemas/{applicationId}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    applicationIdstringThe ID of the application.
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "id": "53f722dee4b0ac13c6a8634d",
              "majorVersion": 1,
              "minorVersion": 0
          }
      ]
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application does not match the Tenant ID of the authenticated user
    404 Not FoundApplication with the specified applicationId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/userNotificationSchemas/71" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "id": "53f722dee4b0ac13c6a8634d",
            "majorVersion": 1,
            "minorVersion": 0
        }
    ]
    

Get notification schema

Returns a notification schema by notification schema ID. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/notificationSchema/{notificationSchemaId}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    notificationSchemaIdstringThe ID of the notification schema
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "applicationId": "71",
          "createdTime": 1408705246572,
          "createdUsername": "admin",
          "description": null,
          "endpointCount": 0,
          "id": "53f722dee4b0ac13c6a8634d",
          "majorVersion": 1,
          "minorVersion": 0,
          "name": "Generated",
          "schema": "{\r\n    \"type\": \"record\",\r\n    \"name\": \"Notification\",\r\n    \"namespace\": \"org.kaa.config\",\r\n    \"fields\": [\r\n        {\r\n            \"name\": \"message\",\r\n            \"type\": \"string\"\r\n        }\r\n    ]\r\n}",
          "type": "USER"
      }
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the notification schema does not match the Tenant ID of the authenticated user
    404 Not FoundA notification schema with the specified notificationSchemaId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/notificationSchema/53f722dee4b0ac13c6a8634d" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationId": "71",
        "createdTime": 1408705246572,
        "createdUsername": "admin",
        "description": null,
        "endpointCount": 0,
        "id": "53f722dee4b0ac13c6a8634d",
        "majorVersion": 1,
        "minorVersion": 0,
        "name": "Generated",
        "schema": "{\r\n    \"type\": \"record\",\r\n    \"name\": \"Notification\",\r\n    \"namespace\": \"org.kaa.config\",\r\n    \"fields\": [\r\n        {\r\n            \"name\": \"message\",\r\n            \"type\": \"string\"\r\n        }\r\n    ]\r\n}",
        "type": "USER"
    }
    

Create/Edit notification schema

Creates or updates a notification schema. If a notification schema with the specified ID does not exist, then it will be created and its createUsername field of the schema will be set to the name of the user who has uploaded it, a unique version number will be generated (incrementally) for this schema. If a configuration with the specified ID exists, the configuration will be updated. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/notificationSchema
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    None

  • Data params

    Multipart/form-data encoding. Fields:

    Expand
    titlenotificationSchema (content-type: application/json)

    Example:

    Code Block
    languagejs
    {"applicationId":"71","name":"Test notification schema","description":"Notification Schema Description"}
    Expand
    titlefile (content-type: application/octet-stream)

    File contents example:

    Code Block
    languagejs
    {
        "type": "record",
        "name": "TestNotification",
        "namespace": "org.kaa.config.test",
        "fields": [
            {
                "name": "message",
                "type": "string"
            }
        ]
    }
  • Success response:

    • Code: 200

      Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "applicationId": "71",
          "createdTime": 1408706536184,
          "createdUsername": "devuser",
          "description": "Notification Schema Description",
          "endpointCount": 0,
          "id": "2131",
          "majorVersion": 2,
          "minorVersion": 0,
          "name": "Test notification schema",
          "schema": "{\n    \"type\": \"record\",\n    \"name\": \"TestNotification\",\n    \"namespace\": \"org.kaa.config.test\",\n    \"fields\": [\n        {\n            \"name\": \"message\",\n            \"type\": \"string\"\n        }\n    ]\n}",
          "type": "USER"
      }
  • Error response:

    Status codesDescription
    400 Bad RequestThe specified notification schema is not a valid avro schema
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the notification schema does not match the Tenant ID of the authenticated user
    404 Not FoundA file with a schema was not found in the form data
    500 Internal Server ErrorAn unexpected error occurred on the server side

     

     

  • Sample call to create notification schema:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -F'notificationSchema={"applicationId":"71","name":"Test notification schema","description":"Notification Schema Description"};type=application/json' -F [email protected]_schema.json "http://localhost:8080/kaaAdmin/rest/api/notificationSchema" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationId": "71",
        "createdTime": 1408706536184,
        "createdUsername": "devuser",
        "description": "Notification Schema Description",
        "endpointCount": 0,
        "id": "2131",
        "majorVersion": 2,
        "minorVersion": 0,
        "name": "Test notification schema",
        "schema": "{\n    \"type\": \"record\",\n    \"name\": \"TestNotification\",\n    \"namespace\": \"org.kaa.config.test\",\n    \"fields\": [\n        {\n            \"name\": \"message\",\n            \"type\": \"string\"\n        }\n    ]\n}",
        "type": "USER"
    }
  • Sample call to edit notification schema:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -F'notificationSchema={"id":"2131","applicationId":"71","name":"Test notification schema v2","description":"Notification Schema Description"};type=application/json' -F [email protected]_schema.json "http://localhost:8080/kaaAdmin/rest/api/notificationSchema" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationId": "71",
        "createdTime": 1408706557247,
        "createdUsername": "devuser",
        "description": "Notification Schema Description",
        "endpointCount": 0,
        "id": "2131",
        "majorVersion": 2,
        "minorVersion": 0,
        "name": "Test notification schema v2",
        "schema": "{\n    \"type\": \"record\",\n    \"name\": \"TestNotification\",\n    \"namespace\": \"org.kaa.config.test\",\n    \"fields\": [\n        {\n            \"name\": \"message\",\n            \"type\": \"string\"\n        }\n    ]\n}",
        "type": "USER"
    }

Get topics

Returns all topics for the specified application. Only users with  the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/topics/{applicationId}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    applicationIdstringThe ID of the application
  • Data params

    None

  • Success response:

     

    • Code: 200 

      Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "applicationId": "71",
              "createdTime": 1409133583238,
              "createdUsername": "devuser",
              "description": "Test topic description",
              "id": "230",
              "name": "Test topic",
              "secNum": 0,
              "type": "MANDATORY"
          }
      ]
      
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application does not match the Tenant ID of the authenticated user
    404 Not FoundAn application with the specified applicationId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/topics/71" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "applicationId": "71",
            "createdTime": 1409133583238,
            "createdUsername": "devuser",
            "description": "Test topic description",
            "id": "230",
            "name": "Test topic",
            "secNum": 0,
            "type": "MANDATORY"
        }
    ]
    

Get endpoint group topics

Returns all topics for the specified endpoint group. Only users with the  TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/topics?endpointGroupId
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    endpointGroupIdstringThe ID of the endpoint group.
  • Data params

    None

  • Success response:

    • Code: 200 

      Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "applicationId": "71",
              "createdTime": 1409133583238,
              "createdUsername": "devuser",
              "description": "Test topic description",
              "id": "230",
              "name": "Test topic",
              "secNum": 0,
              "type": "MANDATORY"
          }
      ]
      
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the endpoint group does not match the Tenant ID of the authenticated user
    404 Not FoundAn endpoint group with the specified endpointGroupId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/topics?endpointGroupId=83" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "applicationId": "71",
            "createdTime": 1409133583238,
            "createdUsername": "devuser",
            "description": "Test topic description",
            "id": "230",
            "name": "Test topic",
            "secNum": 0,
            "type": "MANDATORY"
        }
    ]
    

Get vacant topics

Returns all vacant (not present in the endpoint group) topics for the specified endpoint group. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/vacantTopics/{endpointGroupId}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    endpointGroupIdstringthe ID of the endpoint group.
  • Data params

    None

  • Success response:

    • Code: 200 

      Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "applicationId": "71",
              "createdTime": 1409134343927,
              "createdUsername": "devuser",
              "description": "Test topic 2 description",
              "id": "231",
              "name": "Test topic 2",
              "secNum": 0,
              "type": "VOLUNTARY"
          }
      ]
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the endpoint group does not match the Tenant ID of the authenticated user
    404 Not FoundThe endpoint group with the specified endpointGroupId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/vacantTopics/83" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "applicationId": "71",
            "createdTime": 1409134343927,
            "createdUsername": "devuser",
            "description": "Test topic 2 description",
            "id": "231",
            "name": "Test topic 2",
            "secNum": 0,
            "type": "VOLUNTARY"
        }
    ]
    

Get topic

Returns a topic by topic ID. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/topic/{topicId}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    topicIdstringThe ID of the topic
  • Data params

    None

  • Success response:

    • Code: 200 

      Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "applicationId": "71",
          "createdTime": 1409133583238,
          "createdUsername": "devuser",
          "description": "Test topic description",
          "id": "230",
          "name": "Test topic",
          "secNum": 0,
          "type": "MANDATORY"
      }
      
     
  • Error response:

    Status codesDescription
    400 Bad RequestThe topicId parameter is empty
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the topic does not match the Tenant ID of the authenticated user
    404 Not FoundA topic with the specified topicId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/topic/230" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationId": "71",
        "createdTime": 1409133583238,
        "createdUsername": "devuser",
        "description": "Test topic description",
        "id": "230",
        "name": "Test topic",
        "secNum": 0,
        "type": "MANDATORY"
    }
    

Create/Edit topic

Creates or edits a topic. If a topic with the specified ID does not exist, it will be created. If a topic with the specified ID exists, it will be updated. Only users with theTENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/topic
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    None

  • Data params

    Expand
    titleRequest body

    Example:

    Code Block
    languagejs
    {"applicationId":"71","name":"Test topic 3","type": "MANDATORY","description":"Test topic 3 Description"}
  • Success response:

    • Code: 200 
    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "applicationId": "71",
          "createdTime": 1409135244357,
          "createdUsername": "devuser",
          "description": "Test topic 3 Description",
          "id": "232",
          "name": "Test topic 3",
          "secNum": 0,
          "type": "MANDATORY"
      }
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the topic does not match the Tenant ID of the authenticated user
    404 Not FoundA topic to be edited with the specified topicId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST -H 'Content-Type: application/json' -d'{"applicationId":"71","name":"Test topic 3","type": "MANDATORY","description":"Test topic 3 Description"}' "http://localhost:8080/kaaAdmin/rest/api/topic" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationId": "71",
        "createdTime": 1409135244357,
        "createdUsername": "devuser",
        "description": "Test topic 3 Description",
        "id": "232",
        "name": "Test topic 3",
        "secNum": 0,
        "type": "MANDATORY"
    }

Delete topic

Deletes a topic. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/delTopic?topicId
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    ParameterValueDescription
    topicIdstringthe ID of the topic to be deleted
  • Data params

    None

  • Success response:

    • Code: 200 

  • Error response:

    Status codesDescription
    400 Bad RequestThe topicId parameter is empty
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the topic does not match the Tenant ID of the authenticated user
    404 Not FoundA topic with the specified topicId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST "http://localhost:8080/kaaAdmin/rest/api/delTopic?topicId=232" | python -mjson.tool

Add topic to endpoint group

Adds the specified topic to the specified endpoint group. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/addTopicToEpGroup?endpointGroupId&topicId
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    ParameterValueDescription
    endpointGroupIdstringThe ID of the endpoint group
    topicIdstringThe ID of the topic
  • Data params

    None

  • Success response:

    • Code: 200 

  • Error response:

    Status codesDescription
    400 Bad RequestThe endpointGroupId or topicId parameter is empty
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the topic or the endpoint group does not match the Tenant ID of the authenticated user
    404 Not FoundA topic with the specified topicId or an endpoint group with the specified endpointGroupId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST "http://localhost:8080/kaaAdmin/rest/api/addTopicToEpGroup?endpointGroupId=83&topicId=231" | python -mjson.tool

Remove topic from endpoint group

Removes the specified topic from the specified endpoint group. Only users with the  TENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/removeTopicFromEpGroup?endpointGroupId&topicId
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    ParameterValueDescription
    endpointGroupIdstringThe ID of the endpoint group
    topicIdstringThe ID of the topic
  • Data params

    None

  • Success response:

    • Code: 200 

  • Error response:

    Status codesDescription
    400 Bad RequestThe endpointGroupId or topicId parameter is empty
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the topic or the endpoint group does not match the Tenant ID of the authenticated user
    404 Not FoundA topic with the specified topicId or an endpoint group with the specified endpointGroupId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST "http://localhost:8080/kaaAdmin/rest/api/removeTopicFromEpGroup?endpointGroupId=83&topicId=231" | python -mjson.tool

Send notification

Anchor
Send notification
Send notification

Sends a notification with the notification body from the specified file. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/sendNotification
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    None

  • Data params

    Multipart/form-data encoding. Fields:

    Expand
    titlenotification (content-type: application/json)

    Example:

    Code Block
    languagejs
    {"applicationId":"111","schemaId":"139","version":"1","topicId":"171","type":"USER"}

    If you want to set ttl, you must to set expiredAt in parameter notification.

    Expand
    titlenotification (content-type: application/json)

    Example:

    Code Block
    languagejs
    {"expiredAt":"1442722270583","applicationId":"111","schemaId":"139","version":"1","topicId":"171","type":"USER"}
    Expand
    titlefile (content-type: application/octet-stream)

    File contents example:

    Code Block
    languagejs
    {"message":{"string":"Hello world!"}}
  • Success response:

    • Code: 200 

  • Error response:

    Status codesDescription
    400 Bad RequestThe specified notification is not valid
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the specified application or the application associated with the specified topic does not match the Tenant ID of the authenticated user
    404 Not FoundA file with the notification body was not found in the form data or an application with the specified ID does not exist or a topic with the specified ID does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -F'notification={"applicationId":"111","schemaId":"139","version":"1","topicId":"171","type":"USER"};type=application/json' -F [email protected] "http://localhost:8080/kaaAdmin/rest/api/sendNotification" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationId": "111",
        "body": "ABhIZWxsbyBoZWxsbyE=",
        "expiredAt": 1441722270583,
        "id": "55e5b51eb10a5004210ecd6a",
        "lastTimeModify": 1441117470585,
        "schemaId": "139",
        "secNum": 141,
        "topicId": "171",
        "type": "USER",
        "version": 2
    }

     

     

Send unicast notification


Sends a unicast notification with the notification body from the specified file to the client identified by clientKeyHash. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/sendUnicastNotification
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    None

  • Data params

    Multipart/form-data encoding. Fields:

    Expand
    titlenotification (content-type: application/json)

    Example:

    Code Block
    languagejs
    {"applicationId":"111","schemaId":"139","version":"1","topicId":"171","type":"USER"}

    If you want to set ttl, you must to set expiredAt in parameter notification.

    Expand
    titlenotification (content-type: application/json)

    Example:

    Code Block
    languagejs
    {"expiredAt":"1442722270583","applicationId":"111","schemaId":"139","version":"1","topicId":"171","type":"USER"}
    Expand
    titleclientKeyHash (content-type: text/plain)

    Example:

    Code Block
    languagejs
    lsXnYUbE31aCgN5NSsbcRMAZTgM=
    Expand
    titlefile (content-type: application/octet-stream)

    File contents example:

    Code Block
    languagejs
    {"message":{"string":"Hello world!"}}
  • Success response:

    • Code: 200 

  • Error response:

    Status codesDescription
    400 Bad RequestThe specified notification is not valid
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the specified application or the application associated with the specified topic does not match the Tenant ID of the authenticated user
    404 Not FoundA file with the notification body was not found in the form data or an application with the specified ID does not exist or a topic with the specified ID does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -F'notification={"applicationId":"111","schemaId":"139","version":"1","topicId":"171","type":"USER"};type=application/json' -F'clientKeyHash=lsXnYUbE31aCgN5NSsbcRMAZTgM=;type=text/plain' -F [email protected] "http://localhost:8080/kaaAdmin/rest/api/sendUnicastNotification" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "endpointKeyHash": "lsXnYUbE31aCgN5NSsbcRMAZTgM=",
        "id": "55e5baa7b10a5004210ecd6d",
        "notificationDto": {
            "applicationId": "111",
            "body": "ABhIZWxsbyBoZWxsbyE=",
            "expiredAt": 1441723687742,
            "id": null,
            "lastTimeModify": 1441118887742,
            "schemaId": "139",
            "secNum": -1,
            "topicId": "171",
            "type": "USER",
            "version": 2
        }
    }
    
    

     

     

     

Events

Get event class families

Returns all event class families for the current authorized user within the current tenant. Only users with the TENANT_ADMIN role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/eventClassFamilies
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    None

  • Data params

    None

  • Success response:

     

    • Code: 200 

      Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "className": "PlayerClassFamily",
              "createdTime": 1408705243720,
              "createdUsername": "admin",
              "description": null,
              "id": "30",
              "name": "Player Event Class Family",
              "namespace": "org.kaaproject.kaa.demo.player",
              "schemas": [
                  {
                      "createdTime": 1408705244624,
                      "createdUsername": "admin",
                      "id": "40",
                      "schema": "[\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"DeviceInfoRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"object\",\r\n \"name\": \"DeviceInfo\",\r\n \"fields\": [\r\n    {\"name\": \"model\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"product\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"manufacturer\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"device\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"brand\", \"type\": [\"string\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"DeviceInfoResponse\",\r\n \"fields\": [\r\n\t{\"name\": \"deviceInfo\", \"type\": [\"org.kaaproject.kaa.demo.player.DeviceInfo\", \"null\"]}\r\n  ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlayListRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"object\",\r\n \"name\": \"SongInfo\",\r\n \"fields\": [\r\n    {\"name\": \"title\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"artist\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"url\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"displayName\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"duration\", \"type\": [\"int\", \"null\"]},\r\n    {\"name\": \"album\", \"type\": [\"string\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlayListResponse\",\r\n \"fields\": [\r\n\t{\"name\": \"playList\", \"type\": [{\"type\": \"array\", \"items\": \"org.kaaproject.kaa.demo.player.SongInfo\"}, \"null\"]}\r\n  ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlayRequest\",\r\n \"fields\": [\r\n     {\"name\": \"url\", \"type\": [\"string\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PauseRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"StopRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlaybackInfoRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"enum\"  ,\r\n \"classType\": \"object\",\r\n \"name\": \"PlaybackStatus\",\r\n \"symbols\" : [\"PLAYING\", \"PAUSED\", \"STOPPED\"]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"object\",\r\n \"name\": \"PlaybackInfo\",\r\n \"fields\": [\r\n    {\"name\": \"url\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"time\", \"type\": [\"int\", \"null\"]},\r\n    {\"name\": \"status\", \"type\": [\"org.kaaproject.kaa.demo.player.PlaybackStatus\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlaybackInfoResponse\",\r\n \"fields\": [\r\n\t{\"name\": \"playbackInfo\", \"type\": [\"org.kaaproject.kaa.demo.player.PlaybackInfo\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"BatteryInfoRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"enum\"  ,\r\n \"classType\": \"object\",\r\n \"name\": \"BatteryChargingStatus\",\r\n \"symbols\" : [\"NOT_CHARGING\", \"CHARGING\", \"CHARGED\"]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"object\",\r\n \"name\": \"BatteryInfo\",\r\n \"fields\": [\r\n    {\"name\": \"batteryLife\", \"type\": [\"int\", \"null\"]},\r\n    {\"name\": \"chargingStatus\", \"type\": [\"org.kaaproject.kaa.demo.player.BatteryChargingStatus\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"BatteryInfoResponse\",\r\n \"fields\": [\r\n    {\"name\": \"batteryInfo\", \"type\": [\"org.kaaproject.kaa.demo.player.BatteryInfo\", \"null\"]}\r\n ]\r\n}\r\n]",
                      "version": 1
                  }
              ],
              "tenantId": "10"
          },
          {
              "className": "DeviceEventClassFamily",
              "createdTime": 1408705246098,
              "createdUsername": "admin",
              "description": null,
              "id": "31",
              "name": "Device Event Class Family",
              "namespace": "org.kaaproject.kaa.demo.smarthouse.device",
              "schemas": [
                  {
                      "createdTime": 1408705246155,
                      "createdUsername": "admin",
                      "id": "41",
                      "schema": "[\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.device\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"DeviceInfoRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.device\",\r\n \"type\": \"enum\"  ,\r\n \"classType\": \"object\",\r\n \"name\": \"DeviceType\",\r\n \"symbols\" : [\"THERMOSTAT\", \"TV\", \"SOUND_SYSTEM\", \"LAMP\"]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.device\",\r\n \"type\": \"record\",\r\n \"classType\": \"object\",\r\n \"name\": \"DeviceInfo\",\r\n \"fields\": [\r\n    {\"name\": \"deviceType\", \"type\": [\"org.kaaproject.kaa.demo.smarthouse.device.DeviceType\", \"null\"]},\r\n    {\"name\": \"model\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"manufacturer\", \"type\": [\"string\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.device\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"DeviceInfoResponse\",\r\n \"fields\": [\r\n\t{\"name\": \"deviceInfo\", \"type\": [\"org.kaaproject.kaa.demo.smarthouse.device.DeviceInfo\", \"null\"]}\r\n  ]\r\n}\r\n]",
                      "version": 1
                  }
              ],
              "tenantId": "10"
          },
          {
              "className": "ThermoEventClassFamily",
              "createdTime": 1408705246201,
              "createdUsername": "admin",
              "description": null,
              "id": "32",
              "name": "Thermo Event Class Family",
              "namespace": "org.kaaproject.kaa.demo.smarthouse.thermo",
              "schemas": [
                  {
                      "createdTime": 1408705246242,
                      "createdUsername": "admin",
                      "id": "42",
                      "schema": "[\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.thermo\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"ThermostatInfoRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.thermo\",\r\n \"type\": \"record\",\r\n \"classType\": \"object\",\r\n \"name\": \"ThermostatInfo\",\r\n \"fields\": [\r\n    {\"name\": \"degree\", \"type\": [\"int\", \"null\"]},\r\n    {\"name\": \"targetDegree\", \"type\": [\"int\", \"null\"]},\r\n    {\"name\": \"isSetManually\", \"type\": [\"boolean\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.thermo\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"ThermostatInfoResponse\",\r\n \"fields\": [\r\n    {\"name\": \"thermostatInfo\", \"type\": [\"org.kaaproject.kaa.demo.smarthouse.thermo.ThermostatInfo\", \"null\"]}\r\n  ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.thermo\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"ChangeDegreeRequest\",\r\n \"fields\": [\r\n     {\"name\": \"degree\", \"type\": [\"int\", \"null\"]}\r\n ]\r\n}\r\n]",
                      "version": 1
                  }
              ],
              "tenantId": "10"
          },
          {
              "className": "MusicEventClassFamily",
              "createdTime": 1408705246282,
              "createdUsername": "admin",
              "description": null,
              "id": "33",
              "name": "Music Event Class Family",
              "namespace": "org.kaaproject.kaa.demo.smarthouse.music",
              "schemas": [
                  {
                      "createdTime": 1408705246328,
                      "createdUsername": "admin",
                      "id": "43",
                      "schema": "[\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.music\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlayListRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.music\",\r\n \"type\": \"record\",\r\n \"classType\": \"object\",\r\n \"name\": \"SongInfo\",\r\n \"fields\": [\r\n    {\"name\": \"title\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"artist\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"url\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"displayName\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"duration\", \"type\": [\"int\", \"null\"]},\r\n    {\"name\": \"album\", \"type\": [\"string\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.music\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlayListResponse\",\r\n \"fields\": [\r\n    {\"name\": \"playList\", \"type\": [{\"type\": \"array\", \"items\": \"org.kaaproject.kaa.demo.smarthouse.music.SongInfo\"}, \"null\"]}\r\n  ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.music\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlayRequest\",\r\n \"fields\": [\r\n     {\"name\": \"url\", \"type\": [\"string\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.music\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PauseRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.music\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"StopRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.music\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlaybackInfoRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.music\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"ChangeVolumeRequest\",\r\n \"fields\": [\r\n     {\"name\": \"volume\", \"type\": [\"int\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.music\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"SeekRequest\",\r\n \"fields\": [\r\n     {\"name\": \"time\", \"type\": [\"int\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.music\",\r\n \"type\": \"enum\"  ,\r\n \"classType\": \"object\",\r\n \"name\": \"PlaybackStatus\",\r\n \"symbols\" : [\"PLAYING\", \"PAUSED\", \"STOPPED\"]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.music\",\r\n \"type\": \"record\",\r\n \"classType\": \"object\",\r\n \"name\": \"PlaybackInfo\",\r\n \"fields\": [\r\n    {\"name\": \"song\", \"type\": [\"org.kaaproject.kaa.demo.smarthouse.music.SongInfo\", \"null\"]},\r\n    {\"name\": \"time\", \"type\": [\"int\", \"null\"]},\r\n    {\"name\": \"volume\", \"type\": [\"int\", \"null\"]},\r\n    {\"name\": \"maxVolume\", \"type\": [\"int\", \"null\"]},\r\n    {\"name\": \"timeSetOnDevice\", \"type\": [\"boolean\", \"null\"]},\r\n    {\"name\": \"volumeSetOnDevice\", \"type\": [\"boolean\", \"null\"]},\r\n    {\"name\": \"status\", \"type\": [\"org.kaaproject.kaa.demo.smarthouse.music.PlaybackStatus\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.music\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlaybackInfoResponse\",\r\n \"fields\": [\r\n    {\"name\": \"playbackInfo\", \"type\": [\"org.kaaproject.kaa.demo.smarthouse.music.PlaybackInfo\", \"null\"]}\r\n ]\r\n}\r\n]",
                      "version": 1
                  }
              ],
              "tenantId": "10"
          }
      ]
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the TENANT_ADMIN role
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u admin:admin123 -X GET "http://localhost:8080/kaaAdmin/rest/api/eventClassFamilies" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "className": "PlayerClassFamily",
            "createdTime": 1408705243720,
            "createdUsername": "admin",
            "description": null,
            "id": "30",
            "name": "Player Event Class Family",
            "namespace": "org.kaaproject.kaa.demo.player",
            "schemas": [
                {
                    "createdTime": 1408705244624,
                    "createdUsername": "admin",
                    "id": "40",
                    "schema": "[\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"DeviceInfoRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"object\",\r\n \"name\": \"DeviceInfo\",\r\n \"fields\": [\r\n    {\"name\": \"model\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"product\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"manufacturer\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"device\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"brand\", \"type\": [\"string\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"DeviceInfoResponse\",\r\n \"fields\": [\r\n\t{\"name\": \"deviceInfo\", \"type\": [\"org.kaaproject.kaa.demo.player.DeviceInfo\", \"null\"]}\r\n  ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlayListRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"object\",\r\n \"name\": \"SongInfo\",\r\n \"fields\": [\r\n    {\"name\": \"title\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"artist\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"url\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"displayName\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"duration\", \"type\": [\"int\", \"null\"]},\r\n    {\"name\": \"album\", \"type\": [\"string\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlayListResponse\",\r\n \"fields\": [\r\n\t{\"name\": \"playList\", \"type\": [{\"type\": \"array\", \"items\": \"org.kaaproject.kaa.demo.player.SongInfo\"}, \"null\"]}\r\n  ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlayRequest\",\r\n \"fields\": [\r\n     {\"name\": \"url\", \"type\": [\"string\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PauseRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"StopRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlaybackInfoRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"enum\"  ,\r\n \"classType\": \"object\",\r\n \"name\": \"PlaybackStatus\",\r\n \"symbols\" : [\"PLAYING\", \"PAUSED\", \"STOPPED\"]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"object\",\r\n \"name\": \"PlaybackInfo\",\r\n \"fields\": [\r\n    {\"name\": \"url\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"time\", \"type\": [\"int\", \"null\"]},\r\n    {\"name\": \"status\", \"type\": [\"org.kaaproject.kaa.demo.player.PlaybackStatus\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlaybackInfoResponse\",\r\n \"fields\": [\r\n\t{\"name\": \"playbackInfo\", \"type\": [\"org.kaaproject.kaa.demo.player.PlaybackInfo\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"BatteryInfoRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"enum\"  ,\r\n \"classType\": \"object\",\r\n \"name\": \"BatteryChargingStatus\",\r\n \"symbols\" : [\"NOT_CHARGING\", \"CHARGING\", \"CHARGED\"]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"object\",\r\n \"name\": \"BatteryInfo\",\r\n \"fields\": [\r\n    {\"name\": \"batteryLife\", \"type\": [\"int\", \"null\"]},\r\n    {\"name\": \"chargingStatus\", \"type\": [\"org.kaaproject.kaa.demo.player.BatteryChargingStatus\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"BatteryInfoResponse\",\r\n \"fields\": [\r\n    {\"name\": \"batteryInfo\", \"type\": [\"org.kaaproject.kaa.demo.player.BatteryInfo\", \"null\"]}\r\n ]\r\n}\r\n]",
                    "version": 1
                }
            ],
            "tenantId": "10"
        },
        {
            "className": "DeviceEventClassFamily",
            "createdTime": 1408705246098,
            "createdUsername": "admin",
            "description": null,
            "id": "31",
            "name": "Device Event Class Family",
            "namespace": "org.kaaproject.kaa.demo.smarthouse.device",
            "schemas": [
                {
                    "createdTime": 1408705246155,
                    "createdUsername": "admin",
                    "id": "41",
                    "schema": "[\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.device\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"DeviceInfoRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.device\",\r\n \"type\": \"enum\"  ,\r\n \"classType\": \"object\",\r\n \"name\": \"DeviceType\",\r\n \"symbols\" : [\"THERMOSTAT\", \"TV\", \"SOUND_SYSTEM\", \"LAMP\"]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.device\",\r\n \"type\": \"record\",\r\n \"classType\": \"object\",\r\n \"name\": \"DeviceInfo\",\r\n \"fields\": [\r\n    {\"name\": \"deviceType\", \"type\": [\"org.kaaproject.kaa.demo.smarthouse.device.DeviceType\", \"null\"]},\r\n    {\"name\": \"model\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"manufacturer\", \"type\": [\"string\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.device\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"DeviceInfoResponse\",\r\n \"fields\": [\r\n\t{\"name\": \"deviceInfo\", \"type\": [\"org.kaaproject.kaa.demo.smarthouse.device.DeviceInfo\", \"null\"]}\r\n  ]\r\n}\r\n]",
                    "version": 1
                }
            ],
            "tenantId": "10"
        },
        {
            "className": "ThermoEventClassFamily",
            "createdTime": 1408705246201,
            "createdUsername": "admin",
            "description": null,
            "id": "32",
            "name": "Thermo Event Class Family",
            "namespace": "org.kaaproject.kaa.demo.smarthouse.thermo",
            "schemas": [
                {
                    "createdTime": 1408705246242,
                    "createdUsername": "admin",
                    "id": "42",
                    "schema": "[\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.thermo\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"ThermostatInfoRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.thermo\",\r\n \"type\": \"record\",\r\n \"classType\": \"object\",\r\n \"name\": \"ThermostatInfo\",\r\n \"fields\": [\r\n    {\"name\": \"degree\", \"type\": [\"int\", \"null\"]},\r\n    {\"name\": \"targetDegree\", \"type\": [\"int\", \"null\"]},\r\n    {\"name\": \"isSetManually\", \"type\": [\"boolean\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.thermo\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"ThermostatInfoResponse\",\r\n \"fields\": [\r\n    {\"name\": \"thermostatInfo\", \"type\": [\"org.kaaproject.kaa.demo.smarthouse.thermo.ThermostatInfo\", \"null\"]}\r\n  ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.thermo\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"ChangeDegreeRequest\",\r\n \"fields\": [\r\n     {\"name\": \"degree\", \"type\": [\"int\", \"null\"]}\r\n ]\r\n}\r\n]",
                    "version": 1
                }
            ],
            "tenantId": "10"
        },
        {
            "className": "MusicEventClassFamily",
            "createdTime": 1408705246282,
            "createdUsername": "admin",
            "description": null,
            "id": "33",
            "name": "Music Event Class Family",
            "namespace": "org.kaaproject.kaa.demo.smarthouse.music",
            "schemas": [
                {
                    "createdTime": 1408705246328,
                    "createdUsername": "admin",
                    "id": "43",
                    "schema": "[\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.music\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlayListRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.music\",\r\n \"type\": \"record\",\r\n \"classType\": \"object\",\r\n \"name\": \"SongInfo\",\r\n \"fields\": [\r\n    {\"name\": \"title\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"artist\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"url\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"displayName\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"duration\", \"type\": [\"int\", \"null\"]},\r\n    {\"name\": \"album\", \"type\": [\"string\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.music\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlayListResponse\",\r\n \"fields\": [\r\n    {\"name\": \"playList\", \"type\": [{\"type\": \"array\", \"items\": \"org.kaaproject.kaa.demo.smarthouse.music.SongInfo\"}, \"null\"]}\r\n  ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.music\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlayRequest\",\r\n \"fields\": [\r\n     {\"name\": \"url\", \"type\": [\"string\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.music\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PauseRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.music\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"StopRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.music\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlaybackInfoRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.music\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"ChangeVolumeRequest\",\r\n \"fields\": [\r\n     {\"name\": \"volume\", \"type\": [\"int\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.music\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"SeekRequest\",\r\n \"fields\": [\r\n     {\"name\": \"time\", \"type\": [\"int\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.music\",\r\n \"type\": \"enum\"  ,\r\n \"classType\": \"object\",\r\n \"name\": \"PlaybackStatus\",\r\n \"symbols\" : [\"PLAYING\", \"PAUSED\", \"STOPPED\"]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.music\",\r\n \"type\": \"record\",\r\n \"classType\": \"object\",\r\n \"name\": \"PlaybackInfo\",\r\n \"fields\": [\r\n    {\"name\": \"song\", \"type\": [\"org.kaaproject.kaa.demo.smarthouse.music.SongInfo\", \"null\"]},\r\n    {\"name\": \"time\", \"type\": [\"int\", \"null\"]},\r\n    {\"name\": \"volume\", \"type\": [\"int\", \"null\"]},\r\n    {\"name\": \"maxVolume\", \"type\": [\"int\", \"null\"]},\r\n    {\"name\": \"timeSetOnDevice\", \"type\": [\"boolean\", \"null\"]},\r\n    {\"name\": \"volumeSetOnDevice\", \"type\": [\"boolean\", \"null\"]},\r\n    {\"name\": \"status\", \"type\": [\"org.kaaproject.kaa.demo.smarthouse.music.PlaybackStatus\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.smarthouse.music\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlaybackInfoResponse\",\r\n \"fields\": [\r\n    {\"name\": \"playbackInfo\", \"type\": [\"org.kaaproject.kaa.demo.smarthouse.music.PlaybackInfo\", \"null\"]}\r\n ]\r\n}\r\n]",
                    "version": 1
                }
            ],
            "tenantId": "10"
        }
    ]
    

Get event class family

Returns an event class family by event class family IDOnly users with the TENANT_ADMIN role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/eventClassFamily/{eventClassFamilyId}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    eventClassFamilyIdstringThe ID of the event class family
  • Data params

    None

  • Success response:

     

    • Code: 200 

      Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "className": "PlayerClassFamily",
          "createdTime": 1408705243720,
          "createdUsername": "admin",
          "description": null,
          "id": "30",
          "name": "Player Event Class Family",
          "namespace": "org.kaaproject.kaa.demo.player",
          "schemas": [
              {
                  "createdTime": 1408705244624,
                  "createdUsername": "admin",
                  "id": "40",
                  "schema": "[\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"DeviceInfoRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"object\",\r\n \"name\": \"DeviceInfo\",\r\n \"fields\": [\r\n    {\"name\": \"model\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"product\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"manufacturer\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"device\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"brand\", \"type\": [\"string\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"DeviceInfoResponse\",\r\n \"fields\": [\r\n\t{\"name\": \"deviceInfo\", \"type\": [\"org.kaaproject.kaa.demo.player.DeviceInfo\", \"null\"]}\r\n  ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlayListRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"object\",\r\n \"name\": \"SongInfo\",\r\n \"fields\": [\r\n    {\"name\": \"title\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"artist\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"url\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"displayName\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"duration\", \"type\": [\"int\", \"null\"]},\r\n    {\"name\": \"album\", \"type\": [\"string\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlayListResponse\",\r\n \"fields\": [\r\n\t{\"name\": \"playList\", \"type\": [{\"type\": \"array\", \"items\": \"org.kaaproject.kaa.demo.player.SongInfo\"}, \"null\"]}\r\n  ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlayRequest\",\r\n \"fields\": [\r\n     {\"name\": \"url\", \"type\": [\"string\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PauseRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"StopRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlaybackInfoRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"enum\"  ,\r\n \"classType\": \"object\",\r\n \"name\": \"PlaybackStatus\",\r\n \"symbols\" : [\"PLAYING\", \"PAUSED\", \"STOPPED\"]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"object\",\r\n \"name\": \"PlaybackInfo\",\r\n \"fields\": [\r\n    {\"name\": \"url\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"time\", \"type\": [\"int\", \"null\"]},\r\n    {\"name\": \"status\", \"type\": [\"org.kaaproject.kaa.demo.player.PlaybackStatus\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlaybackInfoResponse\",\r\n \"fields\": [\r\n\t{\"name\": \"playbackInfo\", \"type\": [\"org.kaaproject.kaa.demo.player.PlaybackInfo\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"BatteryInfoRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"enum\"  ,\r\n \"classType\": \"object\",\r\n \"name\": \"BatteryChargingStatus\",\r\n \"symbols\" : [\"NOT_CHARGING\", \"CHARGING\", \"CHARGED\"]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"object\",\r\n \"name\": \"BatteryInfo\",\r\n \"fields\": [\r\n    {\"name\": \"batteryLife\", \"type\": [\"int\", \"null\"]},\r\n    {\"name\": \"chargingStatus\", \"type\": [\"org.kaaproject.kaa.demo.player.BatteryChargingStatus\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"BatteryInfoResponse\",\r\n \"fields\": [\r\n    {\"name\": \"batteryInfo\", \"type\": [\"org.kaaproject.kaa.demo.player.BatteryInfo\", \"null\"]}\r\n ]\r\n}\r\n]",
                  "version": 1
              }
          ],
          "tenantId": "10"
      }
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role TENANT_ADMIN or the Tenant ID of the event class family does not match the Tenant ID of the user
    404 Not FoundAn event class family with the specified eventClassFamilyId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u admin:admin123 -X GET "http://localhost:8080/kaaAdmin/rest/api/eventClassFamily/30" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "className": "PlayerClassFamily",
        "createdTime": 1408705243720,
        "createdUsername": "admin",
        "description": null,
        "id": "30",
        "name": "Player Event Class Family",
        "namespace": "org.kaaproject.kaa.demo.player",
        "schemas": [
            {
                "createdTime": 1408705244624,
                "createdUsername": "admin",
                "id": "40",
                "schema": "[\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"DeviceInfoRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"object\",\r\n \"name\": \"DeviceInfo\",\r\n \"fields\": [\r\n    {\"name\": \"model\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"product\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"manufacturer\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"device\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"brand\", \"type\": [\"string\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"DeviceInfoResponse\",\r\n \"fields\": [\r\n\t{\"name\": \"deviceInfo\", \"type\": [\"org.kaaproject.kaa.demo.player.DeviceInfo\", \"null\"]}\r\n  ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlayListRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"object\",\r\n \"name\": \"SongInfo\",\r\n \"fields\": [\r\n    {\"name\": \"title\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"artist\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"url\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"displayName\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"duration\", \"type\": [\"int\", \"null\"]},\r\n    {\"name\": \"album\", \"type\": [\"string\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlayListResponse\",\r\n \"fields\": [\r\n\t{\"name\": \"playList\", \"type\": [{\"type\": \"array\", \"items\": \"org.kaaproject.kaa.demo.player.SongInfo\"}, \"null\"]}\r\n  ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlayRequest\",\r\n \"fields\": [\r\n     {\"name\": \"url\", \"type\": [\"string\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PauseRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"StopRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlaybackInfoRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"enum\"  ,\r\n \"classType\": \"object\",\r\n \"name\": \"PlaybackStatus\",\r\n \"symbols\" : [\"PLAYING\", \"PAUSED\", \"STOPPED\"]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"object\",\r\n \"name\": \"PlaybackInfo\",\r\n \"fields\": [\r\n    {\"name\": \"url\", \"type\": [\"string\", \"null\"]},\r\n    {\"name\": \"time\", \"type\": [\"int\", \"null\"]},\r\n    {\"name\": \"status\", \"type\": [\"org.kaaproject.kaa.demo.player.PlaybackStatus\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"PlaybackInfoResponse\",\r\n \"fields\": [\r\n\t{\"name\": \"playbackInfo\", \"type\": [\"org.kaaproject.kaa.demo.player.PlaybackInfo\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"BatteryInfoRequest\",\r\n \"fields\": []\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"enum\"  ,\r\n \"classType\": \"object\",\r\n \"name\": \"BatteryChargingStatus\",\r\n \"symbols\" : [\"NOT_CHARGING\", \"CHARGING\", \"CHARGED\"]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"object\",\r\n \"name\": \"BatteryInfo\",\r\n \"fields\": [\r\n    {\"name\": \"batteryLife\", \"type\": [\"int\", \"null\"]},\r\n    {\"name\": \"chargingStatus\", \"type\": [\"org.kaaproject.kaa.demo.player.BatteryChargingStatus\", \"null\"]}\r\n ]\r\n},\r\n{\r\n \"namespace\": \"org.kaaproject.kaa.demo.player\",\r\n \"type\": \"record\",\r\n \"classType\": \"event\",\r\n \"name\": \"BatteryInfoResponse\",\r\n \"fields\": [\r\n    {\"name\": \"batteryInfo\", \"type\": [\"org.kaaproject.kaa.demo.player.BatteryInfo\", \"null\"]}\r\n ]\r\n}\r\n]",
                "version": 1
            }
        ],
        "tenantId": "10"
    }
    

Create/Edit event class family

Creates or edits an event class family. If an event class family with the specified ID does not exist, it will be created. If an event class family with the specified ID exists, it will be updated. Only users with the TENANT_ADMIN role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/eventClassFamily
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    None

  • Data params

    Expand
    titleRequest body

    Example:

    Code Block
    languagejs
    {"name":"Test Event Class Family","className":"TestClassFamily","description":"Test Class Family Description","namespace":"org.kaaproject.kaa.test.family"}
  • Success response:

    • Code: 200

      Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "className": "TestClassFamily",
          "createdTime": 1409142604502,
          "createdUsername": "admin",
          "description": "Test Class Family Description",
          "id": "34",
          "name": "Test Event Class Family",
          "namespace": "org.kaaproject.kaa.test.family",
          "schemas": null,
          "tenantId": "10"
      }
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_ADMIN) or the Tenant ID of the editing event class family does not match the Tenant ID of the user
    404 Not FoundAn event class family to be edited with the specified eventClassFamilyId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call to create event class family:

    Code Block
    languagejava
    curl -v -S -u admin:admin123 -X POST -H 'Content-Type: application/json' -d'{"name":"Test Event Class Family","className":"TestClassFamily","description":"Test Class Family Description","namespace":"org.kaaproject.kaa.test.family"}' "http://localhost:8080/kaaAdmin/rest/api/eventClassFamily" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "className": "TestClassFamily",
        "createdTime": 1409142604502,
        "createdUsername": "admin",
        "description": "Test Class Family Description",
        "id": "34",
        "name": "Test Event Class Family",
        "namespace": "org.kaaproject.kaa.test.family",
        "schemas": null,
        "tenantId": "10"
    }
  • Sample call to edit event class family:

    Code Block
    languagejava
    curl -v -S -u admin:admin123 -X POST -H 'Content-Type: application/json' -d'{"id":"34","name":"Test Event Class Family","className":"TestClassFamily","description":"Test Class Family Description v2","namespace":"org.kaaproject.kaa.test.family"}' "http://localhost:8080/kaaAdmin/rest/api/eventClassFamily" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "className": "TestClassFamily",
        "createdTime": 1409142604502,
        "createdUsername": "admin",
        "description": "Test Class Family Description v2",
        "id": "34",
        "name": "Test Event Class Family",
        "namespace": "org.kaaproject.kaa.test.family",
        "schemas": null,
        "tenantId": "10"
    }

Add event class family schema

Adds the event class family schema to the event class family with the specified ID. The current user will be marked as the creator of schema. Only users with the TENANT_ADMIN role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/addEventClassFamilySchema
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    None

  • Data params

    Multipart/form-data encoding. Fields:

    Expand
    titleeventClassFamilyId (content-type: text/plain)

    Example:

    Code Block
    languagejs
    34
    Expand
    titlefile (content-type: application/octet-stream)

    File contents example:

    Code Block
    languagejs
    [
    {
     "namespace": "org.kaaproject.kaa.test.family",
     "type": "record",
     "classType": "event",
     "name": "MyTestRequest",
     "fields": []
    },
    {
     "namespace": "org.kaaproject.kaa.test.family",
     "type": "record",
     "classType": "event",
     "name": "MyTestResponse",
     "fields": [
        {"name": "testField", "type": ["string", "null"]}
      ]
    }
    ]
  • Success response:

    • Code: 200 

  • Error response:

    Status codesDescription
    400 Bad RequestThe specified event class family schema is not a valid avro schema
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_ADMIN) or the Tenant ID of the specified event class family does not match the Tenant ID of the authenticated user
    404 Not FoundA file with the event class family schema was not found in the form data or an event class family with the specified ID does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u admin:admin123 -F'eventClassFamilyId=34;type=text/plain' -F [email protected] "http://localhost:8080/kaaAdmin/rest/api/addEventClassFamilySchema" | python -mjson.tool

Get event classes

Gets event classes by event class family ID, version and type. Only users with the TENANT_ADMIN, TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/eventClasses?eventClassFamilyId&version&type
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    eventClassFamilyIdstringThe ID of the event class family
    versionstringThe version of the event class family schema
    typestringThe event classes type, one of ["EVENT", "OBJECT"]
  • Data params

    None

  • Success response:

     

    • Code: 200 

      Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "ecfId": "34",
              "fqn": "org.kaaproject.kaa.test.family.MyTestRequest",
              "id": "177",
              "schema": "{\"type\":\"record\",\"name\":\"MyTestRequest\",\"namespace\":\"org.kaaproject.kaa.test.family\",\"fields\":[],\"classType\":\"event\"}",
              "tenantId": "10",
              "type": "EVENT",
              "version": 1
          },
          {
              "ecfId": "34",
              "fqn": "org.kaaproject.kaa.test.family.MyTestResponse",
              "id": "178",
              "schema": "{\"type\":\"record\",\"name\":\"MyTestResponse\",\"namespace\":\"org.kaaproject.kaa.test.family\",\"fields\":[{\"name\":\"testField\",\"type\":[\"string\",\"null\"]}],\"classType\":\"event\"}",
              "tenantId": "10",
              "type": "EVENT",
              "version": 1
          }
      ]
      
     
  • Error response:

    Status codesDescription
    400 Bad RequestOne of the url parameters is empty (eventClassFamilyId, version or type)
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_ADMIN, TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the event class family does not match the Tenant ID of the authenticated user
    404 Not FoundAn event class family with the specified eventClassFamilyId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/eventClasses?eventClassFamilyId=34&version=1&type=EVENT" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "ecfId": "34",
            "fqn": "org.kaaproject.kaa.test.family.MyTestRequest",
            "id": "177",
            "schema": "{\"type\":\"record\",\"name\":\"MyTestRequest\",\"namespace\":\"org.kaaproject.kaa.test.family\",\"fields\":[],\"classType\":\"event\"}",
            "tenantId": "10",
            "type": "EVENT",
            "version": 1
        },
        {
            "ecfId": "34",
            "fqn": "org.kaaproject.kaa.test.family.MyTestResponse",
            "id": "178",
            "schema": "{\"type\":\"record\",\"name\":\"MyTestResponse\",\"namespace\":\"org.kaaproject.kaa.test.family\",\"fields\":[{\"name\":\"testField\",\"type\":[\"string\",\"null\"]}],\"classType\":\"event\"}",
            "tenantId": "10",
            "type": "EVENT",
            "version": 1
        }
    ]
    

Get application event family maps

Returns all application event family maps for the specified application. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/applicationEventMaps/{applicationId}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    applicationIdstringThe ID of the application
  • Data params

    None

  • Success response:

     

    • Code: 200 

      Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "applicationId": "71",
              "createdTime": 1408705246676,
              "createdUsername": "devuser",
              "ecfId": "31",
              "ecfName": "Device Event Class Family",
              "eventMaps": [
                  {
                      "action": "BOTH",
                      "eventClassId": "67",
                      "fqn": "org.kaaproject.kaa.demo.smarthouse.device.DeviceInfoRequest",
                      "id": "151"
                  },
                  {
                      "action": "BOTH",
                      "eventClassId": "160",
                      "fqn": "org.kaaproject.kaa.demo.smarthouse.device.DeviceInfoResponse",
                      "id": "152"
                  }
              ],
              "id": "131",
              "version": 1
          },
          {
              "applicationId": "71",
              "createdTime": 1408705246781,
              "createdUsername": "devuser",
              "ecfId": "32",
              "ecfName": "Thermo Event Class Family",
              "eventMaps": [
                  {
                      "action": "BOTH",
                      "eventClassId": "161",
                      "fqn": "org.kaaproject.kaa.demo.smarthouse.thermo.ThermostatInfoRequest",
                      "id": "153"
                  },
                  {
                      "action": "BOTH",
                      "eventClassId": "163",
                      "fqn": "org.kaaproject.kaa.demo.smarthouse.thermo.ThermostatInfoResponse",
                      "id": "154"
                  },
                  {
                      "action": "BOTH",
                      "eventClassId": "164",
                      "fqn": "org.kaaproject.kaa.demo.smarthouse.thermo.ChangeDegreeRequest",
                      "id": "155"
                  }
              ],
              "id": "132",
              "version": 1
          },
          {
              "applicationId": "71",
              "createdTime": 1408705246909,
              "createdUsername": "devuser",
              "ecfId": "33",
              "ecfName": "Music Event Class Family",
              "eventMaps": [
                  {
                      "action": "BOTH",
                      "eventClassId": "165",
                      "fqn": "org.kaaproject.kaa.demo.smarthouse.music.PlayListRequest",
                      "id": "156"
                  },
                  {
                      "action": "BOTH",
                      "eventClassId": "167",
                      "fqn": "org.kaaproject.kaa.demo.smarthouse.music.PlayListResponse",
                      "id": "157"
                  },
                  {
                      "action": "BOTH",
                      "eventClassId": "168",
                      "fqn": "org.kaaproject.kaa.demo.smarthouse.music.PlayRequest",
                      "id": "158"
                  },
                  {
                      "action": "BOTH",
                      "eventClassId": "169",
                      "fqn": "org.kaaproject.kaa.demo.smarthouse.music.PauseRequest",
                      "id": "159"
                  },
                  {
                      "action": "BOTH",
                      "eventClassId": "170",
                      "fqn": "org.kaaproject.kaa.demo.smarthouse.music.StopRequest",
                      "id": "180"
                  },
                  {
                      "action": "BOTH",
                      "eventClassId": "171",
                      "fqn": "org.kaaproject.kaa.demo.smarthouse.music.PlaybackInfoRequest",
                      "id": "181"
                  },
                  {
                      "action": "BOTH",
                      "eventClassId": "172",
                      "fqn": "org.kaaproject.kaa.demo.smarthouse.music.ChangeVolumeRequest",
                      "id": "182"
                  },
                  {
                      "action": "BOTH",
                      "eventClassId": "173",
                      "fqn": "org.kaaproject.kaa.demo.smarthouse.music.SeekRequest",
                      "id": "183"
                  },
                  {
                      "action": "BOTH",
                      "eventClassId": "176",
                      "fqn": "org.kaaproject.kaa.demo.smarthouse.music.PlaybackInfoResponse",
                      "id": "184"
                  }
              ],
              "id": "133",
              "version": 1
          }
      ]
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application does not match the Tenant ID of the authenticated user
    404 Not FoundAn application with the specified applicationId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/applicationEventMaps/71" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "applicationId": "71",
            "createdTime": 1408705246676,
            "createdUsername": "devuser",
            "ecfId": "31",
            "ecfName": "Device Event Class Family",
            "eventMaps": [
                {
                    "action": "BOTH",
                    "eventClassId": "67",
                    "fqn": "org.kaaproject.kaa.demo.smarthouse.device.DeviceInfoRequest",
                    "id": "151"
                },
                {
                    "action": "BOTH",
                    "eventClassId": "160",
                    "fqn": "org.kaaproject.kaa.demo.smarthouse.device.DeviceInfoResponse",
                    "id": "152"
                }
            ],
            "id": "131",
            "version": 1
        },
        {
            "applicationId": "71",
            "createdTime": 1408705246781,
            "createdUsername": "devuser",
            "ecfId": "32",
            "ecfName": "Thermo Event Class Family",
            "eventMaps": [
                {
                    "action": "BOTH",
                    "eventClassId": "161",
                    "fqn": "org.kaaproject.kaa.demo.smarthouse.thermo.ThermostatInfoRequest",
                    "id": "153"
                },
                {
                    "action": "BOTH",
                    "eventClassId": "163",
                    "fqn": "org.kaaproject.kaa.demo.smarthouse.thermo.ThermostatInfoResponse",
                    "id": "154"
                },
                {
                    "action": "BOTH",
                    "eventClassId": "164",
                    "fqn": "org.kaaproject.kaa.demo.smarthouse.thermo.ChangeDegreeRequest",
                    "id": "155"
                }
            ],
            "id": "132",
            "version": 1
        },
        {
            "applicationId": "71",
            "createdTime": 1408705246909,
            "createdUsername": "devuser",
            "ecfId": "33",
            "ecfName": "Music Event Class Family",
            "eventMaps": [
                {
                    "action": "BOTH",
                    "eventClassId": "165",
                    "fqn": "org.kaaproject.kaa.demo.smarthouse.music.PlayListRequest",
                    "id": "156"
                },
                {
                    "action": "BOTH",
                    "eventClassId": "167",
                    "fqn": "org.kaaproject.kaa.demo.smarthouse.music.PlayListResponse",
                    "id": "157"
                },
                {
                    "action": "BOTH",
                    "eventClassId": "168",
                    "fqn": "org.kaaproject.kaa.demo.smarthouse.music.PlayRequest",
                    "id": "158"
                },
                {
                    "action": "BOTH",
                    "eventClassId": "169",
                    "fqn": "org.kaaproject.kaa.demo.smarthouse.music.PauseRequest",
                    "id": "159"
                },
                {
                    "action": "BOTH",
                    "eventClassId": "170",
                    "fqn": "org.kaaproject.kaa.demo.smarthouse.music.StopRequest",
                    "id": "180"
                },
                {
                    "action": "BOTH",
                    "eventClassId": "171",
                    "fqn": "org.kaaproject.kaa.demo.smarthouse.music.PlaybackInfoRequest",
                    "id": "181"
                },
                {
                    "action": "BOTH",
                    "eventClassId": "172",
                    "fqn": "org.kaaproject.kaa.demo.smarthouse.music.ChangeVolumeRequest",
                    "id": "182"
                },
                {
                    "action": "BOTH",
                    "eventClassId": "173",
                    "fqn": "org.kaaproject.kaa.demo.smarthouse.music.SeekRequest",
                    "id": "183"
                },
                {
                    "action": "BOTH",
                    "eventClassId": "176",
                    "fqn": "org.kaaproject.kaa.demo.smarthouse.music.PlaybackInfoResponse",
                    "id": "184"
                }
            ],
            "id": "133",
            "version": 1
        }
    ]
    

Get application event family map

Returns an application event family map by application event family map ID. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/applicationEventMap/{applicationEventFamilyMapId}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    applicationEventFamilyMapIdstringThe ID of the application event family map
  • Data params

    None

  • Success response:

     

    • Code: 200 

      Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "applicationId": "71",
          "createdTime": 1408705246676,
          "createdUsername": "devuser",
          "ecfId": "31",
          "ecfName": "Device Event Class Family",
          "eventMaps": [
              {
                  "action": "BOTH",
                  "eventClassId": "67",
                  "fqn": "org.kaaproject.kaa.demo.smarthouse.device.DeviceInfoRequest",
                  "id": "151"
              },
              {
                  "action": "BOTH",
                  "eventClassId": "160",
                  "fqn": "org.kaaproject.kaa.demo.smarthouse.device.DeviceInfoResponse",
                  "id": "152"
              }
          ],
          "id": "131",
          "version": 1
      }
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the application event family map does not match the Tenant ID of the authenticated user
    404 Not FoundAn application event family map with the specified applicationEventFamilyMapId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/applicationEventMap/131" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationId": "71",
        "createdTime": 1408705246676,
        "createdUsername": "devuser",
        "ecfId": "31",
        "ecfName": "Device Event Class Family",
        "eventMaps": [
            {
                "action": "BOTH",
                "eventClassId": "67",
                "fqn": "org.kaaproject.kaa.demo.smarthouse.device.DeviceInfoRequest",
                "id": "151"
            },
            {
                "action": "BOTH",
                "eventClassId": "160",
                "fqn": "org.kaaproject.kaa.demo.smarthouse.device.DeviceInfoResponse",
                "id": "152"
            }
        ],
        "id": "131",
        "version": 1
    }
    

Create/Edit application event family map

Creates or edits an application event family map. If an application event family map with the specified ID does not exist, it will be created. If an application event family map with the specified ID exists, it will be updated. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/applicationEventMap
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    None

  • Data params

    Expand
    titleRequest body

    Example:

    Code Block
    languagejs
    {"applicationId":"71","ecfId":"34","ecfName":"Test Event Class Family","eventMaps":[{"action":"BOTH","eventClassId":"177","fqn":"org.kaaproject.kaa.test.family.MyTestRequest"},{"action":"BOTH","eventClassId":"178","fqn":"org.kaaproject.kaa.test.family.MyTestResponse"}]}
  • Success response:

    • Code: 200

      Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "applicationId": "71",
          "createdTime": 1409145316401,
          "createdUsername": "devuser",
          "ecfId": "34",
          "ecfName": "Test Event Class Family",
          "eventMaps": [
              {
                  "action": "BOTH",
                  "eventClassId": "177",
                  "fqn": "org.kaaproject.kaa.test.family.MyTestRequest",
                  "id": "185"
              },
              {
                  "action": "BOTH",
                  "eventClassId": "178",
                  "fqn": "org.kaaproject.kaa.test.family.MyTestResponse",
                  "id": "186"
              }
          ],
          "id": "134",
          "version": 0
      }
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the equired role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the application event family map does not match the Tenant ID of the authenticated user
    404 Not FoundAn application event family map to be edited with the specified applicationEventFamilyMapId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST -H 'Content-Type: application/json' -d'{"applicationId":"71","ecfId":"34","ecfName":"Test Event Class Family","eventMaps":[{"action":"BOTH","eventClassId":"177","fqn":"org.kaaproject.kaa.test.family.MyTestRequest"},{"action":"BOTH","eventClassId":"178","fqn":"org.kaaproject.kaa.test.family.MyTestResponse"}]}' "http://localhost:8080/kaaAdmin/rest/api/applicationEventMap" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationId": "71",
        "createdTime": 1409145316401,
        "createdUsername": "devuser",
        "ecfId": "34",
        "ecfName": "Test Event Class Family",
        "eventMaps": [
            {
                "action": "BOTH",
                "eventClassId": "177",
                "fqn": "org.kaaproject.kaa.test.family.MyTestRequest",
                "id": "185"
            },
            {
                "action": "BOTH",
                "eventClassId": "178",
                "fqn": "org.kaaproject.kaa.test.family.MyTestResponse",
                "id": "186"
            }
        ],
        "id": "134",
        "version": 0
    }

Get vacant event class families

Returns all vacant (not being used by application event family maps) event class families for the specified application. Only users with the  TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/vacantEventClassFamilies/{applicationId}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    applicationIdstringThe ID of the application.
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "ecfId": "30",
              "ecfName": "Player Event Class Family",
              "version": 1
          },
          {
              "ecfId": "34",
              "ecfName": "Test Event Class Family",
              "version": 1
          }
      ]
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application does not match the Tenant ID of the authenticated user
    404 Not FoundAn application with the specified applicationId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/vacantEventClassFamilies/71" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "ecfId": "30",
            "ecfName": "Player Event Class Family",
            "version": 1
        },
        {
            "ecfId": "34",
            "ecfName": "Test Event Class Family",
            "version": 1
        }
    ]
    

Get application event class families

Returns all event class families for the specified application (being used by application event family maps). Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/eventClassFamilies/{applicationId}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    applicationIdstringThe ID of the application.
  • Data params

    None

  • Success response:

     

    • Code: 200 

      Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "aefMapId": "131",
              "ecfId": "31",
              "ecfName": "Device Event Class Family",
              "version": 1
          },
          {
              "aefMapId": "132",
              "ecfId": "32",
              "ecfName": "Thermo Event Class Family",
              "version": 1
          },
          {
              "aefMapId": "133",
              "ecfId": "33",
              "ecfName": "Music Event Class Family",
              "version": 1
          },
          {
              "aefMapId": "134",
              "ecfId": "34",
              "ecfName": "Test Event Class Family",
              "version": 0
          }
      ]
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application does not match the Tenant ID of the authenticated user
    404 Not FoundAn application with the specified applicationId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/eventClassFamilies/71" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "aefMapId": "131",
            "ecfId": "31",
            "ecfName": "Device Event Class Family",
            "version": 1
        },
        {
            "aefMapId": "132",
            "ecfId": "32",
            "ecfName": "Thermo Event Class Family",
            "version": 1
        },
        {
            "aefMapId": "133",
            "ecfId": "33",
            "ecfName": "Music Event Class Family",
            "version": 1
        },
        {
            "aefMapId": "134",
            "ecfId": "34",
            "ecfName": "Test Event Class Family",
            "version": 0
        }
    ]
    

Logging

Get log schemas

Returns all log schemas for the specified application. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information. The Tenant ID value of the application must match Tenant ID of the request submitter.

  • URL 
    /kaaAdmin/rest/api/logSchemas/{applicationId}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    applicationIdstringThe ID of the application.
  • Data params

    None

  • Success response:

     

    • Code: 200 

      Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "applicationId": "71",
              "createdTime": 1408705246583,
              "createdUsername": "admin",
              "description": null,
              "endpointCount": 0,
              "id": "95",
              "majorVersion": 1,
              "minorVersion": 0,
              "name": "Generated",
              "schema": "{\r\n    \"type\": \"record\",\r\n    \"name\": \"LogData\",\r\n    \"namespace\": \"org.kaa.config\",\r\n    \"fields\": [\r\n            {\r\n                \"name\": \"level\",\r\n                \"type\": {\r\n                    \"type\": \"enum\",\r\n                    \"name\": \"Level\",\r\n                    \"symbols\": [\r\n                        \"DEBUG\",\r\n                        \"ERROR\",\r\n                        \"FATAL\",\r\n                        \"INFO\",\r\n                        \"TRACE\",\r\n                        \"WARN\"\r\n                    ]\r\n                }\r\n            },\r\n            {\r\n                \"name\": \"tag\",\r\n                \"type\": \"string\"\r\n            },\r\n            {\r\n                \"name\": \"message\",\r\n                \"type\": \"string\"\r\n            }\r\n    ]\r\n}"
          }
      ]
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application does not match the Tenant ID of the authenticated user
    404 Not FoundAn application with the specified applicationId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/logSchemas/71" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "applicationId": "71",
            "createdTime": 1408705246583,
            "createdUsername": "admin",
            "description": null,
            "endpointCount": 0,
            "id": "95",
            "majorVersion": 1,
            "minorVersion": 0,
            "name": "Generated",
            "schema": "{\r\n    \"type\": \"record\",\r\n    \"name\": \"LogData\",\r\n    \"namespace\": \"org.kaa.config\",\r\n    \"fields\": [\r\n            {\r\n                \"name\": \"level\",\r\n                \"type\": {\r\n                    \"type\": \"enum\",\r\n                    \"name\": \"Level\",\r\n                    \"symbols\": [\r\n                        \"DEBUG\",\r\n                        \"ERROR\",\r\n                        \"FATAL\",\r\n                        \"INFO\",\r\n                        \"TRACE\",\r\n                        \"WARN\"\r\n                    ]\r\n                }\r\n            },\r\n            {\r\n                \"name\": \"tag\",\r\n                \"type\": \"string\"\r\n            },\r\n            {\r\n                \"name\": \"message\",\r\n                \"type\": \"string\"\r\n            }\r\n    ]\r\n}"
        }
    ]
    

Get log schema

Returns a log schema by log schema ID. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/logSchema/{logSchemaId}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    logSchemaIdstringThe ID of the log schema
  • Data params

    None

  • Success response:

     

    • Code: 200 

      Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "applicationId": "71",
          "createdTime": 1408705246583,
          "createdUsername": "admin",
          "description": null,
          "endpointCount": 0,
          "id": "95",
          "majorVersion": 1,
          "minorVersion": 0,
          "name": "Generated",
          "schema": "{\r\n    \"type\": \"record\",\r\n    \"name\": \"LogData\",\r\n    \"namespace\": \"org.kaa.config\",\r\n    \"fields\": [\r\n            {\r\n                \"name\": \"level\",\r\n                \"type\": {\r\n                    \"type\": \"enum\",\r\n                    \"name\": \"Level\",\r\n                    \"symbols\": [\r\n                        \"DEBUG\",\r\n                        \"ERROR\",\r\n                        \"FATAL\",\r\n                        \"INFO\",\r\n                        \"TRACE\",\r\n                        \"WARN\"\r\n                    ]\r\n                }\r\n            },\r\n            {\r\n                \"name\": \"tag\",\r\n                \"type\": \"string\"\r\n            },\r\n            {\r\n                \"name\": \"message\",\r\n                \"type\": \"string\"\r\n            }\r\n    ]\r\n}"
      }
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the log schema does not match the Tenant ID of the authenticated user
    404 Not FoundA log schema with the specified logSchemaId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/logSchema/95" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationId": "71",
        "createdTime": 1408705246583,
        "createdUsername": "admin",
        "description": null,
        "endpointCount": 0,
        "id": "95",
        "majorVersion": 1,
        "minorVersion": 0,
        "name": "Generated",
        "schema": "{\r\n    \"type\": \"record\",\r\n    \"name\": \"LogData\",\r\n    \"namespace\": \"org.kaa.config\",\r\n    \"fields\": [\r\n            {\r\n                \"name\": \"level\",\r\n                \"type\": {\r\n                    \"type\": \"enum\",\r\n                    \"name\": \"Level\",\r\n                    \"symbols\": [\r\n                        \"DEBUG\",\r\n                        \"ERROR\",\r\n                        \"FATAL\",\r\n                        \"INFO\",\r\n                        \"TRACE\",\r\n                        \"WARN\"\r\n                    ]\r\n                }\r\n            },\r\n            {\r\n                \"name\": \"tag\",\r\n                \"type\": \"string\"\r\n            },\r\n            {\r\n                \"name\": \"message\",\r\n                \"type\": \"string\"\r\n            }\r\n    ]\r\n}"
    }
    

Get log schema by application token and schema version

Returns a log schema for the specified schema version and application token. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/logSchema/{applicationToken}/{schemaVersion}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    applicationTokenstringThe token of the application for the requested log schema
    schemaVersionstringThe version of the requested log schema
  • Data params

    None

  • Success response:

     

    • Code: 200 

      Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "applicationId": "71",
          "createdTime": 1408705246583,
          "createdUsername": "admin",
          "description": null,
          "endpointCount": 0,
          "id": "95",
          "majorVersion": 1,
          "minorVersion": 0,
          "name": "Generated",
          "schema": "{\r\n    \"type\": \"record\",\r\n    \"name\": \"LogData\",\r\n    \"namespace\": \"org.kaa.config\",\r\n    \"fields\": [\r\n            {\r\n                \"name\": \"level\",\r\n                \"type\": {\r\n                    \"type\": \"enum\",\r\n                    \"name\": \"Level\",\r\n                    \"symbols\": [\r\n                        \"DEBUG\",\r\n                        \"ERROR\",\r\n                        \"FATAL\",\r\n                        \"INFO\",\r\n                        \"TRACE\",\r\n                        \"WARN\"\r\n                    ]\r\n                }\r\n            },\r\n            {\r\n                \"name\": \"tag\",\r\n                \"type\": \"string\"\r\n            },\r\n            {\r\n                \"name\": \"message\",\r\n                \"type\": \"string\"\r\n            }\r\n    ]\r\n}"
      }
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the log schema does not match the Tenant ID of the authenticated user
    404 Not FoundAn application with the specified application token does not exist or application does not have log schema with the specified schema version
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
     curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/logSchema/114785424389877/1" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationId": "71",
        "createdTime": 1408705246583,
        "createdUsername": "admin",
        "description": null,
        "endpointCount": 0,
        "id": "95",
        "majorVersion": 1,
        "minorVersion": 0,
        "name": "Generated",
        "schema": "{\r\n    \"type\": \"record\",\r\n    \"name\": \"LogData\",\r\n    \"namespace\": \"org.kaa.config\",\r\n    \"fields\": [\r\n            {\r\n                \"name\": \"level\",\r\n                \"type\": {\r\n                    \"type\": \"enum\",\r\n                    \"name\": \"Level\",\r\n                    \"symbols\": [\r\n                        \"DEBUG\",\r\n                        \"ERROR\",\r\n                        \"FATAL\",\r\n                        \"INFO\",\r\n                        \"TRACE\",\r\n                        \"WARN\"\r\n                    ]\r\n                }\r\n            },\r\n            {\r\n                \"name\": \"tag\",\r\n                \"type\": \"string\"\r\n            },\r\n            {\r\n                \"name\": \"message\",\r\n                \"type\": \"string\"\r\n            }\r\n    ]\r\n}"
    }
    

Create/Edit log schema

Creates or updates a log schema. If a log schema with the specified ID does not exist, then it will be created and its createUsername field of the schema will be set to the name of the user who has uploaded it, a unique version number will be generated (incrementally) for this schema. If a configuration with the specified ID exists, the configuration will be updated. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/logSchema
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    None

  • Data params

    Multipart/form-data encoding. Fields:

    Expand
    titlelogSchema (content-type: application/json)

    Example:

    Code Block
    languagejs
    {"applicationId":"71","name":"Test log schema","description":"Log Schema Description"}
    Expand
    titlefile (content-type: application/octet-stream)

    File contents example:

    Code Block
    languagejs
    {
        "type": "record",
        "name": "TestLogData",
        "namespace": "org.kaa.config.test",
        "fields": [
                {
                    "name": "level",
                    "type": {
                        "type": "enum",
                        "name": "Level",
                        "symbols": [
                            "DEBUG",
                            "ERROR",
                            "FATAL",
                            "INFO",
                            "TRACE",
                            "WARN"
                        ]
                    }
                },
                {
                    "name": "tag",
                    "type": "string"
                },
                {
                    "name": "message",
                    "type": "string"
                }
        ]
    }
  • Success response:

    • Code: 200

      Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "applicationId": "71",
          "createdTime": 1408707762378,
          "createdUsername": "devuser",
          "description": "Log Schema Description",
          "endpointCount": 0,
          "id": "98",
          "majorVersion": 2,
          "minorVersion": 0,
          "name": "Test log schema",
          "schema": "{\n    \"type\": \"record\",\n    \"name\": \"TestLogData\",\n    \"namespace\": \"org.kaa.config.test\",\n    \"fields\": [\n            {\n                \"name\": \"level\",\n                \"type\": {\n                    \"type\": \"enum\",\n                    \"name\": \"Level\",\n                    \"symbols\": [\n                        \"DEBUG\",\n                        \"ERROR\",\n                        \"FATAL\",\n                        \"INFO\",\n                        \"TRACE\",\n                        \"WARN\"\n                    ]\n                }\n            },\n            {\n                \"name\": \"tag\",\n                \"type\": \"string\"\n            },\n            {\n                \"name\": \"message\",\n                \"type\": \"string\"\n            }\n    ]\n}"
      }

 

  • Error response:

    Status codesDescription
    400 Bad RequestThe specified log schema is not a valid avro schema
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the log schema does not match the Tenant ID of the authenticated user
    404 Not FoundA file with a schema not found in the form data
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call to create log schema:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -F'logSchema={"applicationId":"71","name":"Test log schema","description":"Log Schema Description"};type=application/json' -F [email protected]_schema.json "http://localhost:8080/kaaAdmin/rest/api/logSchema" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationId": "71",
        "createdTime": 1408707762378,
        "createdUsername": "devuser",
        "description": "Log Schema Description",
        "endpointCount": 0,
        "id": "98",
        "majorVersion": 2,
        "minorVersion": 0,
        "name": "Test log schema",
        "schema": "{\n    \"type\": \"record\",\n    \"name\": \"TestLogData\",\n    \"namespace\": \"org.kaa.config.test\",\n    \"fields\": [\n            {\n                \"name\": \"level\",\n                \"type\": {\n                    \"type\": \"enum\",\n                    \"name\": \"Level\",\n                    \"symbols\": [\n                        \"DEBUG\",\n                        \"ERROR\",\n                        \"FATAL\",\n                        \"INFO\",\n                        \"TRACE\",\n                        \"WARN\"\n                    ]\n                }\n            },\n            {\n                \"name\": \"tag\",\n                \"type\": \"string\"\n            },\n            {\n                \"name\": \"message\",\n                \"type\": \"string\"\n            }\n    ]\n}"
    }

     

     

  • Sample call to edit log schema:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -F'logSchema={"id":"98","applicationId":"71","name":"Test log schema","description":"Log Schema Description"};type=application/json' -F [email protected]_schema.json "http://localhost:8080/kaaAdmin/rest/api/logSchema" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationId": "71",
        "createdTime": 1408707771452,
        "createdUsername": "devuser",
        "description": "Log Schema Description",
        "endpointCount": 0,
        "id": "98",
        "majorVersion": 2,
        "minorVersion": 0,
        "name": "Test log schema",
        "schema": "{\n    \"type\": \"record\",\n    \"name\": \"TestLogData\",\n    \"namespace\": \"org.kaa.config.test\",\n    \"fields\": [\n            {\n                \"name\": \"level\",\n                \"type\": {\n                    \"type\": \"enum\",\n                    \"name\": \"Level\",\n                    \"symbols\": [\n                        \"DEBUG\",\n                        \"ERROR\",\n                        \"FATAL\",\n                        \"INFO\",\n                        \"TRACE\",\n                        \"WARN\"\n                    ]\n                }\n            },\n            {\n                \"name\": \"tag\",\n                \"type\": \"string\"\n            },\n            {\n                \"name\": \"message\",\n                \"type\": \"string\"\n            }\n    ]\n}"
    }

Get log appenders

Returns all log appenders for the specified application. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/logAppenders/{applicationId}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    applicationIdstringThe ID of the application.
  • Data params

    None

  • Success response:

     

    • Code: 200 

      Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "appenderClassName": "org.kaaproject.kaa.server.appenders.file.appender.FileSystemLogAppender",
              "applicationId": "70",
              "applicationToken": "517279666821995",
              "configuration": "{\"publicKey\":\"DFGFDGD43FGGDFJKKJLFD34535DFDFGD\",\"logsRootPath\":\"/kaa_log_uploads\",\"rollingFileNamePatern\":\"logFile.%d{yyyy-MM-dd}.log\",\"rollingMaxHistory\":30,\"triggerMaxFileSize\":\"1GB\",\"encoderPattern\":\"%-4relative [%thread] %-5level %logger{35} - %msg%n\"}",
              "createdTime": 1418313672013,
              "createdUsername": "devuser",
              "description": "Sample file system log appender",
              "headerStructure": [
                  "KEYHASH",
                  "TIMESTAMP"
              ],
              "id": "160",
              "maxLogSchemaVersion": 2147483647,
              "minLogSchemaVersion": 1,
              "name": "File system appender",
              "status": "REGISTERED",
              "tenantId": "10",
              "typeName": "File"
          }
      ]
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application does not match the Tenant ID of the authenticated user
    404 Not FoundAn application with the specified applicationId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/logAppenders/70" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "appenderClassName": "org.kaaproject.kaa.server.appenders.file.appender.FileSystemLogAppender",
            "applicationId": "70",
            "applicationToken": "517279666821995",
            "configuration": "{\"publicKey\":\"DFGFDGD43FGGDFJKKJLFD34535DFDFGD\",\"logsRootPath\":\"/kaa_log_uploads\",\"rollingFileNamePatern\":\"logFile.%d{yyyy-MM-dd}.log\",\"rollingMaxHistory\":30,\"triggerMaxFileSize\":\"1GB\",\"encoderPattern\":\"%-4relative [%thread] %-5level %logger{35} - %msg%n\"}",
            "createdTime": 1418313672013,
            "createdUsername": "devuser",
            "description": "Sample file system log appender",
            "headerStructure": [
                "KEYHASH",
                "TIMESTAMP"
            ],
            "id": "160",
            "maxLogSchemaVersion": 2147483647,
            "minLogSchemaVersion": 1,
            "name": "File system appender",
            "status": "REGISTERED",
            "tenantId": "10",
            "typeName": "File"
        }
    ]
    

Get log appender

Returns a log appender by log appender ID. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/logAppender/{logAppenderId}
  • Method:

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    logAppenderIdstringThe ID of the log appender
  • Data params

    None

  • Success response:

     

    • Code: 200 

    • Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "appenderClassName": "org.kaaproject.kaa.server.appenders.file.appender.FileSystemLogAppender",
          "applicationId": "70",
          "applicationToken": "517279666821995",
          "configuration": "{\"publicKey\":\"DFGFDGD43FGGDFJKKJLFD34535DFDFGD\",\"logsRootPath\":\"/kaa_log_uploads\",\"rollingFileNamePatern\":\"logFile.%d{yyyy-MM-dd}.log\",\"rollingMaxHistory\":30,\"triggerMaxFileSize\":\"1GB\",\"encoderPattern\":\"%-4relative [%thread] %-5level %logger{35} - %msg%n\"}",
          "createdTime": 1418313672013,
          "createdUsername": "devuser",
          "description": "Sample file system log appender",
          "headerStructure": [
              "KEYHASH",
              "TIMESTAMP"
          ],
          "id": "160",
          "maxLogSchemaVersion": 2147483647,
          "minLogSchemaVersion": 1,
          "name": "File system appender",
          "status": "REGISTERED",
          "tenantId": "10",
          "typeName": "File"
      }
      
     
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the log appender does not match the Tenant ID of the authenticated user
    404 Not FoundA log appender with the specified logAppenderId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/logAppender/160" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "appenderClassName": "org.kaaproject.kaa.server.appenders.file.appender.FileSystemLogAppender",
        "applicationId": "70",
        "applicationToken": "517279666821995",
        "configuration": "{\"publicKey\":\"DFGFDGD43FGGDFJKKJLFD34535DFDFGD\",\"logsRootPath\":\"/kaa_log_uploads\",\"rollingFileNamePatern\":\"logFile.%d{yyyy-MM-dd}.log\",\"rollingMaxHistory\":30,\"triggerMaxFileSize\":\"1GB\",\"encoderPattern\":\"%-4relative [%thread] %-5level %logger{35} - %msg%n\"}",
        "createdTime": 1418313672013,
        "createdUsername": "devuser",
        "description": "Sample file system log appender",
        "headerStructure": [
            "KEYHASH",
            "TIMESTAMP"
        ],
        "id": "160",
        "maxLogSchemaVersion": 2147483647,
        "minLogSchemaVersion": 1,
        "name": "File system appender",
        "status": "REGISTERED",
        "tenantId": "10",
        "typeName": "File"
    }
    

Create/Edit log appender

Creates or edits a log appender. If a log appender with the specified ID does not exist, it will be created. If a log appender with the specified ID exists, it will be updated. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/logAppender
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    None

  • Data params

    Expand
    titleRequest body

    Example:

    Code Block
    languagejs
    {"pluginClassName": "org.kaaproject.kaa.server.appenders.file.appender.FileSystemLogAppender", "applicationId": "150", "applicationToken": "49263753185447091438", "jsonConfiguration": "{\"publicKey\":\"XXXXXXXXXXXXXXXXXXXXX\",\"logsRootPath\":\"/kaa_log_uploads_new\",\"rollingFileNamePatern\":\"logFile.%d{yyyy-MM-dd}.log\",\"rollingMaxHistory\":30,\"triggerMaxFileSize\":\"1GB\",\"encoderPattern\":\"%-4relative [%thread] %-5level %logger{35} - %msg%n\"}", "description": "New sample file system log appender", "headerStructure": [ "KEYHASH","TIMESTAMP" ], "name": "New file system appender", "maxLogSchemaVersion": 2147483647, "minLogSchemaVersion": 1, "tenantId": "70", "pluginTypeName": "File"}
  • Success response:

    • Code: 200

      Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "applicationId": "150",
          "applicationToken": "49263753185447091438",
          "confirmDelivery": true,
          "createdTime": 1423499273191,
          "createdUsername": "devuser",
          "description": "New sample file system log appender",
          "headerStructure": [
              "KEYHASH",
              "TIMESTAMP"
          ],
          "id": "256",
          "jsonConfiguration": "{\"publicKey\":\"XXXXXXXXXXXXXXXXXXXXX\",\"logsRootPath\":\"/kaa_log_uploads_new\",\"rollingFileNamePatern\":\"logFile.%d{yyyy-MM-dd}.log\",\"rollingMaxHistory\":30,\"triggerMaxFileSize\":\"1GB\",\"encoderPattern\":\"%-4relative [%thread] %-5level %logger{35} - %msg%n\"}",
          "maxLogSchemaVersion": 2147483647,
          "minLogSchemaVersion": 1,
          "name": "New file system appender",
          "pluginClassName": "org.kaaproject.kaa.server.appenders.file.appender.FileSystemLogAppender",
          "pluginTypeName": "File",
          "tenantId": "70"
      }
  • Error response:

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the log appender does not match the Tenant ID of the authenticated user
    404 Not FoundA log appender to be edited with the specified id does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call to create log appender:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST -H 'Content-Type: application/json' -d'{"pluginClassName": "org.kaaproject.kaa.server.appenders.file.appender.FileSystemLogAppender", "applicationId": "150", "applicationToken": "49263753185447091438", "jsonConfiguration": "{\"publicKey\":\"XXXXXXXXXXXXXXXXXXXXX\",\"logsRootPath\":\"/kaa_log_uploads_new\",\"rollingFileNamePatern\":\"logFile.%d{yyyy-MM-dd}.log\",\"rollingMaxHistory\":30,\"triggerMaxFileSize\":\"1GB\",\"encoderPattern\":\"%-4relative [%thread] %-5level %logger{35} - %msg%n\"}", "description": "New sample file system log appender", "headerStructure": [ "KEYHASH","TIMESTAMP" ], "name": "New file system appender", "maxLogSchemaVersion": 2147483647, "minLogSchemaVersion": 1, "tenantId": "70", "pluginTypeName": "File"}' "http://localhost:8080/kaaAdmin/rest/api/logAppender" | python -mjson.tool
    
    
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationId": "150",
        "applicationToken": "49263753185447091438",
        "confirmDelivery": true,
        "createdTime": 1423499273191,
        "createdUsername": "devuser",
        "description": "New sample file system log appender",
        "headerStructure": [
            "KEYHASH",
            "TIMESTAMP"
        ],
        "id": "256",
        "jsonConfiguration": "{\"publicKey\":\"XXXXXXXXXXXXXXXXXXXXX\",\"logsRootPath\":\"/kaa_log_uploads_new\",\"rollingFileNamePatern\":\"logFile.%d{yyyy-MM-dd}.log\",\"rollingMaxHistory\":30,\"triggerMaxFileSize\":\"1GB\",\"encoderPattern\":\"%-4relative [%thread] %-5level %logger{35} - %msg%n\"}",
        "maxLogSchemaVersion": 2147483647,
        "minLogSchemaVersion": 1,
        "name": "New file system appender",
        "pluginClassName": "org.kaaproject.kaa.server.appenders.file.appender.FileSystemLogAppender",
        "pluginTypeName": "File",
        "tenantId": "70"
    }

     

     

  • Sample call to edit log appender:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST -H 'Content-Type: application/json' -d'{"id":"256","pluginClassName": "org.kaaproject.kaa.server.appenders.file.appender.FileSystemLogAppender", "applicationId": "150", "applicationToken": "49263753185447091438", "jsonConfiguration": "{\"publicKey\":\"XXXXXXXXXXXXXXXXXXXXX\",\"logsRootPath\":\"/kaa_log_uploads_new\",\"rollingFileNamePatern\":\"logFile.%d{yyyy-MM-dd}.log\",\"rollingMaxHistory\":30,\"triggerMaxFileSize\":\"1GB\",\"encoderPattern\":\"%-4relative [%thread] %-5level %logger{35} - %msg%n\"}", "description": "New sample file system log appender v2", "headerStructure": [ "KEYHASH","TIMESTAMP" ], "name": "New file system appender", "maxLogSchemaVersion": 2147483647, "minLogSchemaVersion": 1, "tenantId": "70", "pluginTypeName": "File"}' "http://localhost:8080/kaaAdmin/rest/api/logAppender" | python -mjson.tool
    
    
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationId": "150",
        "applicationToken": "49263753185447091438",
        "confirmDelivery": true,
        "createdTime": 1423499281217,
        "createdUsername": "devuser",
        "description": "New sample file system log appender v2",
        "headerStructure": [
            "KEYHASH",
            "TIMESTAMP"
        ],
        "id": "256",
        "jsonConfiguration": "{\"publicKey\":\"XXXXXXXXXXXXXXXXXXXXX\",\"logsRootPath\":\"/kaa_log_uploads_new\",\"rollingFileNamePatern\":\"logFile.%d{yyyy-MM-dd}.log\",\"rollingMaxHistory\":30,\"triggerMaxFileSize\":\"1GB\",\"encoderPattern\":\"%-4relative [%thread] %-5level %logger{35} - %msg%n\"}",
        "maxLogSchemaVersion": 2147483647,
        "minLogSchemaVersion": 1,
        "name": "New file system appender",
        "pluginClassName": "org.kaaproject.kaa.server.appenders.file.appender.FileSystemLogAppender",
        "pluginTypeName": "File",
        "tenantId": "70"
    }

Delete log appender

Deletes a log appender by log appender ID. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/delLogAppender?logAppenderId
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    ParameterValueDescription
    logAppenderIdstringthe ID of the log appender to be deleted
  • Data params

    None

  • Success response:

    • Code: 200 

  • Error response:

    Status codesDescription
    400 Bad RequestThe logAppenderId parameter is empty
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the log appender does not match the Tenant ID of the authenticated user
    404 Not FoundA log appender with the specified logAppenderId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side

Sample call:

Code Block
languagejava
curl -v -S -u devuser:devuser123 -X POST "http://localhost:8080/kaaAdmin/rest/api/delLogAppender?logAppenderId=161" | python -mjson.tool

Verifiers

Get verifiers

Returns all verifiers for the specified application. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL 
    /kaaAdmin/rest/api/userVerifiers/{applicationId} 
  • Method

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    applicationIdstringThe ID of the application.
  • Data params

    None

  • Success response
    • Code: 200 

      Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      [
          {
              "applicationId": "150",
              "createdTime": 1423249191065,
              "createdUsername": "devuser",
              "description": null,
              "id": "240",
              "jsonConfiguration": "",
              "name": "Trustful verifier",
              "pluginClassName": "org.kaaproject.kaa.server.verifiers.trustful.verifier.TrustfulUserVerifier",
              "pluginTypeName": "Trustful verifier",
              "verifierToken": "66513032250392545773"
          }
      ]
      

       

  • Error response

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application does not match the Tenant ID of the authenticated user
    404 Not FoundAn application with the specified applicationId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/userVerifiers/70" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    [
        {
            "applicationId": "150",
            "createdTime": 1423249191065,
            "createdUsername": "devuser",
            "description": null,
            "id": "240",
            "jsonConfiguration": "",
            "name": "Trustful verifier",
            "pluginClassName": "org.kaaproject.kaa.server.verifiers.trustful.verifier.TrustfulUserVerifier",
            "pluginTypeName": "Trustful verifier",
            "verifierToken": "66513032250392545773"
        }
    ]
    

Get verifier

Returns a verifier by its ID. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to request this information.

  • URL
    /kaaAdmin/rest/api/userVerifier/{userVerifierId}
  • Method

    span
    alignleft
    classhighlight-body
    GET

  • URL params

    ParameterValueDescription
    applicationIdstringThe ID of the application.

     

  • Data params

    None

  • Success response

    • Code: 200 

      Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "applicationId": "150",
          "createdTime": 1423502227771,
          "createdUsername": "devuser",
          "description": "Sample description",
          "id": "266",
          "jsonConfiguration": "{\"app_id\":\"XXXXXXXXXXXX\",\"app_secret\":\"XXXXXXXXXXXXXXXXXXXXXXXXX\",\"max_parallel_connections\":100}",
          "name": "MyFacebookVerifier",
          "pluginClassName": "org.kaaproject.kaa.server.verifiers.facebook.verifier.FacebookUserVerifier",
          "pluginTypeName": "Facebook",
          "verifierToken": "42239328931924105569"
      }
      
      
      


  • Error response

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the log appender does not match the Tenant ID of the authenticated user
    404 Not FoundA user verifier with the specified userVerifierId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X GET "http://localhost:8080/kaaAdmin/rest/api/userVerifier/266" | python -mjson.tool
    
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationId": "150",
        "createdTime": 1423502227771,
        "createdUsername": "devuser",
        "description": "Sample description",
        "id": "266",
        "jsonConfiguration": "{\"app_id\":\"XXXXXXXXXXXX\",\"app_secret\":\"XXXXXXXXXXXXXXXXXXXXXXXXX\",\"max_parallel_connections\":100}",
        "name": "MyFacebookVerifier",
        "pluginClassName": "org.kaaproject.kaa.server.verifiers.facebook.verifier.FacebookUserVerifier",
        "pluginTypeName": "Facebook",
        "verifierToken": "42239328931924105569"
    }

Create/edit user verifier
Anchor
Create/edit user verifier
Create/edit user verifier

Creates or edits a user verifier. If the user verifier with the specified ID does not exist, it will be created. If the user verifier with the specified ID exists, it will be updated. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/userVerifier
  • Method

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    None

  • Data params

    Expand
    titleRequest body

    Example:

    Code Block
    languagejs
    {"pluginClassName": "org.kaaproject.kaa.server.verifiers.facebook.verifier.FacebookUserVerifier", "pluginTypeName":"Facebook", "applicationId": "150", "name":"MyFacebookVerifier","description": "Sample description", "jsonConfiguration": "{\"app_id\":\"XXXXXXXX\",\"app_secret\":\"XXXXXXXXXXXXXXXXXXXXXXX\", \"max_parallel_connections\":100}"}
  • Success response

    • Code: 200

      Expand
      titleResponse body

      Example:

      Code Block
      languagejs
      {
          "applicationId": "150",
          "createdTime": 1423500291744,
          "createdUsername": "devuser",
          "description": "Sample description",
          "id": "264",
          "jsonConfiguration": "{\"app_id\":\"XXXXXXXXXXXX\",\"app_secret\":\"XXXXXXXXXXXXXXXXXXXXXXXXX\",\"max_parallel_connections\":100}",
          "name": "MyFacebookVerifier",
          "pluginClassName": "org.kaaproject.kaa.server.verifiers.facebook.verifier.FacebookUserVerifier",
          "pluginTypeName": "Facebook",
          "verifierToken": "47494470873475333510"
      }
  • Error response

    Status codesDescription
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the log appender does not match the Tenant ID of the authenticated user
    404 Not FoundA user verifier to be edited with the specified id does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call to create user verifier

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST -H 'Content-Type: application/json' -d'{"pluginClassName": "org.kaaproject.kaa.server.verifiers.facebook.verifier.FacebookUserVerifier", "pluginTypeName":"Facebook", "applicationId": "150", "name":"MyFacebookVerifier","description": "Sample description", "jsonConfiguration": "{\"app_id\":\"5215235\",\"app_secret\":\"123424\", \"max_parallel_connections\":10}"}' "http://localhost:8080/kaaAdmin/rest/api/userVerifier" | python -mjson.tool
    
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationId": "150",
        "createdTime": 1423500291744,
        "createdUsername": "devuser",
        "description": "Sample description",
        "id": "264",
        "jsonConfiguration": "{\"app_id\":\"XXXXXXXXXXXX\",\"app_secret\":\"XXXXXXXXXXXXXXXXXXXXXXXXX\",\"max_parallel_connections\":100}",
        "name": "MyFacebookVerifier",
        "pluginClassName": "org.kaaproject.kaa.server.verifiers.facebook.verifier.FacebookUserVerifier",
        "pluginTypeName": "Facebook",
        "verifierToken": "47494470873475333510"
    }
  • Sample call to edit user verifier

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST -H 'Content-Type: application/json' -d'{"id":"264","pluginClassName": "org.kaaproject.kaa.server.verifiers.facebook.verifier.FacebookUserVerifier", "pluginTypeName":"Facebook", "applicationId": "150", "name":"MyFacebookVerifier v2","description": "Sample description", "jsonConfiguration": "{\"app_id\":\"5215235\",\"app_secret\":\"123424\", \"max_parallel_connections\":10}"}' "http://localhost:8080/kaaAdmin/rest/api/userVerifier" | python -mjson.tool
    
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationId": "150",
        "createdTime": 1423500301423,
        "createdUsername": "devuser",
        "description": "Sample description",
        "id": "264",
        "jsonConfiguration": "{\"app_id\":\"XXXXXXXXXXXX\",\"app_secret\":\"XXXXXXXXXXXXXXXXXXXXXXXXX\",\"max_parallel_connections\":100}",
        "name": "MyFacebookVerifier v2",
        "pluginClassName": "org.kaaproject.kaa.server.verifiers.facebook.verifier.FacebookUserVerifier",
        "pluginTypeName": "Facebook",
        "verifierToken": "47494470873475333510"
    }

Delete user verifier

Deletes a user verifier by the user verifier ID. Only users with the TENANT_DEVELOPER or TENANT_USER role are allowed to perform this operation.

  • URL 
    /kaaAdmin/rest/api/delUsererVerifier?userVerifierId
  • Method:

    span
    alignleft
    classhighlight-body
    POST

  • URL params

    ParameterValueDescription
    userVerifierIdstringThe ID of the user verifier to be deleted
  • Data params

    None

  • Success response
    • Code: 200
  • Error response

    Status codesDescription
    400 Bad RequestThe userVerifierId parameter is empty
    401 UnauthorizedThe user is not authenticated or invalid credentials were provided
    403 ForbiddenThe authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID of the application associated with the log appender does not match the Tenant ID of the authenticated user
    404 Not FoundA user verifier with the specified userVerifierId does not exist
    500 Internal Server ErrorAn unexpected error occurred on the server side
  • Sample call

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -X POST "http://localhost:8080/kaaAdmin/rest/api/delUserVerifier?userVerifierId=265" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationToken": "094302219096310",
        "id": "220",
        "logAppendersNames": "mongoDBLogAppender,fileSystemLogAppender",
        "name": "Application 1",
        "publicKey": null,
        "sequenceNumber": 0,
        "tenantId": "10",
        "userVerifierName": "dummyEndpointUserVerifier"
    }
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u devuser:devuser123 -F'notificationSchema={"applicationId":"71","name":"Test notification schema","description":"Notification Schema Description"};type=application/json' -F [email protected]_schema.json "http://localhost:8080/kaaAdmin/rest/api/notificationSchema" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "applicationId": "71",
        "createdTime": 1408706536184,
        "createdUsername": "devuser",
        "description": "Notification Schema Description",
        "endpointCount": 0,
        "id": "2131",
        "majorVersion": 2,
        "minorVersion": 0,
        "name": "Test notification schema",
        "schema": "{\n    \"type\": \"record\",\n    \"name\": \"TestNotification\",\n    \"namespace\": \"org.kaa.config.test\",\n    \"fields\": [\n        {\n            \"name\": \"message\",\n            \"type\": \"string\"\n        }\n    ]\n}",
        "type": "USER"
    }
  • Sample call:

    Code Block
    languagejava
    curl -v -S -u admin:admin123 -X POST -H 'Content-Type: application/json' -d'{"name":"Test Event Class Family","className":"TestClassFamily","description":"Test Class Family Description","namespace":"org.kaaproject.kaa.test.family"}' "http://localhost:8080/kaaAdmin/rest/api/eventClassFamily" | python -mjson.tool
    Expand
    titleExample result
    Code Block
    languagejs
    {
        "className": "TestClassFamily",
        "createdTime": 1409142604502,
        "createdUsername": "admin",
        "description": "Test Class Family Description",
        "id": "34",
        "name": "Test Event Class Family",
        "namespace": "org.kaaproject.kaa.test.family",
        "schemas": null,
        "tenantId": "10"
    }
userExternalId

Copyright © 2014-2015, CyberVision, Inc.