WORKSECTION

Getting Started

Do you have API and how it can be used?

API is an appli­ca­tion pro­gram inter­face for inte­grat­ing one soft­ware with anoth­er.
Work­sec­tion API allows you to access our ser­vice and request/​send data for simul­ta­ne­ous inter­ac­tion of the ser­vice with oth­er programs.

SDK library to sim­pli­fy the work with our API.
​OAuth 2.0 library for easy work with the Work­sec­tion OAuth 2.0.
Use­ful arti­cles in our Blog.
​Method col­lec­tions in Post­man.

Was this article helpful? Yes, thank you! No

What is the way to get access to API?

To use API in our ser­vice, you must have an API key.

AccountAPI → Show API key



Note! Only the account own­er has access to the API key!

Was this article helpful? Yes, thank you! No

What are API functions in the Worksection system?

All the main fea­tures and func­tions, pre­sent­ed in the sys­tem itself, are avail­able through our API, namely:

For par­tic­i­pants and con­tacts:
  • cre­ate teams for mem­bers and fold­ers for contacts 
  • cre­ate contacts 
  • invite new account members
  • get a list of teams, mem­bers and contacts 
  • add and exclude project members
  • sub­scribe and unsub­scribe task members

For tasks and com­ments:
  • cre­ate, edit, close and reopen tasks
  • get task data 
  • get a list of: 
  • all tasks
  • tasks of a spe­cif­ic project 
  • tasks accord­ing to search parameters 
  • post and get task comments
  • cre­ate, set and remove task statuses/​labels

For projects:
  • cre­ate, edit, archive and acti­vate projects 
  • cre­ate folders 
  • get project data 
  • get a list of projects and folders 
  • cre­ate, set and remove project statuses/​tags

For entered costs and enabled timers:
  • cre­ate, update and delete time and finan­cial costs 
  • get par­tic­u­lar cost rows and total costs for projects and indi­vid­ual tasks 
  • get a list of enabled mem­ber timers 
  • stop enabled mem­ber timers 

For files:
  • the abil­i­ty to attach files to com­ments and project/​task descrip­tions dur­ing cre­ation as well as to get uploaded and attached files

Note! To pre­vent the loss, acci­den­tal dele­tion or inten­tion­al destruc­tion of cru­cial data, the abil­i­ty to delete most of the data was exclud­ed, namely:
  • projects/​tasks/​comments
  • account members/​contacts
  • project/​task statuses/​labels
  • uploaded and attached files
Was this article helpful? Yes, thank you! No

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&
&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
  • PARAM_NAME — a number of parameter names of the corresponding method (if necessary)
  • hash — verification value generated in MD5 format from some linked parameters, 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($<all parameters>.$action.$apikey) 
Important! The API can be accessed both through an admin token (API key) and a user token without a hash (OAuth2 token).

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

Method col­lec­tions in Post­man.
Was this article helpful? Yes, thank you! No
esc
или
Print