Notes - Setting

Input:

opsview_rest --token-file /path/to/opsview_restapi_token --data-format=json --pretty PUT /rest/notes/host/7 --data='{ "note" : "New host note" }'

Returns:

{
   "id" : "7",
   "note" : "New host note",
   "writeable" : "1"
}

To clear a note, set note to an empty string.

There will be an error if no note parameter is set.

Below is an example:

opsview_rest --token-file /path/to/opsview_restapi_token --data-format=json --pretty PUT /rest/notes/host/7 --data='{ "note" : "<p>TEST1111</p>" }'
{
    {
        "id" : "7",
        "note" : "<p>TEST1111</p>",
        "writeable" : "1"
    }
}

Note

For more information on how to generate and use the token file, see opsview_rest documentation.
["Opsview On-Premises"] ["API", "Technical Reference"]

Was this topic helpful?