Retrieves running locks from all users that have been active within the last 2 weeks, and that have given permission for their data to be made available in the API. The data is produced every 10 minutes. This endpoint reads previously extracted json data.

Resource URL

https://api.chastikey.com/v0.5/runninglocks.php

Parameters

ParameterDescriptionOptionalDefault
ClientID ClientID is assigned to the API project that you create within the ChastiKey app.
ClientSecret ClientSecret is assigned to the API project that you create within the ChastiKey app. It can be re-generated within the app if needed.

Example

POST https://api.chastikey.com/v0.5/runninglocks.php

Request

  
    $curl = curl_init();

    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://api.chastikey.com/v0.5/runninglocks.php",
        CURLOPT_HTTPHEADER => array(
            "ClientID: gvg3n9gzxmao21gpz143ij0yhn4gqalw",
            "ClientSecret: h3px2ifybw076n9qp3vr2gk5uvaolsks"
        ),
        CURLOPT_CUSTOMREQUEST => "POST",
        CURLOPT_POSTFIELDS => array(),
        CURLOPT_RETURNTRANSFER => TRUE,
        CURLOPT_FRESH_CONNECT => TRUE
    ));

    $response = curl_exec($curl);
    $err = curl_error($curl);

    curl_close($curl);

    if ($err) {
        echo "cURL Error #:".$err;
    } else {
        echo $response;
    }  

Success Response

  {
    "response": {
        "status": 200,
        "message": "the request has succeeded",
        "timestampGenerated": 1579567202
    },
    "locks": [ { .. too many locks to display here } ]
}  

Error Response

  {
    "response": {
        "status": 400,
        "message": "invalid client secret",
        "timestampGenerated": 1579567582
    }
}  

Response Status Codes

CodeDescription
200 OK - The request has succeeded. The client can read the result of the request in the body and the headers of the response.
204 No Content - The request has succeeded but returns no message body.
400 Bad Request - The request could not be understood by the server due to malformed syntax. The message body will contain more information.
401 Unauthorized - The request requires user authentication or, if the request included authorization credentials, authorization has been refused for those credentials.
403 Forbidden - The server understood the request, but is either refusing to fulfill it, or the specific data you're requesting is private.
429 Too Many Requests - Rate limiting has been applied.

Resource Information

Rate Limited True
Response Format JSON
Authentication Tokens