Get Your Api Subscription Daily Usage Details
Method | Full Url |
---|---|
POST | https://json.apireports.com/v1/subscription_usage/daily |
{
"status": true,
"status_code": 200,
"data": {
"day": "28",
"month": "9",
"year": "2021",
"usage": {
"total_api_call": 19,
"call_api_list": [
{
"datetime": "2021-09-28 11:12:10",
"end_point": "planets",
"device_ip": "123.66.141.228"
},
{
"datetime": "2021-09-28 11:42:01",
"end_point": "planets",
"device_ip": "123.66.141.228"
},
{
"datetime": "2021-09-28 11:45:02",
"end_point": "astro_details",
"device_ip": "123.66.141.228"
},
{
"datetime": "2021-09-28 11:47:12",
"end_point": "horo_chart/d1",
"device_ip": "123.66.141.228"
},
{
"datetime": "2021-09-28 11:47:42",
"end_point": "horo_chart/d9",
"device_ip": "123.66.141.228"
},
{
"datetime": "2021-09-28 13:12:41",
"end_point": "astro_details",
"device_ip": "123.66.141.228"
},
{
"datetime": "2021-09-28 13:18:48",
"end_point": "astro_details",
"device_ip": "123.66.141.228"
},
{
"datetime": "2021-09-28 13:48:49",
"end_point": "planets",
"device_ip": "123.66.141.228"
},
{
"datetime": "2021-09-28 13:50:02",
"end_point": "planets",
"device_ip": "123.66.141.228"
},
{
"datetime": "2021-09-28 13:52:14",
"end_point": "horo_chart/d9",
"device_ip": "123.66.141.228"
},
{
"datetime": "2021-09-28 14:05:02",
"end_point": "astro_details",
"device_ip": "123.66.141.228"
},
{
"datetime": "2021-09-28 14:20:36",
"end_point": "horo_chart/d7",
"device_ip": "123.66.141.228"
},
{
"datetime": "2021-09-28 14:45:02",
"end_point": "astro_details",
"device_ip": "123.66.141.228"
},
{
"datetime": "2021-09-28 15:50:22",
"end_point": "horo_chart/d1",
"device_ip": "123.66.141.228"
},
{
"datetime": "2021-09-28 15:55:34",
"end_point": "astro_details",
"device_ip": "123.66.141.228"
},
{
"datetime": "2021-09-28 16:05:02",
"end_point": "planets",
"device_ip": "123.66.141.228"
},
{
"datetime": "2021-09-28 16:45:02",
"end_point": "astro_details",
"device_ip": "123.66.141.228"
},
{
"datetime": "2021-09-28 17:25:51",
"end_point": "planets",
"device_ip": "123.66.141.228"
},
{
"datetime": "2021-09-28 17:45:02",
"end_point": "astro_details",
"device_ip": "123.66.141.228"
}
]
}
}
}
Params | Data Type | Description | Example |
---|---|---|---|
day | int | Date of Birth | 28 |
month | int | Month of Birth | 9 |
year | int | Year of Birth | 2021 |
# cURL Request Example
curl --location --request POST 'https://json.apireports.com/v1/subscription_usage/daily' \
-u '{YourUserID}:{YourApiKey}'\
--header 'Accept-Language: en' \
--header 'Content-Type: application/json' \
--data-raw '{
"day": 28,
"month": 9,
"year": 2021
}'
# END
/* JavaScript Request Example */
var apiEndPoint = "subscription_usage/daily";
var userId = "{YourUserID}";
var apiKey = "{YourApiKey}";
var language = "en";
var data = {
"day": 28,
"month": 9,
"year": 2021
};
var url = 'https://json.apireports.com/v1/'+apiEndPoint;
var request = $.ajax({
url: url,
method: "POST",
dataType:'json',
headers: {
"Authorization": "Basic " + btoa(userId+":"+apiKey),
"Accept-Language": "en",
"Content-Type":'application/json'
},
data:JSON.stringify(data)
});
request.then(
function(resp){
console.log(resp);
},
function(err){
console.log(err);
}
);
/* END */
<?php
/* PHP Request Example */
$apiEndPoint = "subscription_usage/daily";
$userId = "{YourUserID}";
$apiKey = "{YourApiKey}";
$url = "https://json.apireports.com/v1/";
$data = array(
"day" => 28,
"month" => 9,
"year" => 2021
);
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $url.$apiEndPoint);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
$header[] = 'Authorization: Basic '. base64_encode($userId.":".$apiKey);
$header[] = 'Accept-Language: en';
$header[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
$response = curl_exec($ch);
$error = curl_error($ch);
$http_code = curl_getinfo($ch ,CURLINFO_HTTP_CODE);
curl_close($ch);
echo $response;
/* END */
# Python Request Example
import requests
import json
apiEndPoint = "subscription_usage/daily";
userId = "{YourUserID}";
apiKey = "{YourApiKey}";
url = "https://json.apireports.com/v1/"+apiEndPoint
data = json.dumps({
"day": 28,
"month": 9,
"year": 2021
})
headers = {
'Accept-Language': 'en',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, auth=(userId, apiKey),data=data)
print(response.text)
# END
/* NodeJS Request Example */
var request = require('request');
var apiEndPoint = "subscription_usage/daily";
var userId = "{YourUserID}";
var apiKey = "{YourApiKey}";
var url = 'https://json.apireports.com/v1/'+apiEndPoint;
var options = {
'method': 'POST',
'url': url,
'auth': {
'user': userId,
'password': apiKey
},
'headers': {
'Accept-Language': 'en',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"day": 28,
"month": 9,
"year": 2021
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
/* END */