Applicable to:
- Plesk for Linux
Symptoms
Creating an additional FTP user over the Plesk API fails:
# curl -k -u admin:'passXXXX' -X POST -d @plesk-ftp.json "http://<hostname>:8443/api/v2/ftpusers"
{
"code": 1014,
"message": "Parser error: Request is invalid. Error in line 1: Element 'webspace-id': '0' is not a valid value of the atomic type 'id_type'."
Cause
This is caused a by a product issue: EXTREST-158. It will be fixed in future updates.
Resolution
There's no ETA for the fix; follow this article to be notified of any updates. For now, the following workaround is available.
Note: Replace the required values (i.e. hostname, X-API-Key, FTP username, domain name, and password) in the commands below.
-
Create a secret key (X-API-Key):
# curl -iku admin:password -X POST -H 'Content-Type: application/json' -d'{}' https://hostname:8443/api/v2/auth/keys
-
Run this API-CLI call:
# curl -k -X POST "https://hostname:8443/api/v2/cli/ftpsubaccount/call" \
-H "X-API-Key: 67X1fX25-24dX-5eX8-bXe1-d9566X4Xf4X9" \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{ "params": ["--create", "jdoe", "-domain", "example.com", "-home", "/httpdocs", "-passwd", "password"]}'
Comments
0 comments
Please sign in to leave a comment.