The "unlinkLabelsFromRecords" action removes one or more labels from one or more records in a table. It does not return an error if the specified labels are already removed from the specified records.
The operation is atomic. If it returns an error, the specified labels are not unlinked from the specified records unless some other operation had previously unlinked them. It is possible, though, for some other action to have already unlinked some or all of the specified labels to the specified records.
Request examples
Minimal
This unlinks the label "myLabel1" to records 1 and 2 from the table "my_table" owned by the default account and database .
{
"action": "unlinkLabelsFromRecords",
"params":
{
"labels": [ { "name": "myLabel1" } ],
"tableName": "my_table",
"ids": [1,2]
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}
Maximal
This example unlinks the labels "myLabel1" and "myLabel2" in group "myGroup" from records 1 and 2 in the table "my_table" owned by the "db" user in the "faircom" database .
{
"api": "db",
"action": "unlinkLabelsFromRecords",
"params":
{
"labels":
[
{
"group": "myGroup",
"name": "myLabel1"
},
{
"group": "myGroup",
"name": "myLabel2"
}
],
"databaseName": "faircom",
"ownerName": "db",
"tableName": "my_table",
"ids": [1,2],
"verifyLinks": true
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}
Request properties ("params")
| Property | Description | Default | Type | Limits (inclusive) |
|---|---|---|---|---|
labels |
The The
When using tag actions, the optional |
Required - No default value
Defaults to
|
array of objects |
1 or more label objects
Values are managed in the Label API with the group of |
|
labels .group |
The The The group name may contain up to 64 bytes of UTF-8 encoded characters. 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 |
|
labels .name |
The The The
|
Required - No default value | string | 1 to 64 bytes |
databaseName |
The You specify this property when you want to use a different database instead of the default. This property is useful because objects, such as tables and code packages, can have the same name in multiple databases. This feature allows you to create multiple environments in the same server and reuse the same JSON actions in each environment. For example, you can create It is an error to set If no default database is specified during |
Defaults to the session's "defaultDatabaseName" property |
string | 1 to 64 bytes |
ownerName |
The You specify this property when you want to use a different account instead of the default. Your session's account must have the appropriate privileges to access the code package. This property is useful because objects, such as tables and code packages, can have the same name in the same database as long as different accounts own each object. This feature allows you to create duplicate objects for different users on the same server and reuse the same JSON actions on those objects. For example, an administrator can copy objects from a production environment to her account so she can troubleshoot an issue using the same JSON actions, JavaScript, and SQL code. It is an error to set If no default owner is specified during |
Optional with default of the session's "defaultOwnerName" property |
string | 1 to 64 bytes |
tableName |
The See table name in System specifications for the table naming requirements and limitations.
"params": {
"tableName": "ctreeTable"
} |
Required - No default value | string | 1 to 64 bytes |
ids |
An
|
Automatically generated by the server | array of integers | Each array item is an integer from 0 to 2147483647
|
verifyLinks |
The |
Optional with default of true
|
Boolean |
|