Disabling direct SQL execution
In addition to creating and executing services, Db2 REST allows you to directly run SQL
using the /v1/services/execsql
end-point. You can disable the use of this end-point
when you start the IBM Db2 REST service container from the command line.
About this task
Follow the steps below to disable the use of this end-point when you start the IBM Db2 REST service container from the command line.
Procedure
Add the following entry to your docker command:
-e
DB2REST_EXECSQL_DISABLED=true
Example
docker run -it --net=host -e LICENSE=view -e DB2REST_EXECSQL_DISABLED=true --name=db2rest icr.io/obs/hdm/db2rest:latest-amd64
For
Windows and Mac
OSX:
docker run -it --hostname=<Your REST server hostname> -p 50050:50050 -e LICENSE=view -e DB2REST_EXECSQL_DISABLED=true --name=db2rest icr.io/obs/hdm/db2rest:latest-amd64