ves-io-schema-graph-infraprotect-CustomAPI-MitigationZoneQuery
Examples of performing infraprotect CustomAPI MitigationZoneQuery
Usecase:
Get data for mitigation zone
Request:
Request using vesctl:
vesctl request rpc infraprotect.CustomAPI.MitigationZoneQuery -i request.yaml --uri /public/namespaces/system/graph/infraprotect/mitigation/5b931eb7-9a63-49b4-add9-31a7f396d19d --http-method POST
where file request.yaml has following contents:
endTime: "1580407200"
namespace: system
startTime: "1580403600"
zoneUuid: 5b931eb7-9a63-49b4-add9-31a7f396d19d
vesctl yaml response:
bps:
- name: passed
values:
- timestamp: 1591545000000
value: "2450237971"
- timestamp: 1591545600000
value: "2372238506"
- timestamp: 1591546200000
value: "2380032746"
- name: dropped
values:
- timestamp: 1591545000000
value: "0"
- timestamp: 1591545600000
value: "150000"
- timestamp: 1591546200000
value: "0"
pps:
- name: passed
values:
- timestamp: 1591545000000
value: "2450237971"
- timestamp: 1591545600000
value: "2372238506"
- timestamp: 1591546200000
value: "2380032746"
- name: dropped
values:
- timestamp: 1591545000000
value: "0"
- timestamp: 1591545600000
value: "150000"
- timestamp: 1591546200000
value: "0"
Request using curl:
curl -X 'POST' -d '{"namespace":"system","zone_uuid":"5b931eb7-9a63-49b4-add9-31a7f396d19d","start_time":"1580403600","end_time":"1580407200"}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_2__8qnt6fwd5dvglr1xqq6l8b7w0000gp_T_go-build2604632300_b001_apidocs.test/host=C02FN35BMD6R/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/infraprotect/namespaces/system/graph/infraprotect/mitigation/5b931eb7-9a63-49b4-add9-31a7f396d19d'
curl response:
HTTP/1.1 200 OK
Content-Type: application/json
Date: Fri, 03 Nov 2023 15:25:16 GMT
Vary: Accept-Encoding
{
"bps": [
{
"name": "passed",
"values": [
{
"timestamp": 1591545000000,
"value": "2450237971",
"trend_value": null
},
{
"timestamp": 1591545600000,
"value": "2372238506",
"trend_value": null
},
{
"timestamp": 1591546200000,
"value": "2380032746",
"trend_value": null
}
]
},
{
"name": "dropped",
"values": [
{
"timestamp": 1591545000000,
"value": "0",
"trend_value": null
},
{
"timestamp": 1591545600000,
"value": "150000",
"trend_value": null
},
{
"timestamp": 1591546200000,
"value": "0",
"trend_value": null
}
]
}
],
"pps": [
{
"name": "passed",
"values": [
{
"timestamp": 1591545000000,
"value": "2450237971",
"trend_value": null
},
{
"timestamp": 1591545600000,
"value": "2372238506",
"trend_value": null
},
{
"timestamp": 1591546200000,
"value": "2380032746",
"trend_value": null
}
]
},
{
"name": "dropped",
"values": [
{
"timestamp": 1591545000000,
"value": "0",
"trend_value": null
},
{
"timestamp": 1591545600000,
"value": "150000",
"trend_value": null
},
{
"timestamp": 1591546200000,
"value": "0",
"trend_value": null
}
]
}
]
}