Ryte API offers you the unique opportunity to view, export, and use data from reports in the “Website Success” module to different applications and tools. You can easily extract and use the report data you need from our API, even without the Ryte user interface.
If you wish to use Ryte data, you need an Ryte account (business, agency, or enterprise account). Once you book an account, an access code (API key) is automatically generated for your account. You can access the API anytime you wish and do not need to book any separate subscriptions. Which data of the report is fetched is completely up to you.
Authentication is done using a special API key. The authentication code is included once you copy the corresponding API Call in the respective report. The key gives you access to Ryte API services.
API supports URL-Route JSON (standard), XML, and CSV formats and always uses UTF-8 encoding.
Select the report from which you want to extract the data.
Your API key is generated automatically and displayed in the API Call window.
Next, copy this key.
Almost done.
Send the query as body in the HTTP post request to our API endpoint (e.g., https://api.ryte.com/zoom/json).
Below is an example of an endpoint. In the example, we have used a simple CURL in PHP.
<?php
/**********************************************************************
* CURL-less Example to get Status Code Data from Ryte API
**********************************************************************/
/***
* Ryte API Endpoint and Zoom Route
***/
$apiEndpoint = 'https://api.ryte.com';
$zoomRoute = '/zoom/json';
$requestUrl = $apiEndpoint . $zoomRoute;
/***
* JSON Request copied from Ryte Interface
* This example will retrieve the Status Code Overview of the project
* (Number of 2xx, 3xx,301,302,4xx,5xx)
* Tipp: Use the Zoom Interface to "click + play" the data you need, afterwards copy the API call and insert it here.
***/
$postBody = '{ "action": "aggregate",
"authentication": {
"api_key": "[your api key]",
"project": "[your project slug or project id]"
},
"pagination": {
"limit": 100,
"offset": 0
},
"group": [
"header_status_group"
],
"functions": [
{
"name": "count",
"method": "count",
"parameters": [
{
"attribute": "url"
}
]
}
],
"filter": {
"AND": [
{
"field": "is_local",
"operator": "==",
"value": true
}
]
}
}';
$options = array(
'http' => array(
'header' => 'Content-Type: text/json',
'method' => 'POST',
'content' => $postBody,
),
);
$context = stream_context_create($options);
$result = file_get_contents($requestUrl, false, $context);
/***
* Handle HTTP error
***/
if ($result === FALSE) {
echo "Something went wrong";
} else {
/***
* Print Result
***/
echo "Result:\n";
$jsonResult = json_decode($result, true);
print_r($jsonResult);
}
Example of format routes for Website Success reports:
https://api.ryte.com/zoom/json
https://api.ryte.com/zoom/xml
https://api.ryte.com/zoom/csv
Don't hesitate to get in touch with us at business@ryte.com or +1 628-666-9702.