Team Members
ActiveCollab offers several API commands for team member management. To demonstrate these commands, we invited two members
Response: HTTP 200, application/json (Hide)
GET /users
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
[ { "id": 1, "class": "Owner", "url_path": "\/users\/1", "is_archived": false, "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "created_on": 1430164577, "created_by_id": 1, "updated_on": 1430164577, "updated_by_id": 1, "language_id": 0, "first_name": "Ilija.studen", "last_name": null, "display_name": "ilija.studen", "short_display_name": "ilija.studen", "email": "ilija.studen@activecollab.com", "additional_email_addresses": [], "is_pending_activation": false, "avatar_url": "http:\/\/feather.dev\/proxy.php?proxy=avatar&module=system&v=current&b=DEV&user_id=1&size=--SIZE--×tamp=1430164577", "custom_permissions": [], "company_id": 1, "title": null, "phone": null, "im_type": null, "im_handle": null, "note": null }, { "id": 2, "class": "Member", "url_path": "\/users\/2", "is_archived": false, "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "created_on": 1430164579, "created_by_id": 1, "updated_on": 1430164579, "updated_by_id": 1, "language_id": 0, "first_name": "Member1", "last_name": null, "display_name": "member1", "short_display_name": "member1", "email": "member1@activecollab.com", "additional_email_addresses": [], "is_pending_activation": false, "avatar_url": "http:\/\/feather.dev\/proxy.php?proxy=avatar&module=system&v=current&b=DEV&user_id=2&size=--SIZE--×tamp=1430164579", "custom_permissions": [], "company_id": 1, "title": null, "phone": null, "im_type": null, "im_handle": null, "note": null }, { "id": 3, "class": "Member", "url_path": "\/users\/3", "is_archived": false, "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "created_on": 1430164580, "created_by_id": 1, "updated_on": 1430164580, "updated_by_id": 1, "language_id": 0, "first_name": "Member2", "last_name": null, "display_name": "member2", "short_display_name": "member2", "email": "member2@activecollab.com", "additional_email_addresses": [], "is_pending_activation": false, "avatar_url": "http:\/\/feather.dev\/proxy.php?proxy=avatar&module=system&v=current&b=DEV&user_id=3&size=--SIZE--×tamp=1430164580", "custom_permissions": [], "company_id": 1, "title": null, "phone": null, "im_type": null, "im_handle": null, "note": null } ]
and created one team, which is empty at the moment:
Response: HTTP 200, application/json (Hide)
GET /teams/1
Response:
1 2 3 4 5 6 7 8 9 10 11 12
{ "single": { "id": 1, "class": "Team", "url_path": "\/teams\/1", "name": "Developers", "members": [], "created_on": 1430164580, "created_by_id": 1, "updated_on": 1430164580 } }
To add members, simply send POST request to /teams/:team_id/members:
Response: HTTP 200, application/json (Hide)
POST /teams/1/members
Payload:
1 2 3 4 5
[ 1, 2, 3 ]
Response:
1 2 3 4 5
[ 1, 2, 3 ]
Members can be removed with DELETE command:
Response: HTTP 200, text/html
DELETE /teams/1/members/2