Health-API/V1/Health

Jump to: navigation, search

Health

Checks the status of the TiVo service and database availability.

Syntax

POST Request URL

http://cloud.rovicorp.com/data/health?apikey=apikey&sig=sig&locale=locale [&reply=reply]

Required Fields for JSON POST Message Body

{ "Health": { "details": "details" } }

Required Fields for XML POST Message Body

<Health> <details>details</details> </Health>

Request Example 1

Check the status of the TiVo service and database availability and request a JSON response.
http://cloud.rovicorp.com/data/health?apikey=apikey&sig=sig&locale=en-US&reply=json
POST
Content-type: application/json

{"Health":{"details":"on"}}

Request Example 2

Check the status of the TiVo service and database availability and request an XML response.
Template:MgHealthDeschealth?apikey=apikey&sig=sig&locale=en-US&reply=xml
POST
Content-type: application/xml

<Health>
   <details>on</details>
</Health>

Request Parameters

ParameterRequiredDescription
apikey Yes Access code that authorizes your request for data from Rovi.
locale Yes Language and country code that applies to the user (case-sensitive). This is a two-character ISO 639 language code, a hyphen character, and a two-character ISO 3166 country code, as described in RFC 1766. Valid locales include:
  • en-US
English (US), United States
  • fr-CA
French, Canada
sig Yes A calculated authorization code. To perform the calculation, execute the MD5 function on the concatenation of the following three strings:
  • Your API key.
  • The secret key you received with your API key.
  • The Unix time. Unix time is a timestamp supported in most development environments, and is generally defined as the number of seconds since January 1, 1970 00:00:00 GMT.

Perform the calculation at the time of each request to be sure it's within a five-minute window of the server time. If you're testing the call in a browser, use our online signature generator to perform the calculation.

details Yes Specify on to request the status of the service and database separately. Specify off to request the overall status of the application.
reply No Format of the returned data: json or xml. The default is xml.

An optional element may be omitted, specified null, or specified as an empty string. Specify a null as no value, like this: reply=.

Response

Response Header

ResponseTypeDescription
count string Number of data elements returned.
gatewayVersion string Software release level of the API.
processTime string Server processing time in milliseconds.
requestId string Transaction log ID for the request and response.
uri string The request.

Response Body

ResponseTypeDescription
data data Health status value(s).

JSON Response Example

JSON examples are formatted with extra spaces and carriage returns to make them easy to read.

{
   "CreateResponse":{
      "requestId":"BUR-1WVOLLIN-LT:gwy:92",
      "gatewayVersion":"1.2.11-2",
      "uri":"http://cloud.rovicorp.com/data/health?locale=en-US&apikey=msoapikey&reply=json&sig=sig",
      "count":"1",
      "processTime":"350",
      "data":{
         "Health":{
            "matadorService":"YES",
            "mongoDB": "YES"
            }
         }
      }
   }
}

XML Response Example

<CreateResponse requestId="tul1cpgdapp1:gwy:4aww8" gatewayVersion="1.2.11-2" uri="http://cloud.rovicorp.com/data/health?locale=en-US&reply=xml&apikey=msoapikey&sig=sig" count="1" processTime="350">
   <data>
      <Health>
         <matadorService>YES</matadorService>
         <mongoDB>YES</mongoDB>
      </Health>
   </data>
</CreateResponse>

Error Response

ResponseTypeDescription
data data Error information for a failed transaction.

JSON Error Response Example

{
   "ErrorResponse":{
      "requestId":"BUR-1WVOLLIN-LT:gwy:8y",
      "gatewayVersion":"1.2.11-2",
      "uri":"http://cloud.rovicorp.com/data/health?locale=en-US&amp;apikey=cps&amp;reply=xml&amp;sig=sig",
      "count":"1",
      "processTime":"254",
      "data":{
         "error":{
            "status":"400",
            "headers":null,
            "message":"Health Check Failed",
            "Problem":{
               "type":"",
               "name":"",
               "value":"10105",
               "message":",
            }
         }
      }
   }
}

XML Error Response Example

<ErrorResponse requestId="BUR-1WVOLLIN-LT:gwy:8y" gatewayVersion="1.2.11-2" uri="http://cloud.rovicorp.com/data/health?locale=en-US&amp;apikey=msoapikey&amp;reply=xml&amp;sig=sig" count="1" processTime="254">
   <data>
      <error status="400">
         <headers/>
         <message>Health Check Failed.</message>
         <problem type="ProviderError" name="ValidationError" value="10105" message="Details value must be on or off."/>
      </error>
   </data>
</ErrorResponse>

Error Codes

CodeDescription
400
ValueMeaning
10104Username not specified.
10105Username not valid.
10127Locale not valid.
replyReply value specified is not valid.
API keyAPI key specified is not valid.

See Also

↑ Top

Personal tools