Skip to main content
Solved

Working with RSD file with TX version 6892

  • February 18, 2025
  • 8 replies
  • 78 views

avanrijn
Contributor
Forum|alt.badge.img+2

Dear sir,

Is it still possible to work with RSD files in TX version 6892 ?

I found this link: 


Is it possible to do something like this with the latest 8.0 TimeXtender REST provider ?

I am trying to work with an API that is refreshing there Bearer Token every hour
“expiresIn”: 3600

curl -X 'POST' \
  'https://openapi.binnenbeter.nl/api/v1/login' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "tenant": "horstaandemaas",
  "username": "*****",
  "password": "*****"
}'
{
  "token": "eyJwMmMi**********lRW5SWTZKaTFzb1EiLCJhbGciOiJQQkVTMi1IUzUxMitBMjU2S1ciLCJlbmMiOiJBMjU2R0NNIn0.J8cstvlbqRrWzsRulKtnBFv4eKG6r3fvudZI*********gvjw",
  "tokenType": "Bearer",
  "roles": "ADMIN, API",
  "expiresIn": 3600
}

So I have to come up with a solution that dynamically refreshes the token before it is fetching the data or else the API will deny access because the token is out of date.

If you have any ideas please let me know. 

The plan is: What I am trying is to run a powershell script to fetch the new token and then updates the RSD file with the new token.

Hope to hear from you.

Thank you in advance for looking into this.

Regards,

Arthur

Best answer by avanrijn

Hi Thomas,

Thank you for your update. 

I hope we can schedule a call for next week, so you can have a look and feel where I am 
missing out. 

Please let me know when you are available for a Teams meeting.
 

Hope to hear from you.
 

I will create a support-ticket for it.

Regards,
Arthur

 

View original
Did this topic help you find an answer to your question?

8 replies

rory.smith
TimeXtender Xpert
Forum|alt.badge.img+7
  • TimeXtender Xpert
  • 649 replies
  • February 19, 2025

Hi,

you can do this in 6892 if you had a CData REST connector before upgrading to it. New installs should use the TX REST connector. There is no need for Powershell, both approaches work natively.


avanrijn
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • 36 replies
  • February 19, 2025

Hi Rory,

That’s great.
 

Oke, so no need for Powershell, I just use the TX REST provider.

Do you have some TX REST documentation I can walk through ?

I have no idea yet how to set this up.

Thanks.

Regards,

Arthur

 


rory.smith
TimeXtender Xpert
Forum|alt.badge.img+7
  • TimeXtender Xpert
  • 649 replies
  • February 19, 2025

Hi,

I would start by reading the documentation: 

 


Thomas Lind
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • 1017 replies
  • February 19, 2025

Hi ​@avanrijn 

Try to use the OAuth2 authentication method and add the parts of the JSON query as individual parameters. The two headers are usually added by default, so you may not need to add those.

However, if that doesn’t work you can use the new Authentication Endpoint method instead and add the curl part as an endpoint setup.


avanrijn
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • 36 replies
  • February 19, 2025

HI Thomas,

Thanks for you comments. I tried the OAuth2 authentication you are suggesting, but it can’t get it up and running. So I tried the OAuth refresh token.

My Bearer Token Import Metadata is running succesfully, but no data yet.


Please have a look at my Word attachment with screenshots how I set this up (Bearer Token (1).docx).

Hope to hear from you. Thanks in advance for looking into this case.

Regards,
Arthur


avanrijn
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • 36 replies
  • February 20, 2025

Dear Sir,

Is it possible to turn this Question into a Ticket for my client Gemeente Horst aan de Maas.

Thank you in advance.

Regards,

Arthur


Thomas Lind
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • 1017 replies
  • February 21, 2025

Hi ​@avanrijn 

You use the wrong Base URL, it should be the unique part of the path

https://openapi.binnenbeter.nl/api/v1

You should not call your endpoint users when it is the one doing the authentication call. Call it Authentication.

The last bit of the URL reports is what should be the path to the users endpoint instead. The page and size is pagination options. You use the method described here

I can’t see how the result is returned in what you shared, so it may be possible using one of the other methods I have guides for.

Here is how I would set up authentication.

And you should try it despite having a different method this may also work.

If not try the other option, but be sure you do the post call to the login URL.

Notice that I marked the field in the upper right corner. It states that you can import Swagger or OpenAPI, which your API seems to support. You can add the base URL or similar to this and get a list of all the available endpoints you have in the source that you can add by checking them in the list.

Your endpoint should be like this.

If you use pagination as explained in the guide, you only need the size parameter.


avanrijn
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • 36 replies
  • Answer
  • February 21, 2025

Hi Thomas,

Thank you for your update. 

I hope we can schedule a call for next week, so you can have a look and feel where I am 
missing out. 

Please let me know when you are available for a Teams meeting.
 

Hope to hear from you.
 

I will create a support-ticket for it.

Regards,
Arthur

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings