view Sphinx/source/plugins/python/extending-rest-api.py @ 1251:2da32965a475

object move-storage
author Alain Mazy <am@orthanc.team>
date Tue, 23 Dec 2025 13:22:17 +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)