Nodes/health/config/webhook/deleteEventWebhook: DELETE

Deletes an existing webhook event URL.

Availability

Available on all IBM Storage Scale editions.

Description

The DELETE nodes/health/config/webhook/deleteEventWebhook request deletes an existing webhook event URL. For more information about the fields in the data structures that are returned, see mmhealth command.

Request URL

https://<IP address or host name of API server>:<port>scalemgmt/v2/nodes/health/config/webhook/deleteEventWebhook

Request headers

Content-Type: application/json
Accept: application/json

Request data

{
  "webhookurl": "string"
}

The details of the parameters are provided in the following list.

"webhookurl: "Event URL"
The webhook event URL that must be deleted.

Response data

{
  "jobs": [
    {
      "jobId": "Job ID",
      "status": "RUNNING | COMPLETED | FAILED",
      "submitted": "Date and Time",
      "completed": "Date and Time",
      "runtime": "Duration",
      "request": {
        "type": "POST | GET | PUT | DELETE",
        "url": "URL"
      },
      "result": {
         "progress" [],
         " commands" [],
         " stdout" [] ,
       },
       "pids": [],
    }
  ],
  "status": {
    "code": "Return Code",
    "message": "Return Message."
  }
}

For more information about the fields in the following data structures, see the link at the end of the topic.

"jobs":
An array of elements that describe jobs. Each element describes one job.
"jobId": "ID",
The unique ID of the job.
"status": RUNNING | COMPLETED | FAILED
Return status.
"submitted": "Time"
The date and time at which the job was submitted.
"completed": "Time"
The date and time at which the job was completed.
"runtime": "Time"
The duration for which the job ran.
"request"
The request details.
"type": "GET | POST | PUT | DELETE "
The HTTP request type.
URL
The URL through which the job was submitted.
result
The request result.
"progress": "string"
Progress information for the request.
"commands": "Array"
The array of commands that are run in this job.
"stdout": "string"
CLI messages from stdout.
"pids": "Process ID"
The process IDs of all the active sub processes that manage the job.
status
The status of the request message.
"message": "ReturnMessage",
The return message.
"code": ReturnCode
The return code.

Examples

The following API command deletes the webhook event URL http://www.ibm.com.

Request URL:
curl -X DELETE --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Basic YWRtaW46YWRtaW4wMDE=' -d '{ \ "webhookurl": "http://www.ibm.com" \ }' '
'https://198.51.100.1:443/scalemgmt/v2/nodes/health/config/webhook/deleteEventWebhook'
The request URL with no field or filter parameter returns only the details that uniquely identify the object.
Response data:
Note: In the JSON data that is returned, the return code indicates whether the command is successful. The response code 200 indicates that the command successfully retrieved the information. Error code 400 represents an invalid request and 500 represents internal server error.
{
    "jobs": [
        {
            "jobId": 1000000000003,
            "status": "COMPLETED",
            "submitted": "2021-05-03 01:55:41,033",
            "completed": "2021-05-03 01:55:41,450",
            "runtime": 417,
            "request": {
                "type": "DELETE",
                "url": "/scalemgmt/v2/nodes/health/config/webhook/deleteEventWebhook"
            },
            "result": {
                "progress": [],
                "commands": [
                    "mmhealth config webhook remove 'http://www.ibm.com' "
                ],
                "stdout": [
                    "Webhook URL http://www.ibm.com successfully removed from health event monitoring",
                    "info: Webhook URL http://www.ibm.com successfully removed from health event monitoring\n"
                ],