-
|
Hi there, I have pulled the latest ACME-Lego image from Docker (v4.27). I am running it with the following command: The log returns the following messages: When running the Hostinger API to get my DNS zones ('/api/dns/v1/zones/:domain'), I get the following response: [
{
"name": "www",
"records": [
{
"content": "test.com.",
"is_disabled": false
}
],
"ttl": 14400,
"type": "CNAME"
},
{
"name": "abc",
"records": [
{
"content": "test.com.",
"is_disabled": false
}
],
"ttl": 14400,
"type": "CNAME"
},
{
"name": "def",
"records": [
{
"content": "test.com.",
"is_disabled": false
}
],
"ttl": 14400,
"type": "CNAME"
},
{
"name": "xyx",
"records": [
{
"content": "test.com.",
"is_disabled": false
}
],
"ttl": 14400,
"type": "CNAME"
},
{
"name": "@",
"records": [
{
"content": "0 issue \"comodoca.com\"",
"is_disabled": false
},
{
"content": "0 issue \"digicert.com\"",
"is_disabled": false
},
{
"content": "0 issue \"globalsign.com\"",
"is_disabled": false
},
{
"content": "0 issue \"letsencrypt.org\"",
"is_disabled": false
},
{
"content": "0 issuewild \"comodoca.com\"",
"is_disabled": false
},
{
"content": "0 issuewild \"digicert.com\"",
"is_disabled": false
},
{
"content": "0 issuewild \"globalsign.com\"",
"is_disabled": false
},
{
"content": "0 issuewild \"letsencrypt.org\"",
"is_disabled": false
}
],
"ttl": 14400,
"type": "CAA"
},
{
"name": "@",
"records": [
{
"content": "1.1.1.1",
"is_disabled": false
}
],
"ttl": 14400,
"type": "A"
}
] |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 19 replies
-
|
Hello, Do you have several domains? If yes, can you try with another one? |
Beta Was this translation helpful? Give feedback.
-
|
No, unfortunately I don't have another domain to test :( |
Beta Was this translation helpful? Give feedback.
-
|
Hi Fernandez, thank you very much for your swift reply.
hostinger_zones.json{
"overwrite": false,
"zone": [
{
"name": "_acme-challenge",
"records": [
{
"content": "ADw2sEd82DUgXcQ9hNBZThJs7zVJkR5v9JeSbAb9mZY"
}
],
"ttl": 14400,
"type": "TXT"
},
{
"name": "www",
"records": [
{
"content": "test.com.",
"is_disabled": false
}
],
"ttl": 14400,
"type": "CNAME"
},
{
"name": "abc",
"records": [
{
"content": "test.com.",
"is_disabled": false
}
],
"ttl": 14400,
"type": "CNAME"
},
{
"name": "def",
"records": [
{
"content": "test.com.",
"is_disabled": false
}
],
"ttl": 14400,
"type": "CNAME"
},
{
"name": "xyx",
"records": [
{
"content": "test.com.",
"is_disabled": false
}
],
"ttl": 14400,
"type": "CNAME"
},
{
"name": "@",
"records": [
{
"content": "0 issue \"comodoca.com\"",
"is_disabled": false
},
{
"content": "0 issue \"digicert.com\"",
"is_disabled": false
},
{
"content": "0 issue \"globalsign.com\"",
"is_disabled": false
},
{
"content": "0 issue \"letsencrypt.org\"",
"is_disabled": false
},
{
"content": "0 issuewild \"comodoca.com\"",
"is_disabled": false
},
{
"content": "0 issuewild \"digicert.com\"",
"is_disabled": false
},
{
"content": "0 issuewild \"globalsign.com\"",
"is_disabled": false
},
{
"content": "0 issuewild \"letsencrypt.org\"",
"is_disabled": false
}
],
"ttl": 14400,
"type": "CAA"
},
{
"name": "@",
"records": [
{
"content": "1.1.1.1",
"is_disabled": false
}
],
"ttl": 14400,
"type": "A"
}
]
}Result:
hostinger_zones.json{
"overwrite": false,
"zone": [
{
"name": "www",
"records": [
{
"content": "test.com.",
"is_disabled": false
}
],
"ttl": 14400,
"type": "CNAME"
},
{
"name": "abc",
"records": [
{
"content": "test.com.",
"is_disabled": false
}
],
"ttl": 14400,
"type": "CNAME"
},
{
"name": "def",
"records": [
{
"content": "test.com.",
"is_disabled": false
}
],
"ttl": 14400,
"type": "CNAME"
},
{
"name": "xyx",
"records": [
{
"content": "test.com.",
"is_disabled": false
}
],
"ttl": 14400,
"type": "CNAME"
},
{
"name": "@",
"records": [
{
"content": "0 issue \"comodoca.com\"",
"is_disabled": false
},
{
"content": "0 issue \"digicert.com\"",
"is_disabled": false
},
{
"content": "0 issue \"globalsign.com\"",
"is_disabled": false
},
{
"content": "0 issue \"letsencrypt.org\"",
"is_disabled": false
},
{
"content": "0 issuewild \"comodoca.com\"",
"is_disabled": false
},
{
"content": "0 issuewild \"digicert.com\"",
"is_disabled": false
},
{
"content": "0 issuewild \"globalsign.com\"",
"is_disabled": false
},
{
"content": "0 issuewild \"letsencrypt.org\"",
"is_disabled": false
}
],
"ttl": 14400,
"type": "CAA"
},
{
"name": "@",
"records": [
{
"content": "1.1.1.1",
"is_disabled": false
}
],
"ttl": 14400,
"type": "A"
}
]
}Result: Worthwile mentioning: I had a CNAME entry for '_acme-challenge' up until recently (~2 days ago) in my DNS zone file. Maybe this is still cached somewhere and causes trouble consider TTL of 14400? |
Beta Was this translation helpful? Give feedback.
-
|
OK, I will try to do that. Thank you. |
Beta Was this translation helpful? Give feedback.
-
|
Ok, I got a basic request working: hostinger_zones.json{
"overwrite": false,
"zone": [
{
"name": "_acme-challenge",
"records": [
{
"content": "ADw2sEd82DUgXcQ9hNBZThJs7zVJkR5v9JeSbAb9mZX"
}
],
"ttl": 120,
"type": "TXT"
}
]
}Response: |
Beta Was this translation helpful? Give feedback.
-
|
Yes, I deleted them manually.
Command GETcurl https://developers.hostinger.com/api/dns/v1/zones/test.com \
--request GET \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer My_TOKEN'Response GET[
{
"name": "www",
"records": [
{
"content": "test.com.",
"is_disabled": false
}
],
"ttl": 14400,
"type": "CNAME"
},
{
"name": "@",
"records": [
{
"content": "0 issue \"comodoca.com\"",
"is_disabled": false
},
{
"content": "0 issue \"digicert.com\"",
"is_disabled": false
},
{
"content": "0 issue \"globalsign.com\"",
"is_disabled": false
},
{
"content": "0 issue \"letsencrypt.org\"",
"is_disabled": false
},
{
"content": "0 issuewild \"comodoca.com\"",
"is_disabled": false
},
{
"content": "0 issuewild \"digicert.com\"",
"is_disabled": false
},
{
"content": "0 issuewild \"globalsign.com\"",
"is_disabled": false
},
{
"content": "0 issuewild \"letsencrypt.org\"",
"is_disabled": false
}
],
"ttl": 14400,
"type": "CAA"
},
{
"name": "@",
"records": [
{
"content": "1.1.1.1",
"is_disabled": false
}
],
"ttl": 14400,
"type": "A"
}
]
Command PUTcurl -d @/tmp/hostinger_zones.json https://developers.hostinger.com/api/dns/v1/zones/test.com --request PUT --header 'Content-Type: application/json' --header 'Authorization: Bearer MY_TOKEN'hostinger_zones.json{
"overwrite": false,
"zone": [
{
"name": "_acme-challenge",
"records": [
{
"content": "ADw2sEd82DUgXcQ9hNBZThJs7zVJkR5v9JeSbAb9mZX"
}
],
"ttl": 120,
"type": "TXT"
}
]
}Response PUT
Command GETcurl https://developers.hostinger.com/api/dns/v1/zones/test.com \
--request GET \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer My_TOKEN'Response GET[
{
"name": "www",
"records": [
{
"content": "test.com.",
"is_disabled": false
}
],
"ttl": 14400,
"type": "CNAME"
},
{
"name": "_acme-challenge",
"records": [
{
"content": "\"ADw2sEd82DUgXcQ9hNBZThJs7zVJkR5v9JeSbAb9mZX\"",
"is_disabled": false
}
],
"ttl": 120,
"type": "TXT"
},
{
"name": "@",
"records": [
{
"content": "0 issue \"comodoca.com\"",
"is_disabled": false
},
{
"content": "0 issue \"digicert.com\"",
"is_disabled": false
},
{
"content": "0 issue \"globalsign.com\"",
"is_disabled": false
},
{
"content": "0 issue \"letsencrypt.org\"",
"is_disabled": false
},
{
"content": "0 issuewild \"comodoca.com\"",
"is_disabled": false
},
{
"content": "0 issuewild \"digicert.com\"",
"is_disabled": false
},
{
"content": "0 issuewild \"globalsign.com\"",
"is_disabled": false
},
{
"content": "0 issuewild \"letsencrypt.org\"",
"is_disabled": false
}
],
"ttl": 14400,
"type": "CAA"
},
{
"name": "@",
"records": [
{
"content": "1.1.1.1",
"is_disabled": false
}
],
"ttl": 14400,
"type": "A"
}
]Then I executed an additional test:
Command PUTcurl -d @/tmp/hostinger_zones.json https://developers.hostinger.com/api/dns/v1/zones/test.com --request PUT --header 'Content-Type: application/json' --header 'Authorization: Bearer MY_TOKEN'hostinger_zones.json{
"overwrite": false,
"zone": [
{
"name": "_acme-challenge",
"records": [
{
"content": "ADw2sEd82DUgXcQ9hNBZThJs7zVJkR5v9XXXXXXXXXX"
}
],
"ttl": 60,
"type": "TXT"
}
]
}Response: {"message":"Request accepted"}I then executed exactly the same request again within 60s considering ttl was set to '60'. Response: {
"message": "[DNS:4008] DNS resource record is not valid or conflicts with another resource record",
"correlation_id": "a033d3e7-ab93-4135-8f40-58cb1a78651a"
}I then executed the same request again after 60s considering ttl was set to '60'. {
"message": "[DNS:4008] DNS resource record is not valid or conflicts with another resource record",
"correlation_id": "a033d3e7-ab93-4135-8f40-58cb1a78651a"
}
Command DELETEcurl -d @/tmp/hostinger_zones.json https://developers.hostinger.com/api/dns/v1/zones/test.com --request DELETE --header 'Content-Type: application/json' --header 'Authorization: Bearer MY_TOKEN'hostinger_zones.json {
"filters": [
{
"name": "_acme-challenge",
"type": "TXT"
}
]
}Response: {
"message": "Request accepted"
}Command GETcurl https://developers.hostinger.com/api/dns/v1/zones/test.com \
--request GET \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer My_TOKEN'Response GET[
{
"name": "www",
"records": [
{
"content": "test.com.",
"is_disabled": false
}
],
"ttl": 14400,
"type": "CNAME"
},
{
"name": "@",
"records": [
{
"content": "0 issue \"comodoca.com\"",
"is_disabled": false
},
{
"content": "0 issue \"digicert.com\"",
"is_disabled": false
},
{
"content": "0 issue \"globalsign.com\"",
"is_disabled": false
},
{
"content": "0 issue \"letsencrypt.org\"",
"is_disabled": false
},
{
"content": "0 issuewild \"comodoca.com\"",
"is_disabled": false
},
{
"content": "0 issuewild \"digicert.com\"",
"is_disabled": false
},
{
"content": "0 issuewild \"globalsign.com\"",
"is_disabled": false
},
{
"content": "0 issuewild \"letsencrypt.org\"",
"is_disabled": false
}
],
"ttl": 14400,
"type": "CAA"
},
{
"name": "@",
"records": [
{
"content": "1.1.1.1",
"is_disabled": false
}
],
"ttl": 14400,
"type": "A"
}
]Command PUTcurl -d @/tmp/hostinger_zones.json https://developers.hostinger.com/api/dns/v1/zones/test.com --request PUT --header 'Content-Type: application/json' --header 'Authorization: Bearer MY_TOKEN'hostinger_zones.json{
"overwrite": false,
"zone": [
{
"name": "_acme-challenge",
"records": [
{
"content": "ADw2sEd82DUgXcQ9hNBZThJs7zVJkR5v9XXXXXXXXXX"
}
],
"ttl": 60,
"type": "TXT"
}
]
}Response: {"message":"Request accepted"}Command GETcurl https://developers.hostinger.com/api/dns/v1/zones/test.com \
--request GET \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer My_TOKEN'Response GET[
{
"name": "www",
"records": [
{
"content": "test.com.",
"is_disabled": false
}
],
"ttl": 14400,
"type": "CNAME"
},
{
"name": "_acme-challenge",
"records": [
{
"content": "\"ADw2sEd82DUgXcQ9hNBZThJs7zVJkR5v9XXXXXXXXXX\"",
"is_disabled": false
}
],
"ttl": 60,
"type": "TXT"
},
{
"name": "@",
"records": [
{
"content": "0 issue \"comodoca.com\"",
"is_disabled": false
},
{
"content": "0 issue \"digicert.com\"",
"is_disabled": false
},
{
"content": "0 issue \"globalsign.com\"",
"is_disabled": false
},
{
"content": "0 issue \"letsencrypt.org\"",
"is_disabled": false
},
{
"content": "0 issuewild \"comodoca.com\"",
"is_disabled": false
},
{
"content": "0 issuewild \"digicert.com\"",
"is_disabled": false
},
{
"content": "0 issuewild \"globalsign.com\"",
"is_disabled": false
},
{
"content": "0 issuewild \"letsencrypt.org\"",
"is_disabled": false
}
],
"ttl": 14400,
"type": "CAA"
},
{
"name": "@",
"records": [
{
"content": "1.1.1.1",
"is_disabled": false
}
],
"ttl": 14400,
"type": "A"
}
]Consequently, I don't think the Hostinger API documentation regarding the 'Overwrite' flag is a 100% accurate (https://developers.hostinger.com/#tag/dns-zone/put/api/dns/v1/zones/{domain}). If you want to update an existing record, you basically have to query all entries via |
Beta Was this translation helpful? Give feedback.
Thank you, I created a PR to fix the problem: #2690
It is impossible to understand this API documentation without having something to test it.
There are several confusing elements inside the endpoint description and the request body structure.