Hello Lucas,
You could also use the LUA api to do something similar to your second solution.http://book.orthanc-server.com/users/lua.html
- Listen to onStoredInstance callback
- Use a post request to your personal API with the ID of the stored instance (may be restrict that request to the IP address of the orthanc instance)
- From your API, request anything you want from Orthanc through usual REST API.
Regards,
Thibault.