Hello all, my name is Kevin, I have difficulty in updating my CF DNS record using the patch API but it always return “Invalid Property (code: 1086)”
Please kindly advise with this issue
Hello all, my name is Kevin, I have difficulty in updating my CF DNS record using the patch API but it always return “Invalid Property (code: 1086)”
Please kindly advise with this issue
Hi Kevin. I see it requires at least content, name, and type
in your body. Have you tried adding those?
I have to admit I cannot reproduce the same error
I’ve tested via Postman too, works fine for me.
I’ve created a test.domain.com
DNS record pointed to the 192.0.2.1
and proxied via Cloudflare dashboard.
Furthermore, using Cloudflare API → List DNS Records, I’ve listed the DNS records for the particular zone, found it, got the ID.
Later, I’ve made sure the URL parameters for the Cloudflare API → Update DNS Record are changed and correct with the coresponding ones (Zone_ID
, DNS_Record_ID
), added the Headers (Content-Type
, X-Auth-Email
and X-Auth-Key
) with the required values for my CF account, and for the RAW Body I’ve used only the content
:
{
"content": "192.0.2.2"
}
I see a “yellow warning at your screenshot”. As I mentioned, I am using JSON (for content-type) as far as reciving and sending JSON content → could be you should change this to the JSON too:
Other thing which I’ve noticed, when copy-pasting the URL from Cloudflare API Docs, I got it copy-pasted as 2 lines of the code (new line), which I made into a single line.
So, after the Postman request the test.domain.com
DNS record should point from 192.0.2.1
to 192.0.2.2
. Was success, later confirmed by double-checking it via CF dashboard.
Are you sure you copy-pasted the correct ID of the particular DNS record you want to change?
Are you trying to do a batch update of multiple DNS records at the same time or using a script one-by-one?
Furthremore, you cannot have 192.168.1.1
proxied , was that for the purpose written or you really want it?
That’s it! it is the problem, the unseen new-line when copying and pasting from the CF API Docs, thank you so much for the great help Sir!
Hi @kevin.devops, your topic has a solution here.
Let us know what you think of the solution by logging in and give it a or
.
Solutions help the person that asked the question and anyone else that sees the answer later. Login to tell us what you think of the solution with a or
.
Hi @kevin.devops, your topic has a solution here.
Let us know what you think of the solution by logging in and give it a or
.
Solutions help the person that asked the question and anyone else that sees the answer later. Login to tell us what you think of the solution with a or
.
Hi @kevin.devops, your topic has a solution here.
Let us know what you think of the solution by logging in and give it a or
.
Solutions help the person that asked the question and anyone else that sees the answer later. Login to tell us what you think of the solution with a or
.