Individual action items are added to each alert actions list.
This adds an alert action to an existing alert actions group.
Example Request:
POST /api/alert/v1/actions/actions-001 HTTP/1.1
Host: zfssa.example.com:215
X-Auth-Session: uerqghq84vbdv
Content-Type: application/json
Content-Length: 68
{"address": "Joe.Admin@acme.com", "handler": "email", "subject":"CPU Busy"}
Example Response:
HTTP/1.1 201 Created
X-Zfssa-Appliance-Api: 1.0
Content-Type: application/json
Content-Length: 177
Location: /api/alert/v1/actions/actions-001/action-001
{
"action": {
"href": "/api/alert/v1/actions/actions-001
/action-001",
"handler": "email",
"address": "Joe.Admin@acme.com",
"subject": "CPU Busy"
}
}
This modifies an existing alert action.
Example Request:
PUT /api/alert/v1/actions/actions-001/action-000 HTTP/1.1
Host: zfssa.example.com:215
X-Auth-Session: uerqghq84vbdv
Content-Type: application/json
Content-Length: 28
{"address": "Joseph.Admin@acme.com"}
Example Response:
HTTP/1.1 202 Accepted
X-Zfssa-Appliance-Api: 1.0
Content-Type: application/json
Content-Length: 176
X-Zfssa-Version: jkremer/generic@2013.06.08,1-0
{
"action": {
"href": "/api/alert/v1/actions/actions-001
/action-000",
"handler": "email",
"address": "Joseph.Admin@acme.com",
"subject": "CPU Busy"
}
}
For a given alert action, a single action can be deleted. To delete an action, you send a DELETE request to the action href property.
Example Request to Delete an Action:
DELETE /api/alert/v1/actions/actions-001/action-000 HTTP/1.1 Host: zfssa.example.com:215 X-Auth-Session: uerqghq84vbdv HTTP/1.1 204 No Content