Skip to main content

Event management service

The event management service provides resources for updating existing events, either with new status information or with text annotations. To create an event, use the create events resource of the data receiver service.

Resource list

POST /v1/event-management/annotate

Create or update the annotation field of one or more events.

To create an event, use the create events resource.

Note

To obtain values for the annotations.occurrenceId and annotations.annotationId fields, display the details of the event to annotate in an events console.

Request template

JSON requests to create or update one event annotation:

Create annotation

 {
  "annotations": [
    {
      "eventId": "<event-id>",
      "occurrenceId": "<occurence-id>",
      "annotation": "<annotation>"
    }
  ]
}

Update annotation

 {
  "annotations": [
    {
      "eventId": "<event-id>",
      "occurrenceId": "<occurence-id>",
      "annotationId": "<annotation-id>",
      "annotation": "<annotation>"
    }
  ]
}

Request fields

Field

Type

Required

Description

annotations

Array

Yes

One or more event annotation specifications.

annotations.eventId

String

Yes

The identifier of an event.

annotations.occurrenceId

String

Yes

The occurrence identifier of an event.

annotations.annotationId

String

No

The identifier of an event annotation. For updates, this field is required.

annotations.annotation

String

No

The text of an annotation. For updates, the content of this field replaces the existing content of an event annotation, if any.

Status codes

Code

Description

200

Success. The request was processed. Check the response body for per-item results when processing multiple objects.

401

Unauthorized. The API key is missing or invalid.

Example

Request example

 curl https://YOUR-API-ENDPOINT/v1/event-management/annotate \
  -H "content-type: application/json" \
  -H "zenoss-api-key: YOUR-API-KEY" \
  -X POST -s -S -d \
'{
  "annotations": [
    {
      "eventId": "AAAABWRDWOPER3lzOFI2tSCG49g=",
      "occurrenceId": "AAAABWRDWOPER3lzOFI2tSCG49g=:1",
      "annotation": "my sample annotation"
    },
    {
      "eventId": "AAAEDBRDWOPER3lzOFI2tSCG49g=",
      "occurrenceId": "GOLABWRDWOPER3lzOFI2tSCG49g=:16",
      "annotationId": "4cVf7RnzENAbMLXdt8Qu",
      "annotation": "my sample annotation update"
    }
  ]
}'

Response example

 {
  "annotationResponses": [
    {
      "eventId": "AAAABWRDWOPER3lzOFI2tSCG49g=",
      "occurrenceId": "AAAABWRDWOPER3lzOFI2tSCG49g=:1",
      "annotationId": "3BDeyX0rnToJgKvEEaPk",
      "success": true
    },
    {
      "eventId": "AAAEDBRDWOPER3lzOFI2tSCG49g=",
      "occurrenceId": "GOLABWRDWOPER3lzOFI2tSCG49g=:16",
      "success": true
    }
  ]
}
POST /v1/event-management/status

Update the status of one or more events.

To create an event, use the create events resource.

Note

To obtain values for the statuses.occurrenceId and statuses.annotationId fields, display the details of the event to update in an events console.

Request template

JSON requests to update event status information:

Status update

 {
  "statuses": [
    {
      "eventId": "<event-id>",
      "occurrenceId": "<occurence-id>",
      "statusWrapper": {
        "status": "<status>"
      }
    }
  ]
}

Set acknowledgement status

 {
  "statuses": [
    {
      "eventId": "<event-id>",
      "occurrenceId": "<occurence-id>",
      "acknowledged": <boolean>
    }
  ]
}

Request fields

Field

Type

Required

Description

statuses

Array

Yes

One or more event status specifications.

statuses.eventId

String

Yes

The identifier of an event.

statuses.occurrenceId

String

Yes

The occurrence identifier of an event.

statuses.acknowledged

Boolean

No

The acknowledgement state of the event, acknowledged (true) or not acknowledged (false). This field or the statuses.statusWrapper field must be included in a request. Default = false.

statuses.statusWrapper

Object

No

A container for a statuses.statusWrapper.status string. This field or the statuses.acknowledged field must be included in a request.

statuses.statusWrapper.status

String

No

The status of the event.

  • STATUS_DEFAULT - Unknown at this time

  • STATUS_OPEN - Known to be in progress at this time

  • STATUS_SUPPRESSED - Should be ended

  • STATUS_CLOSED - Known to be ended

Status codes

Code

Description

200

Success. The request was processed. Check the response body for per-item results when processing multiple objects.

401

Unauthorized. The API key is missing or invalid.

Example

Request example

 curl https://YOUR-API-ENDPOINT/v1/event-management/status \
  -H "content-type: application/json" \
  -H "zenoss-api-key: YOUR-API-KEY" \
  -X POST -s -S -d \
'{
  "statuses": [
    {
      "eventId": "AAAABWRDWOPER3lzOFI2tSCG49g=",
      "occurrenceId": "AAAABWRDWOPER3lzOFI2tSCG49g=:1",
      "acknowledged": true
    },
    {
      "eventId": "AAAAEVBDWOPER3lzOFI2tSCG49g=",
      "occurrenceId": "AAAABFNJDWOPER3lzOFI2tSCG49g=:134",
      "statusWrapper": {
        "status": "EM_STATUS_SUPPRESSED"
      }
    }
  ]
}'

Response example

 {
  "statusResponses": [
    {
      "eventId": "AAAABWRDWOPER3lzOFI2tSCG49g=",
      "occurrenceId": "AAAABWRDWOPER3lzOFI2tSCG49g=:1",
      "success": true
    },
    {
      "eventId": "AAAAEVBDWOPER3lzOFI2tSCG49g=",
      "occurrenceId": "AAAABFNJDWOPER3lzOFI2tSCG49g=:134",
      "success": true
    }
  ]
}