Tags
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.
Get all available tags
Section titled “Get all available tags”Definition
Section titled “Definition”GET /api/tagsExample request
Section titled “Example request”curl -X GET "http://127.0.0.1:8080/api/tags" -u admin:PASSWORDExample response
Section titled “Example response” ["CustomTag", "alarm", "dev", "metric", "op"]Returns
Section titled “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.
Get the active tags set for a user
Section titled “Get the active tags set for a user”Definition
Section titled “Definition”GET /api/tags/user/USERNAMEExample request
Section titled “Example request”curl -X GET "http://127.0.0.1:8080/api/tags/user/admin" -u admin:PASSWORDExample response
Section titled “Example response” ["dev", "op"]Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
| UserName | The username of the user. If it is not given, the username of the current user will be used. |
Returns
Section titled “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.
Change the tags set for a user
Section titled “Change the tags set for a user”Definition
Section titled “Definition”POST /api/tags/userExample request
Section titled “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"]}' \ -u admin:PASSWORDExample response
Section titled “Example response”"ok"Arguments
Section titled “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
Section titled “Returns”Either an "ok" string or the {error, REASON_STR} object that describes the
reason of the failure.
