我正在使用SoftLayer REST API使用网址https://api.softlayer.com/rest/v3/SoftLayer_User_Customer.json和帖子方法添加用户个人资料。
传递的参数是:
{
"parameters" :
[
{ "address1" : "2544 Nice Road",
"city" : "Atlantic City",
"companyName" : "Cognitive Research",
"state" : "NJ",
"country" : "US",
"postalCode" : "00000",
"firstName" : "Fexxx",
"lastName" : "Hexxx",
"email" : "niceguy@us.crazy.net",
"permissionSystemVersion" : "1",
"timezoneId" : "117",
"username" : "cu-thxxxx@us.ibm.com",
"secondaryPasswordTimeoutDays" : 90,
"userStatusId" : 1001
},
"xx0nn1mm!",
"xx0nn1mm!"
]
}
错误是RC 500 msg是"内部服务器错误"内容是"错误":"属性\'#firstName \'必须设置为创建\' SoftLayer_User_Customer \'。","代码":" SoftLayer_Exception_MissingCreationProperty"
的实例这在过去有效,但今天它失败了。
答案 0 :(得分:0)
使用配置时会显示以下错误:"error": "Invalid password
。
我更改了符合这些要求的password
:
Password must:
contain at least 1 upper character
contain at least 1 lower character
contain at least 1 special character
be at least 8 characters long
我可以使用以下内容创建新的use customer
:
https://[username]:[apikey]@api.softlayer.com/rest/v3.1/SoftLayer_User_Customer/createObject.json
Method: POST
Json Payload:
{
"parameters": [
{
"address1": "2544 Nice Road",
"city": "Atlantic City",
"companyName": "Cognitive Research",
"state": "NJ",
"country": "US",
"postalCode": "00000",
"firstName": "Fexxx",
"lastName": "Hexxx",
"email": "niceguy@us.crazy.net",
"permissionSystemVersion": "1",
"timezoneId": "117",
"username": "cu-thxxxx@us.ibm.com",
"secondaryPasswordTimeoutDays": 90,
"userStatusId": 1001
},
"Xx0nn1mm!",
"Xx0nn1mm!"
]
}
我希望它可以帮到你。