Go to All Forums

Is there any way to check API response elements Date

Hello,

 

I have API, that gives most-read articles in some timestamp. The thing is i want to check that lets say there is at least one articles newer than 3 days.

API gives Json response with all the article titles, links etc and also includes Date.

Im wondering if there is any way to check this with Site24x7 (preferably with Web API monitoring)?

 

 

Thankyou

Like (1) Edit Delete Reply
Replies (2)

Re: Is there any way to check API response elements Date

I was thinking about json validator, but im pretty sure theres no way to validate for example that the date is less than 3 days old?

Like (0) Edit Delete Reply

Re: Is there any way to check API response elements Date

Hello,

We have advanced validation features on our roadmap, but don't have an ETA yet.

A workaround for complex validations is to provide your own secondary API that validates the response. You can use our REST API Transaction to monitor extract values from the first API's response in the first step, and pass them to the second API in the second step. The second API can can return a simpler True / False value that can be validated in the second step.

Have a look at our documentation and don't hesitate to contact support if you need assistance setting up the monitor.

https://www.site24x7.com/help/admin/adding-a-monitor/rest-api-transaction.html

Regards,

Kurian

Like (0) Reply

Was this post helpful?