Reference
Health Check
Version Number
2.0.0
Description
A check on the timely availability, connectivity and reachability of the services that deliver security, caching and data to web clients. A health status report is returned.
It's good practice to call the Health Check API every time you make a sequence of calls to the API.
Request URL
base URL
/v2/healthcheck?timestamp=%@&devid=%@&signature=%@
Parameters
- timestamp = optional: the date and time of the request in ISO 8601 UTC format e.g. 2013-11-13T05:24:25Z
- devid = optional: the developer ID supplied in your email from PTV
- signature = optional: the customised message digest calculated using the method in the Quick start guide
While all parameters for this API are optional, if you don't include them the
securityTokenOK
andclientClockOK
response will return “false”.
Response
The response is made up of the following JSON objects:
- securityTokenOK boolean – indicates whether your key is valid/signature is calculated correctly
- clientClockOK boolean – indicates whether your clock is synchronised with our clock within 3 minutes
- memcacheOK boolean – indicates status of the performance cache
- databaseOK boolean – indicates availability of the data
Refer to [?] for more information on using Health Check to trap errors.
Example Health Check request
http://timetableapi.ptv.vic.gov.au/v2/healthcheck?timestamp=2014-01-22T03:28:33Z
Example Health Check response
{ "securityTokenOK": false, "clientClockOK": false, "memcacheOK": true, "databaseOK": true, }
[Ed: Commentary on this response not included]