Python extension RestApiGet not working for nifti ?

Hi there,

We hit a strange problem, we wanted to develop a python plugin relying on a nifti file generation from Orthanc.

Sadly it seems that the /nifti API is not requestable using orthanc.RestApiGet

response = orthanc.RestApiGet( f’/series/{series}/nifti’)

=> Does not work, return Unknown resource 17

while using an external request using requests librairy is ok (on the same orthanc server) :
r = requests.get(f’http://localhost:8042/series/{series}/nifti’)

I thought that RestApiGet was a simple method to redirect request to orthanc API generically, it seems not.
Maybe it rely internally on a list of APIs that are missing the /nifti api (as this extension is recent ?)

Best regards,

Salim

Hello Salim,

Have you tried using “orthanc.RestApiGetAfterPlugins()” instead of “orthanc.RestApiGet()”?

Regards,
Sébastien-

Yes its working with RestApiGetAfterPlugins

Thanks for your help !

Salim