XP-Dev.com Documentation

Old Sub Accounts API

This user guide only applies if your account and project is on our old platform, i.e. if your project's URL begins with https://xp-dev.com rather than https://<your-account>.xp-dev.com. If your account is on our new platform, you should be using this user guide instead.

Each User Object has the following attributes:

Attribute Description
Username User’s unique username
allowParentProjects If this user is a child user, whether he/she is allowed to create projects on behalf of the parent user
email User’s email address
sizeQuota size quota for user
projectQuota project quota for user, 0 = unlimited
timezone User’s timezone
backups Whether backups are activated for projects owned by this account (Pro option)
ssl Whether SSL is enabled for projects owned by this account (Pro option)

Get Current User

GET request to https://xp-dev.com/api/v1/user/:

curl https://xp-dev.com/api/v1/user/

Response will be a single User object:

{"response":{
        "username":"reader",
        "allowParentProjects":false,
        "email":"hundalz@gmail.com",
        "sizeQuota":1024.0,
        "projectQuota":0,
        "timezone":"Europe/London",
        "backups":true,
        "ssl":true
    }}

Create a new Child User

POST request to https://xp-dev.com/api/v1/user/childuser with the following attributes:

Mandatory:

  • username
  • allowParentProjects
  • email

Optional:

  • password

For example:

curl -X POST -d '{"username":"newchilduser","allowParentProjects":true,"email":"example@example.com"}' -H 'Content-Type: application/json' https://xp-dev.com/api/v1/user/childuser

If a password is NOT supplied in the request then a random password will be set for the user and emailed to the specified email address.

Response will be a single User Object

Get a single Child User

GET request to https://xp-dev.com/api/v1/user/childuser/<username>:

curl https://xp-dev.com/api/v1/user/childuser/jsmith

Response will be a single User Object

Reset a Child User Password

POST request to https://xp-dev.com/api/v1/user/childuser/resetpassword/<username>:

curl -X POST https://xp-dev.com/api/v1/user/childuser/resetpassword/jsmith

Response will be:

{"response":{
        "username":"jsmith",
        "clearTextPassword":"QT5IkEjg"
    }}

The returned attributes are:

Attribute Description
Username User’s unique username
clearTextPassword The new password in clear-text. The user will need to use this when logging in next

The new password is NOT sent to the user in anyway. This should be managed by the API caller.

Delete a Child User

DELETE request to https://xp-dev.com/api/v1/user/childuser/<username>:

curl -X DELETE https://xp-dev.com/api/v1/user/childuser/jsmith

List all Child Users

GET request to https://xp-dev.com/api/v1/user/childusers:

curl https://xp-dev.com/api/v1/user/childusers

Response will be a list of User objects owned by the calling user.

Feel free to contact us if you need any assistance.