XP-Dev.com Documentation

Old Permissions 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 Permission Object has the following attributes:

Attribute Description
id Unique permission ID
username User permissioned
permission Permission type, one of Read, Write, ProjectTrackingRead, ProjectTrackingWrite or Admin
projectId Project ID that this permission applies to

List all Project Permissions

GET request to https://xp-dev.com/api/v1/projectpermissions/project/<project-id>:

curl https://xp-dev.com/api/v1/projectpermissions/project/122

Responses will be a list of Permission Objects:

{"response":[
        {
            "id":13,
            "permission":"Write",
            "username":"simpleuser",
            "projectId":1
        },
        {
            "id":41,
            "permission":"Admin",
            "username":"reader",
            "projectId":1
        },
        {
            "id":64,
            "permission":"Write",
            "username":"otheruser",
            "projectId":1
        },
        {
            "id":65,
            "permission":"Read",
            "username":"someotherreader",
            "projectId":1
        }
        ]
}

List Permissions for a Child User

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

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

Responses will be a list of Permission Objects

List a Single Permission

GET request to https://xp-dev.com/api/v1/projectpermissions/<permission-id>:

curl https://xp-dev.com/api/v1/projectpermissions/65

Responses will be a Permission Object

Create a New Permission

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

Mandatory:

  • permission, either Read, Write, ProjectTrackingRead, ProjectTrackingWrite or Admin
  • username
  • projectId

Example request:

curl -X POST -d '{"permission":"Read","username":"otheruser","projectId":56}' -H 'Content-Type: application/json' https://xp-dev.com/api/v1/projectpermissions/

Delete a Permission

DELETE request to https://xp-dev.com/api/v1/projectpermissions/<permission-id>:

curl -X DELETE https://xp-dev.com/api/v1/projectpermissions/65

Feel free to contact us if you need any assistance.