ves-io-schema-infraprotect-CustomEventDetailsAPI-EditEventDetail

Examples of performing infraprotect CustomEventDetailsAPI EditEventDetail

Usecase:

Edit a single event detail

Request:

Request using vesctl:

vesctl request rpc infraprotect.CustomEventDetailsAPI.EditEventDetail -i request.yaml --uri /public/namespaces/system/infraprotect/event/f04417fd-df0e-404d-ac8e-2008d7646c3d/detail/d19f3be2-5dd8-4ca4-b3aa-413790ea2043 --http-method PUT

where file request.yaml has following contents:

description: new description
namespace: system
time: "2022-01-12T14:47:30.714623600Z"
title: new title

vesctl yaml response:

detail:
  creator: user1
  description: new description
  id: d19f3be2-5dd8-4ca4-b3aa-413790ea2043
  time: "2022-01-12T14:47:30.714623600Z"
  title: new title

Request using curl:

curl -X 'PUT' -d '{"namespace":"system","title":"new title","description":"new description","time":"2022-01-12T14:47:30.714623600Z"}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build038462651_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/infraprotect/namespaces/system/infraprotect/event/f04417fd-df0e-404d-ac8e-2008d7646c3d/detail/d19f3be2-5dd8-4ca4-b3aa-413790ea2043'

curl response:

HTTP/1.1 200 OK
Content-Length: 204
Content-Type: application/json
Date: Wed, 12 Jan 2022 14:48:49 GMT
Vary: Accept-Encoding

{
  "detail": {
    "id": "d19f3be2-5dd8-4ca4-b3aa-413790ea2043",
    "title": "new title",
    "description": "new description",
    "creator": "user1",
    "time": "2022-01-12T14:47:30.714623600Z"
  }
}