assignAlert

A Graze API POST request that assigns the specified user as the owner of the specified alert ID.

Back to Graze API EndPoint Reference.

Request arguments

Endpoint assignAlert takes the following request arguments:

Name

Type

Required

Description

auth_token

String

Yes

A valid auth_token returned from the authenticate request. See the authenticate endpoint for more information.

alert_id

Number

Yes

Alert ID.

user_id

Number

No, if you specify username.

ID of the user to be assigned as the owner of the alert. You must provide the user_id or the username.

username

String

No, if you specify user_id.

Username of the user to be assigned as the owner of the alert. You must provide the user_id or the username.

Response

Endpoint assignAlert returns the following response:

API update behavior

The behavior of this endpoint depends on whether the relevant alert or Situation is open, closed and still in the active database, or closed and archived to the historic database. This endpoint updates the alert or Situation as follows:

See API Update Behavior for more information on Situation statuses.

Examples

The following examples demonstrate typical use of endpoint assignAlert:

Request example

Example cURL request to username "network1" to alert ID 7:

curl -X POST -u graze:graze -k -v "https://localhost/graze/v1/assignAlert" -H "Content-Type: application/json; charset=UTF-8" -d '{"alert_id" : 7, "username" : "network1" }'

Response example