REST API URLs

The Resource url changes depending on deployment method used for the Flask REST server. GET Curl calls for single SBDs will be used in these examples.

Deploying locally

If deploying locally (with make rest or python src/ska_db_oda/rest/rest.py) the port is required :

Hostname:port
  • localhost:5000

Resource url
  • /api/v1/sbds/<sbd_id>

Curl call
  • curl -iX GET -H -d “localhost:5000/api/v1/sbds/sbd-mvp01-20200325-00001”

Deploying via Kubernetes

If deploying via Kubernetes and Helm with make install-chart The port must be ommitted, and ska-db-oda (kubernetes namespace) must be prepended to the resource url. Deploying on kuberetes allows a choice of hostnames to use in the urls for curl calls:

Hostnames
  • localhost

  • kubernetes.docker.internal

  • <your machine name>

Resource url
  • ska-db-oda/api/v1/sbds/<sbd_id>

Curl calls