• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Please beaware of a breaking change in the REST API on the next Plesk release (18.0.62).
    Starting from Plesk Obsidian 18.0.62, requests to REST API containing the Content-Type header with a media-type directive other than “application/json” will result in the HTTP “415 Unsupported Media Type” client error response code. Read more here

Resolved Plesk Rest API Error 500 (Create User)

BenjaminK

New Pleskian
Hey,

I am currently working on the automation of a system and want to have a user created via API.
Using Swagger to test the endpoints resulted in an error that I could not explain. The endpoint throws back a 500 Internal Error Code with the following content:

{
"code": 1002,
"message": ""
}

According to the documentation, this error deals with the attempt to create users multiple times, which is clearly not the case here.

Here again the whole request as CURL:

curl -X POST "myplesklink.com" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"id\": 1000, \"created\": \"2016-11-13\", \"name\" \"John Smith\", \"company\": \"Plesk\", \"login\": \"john-unit-test\", \"status\": 0, \"email\": \"[email protected]\", \"locale\": \"en-US\", \"guid\": \"18b78dd1-2b43-44f7-9599-56ccb56a85dc\", \"owner_login\": \"admin\", \"external_id\" \"link:12345\", \"description\": \"nice guy\", \"password\": \"setup\", \"type\": \"reseller\"}

You will also find the system data here:

{
"platform": "Unix",
"hostname": "myplesklink.com",
"guid": "some uuid",
"panel_version": "18.0.26",
"panel_revision": "f01f47b9bea31b4186ff330d137e1aea57bb084a",
"panel_build_date": "2020-04-10",
"panel_update_version": "0",
"extension_version": "1.4.2",
"extension_release": "142"
}

Many thanks in advance!
 
From the error code it seems to be the password that is not complex enough (you need to give a password that complies with the requirements set by policy)
 
Back
Top