mirror of
https://github.com/pi-hole/docs.git
synced 2024-12-06 19:27:12 +01:00
@@ -52,6 +52,10 @@
|
||||
}
|
||||
```
|
||||
|
||||
**Reply type**
|
||||
|
||||
Object
|
||||
|
||||
**Fields**
|
||||
|
||||
??? info "Status (`"blocking": boolean`)"
|
||||
@@ -73,7 +77,7 @@
|
||||
- `POST /api/dns/blocking`
|
||||
|
||||
<!-- markdownlint-disable code-block-style -->
|
||||
???+ example "Request (required authorization)"
|
||||
???+ example "Request (requires authorization)"
|
||||
|
||||
=== "cURL"
|
||||
|
||||
@@ -125,6 +129,10 @@
|
||||
}
|
||||
```
|
||||
|
||||
**Reply type**
|
||||
|
||||
Object
|
||||
|
||||
**Fields**
|
||||
|
||||
See description of the `GET` request above. Remember that `timer` may be `null` if there is no active timer.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
- `GET /api/dns/cache`
|
||||
|
||||
<!-- markdownlint-disable code-block-style -->
|
||||
???+ example "Request (required authorization)"
|
||||
???+ example "Request (requires authorization)"
|
||||
|
||||
=== "cURL"
|
||||
|
||||
@@ -53,13 +53,13 @@
|
||||
??? info "DNS cache size (`"cache_size": number`)"
|
||||
Size of the DNS domain cache, defaulting to 10,000 entries. You typically specify this number directly in `/etc/dnsmasq.d/01-pihole.conf`. It is the number of entries that can be actively cached at the same time. There is no benefit in enlarging this number *except* if the DNS cache evictions count is larger than zero.
|
||||
|
||||
This information may also be queried using `dig +short chaos txt cachesize.bind`
|
||||
This information may also be queried using `#!bash dig +short chaos txt cachesize.bind`
|
||||
|
||||
??? info "DNS cache insertions (`"cache_inserted": number`)"
|
||||
|
||||
Number of total insertions into the cache. This number can be substantially larger than DNS cache size as expiring cache entries naturally make room for new insertions over time. Each lookup with a non-zero TTL will be cached.
|
||||
|
||||
This information may also be queried using `dig +short chaos txt insertions.bind`
|
||||
This information may also be queried using `#!bash dig +short chaos txt insertions.bind`
|
||||
|
||||
??? info "DNS cache evictions (`"cache_evicted": number`)"
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
The cache size should be increased when the number of evicted cache entries is larger than zero.
|
||||
|
||||
This information may also be queried using `dig +short chaos txt evictions.bind`
|
||||
This information may also be queried using `#!bash dig +short chaos txt evictions.bind`
|
||||
|
||||
<!-- markdownlint-enable code-block-style -->
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
- `GET /api/blacklist/regex`
|
||||
|
||||
<!-- markdownlint-disable code-block-style -->
|
||||
???+ example "Request (required authorization)"
|
||||
???+ example "Request (requires authorization)"
|
||||
|
||||
=== "cURL"
|
||||
|
||||
@@ -73,9 +73,13 @@
|
||||
??? info "Addition time (`"date_added": number`)"
|
||||
Unix timestamp of addition of this item to Pi-hole's database.
|
||||
|
||||
Use `#!bash date -d @1589108911` to obtain a human-readable datetime string.
|
||||
|
||||
??? info "Modification time (`"date_modified": number`)"
|
||||
Unix timestamp of modification of this item in Pi-hole's database.
|
||||
|
||||
Use `#!bash date -d @1589104951` to obtain a human-readable datetime string.
|
||||
|
||||
??? info "Comment (`"comment": [null|string]`)"
|
||||
User-provided free-text comment for this item. May be `null` if not specified.
|
||||
|
||||
@@ -104,7 +108,7 @@
|
||||
- `GET /api/blacklist/regex/<domain>`
|
||||
|
||||
<!-- markdownlint-disable code-block-style -->
|
||||
???+ example "Request (required authorization)"
|
||||
???+ example "Request (requires authorization)"
|
||||
|
||||
=== "cURL"
|
||||
|
||||
@@ -186,7 +190,7 @@
|
||||
- `PATCH /api/blacklist/regex`
|
||||
|
||||
<!-- markdownlint-disable code-block-style -->
|
||||
???+ example "Request (required authorization)"
|
||||
???+ example "Request (requires authorization)"
|
||||
|
||||
=== "cURL"
|
||||
|
||||
@@ -278,7 +282,7 @@
|
||||
- `DELETE /api/blacklist/regex/<domain>`
|
||||
|
||||
<!-- markdownlint-disable code-block-style -->
|
||||
???+ example "Request (required authorization)"
|
||||
???+ example "Request (requires authorization)"
|
||||
|
||||
=== "cURL"
|
||||
|
||||
@@ -339,7 +343,7 @@
|
||||
|
||||
Response code: `HTTP/1.1 204 No Content`
|
||||
|
||||
??? failure "Error response (database permission error)"
|
||||
??? failure "Error response"
|
||||
|
||||
Response code: `HTTP/1.1 402 - Request failed`
|
||||
|
||||
|
||||
@@ -99,6 +99,10 @@ The form of replies to successful requests strongly depends on the selected endp
|
||||
}
|
||||
```
|
||||
|
||||
**Reply type**
|
||||
|
||||
Object or Array
|
||||
|
||||
In contrast, errors have a uniform style to ease their programatic treatment:
|
||||
|
||||
???+ failure "Example reply: Error (unauthorized access)"
|
||||
|
||||
@@ -94,6 +94,9 @@ markdown_extensions:
|
||||
# Tabbed provides a syntax to easily add tabbed Markdown content.
|
||||
# (https://facelessuser.github.io/pymdown-extensions/extensions/tabbed/)
|
||||
- pymdownx.tabbed
|
||||
# InlineHilite is an inline code highlighter inspired by CodeHilite.
|
||||
# (https://facelessuser.github.io/pymdown-extensions/extensions/inlinehilite/)
|
||||
- pymdownx.inlinehilite
|
||||
|
||||
nav:
|
||||
- Overview: index.md
|
||||
|
||||
Reference in New Issue
Block a user