0
votes

I am using the SoftLayer REST API to add a user profile using URL https://api.softlayer.com/rest/v3/SoftLayer_User_Customer.json and a post method.

The parameters passed are:

{
     "parameters" :
 [
   { "address1" : "2544 Nice Road",
     "city" : "Atlantic City",
           "companyName" : "Cognitive Research",
     "state" : "NJ",
           "country" : "US",
     "postalCode" :  "00000",
         "firstName" : "Fexxx",
         "lastName" : "Hexxx",
         "email" : "[email protected]",
     "permissionSystemVersion" : "1",
     "timezoneId" : "117",
     "username" : "[email protected]",
     "secondaryPasswordTimeoutDays" : 90,
     "userStatusId" : 1001
    },
           "xx0nn1mm!",
           "xx0nn1mm!"
  ]
  }

The error is RC 500 msg is "Internal Server Error" content is "error":"The property \'firstName\' must be set to create an instance of \'SoftLayer_User_Customer\'.","code":"SoftLayer_Exception_MissingCreationProperty"

This has worked in the past, but today it is failing.

1

1 Answers

0
votes

The following error is displayed when using your configuration: "error": "Invalid password.

I changed the password that meets these requirements:

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 

I was able to create a new use customer using the following:

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": "[email protected]",
      "permissionSystemVersion": "1",
      "timezoneId": "117",
      "username": "[email protected]",
      "secondaryPasswordTimeoutDays": 90,
      "userStatusId": 1001
    },
    "Xx0nn1mm!",
    "Xx0nn1mm!"
  ]
}

I hope it help you.