SRV Record using API v4


#1

I can’t create a SRV record by Cloudflare APi v4.
I use a POST method, with name=_minecraft._tcp.mydomain, content=5\t25565\tmydomain, priority=1,
proxied=false. And it only return 400 bad request ???


#2

bump. help me pls


#3

Here is a curl example for creating _minecraft._tcp.example.net..

curl "https://api.cloudflare.com/client/v4/zones/.../dns_records" \
     --header "X-Auth-Email: [email protected]" \
     --header "X-Auth-Key: ..." \
     --header "Content-Type: application/json" \
     --data '{"type": "SRV", "data": {"service": "_minecraft", "proto": "_tcp", "name": "example.net", "priority": 1, "weight": 5, "port": 25565, "target": "example.net"}}'

#4

Tack så mycket @andreas that’s a great example.


#5

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.