blob: 7b41da5f4642ab12689ad82c28bbcf4d42cca6d6 [file]
..
..
.. Licensed under the Apache License, Version 2.0 (the "License");
.. you may not use this file except in compliance with the License.
.. You may obtain a copy of the License at
..
.. http://www.apache.org/licenses/LICENSE-2.0
..
.. Unless required by applicable law or agreed to in writing, software
.. distributed under the License is distributed on an "AS IS" BASIS,
.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
.. See the License for the specific language governing permissions and
.. limitations under the License.
..
.. _to-api-logs-days-days:
**********************
``logs/{{days}}/days``
**********************
``GET``
=======
Fetches a list of changes that have been made to the Traffic Control system in the past ``days`` days
:Auth. Required: Yes
:Roles Required: None
:Response Type: Array
Request Structure
-----------------
.. table:: Request Path Parameters
+------+-----------------------------------------------------+
| Name | Description |
+======+=====================================================+
| days | An integral number of days of change logs to return |
+------+-----------------------------------------------------+
.. table:: Request Query Parameters
+-------+----------+---------------------------------------------------+
| Name | Required | Description |
+=======+==========+===================================================+
| limit | no | The number of rows to which to limit the response |
+-------+----------+---------------------------------------------------+
.. code-block:: http
:caption: Request Example
GET /api/1.4/logs/1/days?limit=2 HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: last_seen_log="2018-11-15% 15:11:38"; mojolicious=...
Response Structure
------------------
:id: Integral, unique identifier for the Log entry
:lastUpdated: Date and time at which the change was made, in ISO format
:level: Log categories for each entry, e.g. 'UICHANGE', 'OPER', 'APICHANGE'
:message: Log detail about what occurred
:ticketNum: Optional field to cross reference with any bug tracking systems
:user: Name of the user who made the change
.. code-block:: http
:caption: Response Example
HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept
Access-Control-Allow-Methods: POST,GET,OPTIONS,PUT,DELETE
Access-Control-Allow-Origin: *
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Type: application/json
Date: Thu, 15 Nov 2018 15:19:10 GMT
Server: Mojolicious (Perl)
Set-Cookie: last_seen_log="2018-11-15% 15:19:10"; path=/; Max-Age=604800
Set-Cookie: mojolicious=...; Path=/; Expires=Mon, 18 Nov 2019 17:40:54 GMT; Max-Age=3600; HttpOnly
Vary: Accept-Encoding
Whole-Content-Sha512: 40dV+azaZ3b6F30y6YHVbV3H2a3ekZrdoxICupwaxQnj62pwYfb7YCM7Qhe3OAItmB77Tbg9INy27ymaz3hr9A==
Content-Length: 357
{ "response": [
{
"ticketNum": null,
"level": "APICHANGE",
"lastUpdated": "2018-11-14 21:40:06.493975+00",
"user": "admin",
"id": 444,
"message": "User [ test ] unlinked from deliveryservice [ 1 | demo1 ]."
},
{
"ticketNum": null,
"level": "APICHANGE",
"lastUpdated": "2018-11-14 21:37:30.707571+00",
"user": "admin",
"id": 443,
"message": "1 delivery services were assigned to test"
}
]}