Merge "Add request sample of API 'add anomaly rule"

This commit is contained in:
Zuul 2023-09-14 06:56:30 +00:00 committed by Gerrit Code Review
commit 4034c2067d
2 changed files with 11 additions and 1 deletions

View File

@ -7,7 +7,7 @@ Users can add, delete, modify and query anomaly rules, query and delete anomaly
Add anomaly rule
~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~
.. rest_method:: POST /v1/anomaly/rule
@ -24,6 +24,12 @@ Request
- log_type: rule_log_type
- module: rule_module
**Example Add Anomaly rule request:**
.. literalinclude:: ./samples/anomaly-detect/add-anomaly-rule-request-curl.json
:language: javascript
Response codes
--------------

View File

@ -0,0 +1,4 @@
curl -X POST "http://10.49.38.57:10010/v1/anomaly/rule" \
-d '{"title": "test", "desc":"test", "keyword": "out of memory", "log_type":"flog", "module":"nova"}'
-H 'X-Auth-Token: 124'
-H 'Content-type: application/json'