Only include properties you want to modify. Properties that you omit remain unchanged.
Request examples
Minimal
{
"action": "alterLabel",
"params": {
"name": "mylabelName"
}
}Typical example changing all properties except "group" and "name"
{
"api": "admin",
"action": "alterLabel",
"params": {
"group": "product/color/",
"name": "myLabel2",
"value": 99,
"enum": 1,
"sequence": 3.2,
"deprecated": false,
"description": "My label description.",
"metadata": {"myKey": "myValue"}
},
"authToken": "replaceWithAuthTokenFromCreateSession",
"requestId": "2",
"debug": "none"
}Maximal using "group" and "name"
The "group" and "name" properties identify the label. The "newGroup" property renames the group, and the "newName" property renames the label.
This example changes all values of a label, including "enum", "sequence", "deprecated", "description", and "metadata". It deprecates a label by setting "deprecated" to true.
{
"api": "admin",
"action": "alterLabel",
"params": {
"group": "myLabelGroupName",
"name": "mySecondLabelName",
"newGroup": "new group name",
"newName": "new label name must be unique in the label's group",
"enum": 1,
"sequence": "3.14",
"deprecated": true,
"description": "new label description",
"metadata": { "new": "metadata" }
},
"authToken": "replaceWithAuthTokenFromCreateSession",
"apiVersion": "1.0",
"requestId": "3",
"debug": "max"
}Using "id"
The "id" property identifies the label. The "newGroup" property renames the group, and the "newName" property renames the label. It undeprecates a label by setting "deprecated" to false.
{
"api": "admin",
"action": "alterLabel",
"params": {
"id": 1,
"newGroup": "my group name",
"newName": "my label name must be unique in the label's group",
"deprecated": false
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}
Response example
Minimal
{
"result": {
"id": 1,
"group": "my group name",
"name": "my label name must be unique in the label's group",
"value": {
"new": "metadata"
},
"enum": 1,
"sequence": "3.14",
"deprecated": true,
"description": "new label description",
"metadata": { "new": "metadata" }
},
"authToken": "authToken",
"debugInfo": {},
"errorCode": 0,
"errorMessage": ""
}Request properties ("params")
| Property | Description | Default | Type | Limits (inclusive) |
|---|---|---|---|---|
deprecated |
The "deprecated" property optionally deprecates a label. Set it to true to deprecate a label and false to preserve it. Deprecating a label is similar to marking a label as deleted. |
Optional with default of false
|
Boolean |
|
description |
The "description" property describes objects such as code packages, labels, or things. The server indexes this field with a full-text index so that you can search for any word or phrase. You cannot use this property for filtering in the Thing API. |
Optional with default of
|
string |
0 to 65,500 bytes 1 to 512 bytes for the Thing API |
enum |
The
|
Optional with default of 0
|
smallint |
-32768 to 32767
|
group |
The The The group name may contain up to 64 bytes of UTF-8 encoded characters. If the When you assign a group name to a label, the server automatically checks if the group name exists in the list of groups that the
|
Optional with default of ""
|
string | 1 to 64 bytes |
id |
The
|
Automatically generated by the server | integer |
|
metadata |
The "metadata" property contains user-defined properties that add keywords and tags about the code package. The server indexes this field with a full-text index so you can search for any word or phrase to find code packages. |
Optional with default of {}
|
object | 0 or more key/value pairs |
name |
The The The
|
Required - No default value | string | 1 to 64 bytes |
newGroup |
The |
Optional with default of null
|
string | 1 to 64 bytes |
newName |
The "newName" property assigns a new label name to an existing label or table. It defaults to null, which means the action does not change the label's or table's name. |
Optional with default of null
|
string | 1 to 64 bytes |
sequence |
The |
Optional with default of 0
|
double | Any floating point or integer number. |
Response properties ("result")
| Property | Description | Default | Type |
|---|---|---|---|
id |
The |
integer |
|
group |
The The If the When you assign a group name to a label, the server automatically checks whether the group name exists in the list of groups returned by the "listLabelGroups" action. If the group name does not exist, the server adds it to the list. When you rename a group assigned to a label, the server automatically adds a new group name to the list and removes the previous group name if no other label uses it.
|
string | 1 to 64 bytes |
name |
The The The
|
string | 1 to 64 bytes |
value |
The
When you use the |
JSON | 0 to 65,500 bytes |