The documentation describes the external API to access Cenno resources using simple HTTP REST API. It allows to delete, update, post and get resources.
API access
The API is accessible via URL https://example.cennoapp.com/api . ’example’ should be replaced with account code.
Authentication
Authentication is done using basic HTTP authentication. API key should be used as username. Password can be left empty or can be the same as username.
API
Company
Get list
https://example.cennoapp.com/api/companies
HTTP request method: GET.
Response example:
[ { "id": 622, "title": "Sample Company", "responsible_id": 1178, "url": "", "type_id": null, "business": "", "contract": false, "contract_start": null, "contract_end": null, "street": "", "post_code": "", "city": "", "country": "", "phone": "", "created_at": "2016-08-15T16:46:05+03:00", "updated_at": "2016-08-15T16:49:45+03:00", "external_id": null, "projects_count": 2, "business_id": "", "vat_code": "", "employees": null, "contact_person_id": null, "fax": "", "notes": "", "billing_street": "", "billing_post_code": "", "billing_city": "", "billing_country": "" } ]
Get one by id
https://example.cennoapp.com/api/companies/622
HTTP request method: GET.
Response example:
{ "id": 622, "title": "Sample Company", "responsible_id": 1178, "url": "", "type_id": null, "business": "", "contract": false, "contract_start": null, "contract_end": null, "street": "", "post_code": "", "city": "", "country": "", "phone": "", "created_at": "2016-08-15T16:46:05+03:00", "updated_at": "2016-08-15T16:49:45+03:00", "external_id": null, "projects_count": 2, "business_id": "", "vat_code": "", "employees": null, "contact_person_id": null, "fax": "", "notes": "", "billing_street": "", "billing_post_code": "", "billing_city": "", "billing_country": "" }
User
Get list
https://example.cennoapp.com/api/users
HTTP request method: GET.
Response example:
[ { "id": 1178, "first_name": "Vida", "last_name": "Thompson", "title": null, "email": "example@cennoapp.com", "phone": null, "birthday": null, "allow_access": true, "crypted_password": "400$8$47$efb6f6c1f156e30a$c46fd96c454084f74d131d8fb9b9380c6479e8a5b7be3f9c6628d1cf16839351", "password_salt": "73Japn2HuoS5RjKx8F8k", "persistence_token": "fa036944de3dd239de0310abf351dd0d5bcbfe16af70170af57f9ed0af8688ea8003c6f91280a9feab4f3dfa08e1d2db8a668f513be47bfd2729b115f005646f", "perishable_token": "8USYBBYqtNgtkIw7b9tC", "current_login_at": "2016-08-15T16:47:13+03:00", "last_login_at": "2016-08-15T16:46:05+03:00", "current_login_ip": "::1", "last_login_ip": "::1", "created_at": "2016-08-15T16:46:05+03:00", "updated_at": "2016-08-15T17:07:41+03:00", "company_id": 622, "external_id": null, "role": "owner", "email_format": "html", "last_request_at": "2016-08-15T17:07:41+03:00", "token": "d9d801669d", "enable_item_reminders": true, "enable_milestone_reminders": true, "enable_notifications": true, "locale_id": 1, "keep_locale": false, "office_phone": null, "notes": null, "failed_login_count": 0, "last_password_reset_sent_at": "2016-08-15T16:46:08+03:00", "deleted_at": null } ]
Get one by id
https://example.cennoapp.com/api/users/471
HTTP request method: GET.
Example response:
{ "id": 1178, "first_name": "Vida", "last_name": "Thompson", "title": null, "email": "example@cennoapp.com", "phone": null, "birthday": null, "allow_access": true, "crypted_password": "400$8$47$efb6f6c1f156e30a$c46fd96c454084f74d131d8fb9b9380c6479e8a5b7be3f9c6628d1cf16839351", "password_salt": "73Japn2HuoS5RjKx8F8k", "persistence_token": "fa036944de3dd239de0310abf351dd0d5bcbfe16af70170af57f9ed0af8688ea8003c6f91280a9feab4f3dfa08e1d2db8a668f513be47bfd2729b115f005646f", "perishable_token": "8USYBBYqtNgtkIw7b9tC", "current_login_at": "2016-08-15T16:47:13+03:00", "last_login_at": "2016-08-15T16:46:05+03:00", "current_login_ip": "::1", "last_login_ip": "::1", "created_at": "2016-08-15T16:46:05+03:00", "updated_at": "2016-08-15T17:07:41+03:00", "company_id": 622, "external_id": null, "role": "owner", "email_format": "html", "last_request_at": "2016-08-15T17:07:41+03:00", "token": "d9d801669d", "enable_item_reminders": true, "enable_milestone_reminders": true, "enable_notifications": true, "locale_id": 1, "keep_locale": false, "office_phone": null, "notes": null, "failed_login_count": 0, "last_password_reset_sent_at": "2016-08-15T16:46:08+03:00", "deleted_at": null }
Project
Get list
https://example.cennoapp.com/api/projects
HTTP request method: GET.
Response example:
[ { "id": 1274, "title": "Getting started", "description": "Welcome to Cenno!rnrnThe purpose of this pre-populated Getting Started –project and the six items in it, is to be able to start using Cenno quick, and invate your team members to Cenno by email. Cenno is foremost a team tool and its features are build around multiple users.rnrnYou can always return to the opening dashboard view by clicking the Dashboard-tab in the top left corner or by using the back-button in your browser.rnrnPlease spend few minutes browsing through the help-section by clicking the Help-link in the top right corner, even if this might feel like waste of your valuable time. Inside the Help you also find the FAQ section containing information about Cenno and its security aspects. rn", "company_id": 622, "status_id": 1253, "external_id": null, "start_date": "2016-08-15", "end_date": "2016-09-14", "created_at": "2016-08-15T16:46:06+03:00", "updated_at": "2016-08-15T16:46:07+03:00", "items_count": 6, "progress_percent": 0, "restricted": false, "sandbox": false, "completed": false, "status_type": "open", "assignee_can_close_items": false } ]
Get one by id
https://example.cennoapp.com/api/projects/1274
HTTP request method: GET.
Response example:
{ "id": 1274, "title": "Getting started", "description": "Welcome to Cenno!rnrnThe purpose of this pre-populated Getting Started –project and the six items in it, is to be able to start using Cenno quick, and invate your team members to Cenno by email. Cenno is foremost a team tool and its features are build around multiple users.rnrnYou can always return to the opening dashboard view by clicking the Dashboard-tab in the top left corner or by using the back-button in your browser.rnrnPlease spend few minutes browsing through the help-section by clicking the Help-link in the top right corner, even if this might feel like waste of your valuable time. Inside the Help you also find the FAQ section containing information about Cenno and its security aspects. rn", "company_id": 622, "status_id": 1253, "external_id": null, "start_date": "2016-08-15", "end_date": "2016-09-14", "created_at": "2016-08-15T16:46:06+03:00", "updated_at": "2016-08-15T16:46:07+03:00", "items_count": 6, "progress_percent": 0, "restricted": false, "sandbox": false, "completed": false, "status_type": "open", "assignee_can_close_items": false }
Category
Get list
https://example.cennoapp.com/api/categories
HTTP request method: GET.
Response example:
[ { "id": 1097, "project_id": 1274, "title": "Sample category", "position": 0, "created_at": "2016-08-15T17:48:01+03:00", "updated_at": "2016-08-15T17:48:01+03:00", "external_id": null } ]
Get one by id
https://example.cennoapp.com/api/categories/1097
HTTP request method: GET.
Response example:
{ "id": 1097, "project_id": 1274, "title": "Sample category", "position": 0, "created_at": "2016-08-15T17:48:01+03:00", "updated_at": "2016-08-15T17:48:01+03:00", "external_id": null }
Item
Get list
https://example.cennoapp.com/api/items
HTTP request method: GET.
Response example:
[ { "id": 10346, "title": "1. Read Help and FAQ", "description": "Welcome to Cenno!rnrnThe purpose of this pre-populated Getting Started –project and the six items in it, is to be able to start using Cenno quick, and invate your team members to Cenno by email. Cenno is foremost a team tool and its features are build around multiple users.rnrnYou can always return to the opening dashboard view by clicking the Dashboard-tab in the top left corner or by using the back-button in your browser.rnrnPlease spend few minutes browsing through the help-section by clicking the Help-link in the top right corner, even if this might feel like waste of your valuable time. Inside the Help you also find the FAQ section containing information about Cenno and its security aspects.rn", "project_id": 1274, "category_id": 1097, "type_id": 309, "owner_id": 1178, "assignee_id": 1178, "status_id": 1089, "priority_id": 1042, "estimated_hours": 0, "spent_hours": 0, "remaining_hours": 0, "in_budget": false, "rate": 0, "work_type_id": 431, "created_at": "2016-08-15T16:46:06+03:00", "updated_at": "2016-08-15T17:48:01+03:00", "importance": 0, "external_id": null, "status_type": "open", "start_date": "2016-08-15", "end_date": "2016-08-16", "progress_percent": 0, "milestone_id": null, "private": false, "resolved_at": null, "simple_start_date": null, "simple_end_date": null } ]
Get one by id
https://example.cennoapp.com/api/items/10346
HTTP request method: GET.
Response example:
[ { "id": 10346, "title": "1. Read Help and FAQ", "description": "Welcome to Cenno!rnrnThe purpose of this pre-populated Getting Started –project and the six items in it, is to be able to start using Cenno quick, and invate your team members to Cenno by email. Cenno is foremost a team tool and its features are build around multiple users.rnrnYou can always return to the opening dashboard view by clicking the Dashboard-tab in the top left corner or by using the back-button in your browser.rnrnPlease spend few minutes browsing through the help-section by clicking the Help-link in the top right corner, even if this might feel like waste of your valuable time. Inside the Help you also find the FAQ section containing information about Cenno and its security aspects.rn", "project_id": 1274, "category_id": 1097, "type_id": 309, "owner_id": 1178, "assignee_id": 1178, "status_id": 1089, "priority_id": 1042, "estimated_hours": 0, "spent_hours": 0, "remaining_hours": 0, "in_budget": false, "rate": 0, "work_type_id": 431, "created_at": "2016-08-15T16:46:06+03:00", "updated_at": "2016-08-15T17:48:01+03:00", "importance": 0, "external_id": null, "status_type": "open", "start_date": "2016-08-15", "end_date": "2016-08-16", "progress_percent": 0, "milestone_id": null, "private": false, "resolved_at": null, "simple_start_date": null, "simple_end_date": null } ]
Time entry
Get list
https://example.cennoapp.com/api/time_entries
HTTP request method: GET.
Response example:
[ { "id": 14915, "user_id": 1178, "item_id": 10346, "project_id": 1274, "date": "2016-08-15", "hours": 2, "description": "Sample time entry", "created_at": "2016-08-15T17:59:21+03:00", "updated_at": "2016-08-15T17:59:21+03:00", "external_id": null, "billable": true } ]
Get one by id
https://example.cennoapp.com/api/time_entries/14915
HTTP request method: GET.
Response example:
{ "id": 14915, "user_id": 1178, "item_id": 10346, "project_id": 1274, "date": "2016-08-15", "hours": 2, "description": "Sample time entry", "created_at": "2016-08-15T17:59:21+03:00", "updated_at": "2016-08-15T17:59:21+03:00", "external_id": null, "billable": true }
Create new
https://example.cennoapp.com/api/time_entries
HTTP request method: POST.
Request example:
{ "time_entry": { "user_id": 1178, "item_id": 10346, "project_id": 1274, "date": "2016-08-15", "hours": 1, "description": "Test entry", "external_id": null, "billable": true } } Response example:
{ "id": 14916, "user_id": 1178, "item_id": 10346, "project_id": 1274, "date": "2016-08-15", "hours": 1, "description": "Test entry", "created_at": "2016-08-15T18:03:25+03:00", "updated_at": "2016-08-15T18:03:25+03:00", "external_id": null, "billable": true }
Update
https://example.cennoapp.com/api/time_entries/14916
HTTP request method: PUT.
Example request:
{ "time_entry": { "user_id": 1178, "item_id": 10346, "project_id": 1274, "date": "2016-08-15", "hours": 1, "description": "Test entry X", "external_id": null, "billable": true } }
Response example:
{ "id": 14916, "user_id": 1178, "item_id": 10346, "project_id": 1274, "date": "2016-08-15", "hours": 1, "description": "Test entry X", "created_at": "2016-08-15T18:03:25+03:00", "updated_at": "2016-08-15T18:05:58+03:00", "external_id": null, "billable": true }
Delete
https://example.cennoapp.com/api/time_entries/14916
HTTP request method: DELETE.
Validation errors
If validation errors would occur during creation or updating of resource they are returned in response.
Example:
Response Status: 422
{ "hours": [ "must be greater than 0" ] }
Not found resource
If resource is not found by id, server responds with status 404.
Example:
https://example.cennoapp.com/api/time_entries/7874
HTTP request method: GET.
Response Status: 404