- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2025 02:41 AM
Hi,
For one of the inbound integration requirement, we need to restrict 3rd party for invoking a ServiceNow table API only 2 times per day.
I know OOB there is a feature to set rate limit for no. of requests per hour, but we need something similar to set no. of request per day.
Please let me know if anyone has done if before.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2025 02:57 AM
Never has done it before, but why not
Scripted REST API + Custom Counter Table with
Fields:
integration_id or api_key
date (type: Date)
counter (Integer)
In your Scripted REST API:
Each time the 3rd-party calls your endpoint:
Check if there’s already an entry for today.
If yes and counter >= 2, reject the request (return HTTP 429 or custom message).
Otherwise, increment the counter and allow the request to proceed.
Reset Behavior
You’ll want to reset the counter daily. Since the date is stored as a separate field, each day a new record is created. You can also run a scheduled job to clean up old entries after 30 days.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2025 02:57 AM
Never has done it before, but why not
Scripted REST API + Custom Counter Table with
Fields:
integration_id or api_key
date (type: Date)
counter (Integer)
In your Scripted REST API:
Each time the 3rd-party calls your endpoint:
Check if there’s already an entry for today.
If yes and counter >= 2, reject the request (return HTTP 429 or custom message).
Otherwise, increment the counter and allow the request to proceed.
Reset Behavior
You’ll want to reset the counter daily. Since the date is stored as a separate field, each day a new record is created. You can also run a scheduled job to clean up old entries after 30 days.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2025 03:04 AM
ok, thanks @Cheikh Ahmadou for your response.
So it requires a complete customization, and nothing is available OOO.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2025 03:26 AM
I would not say it is required but i don't have an OOO in mind.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2025 04:15 AM
yes it's based on hours and not on request per day
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader