forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Wang , Deng Ke <wangdengke2@huawei.com> Co-committed-by: Wang , Deng Ke <wangdengke2@huawei.com>
188 lines
15 KiB
HTML
188 lines
15 KiB
HTML
<a name="dds_api_0099"></a><a name="dds_api_0099"></a>
|
|
|
|
<h1 class="topictitle1">Obtaining the Audit Log List</h1>
|
|
<div id="body0000001072196454"><div class="section" id="dds_api_0099__section4850156117316"><h4 class="sectiontitle">Function</h4><p id="dds_api_0099__p3631239417316">This API is used to obtain an audit log list.</p>
|
|
</div>
|
|
<div class="section" id="dds_api_0099__section28961517113719"><h4 class="sectiontitle">URI</h4><ul id="dds_api_0099__ul3084351717316"><li id="dds_api_0099__li915620217316">URI format<p id="dds_api_0099__p12959320171311"><a name="dds_api_0099__li915620217316"></a><a name="li915620217316"></a>GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/auditlog?start_time={start_time}&end_time={end_time}&offset={offset}&limit={limit}</p>
|
|
</li><li id="dds_api_0099__li9912141165910">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dds_api_0099__table5812191010574" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="dds_api_0099__row1081011065715"><th align="left" class="cellrowborder" valign="top" width="24%" id="mcps1.3.2.2.2.1.2.4.1.1"><p id="dds_api_0099__p19810111015719">Name</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="24.9%" id="mcps1.3.2.2.2.1.2.4.1.2"><p id="dds_api_0099__p78101910145713">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="51.1%" id="mcps1.3.2.2.2.1.2.4.1.3"><p id="dds_api_0099__p28109107574">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dds_api_0099__row28101910135714"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="dds_api_0099__p1581031011572">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.9%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="dds_api_0099__p1381091095717">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="51.1%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="dds_api_0099__p1681031015579">Specifies the project ID of a tenant in a region.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dds_api_0099__row16811181014577"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="dds_api_0099__p1181010107577">instance_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.9%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="dds_api_0099__p3810151016571">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="51.1%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="dds_api_0099__p148114105575">Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dds_api_0099__row15811110105719"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="dds_api_0099__p208111310115717">node_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.9%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="dds_api_0099__p1481111108576">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="51.1%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="dds_api_0099__p168111010195716">Specifies the ID of the node whose audit logs are to be queried.</p>
|
|
<p id="dds_api_0099__p08112101578">If this parameter is not transferred, the audit logs of all nodes are queried by default. The audit logs of cluster instances are distributed on mongos nodes.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dds_api_0099__row1781121012575"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="dds_api_0099__p198111010205715">start_time</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.9%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="dds_api_0099__p98111010135713">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="51.1%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="dds_api_0099__p581118101572">Specifies the start time. The format of the start time is "yyyy-mm-ddThh:mm:ssZ".</p>
|
|
<p id="dds_api_0099__p178111310185718"><strong id="dds_api_0099__b1048791042211">T</strong> is the separator between the calendar and the hourly notation of time. <strong id="dds_api_0099__b848912108228">Z</strong> indicates the time zone offset.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dds_api_0099__row0811171012574"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="dds_api_0099__p168111310105710">end_time</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.9%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="dds_api_0099__p1781131011572">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="51.1%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="dds_api_0099__p1981101014572">Specifies the end time. The format of the end time is "yyyy-mm-ddThh:mm:ssZ" and the end time must be later than the start time. The time span cannot be longer than 30 days.</p>
|
|
<p id="dds_api_0099__p1081171095720"><strong id="dds_api_0099__b1991111437224">T</strong> is the separator between the calendar and the hourly notation of time. <strong id="dds_api_0099__b129131943182216">Z</strong> indicates the time zone offset.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dds_api_0099__row1381141095712"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="dds_api_0099__p1811191035715">offset</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.9%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="dds_api_0099__p5811121075714">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="51.1%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="dds_api_0099__p138115106579">Specifies the index position.</p>
|
|
<p id="dds_api_0099__p8811101025720">If <strong id="dds_api_0099__b769695222214">offset</strong> is set to <em id="dds_api_0099__i269895252212">N</em>, the resource query starts from the N+1 piece of data. The value is <strong id="dds_api_0099__b1870117521224">0</strong> by default, indicating that the query starts from the first piece of data. The value cannot be a negative number.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dds_api_0099__row281201025717"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="dds_api_0099__p881271015574">limit</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.9%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="dds_api_0099__p1981251012572">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="51.1%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="dds_api_0099__p1381281045713">Specifies the number of records to be queried.</p>
|
|
<ul id="dds_api_0099__ul062319120013"><li id="dds_api_0099__li862331803">The value ranges from 1 to 100.</li><li id="dds_api_0099__li89751312013">If this parameter is not transferred, the first 100 DB instances are queried by default.</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dds_api_0099__section3074340117316"><h4 class="sectiontitle">Requests</h4><ul id="dds_api_0099__ul4675177165515"><li id="dds_api_0099__li66761970556">Example request<p id="dds_api_0099__p18586171019553"><a name="dds_api_0099__li66761970556"></a><a name="li66761970556"></a>GET https://dds.eu-de.otc.t-systems.com/v3/056538411200d4cd2f79c003c7606412/instances/65d3fe0c50984b35bc1a36e9b7c7de98in02/auditlog?start_time=2020-12-06T09:00:00+0800&end_time=2020-12-10T18:00:15+0800&offset=0&limit=33</p>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dds_api_0099__section569954692915"><h4 class="sectiontitle">Responses</h4><ul id="dds_api_0099__ul4699546112920"><li id="dds_api_0099__li5699154612912">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dds_api_0099__table1070024652918" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="dds_api_0099__row770074612919"><th align="left" class="cellrowborder" valign="top" width="28.442844284428443%" id="mcps1.3.4.2.1.1.2.4.1.1"><p id="dds_api_0099__p187001546172913">Name</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="24.412441244124413%" id="mcps1.3.4.2.1.1.2.4.1.2"><p id="dds_api_0099__p4700246132912">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="47.14471447144714%" id="mcps1.3.4.2.1.1.2.4.1.3"><p id="dds_api_0099__p137001746202917">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dds_api_0099__row8701194610299"><td class="cellrowborder" valign="top" width="28.442844284428443%" headers="mcps1.3.4.2.1.1.2.4.1.1 "><p id="dds_api_0099__p13701184619297">audit_logs</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.412441244124413%" headers="mcps1.3.4.2.1.1.2.4.1.2 "><p id="dds_api_0099__p5702144612293">Array of objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="47.14471447144714%" headers="mcps1.3.4.2.1.1.2.4.1.3 "><p id="dds_api_0099__p6702124615297">Indicates the audit log details. For details about audit logs, see <a href="#dds_api_0099__table15702194615294">Table 3</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dds_api_0099__row137021046202911"><td class="cellrowborder" valign="top" width="28.442844284428443%" headers="mcps1.3.4.2.1.1.2.4.1.1 "><p id="dds_api_0099__p7702144682916">total_record</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.412441244124413%" headers="mcps1.3.4.2.1.1.2.4.1.2 "><p id="dds_api_0099__p11702346182919">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="47.14471447144714%" headers="mcps1.3.4.2.1.1.2.4.1.3 "><p id="dds_api_0099__p87021946192913">Indicates the total number of records.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="dds_api_0099__table15702194615294"></a><a name="table15702194615294"></a><table cellpadding="4" cellspacing="0" summary="" id="dds_api_0099__table15702194615294" frame="border" border="1" rules="all"><caption><b>Table 3 </b>audit_logs parameters</caption><thead align="left"><tr id="dds_api_0099__row14703346202918"><th align="left" class="cellrowborder" valign="top" width="28.442844284428443%" id="mcps1.3.4.2.1.2.2.4.1.1"><p id="dds_api_0099__p1370316466292">Name</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="24.412441244124413%" id="mcps1.3.4.2.1.2.2.4.1.2"><p id="dds_api_0099__p20703746192915">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="47.14471447144714%" id="mcps1.3.4.2.1.2.2.4.1.3"><p id="dds_api_0099__p6703144619293">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dds_api_0099__row570314618291"><td class="cellrowborder" valign="top" width="28.442844284428443%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="dds_api_0099__p147031646142913">node_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.412441244124413%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="dds_api_0099__p147031446122911">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="47.14471447144714%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="dds_api_0099__p470364622912">Indicates the node ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dds_api_0099__row5703646162913"><td class="cellrowborder" valign="top" width="28.442844284428443%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="dds_api_0099__p37031146152912">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.412441244124413%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="dds_api_0099__p470384613297">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="47.14471447144714%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="dds_api_0099__p5703184611298">Indicates the audit log ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dds_api_0099__row470314468292"><td class="cellrowborder" valign="top" width="28.442844284428443%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="dds_api_0099__p5703174618294">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.412441244124413%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="dds_api_0099__p1770374672910">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="47.14471447144714%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="dds_api_0099__p177031461295">Indicates the audit log file name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dds_api_0099__row8704104642916"><td class="cellrowborder" valign="top" width="28.442844284428443%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="dds_api_0099__p8704204662917">size</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.412441244124413%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="dds_api_0099__p16704346162915">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="47.14471447144714%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="dds_api_0099__p10704946122919">Indicates the size of the audit log in byte.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dds_api_0099__row14704204610297"><td class="cellrowborder" valign="top" width="28.442844284428443%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="dds_api_0099__p17704174662911">start_time</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.412441244124413%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="dds_api_0099__p147049467291">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="47.14471447144714%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="dds_api_0099__p6704134682912">Indicates the start time of the audit log. The format is "yyyy-mm-ddThh:mm:ssZ".</p>
|
|
<p id="dds_api_0099__p570464613290"><strong id="dds_api_0099__b570444692912">T</strong> is the separator between the calendar and the hourly notation of time. <strong id="dds_api_0099__b1570413461299">Z</strong> indicates the time zone offset.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dds_api_0099__row19704346152911"><td class="cellrowborder" valign="top" width="28.442844284428443%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="dds_api_0099__p20704144642918">end_time</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.412441244124413%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="dds_api_0099__p670424616290">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="47.14471447144714%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="dds_api_0099__p1970412461292">Indicates the end time of the audit log. The format is "yyyy-mm-ddThh:mm:ssZ".</p>
|
|
<p id="dds_api_0099__p10704144652913"><strong id="dds_api_0099__b870464612914">T</strong> is the separator between the calendar and the hourly notation of time. <strong id="dds_api_0099__b1370416462296">Z</strong> indicates the time zone offset.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
<ul id="dds_api_0099__ul1870412464298"><li id="dds_api_0099__li17704194612910">Response example<pre class="codeblock" id="dds_api_0099__codeblock147047468296">{
|
|
"audit_logs": [
|
|
{
|
|
"id": "10190012aae94b38a10269b8ad025fc1no02_1607681849871",
|
|
"name": "0a84b6e97780d3271fd0c00f2db42932_audit_log_65d3fe0c50984b35bc1a36e9b7c7de98in02_10190012aae94b38a10269b8ad025fc1no02_1607681849871",
|
|
"size": 24735174,
|
|
"node_id": "10190012aae94b38a10269b8ad025fc1no02",
|
|
"start_time": "2020-12-11T18:14:49+0800",
|
|
"end_time": "2020-12-11T18:17:25+0800"
|
|
}
|
|
],
|
|
"total_record": 1
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dds_api_0099__section571819241003"><h4 class="sectiontitle">Status Code</h4><p id="dds_api_0099__dds_api_0018_p16131712193312">Status Code:200.</p>
|
|
<p id="dds_api_0099__dds_api_0018_p480617135329">For more information, see <a href="dds_status_code.html">Status Code</a>.</p>
|
|
</div>
|
|
<div class="section" id="dds_api_0099__section6522193710339"><h4 class="sectiontitle">Error Code</h4><p id="dds_api_0099__dds_api_0018_p20466124120334">For more information, see <a href="dds_error_code.html">Error Code</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_api_0092.html">Log Information Queries</a></div>
|
|
</div>
|
|
</div>
|
|
|