0

API string editor

Jürgen Jürgenson 4 months ago in Devices / Http updated by Fabien Fuster 4 months ago 5

Hey,

I need to change the date on a API command. But the command will not work when there is '%X' in the string. Is there a better way to change the date value?

Its made for Entso-E day ahead prices, but their API does not support just one value for date, it needs to have a start date and end date. So i made this as shown in the picture. it gives the current date and calculates  +1 day and inputs it as the end day. But it failed to get responses like that. 

+1

Try with the below, having propertie %5 = 0000. Don't put the ' character around %x

periodStart=%3%2%1%5&periodEnd=%3%2%4%5

Thank you Fabien!

It works now. I was also missing a 0 in front of the month and day value, bOS wont let me change the date format to YYYYMMDD. Now its updating, but i dont know how to make it work when the month changes to  10,11 and 12. 

I think i should make them separately and then somehow collect the correct values to one output for visualisation. 

+1

Hi Jürgen,


Happy to read it works by now.

I've had similar issue as your "0 heading" one with some of my API. The only (somewhat heavy) solution I found is to to create a program to set correctly the propertie. The goal is to get rid of %6 and have the following done for %0,1 and 2:

if General\Time.Value=1

set Devices\Http ENTSO-E test\Corrected Time.Value=01

if General\Time.Value=2

set Devices\Http ENTSO-E test\Corrected Time.Value=02

...

if General\Time.Value=9

set Devices\Http ENTSO-E test\Corrected Time.Value=09

%0 propertie value would then be linked to Devices\Http ENTSO-E test\Corrected Time.Value and so on.

Of course you can put the node name of your choice ;-)


This should solve your issue.


Regards,

Thank you again, this works even better!

Top ! Nice to see you like the solution.