Go to main content
Guide RESTful API des systèmes Oracle® ZFS Storage Appliance, version OS8.6.x

Quitter la vue de l'impression

Mis à jour : Septembre 2016
 
 

Eléments d'action d'alerte

Des éléments d'action d'alerte individuels sont ajoutés à chaque liste d'actions d'alerte.

Create Alert Action

Cette commande permet d'ajouter une action d'alerte à un groupe d'actions d'alerte existant.

Exemple de demande :

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"}

Exemple de réponse :

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"
    }
}

Modify Alert Action

Cette commande permet de modifier une action d'alerte existante.

Exemple de demande :

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"}

Exemple de réponse :

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"
    }
}

Delete Alert Action Item

Vous pouvez supprimer une seule action d'alerte pour une action d'alerte donnée. Pour supprimer une action, envoyez une demande DELETE à la propriété href de l'action.

Exemple de demande de suppression d'une 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