Xpenser API: Project Participants

List Project Participants

URL: /api/v1.0/projects/participants/{{project.id}}

Method: GET

Sample Usage:

curl -u user:password "https://www.xpenser.com/api/v1.0/projects/participants/293"

Response:

[
    {
        "contact_id": 53811, 
        "project": {
            "status": "A", 
            "name": "Phase 1, Client X", 
            "level": 0, 
            "organization_id": 39659, 
            "externalid": "6789", 
            "id": 293
        }, 
        "approvalrole": null, 
        "contact": {
            "first_name": "Anthony", 
            "last_name": "Cedecas", 
            "user_id": 53867, 
            "type": "I", 
            "id": 53811, 
            "role": "", 
            "deptname": "", 
            "email": "anthony@crossrec.com"
        }, 
        "role": null, 
        "rule": "I", 
        "id": 277
    }
]

Add a Participant (employee) to a Project

URL: /api/v1.0/projects/participant/{{project_id}}/{{participant_id}}

Method: POST

Parameters:

Sample Usage:

Add the employee with id 53811 to the project with id 293

curl -u user:password -d "" \
    https://www.xpenser.com/api/v1.0/projects/participant/293/53811

Note the use of -d "" in the call above which ensures this is a POST request.

Response:

{
    "contact_id": 53811, 
    "project": {
        "status": "A", 
        "name": "Phase 1, Client X", 
        "level": 0, 
        "organization_id": 39659, 
        "externalid": "6789", 
        "id": 293
    }, 
    "approvalrole": null, 
    "contact": {
        "first_name": "Anthony", 
        "last_name": "Cedecas", 
        "user_id": 53867, 
        "type": "I", 
        "id": 53811, 
        "role": "", 
        "deptname": "", 
        "email": "anthony@crossrec.com"
    }, 
    "role": null, 
    "rule": "I", 
    "id": 277
}

Remove a Participant (employee) from a Project

URL: /api/v1.0/projects/participant/{{project_id}}/{{participant_id}}

Method: POST

Parameters:

Sample Usage:

Remove the employee with id 53811 to the project with id 293

curl -u user:password -d "action=delete" \
    https://www.xpenser.com/api/v1.0/projects/participant/293/53811

Response: HTTP 204 return code