view Sphinx/source/plugins/python/extending-rest-api.py @ 1117:9a4c9e0218d9

get-scu
author Alain Mazy <am@orthanc.team>
date Mon, 09 Dec 2024 18:46:28 +0100
parents a589668768d7
children
line wrap: on
line source

import orthanc
import pprint

def OnRest(output, uri, **request):
    pprint.pprint(request)
    print('Accessing uri: %s' % uri)
    output.AnswerBuffer('ok\n', 'text/plain')

orthanc.RegisterRestCallback('/(to)(t)o', OnRest)
orthanc.RegisterRestCallback('/tata', OnRest)