app.create

The app.create service is used to create a new application token.

Requires Org Admin.

TR50 Request

{
  "put": {
    "command": "app.create",
    "params": {
      "name": "myname"
    }
  }
}

Request Parameters

Name Type Required Description
name String Yes The name of the application token.
desc String The description.
token String The token string. The token must meet the following complexity requirements:
  • Minimum 16 characters.
  • Must contain at least one capital letter (A-Z).
  • Must contain at least one lower case letter (a-z).
  • Must contain at least one digit (0-9).

The token is optional and will be automatically generated, if none is specified.

autoRegThingDefId String
autoRegTags Array
autoRegSecTags Array
roles Array The roles granted to the application during execution.
isSuperAdmin Boolean If the application should run with SuperAdmin permissions.
isSuperOps Boolean If the application should run with SuperOps permissions.
isOrgAdmin Boolean If the application should run with Org-Admin permissions.
license String

All apps must have:

  • an array with roles specifying what commands the app can execute.

Or, one of the following fields must be set to true:

  • isSuperAdmin, you must have Super Administrator access to set this field.
  • isSuperOps, you must have at least Super Ops access to set this field.
  • isOrgAdmin, you must have at least Org Admin access to set this field.

TR50 Response

If the command is sent successfully a success message and the object id is returned. Otherwise, an error and error message will be returned.

{
  "put": {
    "success": true,
    "params": {
      "id": "500000000000000000000042"
    }
  }
}