An activity can have one or more secondary owners (called 'others' in the web ui). These endpoints are for listing all the possible owners - and showing the selected ones, and also an API for updating the activity with selected secondary owners
Secondary Owners
| Parameter | Mandatory | Description | Examples | More Info |
|---|---|---|---|---|
| API | Yes | The API area | activities.json | |
| General | Yes | Parameters described in API syntax section | Structure of an API call | |
| Company | Yes | The company number | company=1 | |
| Action | Yes | The action to perform | action=secondaryowners | |
| User IDs | Yes | Selected secondary owners | userid=[242,192] |
To update the secondary owners, use the Update action and the field name "activitySecondaryOwnersUserID"=[]
Example request (OAuth 2.0):
Authorization: Bearer <access_token>
http://<SERVER>/jsonapi/activities.json?&company=1&action=secondaryowners&userid=[242,192]&version=6
Example request (legacy username/password):
http://<SERVER>/jsonapi/activities.json?&company=1&action=secondaryowners&userid=[242,192]&version=6&user=<username>&password=<password>
Example response:
{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"totalrows": 172,
"totalpages": 1,
"responsemessage": "",
"pagerows": 0,
"pagenumber": 1,
"success": true,
"data": [
{
"userFullName": "Jim Smith",
"userUserId": 344,
"variable_selected": false
},
{
"userFullName": "Aaron Cronshaw",
"userUserId": 242,
"variable_selected": true
}
]
}