LabelService Resource
GET /v1/label/search
Performs a search using the regular expression in 'expression' to find matching labels.
| name | type | description | constraints |
|---|---|---|---|
| auth-token | header | The authentication token. | |
| expression | query | The regular expression to be used for finding labels. | |
| include_system_labels | query | Set to true to include system labels. Default is to exclude system labels. See https://wiki.alkit.se/wice256/index.php/Labels#System_labels for more information about system labels. | boolean |
| must_be_in_use | query | Set to true to search among labels that are in use in any resource. Default is true. | boolean |
| code | condition |
|---|---|
| 401 | If no or an invalid authentication token is supplied. |
| 400 | If 'expression' is empty. |
| media type | data type | description |
|---|---|---|
| application/json | array of string (JSON) | A list of matching labels. |
Example
Request
GET /v1/label/search
Content-Type: */*
Accept: application/json
auth-token: ...
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
...
POST /v1/label/search/associations/wcu
Returns all WCUs matching the given LabelMatch object.
| name | type | description |
|---|---|---|
| auth-token | header | The authentication token. |
| media type | data type | description |
|---|---|---|
| application/json | LabelMatch (JSON) | The label match object. |
| code | condition |
|---|---|
| 412 | If a provided label does not exist in the system. |
| 401 | If no or an invalid authentication token is supplied. |
| media type | data type | description |
|---|---|---|
| application/json | array of string (JSON) | a distinct list of wcu identifiers. |
Example
Request
POST /v1/label/search/associations/wcu
Content-Type: application/json
Accept: application/json
auth-token: ...
{
"matchOperator" : "ANY",
"labelCriteria" : [ {
"label" : "Location",
"value" : "^GOT$"
}, {
"label" : "Project",
"value" : "ABC"
} ]
}
Response
HTTP/1.1 201 Created
Content-Type: application/json
[ "04-1B-94-00-0D-17", "04-1B-94-00-0C-CD", "04-1B-94-00-0C-A3" ]