How to make a custom API call for REST?

I have a hard time figuring out how to set up the HTTP module for a API Key Auth request. I have generated a api token from the service provider which is xxxxxxxxxx.

My aim is to retrieve a list of listed items from the data source and publish them to a google sheet.

The GET for this is https://api.teamtailor.com/v1/jobs

I can connect to the api but not retrieve any information. Any pointers would be much appreciated.


Please use in Item 1:

Name:
Authorization

Value:
Token token=XXXXXXX

And remove the API Version it only expects the nr.

@Daniel_Lof

1 Like

@Daniel_Lof you shared the Token in clear-text please upload a blured pic. Thanks!

Can you share the API Docs to sort this?

1 Like

Sure! Once I get one scenario set up to work then everything will be much clearer.

The specific thing I am trying to achieve is to list all jobs that is posted by client in Teamtailor.

I really appreciate the assistance. Thank you.

I assume your header is still not the right header one.

--header 'Authorization: Token token=od71S1zmxWetVvzz6ovSeznEPb-OdsZZSX9EeBi9' \
--header 'X-Api-Version: 20210218'

Before “token” please add Token token=0-934-09234-2394-09asdasd as well as you are missing the X-Api-Version.

1 Like

Got it! Now getting data. Thanks for all the help! Will now continue to configure the google sheet part.

1 Like

Sure feel free to share your challenges with us at any time!

2 Likes

Thanks! I am now getting data to google sheets, but I only get the first row of data from the api. Trying to figure out how to display all rows :face_with_raised_eyebrow:

Although this might be a setting in the google sheet module in the scenario. Trying different alternatives.

You probably need to parse the JSON and use an Iterator.

Tipp: https://www.make.com/en/help/modules/iterator

Check here for a professional service provider they can probably set this up quite fast. Professional Services - Make Community

Thank you, yes I was figuring that this was needed after reading a lot of posts and documentation. Been trying to set it up, and got it to create several rows in the google sheet but for each header it returned the same value so I still have some configuration to do. I’ll attach some screenshots of the scenario and result.

I was also trying to post in the Professional Services but for some reason I am not allowed to create a new topic there.







Really trying to figure out this by myself (with some appreciated assistance) before outsourcing it, but time is running out for me on this project.

Hey @Daniel_Lof ,

So the data you are mapping in your google sheet comes from the HTTP module, and this seems to be an array of data. If you use an array as variable within your scenario, it will always only use a certain index of the array, which means it will always be the same data.

If you would like to iterate over the array, use an iterator and then map the values from the iterator and not the HTTP module. This way it will have the correct data :wink:

3 Likes

Thanks! That was the final piece of the puzzle! Now working as planned!

2 Likes

Although now working, data is retrieved and posted into columns in google sheet via an Iterator, it only retrieves 10 collections (rows), and there are 316 available. Seems like this must be a default setting somewhere that I am missing.

@Daniel_Lof no this is not a setting, this is how the Teamtailor API was build.
Every “List jobs” request outputs 10 records within the array, and a “links” object which will contain the next page. If you want mulitple / all records you will have to iterate over the amount of next pages.

You can take a look here for inspiration:

3 Likes

Ah cool! Thanks for the inspiration. I’ve never created a loop before, now is a perfect time to try and learn.

2 Likes

This is a case study in using an API from scratch. Thanks everyone for participating. Also try Postman to learn about APIs.

3 Likes

No problem @Daniel_Lof ! Great topic for anyone else trying to learn REST APIs

2 Likes