1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

DOCS: Added Gitbook filenames to JSON code snippets. (#2119)

This commit is contained in:
Jeffrey Cafferata
2023-03-02 22:17:27 +01:00
committed by GitHub
parent 4b37906049
commit 93c77ebe34
46 changed files with 166 additions and 29 deletions

View File

@@ -16,6 +16,7 @@ Optional fields include:
Example:
{% code title="creds.json" %}
```json
{
"cloudflare": {
@@ -25,6 +26,7 @@ Example:
}
}
```
{% endcode %}
# Authentication
@@ -39,6 +41,7 @@ provide a [Cloudflare API token](https://dash.cloudflare.com/profile/api-tokens)
This method is enabled by setting the `apitoken` value in `creds.json`:
{% code title="creds.json" %}
```json
{
"cloudflare": {
@@ -48,6 +51,7 @@ This method is enabled by setting the `apitoken` value in `creds.json`:
}
}
```
{% endcode %}
* `accountid` is found in the Cloudflare portal ("Account ID") on any "Website" page. Click on any site and you'll see the "Account ID" on the lower right side of the page.
* `apitoken` is something you must create. See [Cloudflare's documentation](https://support.cloudflare.com/hc/en-us/articles/200167836-Managing-API-Tokens-and-Keys) for instructions on how to generate and configure permissions on API tokens. (Spoiler alert: [link](https://dash.cloudflare.com/profile/api-tokens). The token must be granted rights (authorization to do certain tasks) at a very granular level.
@@ -74,6 +78,7 @@ This method is not recommended because these credentials give DNSControl access
This method is enabled by setting the `apikey` and `apiuser` values in `creds.json`:
{% code title="creds.json" %}
```json
{
"cloudflare": {
@@ -84,6 +89,8 @@ This method is enabled by setting the `apikey` and `apiuser` values in `creds.js
}
}
```
{% endcode %}
* `accountid` (see above)
* `apiuser` is the email address associated with the account.
* `apikey` is found on [My Profile / API Tokens](https://dash.cloudflare.com/profile/api-tokens).