API

NOTE: API is an add-on feature of Workzone. For more details on upgrading your team's Workzone license, please contact us at help@workzone.com or call 610-275-9861.

Learn more about Workzone Enterprise.

Workzone has a robust API (Application Program Interface) which allows customers to access Workzone information from external sources.

From Google and Slack to Salesforce and Jira, Workzone can connect with the apps your team uses and loves. With it’s robust API, you can integrate your work in Workzone with the other leading tools in your team’s tech stack, even home-grown programs.
Check a project’s state, get your to-do list or grab time tracked on projects for use in your accounting software. Workzone makes it simple using standard API calls and clear documentation. For more information about adding API access to your Workzone site, call us at 610-275-9861 or email help@workzone.com

Setting up API

If your Workzone site has API access available, the following instructions are provided for its setup, found in the settings page for all workspaces, under the Global section, as API Access + Integrations. Where “[organization name]” is mentioned, substitute this with the portion of your own unique site’s URL.
To access the API, first register an “App”. A client_id and client_secret will be generated for that App, and those credentials can be used to acquire an access token. That access token is then used to make API calls via OAuth 2.

Getting a token

 curl --data "client_id=CLIENT_ID&client_secret=CLIENT_SECRET&grant_type=client_credentials" "https://[organization name].sharedwork.com/api/token" 
(replace CLIENT_ID and CLIENT_SECRET with your App’s client_id and client_secret, respectively.)
You will get a JSON response containing your access_token that looks like this:
 {"access_token":"RmluZCBhbnl0aGluZyBpbnRlcmVzdGluZz8","expires_in":3600} 

Calling the API

Now take that access_token, and use it to call the API:
 curl --header "Authorization: Bearer RmluZCBhbnl0aGluZyBpbnRlcmVzdGluZz8" "https://[organization name].sharedwork.com/api/test"
You will get a JSON response that looks like this:
 {"hostname":"[organization name].sharedwork.com",”currentDate":"Mon Aug 14 01:13:48 EDT 2017","message":"It worked!","user":"your email"} 
Note that "your email" is substituted with your actual email address.
After you have created an App, you can refer to the Interactive API Documentation found at [organization name].sharedwork.com/apidoc
Note that the client_secret cannot be recovered once generated – it can only be reset (similar to passwords). Also, if the status of an App becomes anything other than “Active”, a problem has occurred – please contact help@workzone.com to resolve it.

Special Considerations & Limitations

Since some API requests can take several minutes to run, requiring significant processing power, an API Client cannot initiate an API call while it already has one in progress. If a call is initiated while another one is in progress, a "429 Too Many Requests" error message will appear.

The following API calls that have page and pageSize parameters:

  • /projects
  • /projects/tasks
  • /projects/{projectID}/tasks
  • /reports/statusByProject
  • /reports/timeByProject

For those calls, the default page parameter is 1, and the maximum pageSize is 500. For responses that include more than 500 items, the call will need to be incremented to include additional pages. The page parameter will accept any non-zero integer.

Acceptable Use Policy

In order to ensure Workzone's API can maintain peak performance and security, we've laid out some basic guidelines for use. Please refer to our API Acceptable Use Policy for more information.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us