This user guide only applies if your account and project is on our new platform, i.e. if your project's URL begins with https://<your-account>.xp-dev.com rather than https://xp-dev.com. If your account is on our old platform, you should be using this user guide instead.
Each User Object has the following attributes:
Attribute | Description |
---|---|
id | User’s unique ID |
Username | User’s unique username |
User’s email address | |
timezone | User’s timezone |
userRole | The role that this user has on the main account - one of User, Administrator or Owner (this is case sensitive) |
GET
request to https://<your-account>.xp-dev.com/api/v1/user
:
curl https://<your-account>.xp-dev.com/api/v1/user
Response will be a single User object:
{
"id": 1,
"username": "reader",
"timezone": "Europe/London",
"email": "admin@xp-dev.com",
"userRole": "Owner"
}
POST
request to https://<your-account>.xp-dev.com/api/v1/user
with the
following attributes:
Mandatory:
For example:
curl -X POST -d '{"username":"newchilduser","email":"example@example.com", "password":"FGdfosad", "userRole": "Administrator"}' -H 'Content-Type: application/json' https://<your-account>.xp-dev.com/api/v1/user
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
request to https://<your-account>.xp-dev.com/api/v1/user/<id>
:
curl https://<your-account>.xp-dev.com/api/v1/user/128
Response will be a single User Object
GET
request to https://<your-account>.xp-dev.com/api/v1/user/all
:
curl https://<your-account>.xp-dev.com/api/v1/user/all
Response will be a list of User Objects
DELETE
request to
https://<your-account>.xp-dev.com/api/v1/user/<user-id>
:
curl -X DELETE https://<your-account>.xp-dev.com/api/v1/user/128
Feel free to contact us if you need any assistance.