Beginners Guide: Get Data From Wrike’s API Without Coding via Postman

 

Update (September 2020): Please be aware that the API request samples used in this article are taken from Wrike's API v3, while the current version is API v4. You can find the relevant API request samples in our documentation.

 

Mastering REST API is not an easy job — for the majority of use cases some advanced technical knowledge is needed, and the ability to code is essential if you want to create custom applications which fit your specific business needs.

But what if you’re not a developer or programmer? What if you’re a business person and you want to use Wrike’s API to access data? Is there a way to use APIs without coding?

The answer is YES! There are plenty of ways to interact with APIs without writing a single line of code. In this post I’ll describe one of the easiest ways to get started with Wrike’s API by using Postman, a popular Chrome add-in (now also a separate application).

Before You Start

You need:

  • The Postman app. Get it here.
  • An active Wrike account. It can be any subscription type.
  • A registered Wrike API application and its permanent token. For more details see our post Get Started with Wrike’s API and our article about the Developer Portal.

Background on Wrike’s API and Postman

Wrike

Wrike’s API supports GET, POST, PUT, and DELETE type requests and produces a JSON response which contains the entity type in the ‘kind’ field and an array of entities in the ‘data field.

HTTP requests are needed to get, post, modify, or delete data tied to a specific endpoint, which is indicated in the request URL. All URL’s start with ‘https://www.wrike.com/api/v3/’. However, the URL endpoints may vary as they are related to specific entities on Wrike’s side (like /tasks, /folders, /contacts, etc).

Additional parameters are required to define or filter data. You can find the list of supported methods and parameters in our API documentation.

Postman

Postman is an application used for interacting with APIs. Postman works by sending HTTP requests and can add request headers and parameters. The request builder is organized by tabs—one tab per request. Responses (from the API or server you're working with) are displayed on a separate section of the same tab, which makes Postman convenient for both sending and receiving data.

Set Up Postman to Access Wrike Data

Before starting we need to authorize Postman so that it can access data in Wrike. To do this we need to pass Postman’s Authorization header to Wrike’s API.

  1. Set up an environment in Postman. Check Postman’s guide on setting up environments to learn how to do this.
  2. Create the ‘access_token’ Key with the Key Value editor and paste your Wrike app’s permanent access token as the Value (screenshot). Click  ‘Add’ and close the environment editing interface.
  3. Make sure your custom environment is selected in the picker in the top-right corner of your main screen (screenshot).
  4. You can now add the Authorization header to any request (this step is required for requests to Wrike’s API) by using the key ‘Authorization’ and value: ‘bearer {{access_token}}’ (screenshot).

Use Postman to Get Data from Wrike’s API

All preparations are done, now on to the fun part!

In the example below, we’re going to get a complete list of Timelog-type records from the entire Wrike account

  1. Get the list of Wrike accounts your user is a member of.
    GET call to https://www.wrike.com/api/v3/accounts should help to achieve this (with Authorization header set up, we can click ‘Send’ and quickly get result (screenshot).
  2. Find the needed account ID in the response, copy and save it for the next step.
    In case you have multiple accounts in the Workspace, looking up by the account name should help (you can use the Search response feature in Postman).
  3. Obtain the list of Timelog entries.
    Make a GET call to https://www.wrike.com/api/v3/accounts/_ID_/timelogs (again, do not forget to check that the Authorization header is added), substituting the ‘_ID_’ with your account API v3 ID copied at step #2. More details on our Query Timelogs page.  

A list of Timelog records is generated, with extra parameters in JSON format (screenshot).

Please note, you won’t be able to obtain data related to Tasks, Folders, or Projects which aren’t shared with the user you are authorized as.  

You can use the same framework to pull the hours logged in the Time Tracker for any Wrike user, Folder, Project, or Task. You can use parameters to narrow down the results, our docs will provide you with the needed information.

Postman also has detailed documentation, which you may find helpful for mastering the possibilities available via API: Postman help docs.

Let me know how this works for your team! Will be happy to answer your questions.

Pavel M Community Team at Wrike Conosci le straordinarie funzionalità di Wrike e le best practices

3
17 commenti
Spot On Innovative Approach Stellar Advice
Avatar

Hi Pavel,

This is a great tutorial!  I am running into an error message once I get to the step "Get the list of Wrike accounts your user is a member of."

I created an environment with a key called "access_token" and a value with our specific permanent access token that was obtain through creating our app in Wrike.

I added a header with a key of "Authorization" and a value of "bearer {{access_token}}"

I selected the Wrike environment that was created, entered "https://wrike.com/api/v3/accounts" as the GET url and the response is:

{
"errorDescription": "Access token is unknown or invalid",
"error": "not_authorized"
}

Any trouble shooting ideas to resolve this error?  

Thank you in advance!

Jacob.

0
Azioni per commenti Permalink
Spot On Innovative Approach Stellar Advice
Avatar

Hi Jacob! Thanks for your question! Based on your description everything looks fine to me.

However, I would again double-check several things here:

  • please make sure your access token is correct (maybe generate a new one)
  • check out the selector for environments https://www.screencast.com/t/BsBZmDCy
  • make sure the syntax for environment key is correct 

Please let me know if you checked everything, but still have no success.



Pavel M Community Team at Wrike Conosci le straordinarie funzionalità di Wrike e le best practices

0
Azioni per commenti Permalink
Spot On Innovative Approach Stellar Advice
Avatar

I received the same unauthorized error. I checked and even generated a new access token.

0
Azioni per commenti Permalink
Spot On Innovative Approach Stellar Advice
Avatar

Hi Gaurav! I've noticed that in some cases this error can be returned if you use https://wrike.com.. instead of https://www.wrike.com... path (although both should be working fine in theory, as there's redirect in place). Could that be your case?

Pavel M Community Team at Wrike Conosci le straordinarie funzionalità di Wrike e le best practices

0
Azioni per commenti Permalink
Spot On Innovative Approach Stellar Advice
Avatar

I am still having the same unauthorized issue, even when adjusting the settings to use https://www.wrike.com/api/v3/accounts

0
Azioni per commenti Permalink
Spot On Innovative Approach Stellar Advice
Avatar

Hi 

I am receiving a CORS error on attempting to use POST:

{
"errorDescription": "Failed to authorize CORS request",
"error": "not_authorized"
}

I do not receive a similar error on using GET.

I am experiencing this using Postman and also a PHP based script running on a https domain of mine (Note: I have added this domain in the 'HTTP access control (CORS)' section in my Wrike app configuration settings.

Any help on this would be most appreciated.

UPDATE

I recreated the app within Wrike API console and created new access token. The issue is not happening now for the newly created app!

1
Azioni per commenti Permalink
Spot On Innovative Approach Stellar Advice
Avatar

Hi Aonghus! I am glad you had it resolved! If you are not adding CORS domain in Wrike's Dev Console for your App, no validation will happen on Wrike side, so it's better to leave it blank unless you are really intended to use it. 

Pavel M Community Team at Wrike Conosci le straordinarie funzionalità di Wrike e le best practices

0
Azioni per commenti Permalink
Spot On Innovative Approach Stellar Advice
Avatar

I am total beginner trying to follow this guide, and I am having trouble setting up postman. In your section, "Set Up Postman to Access Wrike Data" I am not sure if I have done the correct thing for step 1, since the linked article has no discrete instructions for creating a new environment. I named a new environment and then saved it. I am now firmly stuck on step 2 of the same section. The linked screenshot will not load and I cannot figure out what you are talking about. Where do I enter this information? I may have found the page by clicking "Params". Is that correct? If so, where do I enter the info? I am also confused by step 4 of the same section, not sure what to ask until I figure out these problems first, though. Please help me get this working so I can figure out what to learn next. Thanks for your time. 

0
Azioni per commenti Permalink
Spot On Innovative Approach Stellar Advice
Avatar

Hi, can anyone please offer some help? If you could get me up and running, I would be happy to write better setup instructions and provide working links; I am a technical writer by profession.

1
Azioni per commenti Permalink
Spot On Innovative Approach Stellar Advice
Avatar

Hi Jay! Sorry to make you wait, I am ready to help you :)

It looks like Postman docs have modified links for Environments instructions, the correct new link for Step 1 is: https://www.getpostman.com/docs/postman/environments_and_globals/manage_environments

The same thing is about the Key Value editor - I could not find any new suitable article.
Do you see something like this when editing your Environment? https://www.screencast.com/t/vOoq9h5SpQN

Pavel M Community Team at Wrike Conosci le straordinarie funzionalità di Wrike e le best practices

0
Azioni per commenti Permalink
Spot On Innovative Approach Stellar Advice
Avatar

Pavel, many thanks for your help. I contacted postman as well and they emailed about the same time you commented. Their support section is throwing a lot of 404's. Also, I was specifically looking for a menu called "Key Value Editor" based on your wording, which I now realize is simply a part of the "Manage Environment" screen. I have now configured postman and was successful running the test for the account information.

0
Azioni per commenti Permalink
Spot On Innovative Approach Stellar Advice
Avatar

Awesome! I am glad you have figured it out! By the way, the 'Key Value Editor' article is now back, my link should be functioning :)
Thanks for drawing Postman's attention to the issue.

Pavel M Community Team at Wrike Conosci le straordinarie funzionalità di Wrike e le best practices

0
Azioni per commenti Permalink
Spot On Innovative Approach Stellar Advice
Avatar

Hi Pavel-

I have exported comments from Asana using Postman and would like to import them into Write where task names match.  Do you know of a guide to import multiple records using Postman instead of just one at a time?  Thanks.

0
Azioni per commenti Permalink
Spot On Innovative Approach Stellar Advice
Avatar

It might be a helpful note that you have to adjust the url if your account is hosted in the EU data center. In this case you have to use https://app-eu.wrike.com/api/v3/accounts.

0
Azioni per commenti Permalink
Spot On Innovative Approach Stellar Advice
Avatar

I want to pull project tasks (including all comments and additional tabs data) from Wrike and push the data to ZD via API using POSTMAN. Does anyone know if this is possible and if there is any documentation out there that could assist me?

0
Azioni per commenti Permalink
Spot On Innovative Approach Stellar Advice
Avatar
Hugh

Hi Asaf Max!

It is currently not possible to pull comments and tasks into the same call.

Hope this helps! If you have any questions, let me know.

0
Azioni per commenti Permalink
Spot On Innovative Approach Stellar Advice
Avatar

Thanks for this article. I wish I would have found it a few months ago! It does need to be updated for the current version of Wrike API. I was able to get it to work by adjusting the following:

  • You don't need to put the account id in the request URL if you are using the permanent token
  • An example URL is https://www.wrike.com/api/v4/folders/ (note the v4 in the URL)
  • Add a key to the headers instead of using the Authorization setup with the Authorization as the KEY and VALUE = bearer {{access_token}} 
1
Azioni per commenti Permalink

Folllowing List for Post: Beginners Guide: Get Data From Wrike’s API Without Coding via Postman
[this list is visible for admins and agents only]

Didn’t find what you were looking for? Write new post