Http_poller - URL - VAR

Can you help me, I'm making a request using HTTP however due to the API limitation I need to insert a date and this date needs to vary.
I need the date to always be updated to the current date minus 1 hour.

url => "https://teste/teste/events?modifyDate=2000-12-12T12:00:00.123Z&orderByLoggedDateDesc=true&maxRecords=1000&eventType=INCIDENT&eventStatus=OPEN&disableExceptionOnMaxRecords=true&fields=csgShortCode,eventRef,modifyDate,dateLogged,eventStatus,assignedServDept[name],assignedServDept[shortCode],formattedReference,loggingServDept[name],loggingServDept[shortCode],loggingUser[name],loggingUser[shortCode],affectedUserName,assignedUser[name],assignedUser[shortCode],itemA[name],category[name],userStatus[name],resolutionDue,originalAssignedServDeptSC,webCustomPropertiesDescription"

2000-12-12T12:00:00.123Z this data needs to be updated with each new query

You cannot easily modify the request parameters of an input. For more details see here.

If you are OK with restarting logstash each time you could use preset an environment variable with the date and reference that in the input.

1 Like