GET requests for getting information about tags:
POST requests to change settings:
Note that the tags assigned to users are used only if authentication is
switched on. When authentication is disabled the tags defined by the
default_user_tags
configuration parameter are used by the REST
layer.
Definition
Example request
| curl -X GET "http://127.0.0.1:8080/api/tags"
|
Example response
| ["CustomTag", "alarm", "dev", "metric", "op"]
|
Returns
A minimal list of known tags that can be assigned to users or be used to reload
only the current view on the WombatOAM Dashboard. It excludes object attributes,
such as alarm IDs, but includes custom tags, data type tags (e.g. "alarm"
and
"metric"
) and the tags announced by the plugins, which are "dev"
and "op"
by default.
Definition
| GET /api/tags/user/USERNAME
|
Example request
| curl -X GET "http://127.0.0.1:8080/api/tags/user/admin"
|
Example response
Arguments
Argument |
Description |
UserName |
The username of the user. If it is not given, the username of the current user will be used. |
Returns
If the user exists either the list of tags set for the given user, or the
"all"
string is returned. The latter means no filtering is switched on for the
user. In case of an error (e.g. the user doesn't exist), the
{error, REASON_STR}
object is returned.
Definition
Example request
| curl -X POST "http://127.0.0.1:8080/api/tags/user" \
-H "Content-Type: application/json" \
-d '{"UserName": "admin", "tags": ["dev", "op"]}'
|
Example response
Arguments
Argument |
Description |
UserName |
Required. The username of the user. |
tags |
Required. Either the list of tags that should be set for the given user, or the "all" string to switch filtering off. |
Returns
Either an "ok"
string or the {error, REASON_STR}
object that describes the
reason of the failure.