Making a Traffic Call

  1. In a Docker Swarm cluster, you can use any machine's IP to make a traffic call. In the current working terminal, you can get the master IP using the following command.
    MASTER_HOST_IP=`echo $DOCKER_HOST|cut -d ':' -f 2|cut -d '/' -f 3`

    To get hosts' IP run docker-machine ls command and use any IP to make a traffic call.

  2. In the Docker Swarm cluster, you can use any machine's IP to make a traffic call. You can make a traffic call from your local terminal.
  3. To create API configurations, refer Setting Service Configuration Data.
The following is a sample call invocation against the MASTER_HOST_IP URL:
curl -v -H 'Host:api.example.com' 'http://MASTER_HOST_IP/v1/api/patient/1234?api_key=3bvu8u3p8k5vjxmhrs6tnd6e'
Note: Your service endpoint will be according to the configuration you create.