API Subscriptions
Response: HTTP 200, application/json (Hide)
POST /users
Payload:
1 2 3 4 5 6
{
"type": "Member",
"email": "member@activecollab.com",
"password": "123",
"company_id": 1
}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
{
"single": {
"id": 2,
"class": "Member",
"url_path": "\/users\/2",
"is_archived": false,
"is_trashed": false,
"trashed_on": null,
"trashed_by_id": 0,
"created_on": 1430164611,
"created_by_id": 1,
"updated_on": 1430164611,
"updated_by_id": 1,
"language_id": 0,
"first_name": "Member",
"last_name": null,
"display_name": "member",
"short_display_name": "member",
"email": "member@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=1430164611",
"custom_permissions": [],
"company_id": 1,
"title": null,
"phone": null,
"im_type": null,
"im_handle": null,
"note": null
}
}List API subscriptions:
Create a new subscription:
Response: HTTP 200, application/json (Hide)
POST /users/2/api-subscriptions
Payload:
1 2 3 4
{
"client_vendor": "activeCollab",
"client_name": "Narrative"
}Response:
1 2 3 4 5 6 7 8 9 10 11 12 13
{
"single": {
"id": 2,
"class": "ApiSubscription",
"url_path": "\/users\/2\/api-subscriptions\/2",
"created_on": 1430164612,
"user_id": 2,
"client_name": "Narrative",
"client_vendor": "activeCollab",
"token": "2-JwEBpVEPmyzxghnvGD07HUEBxBln0NGI0oVD583s",
"last_used_on": null
}
}If we try to change any of the subscription properties, system will throw Bad Request error:
Response: HTTP 404, text/html
PUT /users/2/api-subscriptions/2
Payload:
1 2 3
{
"token": "12"
}Lets delete a subscription:
Response: HTTP 200, text/html
DELETE /users/2/api-subscriptions/2
Confirmation that subscription has been deleted:
Response: HTTP 404, text/html
GET /users/2/api-subscriptions/2