WORKSECTION

Getting Started

Do you have API and how it can be used?

API is an application program interface for integrating one software with another. Worksection API allows you to access our service and request/send data for simultaneous interaction of the service with other programs.

What is the way to get access to API?

To use API in our service, you must have an API key.

AccountSecurityAdmin APIShow API key


Note! Only the account owner has access to the API key!


What are API functions in the Worksection system?

All the main features and functions, presented in the system itself, are available through our API, namely:

For participants and contacts:
  • create teams for members and folders for contacts
  • create contacts
  • invite new account members
  • get a list of teams, members and contacts
  • add and exclude project members
  • subscribe and unsubscribe task members

For tasks and comments:
  • create, edit, close and reopen tasks
  • get task data
  • get a list of:
  • all tasks
  • tasks of a specific project
  • tasks according to search parameters
  • post and get task comments
  • create, set and remove task statuses/labels

For projects:
  • create, edit, archive and activate projects
  • create folders
  • get project data
  • get a list of projects and folders
  • create, set and remove project statuses/tags

For entered costs and enabled timers:
  • create, update and delete time and financial costs
  • get particular cost rows and total costs for projects and individual tasks
  • get a list of enabled member timers
  • stop enabled member timers

For files:
  • the ability to attach files to comments and project/task descriptions during creation as well as to get uploaded and attached files

Note! To prevent the loss, accidental deletion or intentional destruction of crucial data, the ability to delete most of the data was excluded, namely:
  • projects/tasks/comments
  • account members/contacts
  • project/task statuses/labels
  • uploaded and attached files

Main principles of API-based work

To create GET or POST requests in the Worksection API use the following link

https://your-domain.worksection.com/api/admin/v2/?action=ACTION_NAME&
page=LINK_URL&PARAM_NAME1=PARAM_VALUE&...&PARAM_NAME_N=PARAM_VALUE&hash=HASH
  • your-domain.worksection.com — address of your Worksection account, registered in the system
  • action — name of the corresponding method
  • page — system link to a project, task or subtask without a name of the account:
  • /project/PROJECT_ID/ — for projects
    /project/PROJECT_ID/TASK_ID/ — for tasks
    /project/PROJECT_ID/TASK_ID/SUBTASK_ID/ — for subtasks and sub-subtasks
    Specified links can be obtained either directly from the browser address bar, while being on a project or task/subtask page, or composed by getting the corresponding identifiers through the following methods:
    id of a task/subtask can be obtained through get_all_tasks method
    id of a project can be obtained through get_projects method
  • PARAM_NAME — a number of parameter names of the corresponding method (if necessary)
  • hash — verification value generated in MD5 format from three linked parameters: page, action and your API key, placed one by one without spaces in the specified order
An example of MD5 hash structure in PHP:

 $hash = md5($page.$action.$apikey) 
Note! In some methods, the page parameter is not required or is optional, which must be considered when forming a hash value:

 $hash = md5($action.$apikey) 

Response is formed in JSON format with UTF-8 encoding

The status field contains information about the request status:
  • ok — request succeeded
  • error — error occurred

Sample response if a request succeeded

{
    "status": "ok" 
} 
Sample response if an error occurred

{
    "status": "error",
    "status_code": 2,
    "message": "Action hash is missed or invalid" 
} 
In case of an error status, the status_code and message fields will contain information about the error (in some cases there will be an additional message_details field with additional details about the error).

Correspondence between status_code / message fields:

// query errors or a verification 
  • 0 — Action is invalid
  • 1 — Action is required
  • 2 — Action hash is missed or invalid
// errors in the URL
  • 3 — Page is invalid
  • 4 — Project is invalid
  • 5 — Task is invalid
  • 6 — Subtask is invalid
  • 7 — Project is required
  • 8 — Task is required
  • 9 — Subtask is required
// other errors
  • 10 — Field is required, message_details contains the name of the field
  • 11 — Invalid email, message_details contains invalid email
  • 12 — Task is already closed
  • 13 — Task has children
  • 14 — Subtask is already closed
  • 15 — Subtask has children
  • •••
  • 20 — Quota exceeded


esc
или
Print