Skip to content
How to make a custo...
 
Notifications
Clear all

How to make a custom API call for REST?

19 Posts
4 Users
0 Reactions
8 Views
Daniel_Lof
(@daniel_lof)
Posts: 10
Active Member
Topic starter
 

I'm having trouble configuring the HTTP module for an API Key authentication request. I've obtained an API token from the service provider, which is xxxxxxxxxx.

My goal is to fetch a list of available items from the data source and then publish them to a Google Sheet.

The GET request endpoint is https://api.teamtailor.com/v1/jobs .

I can establish a connection to the API, but I'm unable to retrieve any data. Any guidance on this would be greatly appreciated.

 
Posted : 07/11/2022 11:08 am
SebastianMertens
(@sebastianmertens)
Posts: 8
Active Member
 

Please use the following for Item 1:

Name:
Authorization

Value:
Token token=XXXXXXX

And omit the API Version; it only expects the number.

 
Posted : 07/11/2022 1:18 pm
SebastianMertens
(@sebastianmertens)
Posts: 8
Active Member
 

You shared the Token in clear-text, please upload a blurred pic. Thanks!

Can you share the API Docs to sort this?

Please provide the rewritten markdown content.

 
Posted : 07/11/2022 1:47 pm
Daniel_Lof
(@daniel_lof)
Posts: 10
Active Member
Topic starter
 

Certainly! Once I have a working scenario, everything will become much clearer.

The specific goal I'm trying to accomplish is to retrieve a list of all jobs posted by clients in Teamtailor.

I truly appreciate your help. Thank you.

 
Posted : 07/11/2022 1:56 pm
SebastianMertens
(@sebastianmertens)
Posts: 8
Active Member
 

I suspect your header is still not configured correctly.

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

Kindly ensure that before "Token", you include Token token=0-934-09234-2394-09asdasd. Additionally, it appears you are missing the X-Api-Version header.

 
Posted : 07/11/2022 2:41 pm
Daniel_Lof
(@daniel_lof)
Posts: 10
Active Member
Topic starter
 

Understood! I'm now retrieving the data. Thank you for all the assistance! I will proceed with configuring the Google Sheets component.

 
Posted : 07/11/2022 3:23 pm
SebastianMertens
(@sebastianmertens)
Posts: 8
Active Member
 

Certainly, please feel free to share your challenges with us whenever you need to!

 
Posted : 07/11/2022 6:56 pm
Daniel_Lof
(@daniel_lof)
Posts: 10
Active Member
Topic starter
 

Thanks! I'm now successfully sending data to Google Sheets, but it appears I'm only receiving the first row of data from the API. I'm working on figuring out how to display all the rows.

:face_with_raised_eyebrow:

 
Posted : 07/11/2022 7:19 pm
Daniel_Lof
(@daniel_lof)
Posts: 10
Active Member
Topic starter
 

This could potentially be a setting within the Google Sheets module in the workflow. I'll try exploring different options.

 
Posted : 07/11/2022 7:36 pm
SebastianMertens
(@sebastianmertens)
Posts: 8
Active Member
 

You likely need to parse the JSON and employ an Iterator.

Tipp: https://www.callin.io/en/help/modules/iterator

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

 
Posted : 07/11/2022 7:39 pm
Daniel_Lof
(@daniel_lof)
Posts: 10
Active Member
Topic starter
 

Thank you, I suspected this was necessary after reviewing numerous posts and documentation. I've been attempting to configure it, and it has successfully created several rows in the Google Sheet, but each header is returning the same value, so I still have some configuration adjustments to make. I'll include some screenshots of the scenario and the outcome.

I also tried posting in the Professional Services section, but for some reason, I'm unable to create a new topic there.

 
Posted : 08/11/2022 7:22 am
Daniel_Lof
(@daniel_lof)
Posts: 10
Active Member
Topic starter
 

I'm really trying to figure this out independently (with some helpful guidance) before I delegate it, but my project timeline is becoming quite tight.

 
Posted : 08/11/2022 7:23 am
Bjorn.drivn
(@bjorn-drivn)
Posts: 13
Active Member
 

Hey,

So the data you're mapping in your Google Sheet originates from the HTTP module, and it appears to be an array of data. When you utilize an array as a variable within your scenario, it will consistently select a specific index from that array, meaning it will always be the same data.

If you wish to loop through the array, employ an iterator and then map the values from the iterator rather than the HTTP module. This approach will ensure you have the correct data.

:wink:

 
Posted : 08/11/2022 11:40 am
Daniel_Lof
(@daniel_lof)
Posts: 10
Active Member
Topic starter
 

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

 
Posted : 08/11/2022 12:09 pm
Daniel_Lof
(@daniel_lof)
Posts: 10
Active Member
Topic starter
 

Although the process is now functional, retrieving and posting data into Google Sheets columns via an Iterator only pulls 10 collections (rows), while 316 are available. This suggests a default setting is likely in place that I might be overlooking.

 
Posted : 08/11/2022 5:25 pm
Page 1 / 2
Share: