Check status
curl --request GET \
--url https://{org}.usehasp.run/api/hasp/v1/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://{org}.usehasp.run/api/hasp/v1/status"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{org}.usehasp.run/api/hasp/v1/status', 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://{org}.usehasp.run/api/hasp/v1/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://{org}.usehasp.run/api/hasp/v1/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{org}.usehasp.run/api/hasp/v1/status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{org}.usehasp.run/api/hasp/v1/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "ok",
"message": "<string>",
"estimatedSeconds": 123,
"authenticated": true,
"auth_type": "api_key",
"project": {
"id": "<string>"
},
"key": {
"role": "<string>",
"prefix": "<string>"
}
}{
"success": false,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"param": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>"
}
}{
"success": false,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"param": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>"
}
}{
"success": false,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"param": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>"
}
}Status
Check status
Liveness, callable without credentials. With a project API key it also confirms
the key and, for an app of the key’s project named by X-Hasp-AppId, reports
whether the app is in maintenance.
GET
/
status
Check status
curl --request GET \
--url https://{org}.usehasp.run/api/hasp/v1/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://{org}.usehasp.run/api/hasp/v1/status"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{org}.usehasp.run/api/hasp/v1/status', 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://{org}.usehasp.run/api/hasp/v1/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://{org}.usehasp.run/api/hasp/v1/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{org}.usehasp.run/api/hasp/v1/status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{org}.usehasp.run/api/hasp/v1/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "ok",
"message": "<string>",
"estimatedSeconds": 123,
"authenticated": true,
"auth_type": "api_key",
"project": {
"id": "<string>"
},
"key": {
"role": "<string>",
"prefix": "<string>"
}
}{
"success": false,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"param": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>"
}
}{
"success": false,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"param": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>"
}
}{
"success": false,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"param": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>"
}
}Authorizations
Project API key, for server-to-server access to one project.
Headers
With a project API key: an app of the key's project whose maintenance state to report. Ignored without credentials, and for an app of another project.
Response
Liveness, plus the key and app detail an authenticated caller is entitled to.