The health endpoint is a crucial endpoint for IriusRisk, as it can show a lot of information surrounding a deployment and the status of the services running at infrastructure level.
To find out further information on this endpoint, follow this link.
What Can a HEAD Request Show?
A HEAD request will essentially do a GET request, but not return the response body, this means that if a HEAD request is successful the response will be 200, and anything other than a 200 response would generally need investigated as it means there may be an issue with the application and/or deployment.
Why Would I Use a HEAD Request?
A HEAD request against the /health endpoint can be beneficial for automations, deployment health inspection or other business functions to determine the health of IriusRisk.
How Do I Query The Endpoint?
A GUI application like Postman or Insomnia can be used to query the health endpoint - For details on how to set up the GUI application with IriusRisk API please see the below articles:
An example of a cURL command is as follows:
$ curl -I HEAD https://<DNS>.iriusrisk.com/health
The cURL command will return a response, and this will show us a response code. Below is a response:
❯ curl --head https://<DNS>.iriusrisk.com/health
As the above output suggests, the deployment is up and healthy. A status code of 200 means the application is working as intended, if you receive any other status code then this would need investigated.