Categories
Rest-API connector able to store header token to use in another request?

We have a an instance of OAS 2023 that we will soon upgrade to OAS 2024.
One thing that drives this is that there is an API rest connector included in the 2024 version, and we have a use case that we want to explore.
We have another system that we want to request data to a dataset. This system requires a bearer token to be included in requests that results in data being sent. The bearer token is changed every 2 minutes, so OAS has to request the bearer token, save it and then include it in the next request.
What I am thinking is that I will create a dataflow that:
1. Requests bearer tokes and then saves it.
2. Uses the requested bearer token in the next request, which will result in a data load from the other system, reloading a dataset that is currently in OAS.
Is this feasable? Can I dynamically set the bearer token at all, or do I have to create a workaround with a script or some sort?
We have the option of having someone else create a system integration, but if it is feasable, we'd rather do it ourselves, but it is hard to understand from the documentation if what I want to do is possible. Since I do not have an instance of the 2024 version yet, I am unable to test it.
I have read
and think it is the "HttpHeader" authentication option that I have to use, but I am uncertain if it is meant to be static (from Oracles side of things), whereas the other system requires a dynamic approach.Best Answer
-
Hi,
The token is a static value that is saved in the connection. You can see it just like for the password of a database connection : it's part of the connection, and it is static. You can edit the connection and update the token, but that's not something a dataflow can do.
In OAS 2024 the REST API connection in DV is still flagged as "preview", but I don't believe it is much different in OAC (there are just so many different kind of APIs that this connection tries to handle a number of them, but isn't really a dynamic connection).
Do you have an Oracle Database? You could consider having the database doing the job: the database can call REST APIs, could get the token and use it for the next request, and then save the data in a table. You can then schedule it in the database to execute based on a scheduler, or trigger it's execution somehow by calling a package or running a query.
Keeping it short: what you would like to achieve is currently not possible in OAS 2024 as far as I know.
You can look in the ideas (
) if it has already been requested and upvote it, or post the idea. It could maybe be part of OAS 2025…0
Answers
-
I was afraid of this.
While we have Oracle database, we'd like to avoid direct queries to other systems from it, so we will likely build another solution instead.
This helped a ton as always, thank you!
0