Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

opEvents CLI

opEvents CLI is now able to dynamically update events using the act=set parameter.

...

Code Block
CLI command : /usr/local/omk/bin/opevents-cli.pl  act=set event_id="672a9b95ad7949330256138a" entry.details="update event details" entry.level=Minor

opEvents API

opEvents API is now able to dynamically update events using a PATCH request.

...


This will update the Event with the given data.

Successful Response

HTTP Status

Body

Description

200 OK

JSON object with success message.
{"success":"Event successfully updated"}

The success property is set to “Event successfully updated” and only if the request was successful.

Bad Responses

HTTP Status

Payload example

Body

Description

400 Bad Request

/omk/opEvents/api/v1/events/672a9b95ad794933025xxxx

JSON object with error message.
{"error":"Empty input: Please provide the necessary data in the request body.","errorTitle":"Invalid Input"}

Invalid event id in API

400 Bad Request

empty payload

JSON object with error message.
{"error":"Empty input: Please provide the necessary data in the request body.","errorTitle":"Invalid Input"}

The error message is set to "Empty input: Please provide the necessary data in the request body."

opEvents CLI and API Validations

The opEvents CLI and API both follow a set of validation rules to maintain data integrity:

...