curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

{"code":"INVALID_RECORDS", "fields":[{"code":"INVALID_RECORDS", "message":"Invalid [name] provided for record data

From: Kaushal Shriyan via curl-users <curl-users_at_lists.haxx.se>
Date: Wed, 26 Oct 2022 14:26:58 +0530

Hi,

I have the below bash shell script

#!/bin/bash

echo "Please enter the domain name to be added"
read domainname

echo "Fully qualified domain name to be added is ${domainname}.mydomain.com"

echo "Please enter the IP Address to be added"
read ipaddress

curl -X PATCH https://api.godaddy.com/v1/domains/mydomain.com/records \
  -H "Authorization: sso-key xxxxxxxxxxxxxxxxxxxxxxxx:xxxxxxxxxxxxx" \
  -H 'Content-Type: application/json' \
  --data '[{"type": "A","name": "$domainname","data": "$ipaddress","ttl":
600}]'

{"code":"INVALID_RECORDS","fields":[{"code":"INVALID_RECORDS","message":"Invalid
[name] provided for record data,
[$domainname].","path":"records"}],"message":"One or more of the given
records is invalid","errors":["Invalid [name] provided for record data,
[$domainname]."]}

I am encountering INVALID_RECORDS as per the above output. Please guide me.
Thanks in advance.

Best Regards,

Kaushal


-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2022-10-26