cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic parameters in REST polling sender

pavel-kvasnicka
Discoverer
0 Kudos
714

Hi colleagues,

I deal with Message overview servet to obtain overview of error messages.

Can you please advice how to dynamically change parameters in REST polling sender?

Thank you

Pavel

Accepted Solutions (0)

Answers (3)

Answers (3)

stefan_grube
Active Contributor
0 Kudos

you could use a dummy file for polling your scenario.
A mapping (graphical or Java) could provide the requested values.

An async - sync bridge can be used for dealing with the response of your scenario.

FILE -> REST -> result

pavel-kvasnicka
Discoverer
0 Kudos

Hi Alexander,

unfortunatelly I can´t omit end and I also need change both according this prescription provided by servlet.

<Period>
  <Type>HOURLY</Type>
  <Interval>
    <Begin>2023-03-02 10:00:00.0</Begin>
    <End>2023-03-02 11:00:00.0</End>
  </Interval>
</Period>

The goal is to pull every hour data from actuall day and previous hour.

I went through a lot of posts and did not find working answer (strange because I would say that it look like common problem).

Thanks for any hint

Pavel

alex_bundschuh
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Pavel,

I have setup a REST sender scenario using timestamp, see https://blogs.sap.com/2015/06/26/pi-rest-adapter-polling-a-rest-api/

However, I'm afraid you can only use one variable incrementalToken within your query, so your scenario with two timestamps for begin and end won't work unless you can omit end

Note also that you need to be careful with the polling capability, whenever you stop and start the channel or re-activate the channel the timestamp is reset to the initial value, so you need to maintain the initial value before activating again

Alex