From 3be9f638f767d786db29e57c71f198d21b2bd8f3 Mon Sep 17 00:00:00 2001 From: inspurericzhang Date: Wed, 14 Sep 2022 04:09:06 +0000 Subject: [PATCH] sort api in index.rst & fix status code & add response json of two apis Change-Id: Iba1ed8ab01bb0a148e78beb388bccb3cacd93f1c --- api-ref/source/status.yaml | 4 ++-- api-ref/source/v1/api-versions.inc | 2 +- api-ref/source/v1/custom-config.inc | 2 +- api-ref/source/v1/index.rst | 4 ++-- api-ref/source/v1/search-analyse-logs.inc | 5 +---- api-ref/source/v1/search-instance-callchain.inc | 5 +---- api-ref/source/v1/search-instance-requestids.inc | 12 +++++++++++- api-ref/source/v1/search-logs-download.inc | 5 +---- api-ref/source/v1/search-logs.inc | 5 +---- api-ref/source/v1/search-typical-logs.inc | 12 +++++++++++- 10 files changed, 32 insertions(+), 24 deletions(-) diff --git a/api-ref/source/status.yaml b/api-ref/source/status.yaml index 81f8401..b3264f3 100644 --- a/api-ref/source/status.yaml +++ b/api-ref/source/status.yaml @@ -1,7 +1,7 @@ -0: +1: default: | Request was successful. -1: +0: default: | Request was successful, but no data caused by some reasons. -1: diff --git a/api-ref/source/v1/api-versions.inc b/api-ref/source/v1/api-versions.inc index 97dbfe9..19a66c6 100644 --- a/api-ref/source/v1/api-versions.inc +++ b/api-ref/source/v1/api-versions.inc @@ -15,7 +15,7 @@ Response codes .. rest_status_code:: success ../status.yaml - - 0 + - 1 .. rest_status_code:: error ../status.yaml diff --git a/api-ref/source/v1/custom-config.inc b/api-ref/source/v1/custom-config.inc index dd791ea..c9fa253 100644 --- a/api-ref/source/v1/custom-config.inc +++ b/api-ref/source/v1/custom-config.inc @@ -18,7 +18,7 @@ Response codes .. rest_status_code:: success ../status.yaml - - 0 + - 1 .. rest_status_code:: error ../status.yaml diff --git a/api-ref/source/v1/index.rst b/api-ref/source/v1/index.rst index d483a3c..f576fb0 100644 --- a/api-ref/source/v1/index.rst +++ b/api-ref/source/v1/index.rst @@ -15,8 +15,8 @@ OpenStack Log API V1 (CURRENT) .. search log document. .. include:: search-params.inc .. include:: search-logs.inc -.. include:: search-analyse-logs.inc .. include:: search-logs-download.inc -.. include:: search-instance-callchain.inc +.. include:: search-analyse-logs.inc .. include:: search-typical-logs.inc .. include:: search-instance-requestids.inc +.. include:: search-instance-callchain.inc diff --git a/api-ref/source/v1/search-analyse-logs.inc b/api-ref/source/v1/search-analyse-logs.inc index 45fc991..fb13d97 100644 --- a/api-ref/source/v1/search-analyse-logs.inc +++ b/api-ref/source/v1/search-analyse-logs.inc @@ -13,16 +13,13 @@ Search host_name, module_name,program_name,level more informations for all Venus Response codes -------------- -.. rest_status_code:: success ../status.yaml - - - 0 - .. rest_status_code:: success ../status.yaml - 1 .. rest_status_code:: error ../status.yaml + - 0 - -1 Response diff --git a/api-ref/source/v1/search-instance-callchain.inc b/api-ref/source/v1/search-instance-callchain.inc index fedef29..9368d78 100644 --- a/api-ref/source/v1/search-instance-callchain.inc +++ b/api-ref/source/v1/search-instance-callchain.inc @@ -13,16 +13,13 @@ Search nova-api, nova-conductor, nova-scheduler and nova-compute informations fo Response codes -------------- -.. rest_status_code:: success ../status.yaml - - - 0 - .. rest_status_code:: success ../status.yaml - 1 .. rest_status_code:: error ../status.yaml + - 0 - -1 Response diff --git a/api-ref/source/v1/search-instance-requestids.inc b/api-ref/source/v1/search-instance-requestids.inc index a30ce2d..3988eea 100644 --- a/api-ref/source/v1/search-instance-requestids.inc +++ b/api-ref/source/v1/search-instance-requestids.inc @@ -15,8 +15,18 @@ Response codes .. rest_status_code:: success ../status.yaml - - 0 + - 1 .. rest_status_code:: error ../status.yaml + - 0 - -1 + +Response +-------- + +**Example: JSON request** + + +.. literalinclude:: ./samples/search-log/search-instance-request-ids-show-response.json + :language: javascript diff --git a/api-ref/source/v1/search-logs-download.inc b/api-ref/source/v1/search-logs-download.inc index 89cf8a6..ae16138 100644 --- a/api-ref/source/v1/search-logs-download.inc +++ b/api-ref/source/v1/search-logs-download.inc @@ -13,16 +13,13 @@ Download the search logs of all Venus modules. Response codes -------------- -.. rest_status_code:: success ../status.yaml - - - 0 - .. rest_status_code:: success ../status.yaml - 1 .. rest_status_code:: error ../status.yaml + - 0 - -1 Response diff --git a/api-ref/source/v1/search-logs.inc b/api-ref/source/v1/search-logs.inc index d7798a1..d9b0698 100644 --- a/api-ref/source/v1/search-logs.inc +++ b/api-ref/source/v1/search-logs.inc @@ -13,16 +13,13 @@ List host_name, module_name,program_name,level more informations for all Venus m Response codes -------------- -.. rest_status_code:: success ../status.yaml - - - 0 - .. rest_status_code:: success ../status.yaml - 1 .. rest_status_code:: error ../status.yaml + - 0 - -1 Response diff --git a/api-ref/source/v1/search-typical-logs.inc b/api-ref/source/v1/search-typical-logs.inc index 689f0b8..4159aee 100644 --- a/api-ref/source/v1/search-typical-logs.inc +++ b/api-ref/source/v1/search-typical-logs.inc @@ -15,8 +15,18 @@ Response codes .. rest_status_code:: success ../status.yaml - - 0 + - 1 .. rest_status_code:: error ../status.yaml + - 0 - -1 + +Response +-------- + +**Example: JSON request** + + +.. literalinclude:: ./samples/search-log/search-typical-logs-show-response.json + :language: javascript