API Key Usage
curl --request GET \
--url https://api.sorsa.io/v3/key-usage-info \
--header 'ApiKey: <api-key>'import requests
url = "https://api.sorsa.io/v3/key-usage-info"
headers = {"ApiKey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {ApiKey: '<api-key>'}};
fetch('https://api.sorsa.io/v3/key-usage-info', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sorsa.io/v3/key-usage-info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"ApiKey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sorsa.io/v3/key-usage-info"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("ApiKey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sorsa.io/v3/key-usage-info")
.header("ApiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sorsa.io/v3/key-usage-info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["ApiKey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"key_requests": 100,
"remaining_requests": 100,
"total_requests": 1000,
"valid_until": "2021-01-01T00:00:00Z"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Technical Endpoints
API Key Usage
Returns usage statistics for the current API key: total allocated requests, remaining balance, and the expiration date of the current request quota. No parameters required; the key is read from the ApiKey header.
GET
/
key-usage-info
API Key Usage
curl --request GET \
--url https://api.sorsa.io/v3/key-usage-info \
--header 'ApiKey: <api-key>'import requests
url = "https://api.sorsa.io/v3/key-usage-info"
headers = {"ApiKey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {ApiKey: '<api-key>'}};
fetch('https://api.sorsa.io/v3/key-usage-info', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sorsa.io/v3/key-usage-info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"ApiKey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sorsa.io/v3/key-usage-info"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("ApiKey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sorsa.io/v3/key-usage-info")
.header("ApiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sorsa.io/v3/key-usage-info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["ApiKey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"key_requests": 100,
"remaining_requests": 100,
"total_requests": 1000,
"valid_until": "2021-01-01T00:00:00Z"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Response
OK
Number of requests allocated for the current period.
Example:
100
Number of requests remaining.
Example:
100
Total requests used across all periods.
Example:
1000
Expiration date of the current request balance in ISO 8601 format.
Example:
"2021-01-01T00:00:00Z"
Was this page helpful?
⌘I