Was reading through some of the online documentation here:
https://book.orthanc-server.com/plugins/python.html#auto-routing-studies regarding the RestApiPostAfterPlugins(). Not sure that that is what I am interested in as it isn’t clear to me what that actually does.
Wondering if there is a way to register a callback that matches the built-in orthanc endpoint such that the python plug-in is executed first (i.e. just writes some info to a DB or log file), and then passes the request off to the built-in method ?
def DownloadStudy(output, uri, **request):
- do some stuff like logging to a file or DB
- pass the request off to the native method vs. use output.AnswerBuffer() to generate what the the native method would return.
orthanc.RegisterRestCallback(‘/studies/(.*)/archive’, DownloadStudy)
The reason I might want to do that is because the request in some cases has some data in the headers or elsewhere that identifies the user making the request and I’d like to log that in some cases.
Thanks.
/sds