From 33093de6aa30eae902e82cb556960a36aa1bd1f1 Mon Sep 17 00:00:00 2001 From: Simon Zolin Date: Thu, 14 Nov 2019 15:18:43 +0300 Subject: [PATCH] * openapi: update 'QueryLog' --- openapi/CHANGELOG.md | 40 ++++++++++++++++++++++++++++++++++++++++ openapi/openapi.yaml | 12 +++++++++--- 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/openapi/CHANGELOG.md b/openapi/CHANGELOG.md index 281d58e5..3172be07 100644 --- a/openapi/CHANGELOG.md +++ b/openapi/CHANGELOG.md @@ -1,6 +1,46 @@ # AdGuard Home API Change Log +## v0.99.3: API changes + +### API: Get query log: GET /control/querylog + +The response data is now a JSON object, not an array. + +Response: + + 200 OK + + { + "oldest":"2006-01-02T15:04:05.999999999Z07:00" + "data":[ + { + "answer":[ + { + "ttl":10, + "type":"AAAA", + "value":"::" + } + ... + ], + "client":"127.0.0.1", + "elapsedMs":"0.098403", + "filterId":1, + "question":{ + "class":"IN", + "host":"doubleclick.net", + "type":"AAAA" + }, + "reason":"FilteredBlackList", + "rule":"||doubleclick.net^", + "status":"NOERROR", + "time":"2006-01-02T15:04:05.999999999Z07:00" + } + ... + ] + } + + ## v0.99.1: API changes ### API: Get current user info: GET /control/profile diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml index eca972b3..d871fef3 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -1417,10 +1417,16 @@ definitions: example: "2018-11-26T00:02:41+03:00" QueryLog: - type: "array" + type: "object" description: "Query log" - items: - $ref: "#/definitions/QueryLogItem" + properties: + oldest: + type: "string" + example: "2018-11-26T00:02:41+03:00" + data: + type: "array" + items: + $ref: "#/definitions/QueryLogItem" QueryLogConfig: type: "object"