[英]Creating a DNS A Record using REST API createObject
I couldn't get createARecord
to work, so I am trying to use createObject
. 我无法使
createARecord
工作,所以我尝试使用createObject
。
The URL I am using with GET method. 我在GET方法中使用的URL。
https://api.softlayer.com/rest/v3/SoftLayer_Dns_Domain_ResourceRecord/createObject
The content sent is: 发送的内容是:
{
"parameters" :
[
{
"domainId" : "1914686",
"host" : "dsn-t01",
"data" : "127.0.0.1",
"type" : "a",
"minimum" : undef,
"retry" : undef,
"mxPriority" : undef,
"expire" : undef,
"responsiblePerson" : undef,
"id" : undef,
"ttl" : 900
}
]
}
The RC is 500, MSG is "Internal Server Error", the content is "{"error":"Invalid modification structure received.
RC为500,MSG为“内部服务器错误”,内容为“ {”错误”:“收到无效的修改结构。 Expected a skeleton of \\'SoftLayer_Dns_Domain_ResourceRecord\\'.","code":"SoftLayer_Exception"}"
预期为\\'SoftLayer_Dns_Domain_ResourceRecord \\'的框架。“,”代码“:” SoftLayer_Exception“}”
I am not having much success with these REST APIs. 这些REST API并没有取得太大的成功。
Can you please help. 你能帮忙吗?
Please the following POST request: 请执行以下POST请求:
https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Dns_Domain_ResourceRecord/createObject.json
Method: POST 方法:开机自检
Json payload: Json有效负载:
{
"parameters": [
{
"domainId": 1769988,
"data": "127.0.0.1",
"host": "@",
"type": "a"
}
]
}
References: 参考文献:
SoftLayer_Dns_Domain_ResourceRecord::createObject SoftLayer_Dns_Domain_ResourceRecord :: createObject
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.