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:

  1. GET http://<host>:<port>/webadmin/denodo-scheduler-admin/Ping

  2. Extract XSRF-TOKEN value from cookie

  3. 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

  1. Extract JSESSIONID value from cookie

  2. 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

  1. 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:

  1. Ping

curl -c - --location --request GET 'http://localhost:9090/webadmin/denodo-scheduler-admin/Ping'
  1. 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'
  1. 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>'
  1. 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>'