-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't add SRV records anymore #46
Comments
I investigated further using curl -X POST "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/dns_records" \
-H "X-Auth-Email: user@example.com" \
-H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
-H "Content-Type: application/json" \
--data '{"type":"SRV","name":"_test._tcp.example.org","content":"0 0 1234 server.example.org"}' This is not the case anymore. The API will return the error: {
"success": false,
"errors": [
{
"code": 1004,
"message": "DNS Validation Error",
"error_chain": [
{
"code": 9101,
"message": "service is a required data field."
}
]
}
],
"messages": [],
"result": null
} Seems now there should be an additional curl -X POST "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/dns_records" \
-H "X-Auth-Email: user@example.com" \
-H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
-H "Content-Type: application/json" \
--data '{"type":"SRV","name":"_test._tcp.example.org","content":"0 0 1234 server.example.org","data":{"priority":0,"weight":0,"port":1234,"target":"server.example.org","service":"_test","proto":"_tcp","name":"example.org"}}' This works well, though not documented. Seems this should be changed in |
This JSON might look a bit redundant, I tested and it seems we can avoid duplication by removing {
"type": "SRV",
"data": {
"service": "_test",
"proto": "_tcp",
"name": "example.org",
"priority": 0,
"weight": 0,
"port": 1234,
"target": "server.example.org"
}
} It works ok too. |
Turned out, |
I've also fixed priority parsing, it should be at index 0. In |
Hi,
I'm unable to add
SRV
type records with this tool anymore, e.g. something like this:cfcli -d example.org -t SRV add _test._tcp.example.org 0 0 1234 server.example.org
I'm sure it was working several months ago as I have built this command into my scripts that were working at a time. Apparently CF changed something that breaks the tool. Tried with
priority
option too but no luck.The text was updated successfully, but these errors were encountered: