Scheduler REST Client API¶
Besides the Scheduler RMI Client API you can also interact with
the Scheduler servers through a REST API provided by the Scheduler Administration Tool. The
documentation of this REST API is available on
http://<host>:<port>/webadmin/denodo-scheduler-admin/swagger-ui.html
However first of all, in order to use this API an authentication action needs to be done. The steps in order to perform a successful authentication are:
GET
http://<host>:<port>/webadmin/denodo-scheduler-admin/Ping
Extract XSRF-TOKEN value from cookie
POST
http://<host>:<port>/webadmin/denodo-scheduler-admin/login
Note
Header X-XSRF-TOKEN with the value of XSRF-TOKEN got in 2
Cookie XSRF-TOKEN with the value of XSRF-TOKEN got in 2
Extract JSESSIONID value from cookie
Request any API endpoint with:
Note
Header X-XSRF-TOKEN with the value of XSRF-TOKEN got in 2
Cookie XSRF-TOKEN with the value of XSRF-TOKEN got in 2
Cookie JSESSIONID with the value of JSESSIONID got in 4
POST
http://<host>:<port>/webadmin/denodo-scheduler-admin/logout
Note
Header X-XSRF-TOKEN with the value of XSRF-TOKEN got in 2
Cookie XSRF-TOKEN with the value of XSRF-TOKEN got in 2
Cookie JSESSIONID with the value of JSESSIONID got in 4
An example to retrieve user information by calling /api/me was:
Ping
curl -c - --location --request GET 'http://localhost:9090/webadmin/denodo-scheduler-admin/Ping'
Login
curl -c - --location --request POST 'http://localhost:9090/webadmin/denodo-scheduler-admin/login' --header 'X-XSRF-TOKEN: <XSRF-TOKEN-VALUE-FROM-PING-COOKIE>' --header 'Cookie: XSRF-TOKEN=<XSRF-TOKEN-VALUE-FROM-PING-COOKIE>' --form 'username=admin' --form 'password=admin' --form 'uri=//localhost:8000'
Me
curl -c --location --request GET 'http://localhost:9090/webadmin/denodo-scheduler-admin/api/me' --header 'URI: //localhost:8000' --header 'X-XSRF-TOKEN: <XSRF-TOKEN-VALUE-FROM-PING-COOKIE>' --header 'Cookie: XSRF-TOKEN=<XSRF-TOKEN-VALUE-FROM-PING-COOKIE>; JSESSIONID=<JSESSIONID-VALUE-FROM-LOGIN-COOKIE>'
Logout
curl -c - --location --request POST 'http://localhost:9090/webadmin/denodo-scheduler-admin/logout' --header 'URI: //localhost:8000' --header 'X-XSRF-TOKEN: <XSRF-TOKEN-VALUE-FROM-PING-COOKIE>' --header 'Cookie: XSRF-TOKEN=<XSRF-TOKEN-VALUE-FROM-PING-COOKIE>; JSESSIONID=<JSESSIONID-VALUE-FROM-LOGIN-COOKIE>'