]> granicus.if.org Git - pdns/commitdiff
Document authoritative server cache endpoint
authorPieter Lexis <pieter.lexis@powerdns.com>
Thu, 6 Sep 2018 10:23:13 +0000 (12:23 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Thu, 6 Sep 2018 10:24:06 +0000 (12:24 +0200)
docs/http-api/cache.rst [new file with mode: 0644]
docs/http-api/index.rst
docs/http-api/swagger/authoritative-api-swagger.yaml

diff --git a/docs/http-api/cache.rst b/docs/http-api/cache.rst
new file mode 100644 (file)
index 0000000..9437efb
--- /dev/null
@@ -0,0 +1,12 @@
+Cache
+=====
+
+Endpoints
+---------
+.. openapi:: swagger/authoritative-api-swagger.yaml
+  :paths: /servers/{server_id}/cache/flush
+
+Objects
+-------
+.. openapi:: swagger/authoritative-api-swagger.yaml
+  :definitions: CacheFlushResult
index 7a159a8e2a55f6fca75e0659d3c9a36eb38194b3..91b4bc0c769d2104c87303e834bc3d571ed20827 100644 (file)
@@ -103,3 +103,4 @@ The API exposes several endpoints and objects:
   metadata
   search
   statistics
+  cache
index 4746798b78700ab2aceeab43f230a80c6707c943..6d02121875d60d9aa75574de0aae5804306d6e95 100644 (file)
@@ -58,6 +58,29 @@ paths:
           schema:
             $ref: '#/definitions/Server'
 
+  '/servers/{server_id}/cache/flush':
+    put:
+      summary: Flush a cache-entry by name
+      operationId: cacheFlushByName
+      tags:
+        - servers
+      parameters:
+        - name: server_id
+          in: path
+          required: true
+          description: The id of the server to retrieve
+          type: string
+        - name: domain
+          in: query
+          required: true
+          description: The domain name to flush from the cache
+          type: string
+      responses:
+        '200':
+          description: Flush successful
+          schema:
+            $ref: '#/definitions/CacheFlushResult'
+
   '/servers/{server_id}/zones':
     get:
       summary: List all Zones in a server
@@ -1090,3 +1113,14 @@ definitions:
       bits:
         type: integer
         description: 'The size of the key'
+
+  CacheFlushResult:
+    title: CacheFlushResult
+    description: 'The result of a cache-flush'
+    properties:
+      count:
+        type: number
+        description: 'Amount of entries flushed'
+      result:
+        type: string
+        description: 'A message about the result like "Flushed cache"'