The is_api() function indicates if the current request was made to the /api endpoint.
results = is_api()
|
Boolean |
Current request made to /api endpoint flag: True = Current request was made to the /api endpoint . False = Current request was not made to the /api endpoint . |
from splunk.appserver.mrsparkle.lib import util
... elided ...
def check(fn, self, *a, **kw):
is_api = util.is_api()
if (is_api):
... elided ...
else
... elided ...