app.update
The app.update service is used to update an existing application token or fields associated to the token.
Requires Org-Admin rights.
TR50 Request
{
"put": {
"command": "app.update",
"params": {
"id":"500000000000000000000042",
"name": "myname",
"desc": "My application description",
"token": "qwertyasdf1234567890zxcvb",
"autoRegThingDefId": "",
"autoRegTags": ["", ""],
"autoRegSecTags": ["", ""],
"roles": ["", ""],
"isSuperAdmin": false,
"isSuperOps": false,
"isOrgAdmin": false,
"license": ""
}
}
}
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
id | String | Yes |
The object id for the application. id is required only when changing the name of the application |
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:
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 | ||
unset | Array | An array of fields to unset. All optional parameters are allowed to be unset. | |
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. |
TR50 Response
If the command is sent successfully a success message is returned. Otherwise, an error and error message will be returned.
{
"put": {
"success": true
}
}