Method: /session/ping

From Videntity Documentaion Wiki

Revision as of 02:07, 5 October 2009 by Cboyce (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

URL: https://vidapi.com/session/ping

Definition: Keeps your current API session active

Request Type: POST

Content-Type: application/x-www-form-urlencoded

Arguments: 1 (required)

session_key (required): key to your current session. Your session key is given to you in response to your login request.

URL Encoded example:

session_key=Ry5NvPAbceAS123

Response Type: XML

Response Format:

   <?xml version="1.0" encoding="utf-8"?>
   <response api_method="/session/ping">
        <status>STATUS</status>
        <api_tx_number>TRANSACTION_NUMBER</api_tx_number>
        <detail>DETAILS</detail>
        <response_name_value>
            <session_key>De325h3Fsdg76rt</session_key>
        </response_name_value>
        <timestamp>TIMESTAMP</timestamp>
   </response>

Response Example:

   <?xml version="1.0" encoding="utf-8"?>
   <response api_method="/session/ping">
        <status>SUCCESS</status>
        <api_tx_number>58768</api_tx_number>
        <detail>your session has been pinged successfully</detail>
        <response_name_value>
            <session_key>De325h3Fsdg76rt</session_key>
        </response_name_value>
        <timestamp>2008-09-30 15:56:42</timestamp>
   </response>

Errors: Errors:

ERROR NUMBER ERROR NAME ERROR DETAILS ERROR EXPLANATION
2 SESSION_DOES_NOT_EXIST session does not exist This error message indicates that your session hasn't been created or has expired. If you receive this error message please call the API login URL to generate a new session.
3 SESSION_EXPIRED The session has expired This error message indicates that your session hasn't been created or has expired. If you receive this error message please call the API login URL to generate a new session.
4 MISSING_MANDATORY_FIELD Mandatory field session_key is missing Every method has a set number of required fields that must be included in a method call. If the required method arguments are missing this error is returned.
11 SERVER_ERROR The server could not process your request. The server could not process your request. Please Try again.


Error Example:

<?xml version="1.0" encoding="utf-8"?>
<response api_method="/session/ping">
    <status>ERROR</status>
    <api_tx_number>12123</api_tx_number>     
    <error_number>3</error_number>
    <error_name>Session Expired</error_name>
    <error_detail>session does not exist</error_detail>  
    <timestamp>2008-09-30 15:56:42</timestamp>
</response>