2 Replies Latest reply on May 31, 2017 4:03 PM by Peter de Vaal

    updating template or handler - layout of rest services




      i am starting to provision quite a few rest services and i was following the url pattern below where i was grouping similar services into the same modules.






      I found that if i do this it means i have to recreate all the templates and handlers any time i want to update a single one which isn't ideal.


      Have i missed a function / procedure to update templates or handlers ? or do i need to rethink my use of modules and make them more granular than common ?

        • 1. Re: updating template or handler - layout of rest services

          ORDS.DEFINE_HANDLER - you can use this to update a handler


          Otherwise, yes you have ORDS.DEFINE_MODULE which rebuilds the entire module for making changes to any of its particulars.

          • 2. Re: updating template or handler - layout of rest services
            Peter de Vaal

            When using SQL developer I recommend to capture the ORDS.DEFINE_MODULE and ORDS.DEFINE_HANDLER statements in a script, which you can check-in into version control. Just capture the statements from the statement log after you have defined the module, template or handler from the REST dataservices node.


            I have many similar REST templates, so I usually copy a previously created file with the DEFINE_TEMPLATE and DEFINE_HANDLER statements and just edit the name, the SQL statement and (if present) the DEFINE_PARAMETER statements. The SQL statement I usually capture from the statement log, so I do not have to do the escaping of quotes in the query (if present) myself.