app.create
The app.create service is used to create a new application token.
Requires Org-Admin rights.
TR50 Request
{
"put": {
"command": "app.create",
"params": {
"name": "myname"
}
}
}
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
name | String | Yes |
The name of the application token. Name must be unique for a current working organization. i.e. you cannot have more than one application with the same name within the same organization. |
desc | String | The description. | |
token | String | The token string. The token must meet the following complexity requirements:
The token is optional and will be automatically generated, if none is specified. |
|
autoRegThingDefId | String | ||
autoRegTags | Array | ||
autoRegSecTags | Array | ||
roles | Array | The ID of 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 | ||
restrictAccessToSelf | Boolean | Prevent applications and things using this app token from accessing any topic space other than for itself. Does not apply to applications granted Org-Admin permissions. |
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"
}
}
}