curl --request GET \
--url https://{org}.usehasp.run/api/hasp/v1/projects/{project}/entities/{entity}/records \
--header 'Authorization: Bearer <token>'import requests
url = "https://{org}.usehasp.run/api/hasp/v1/projects/{project}/entities/{entity}/records"
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/projects/{project}/entities/{entity}/records', 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/projects/{project}/entities/{entity}/records",
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/projects/{project}/entities/{entity}/records"
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/projects/{project}/entities/{entity}/records")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{org}.usehasp.run/api/hasp/v1/projects/{project}/entities/{entity}/records")
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{
"data": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"meta": {
"next_cursor": "<string>",
"has_more": true
}
}{
"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>"
}
}{
"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>"
}
}List records
Production records of the entity, filtered, sorted, and cursor-paginated. Filtering or sorting on a
field declared indexed: true is served by that field’s index; other fields are scanned.
curl --request GET \
--url https://{org}.usehasp.run/api/hasp/v1/projects/{project}/entities/{entity}/records \
--header 'Authorization: Bearer <token>'import requests
url = "https://{org}.usehasp.run/api/hasp/v1/projects/{project}/entities/{entity}/records"
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/projects/{project}/entities/{entity}/records', 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/projects/{project}/entities/{entity}/records",
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/projects/{project}/entities/{entity}/records"
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/projects/{project}/entities/{entity}/records")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{org}.usehasp.run/api/hasp/v1/projects/{project}/entities/{entity}/records")
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{
"data": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"meta": {
"next_cursor": "<string>",
"has_more": true
}
}{
"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>"
}
}{
"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
The id of the published app making the request. Required when calling without credentials: anonymous reads are allowed only for an app whose access mode is public, and only for its own project.
Path Parameters
The project's slug or id (ULID).
The entity slug
Query Parameters
JSON object of conditions, all ANDed. Per field: {"status":"open"} (equality), {"status":null}
(is null), an operator map {"age":{"gte":18,"lt":65}}, or one explicit operator
{"age":{"op":"gte","value":18}}. created_at/updated_at accept gt, gte, lt, lte against an
ISO 8601 timestamp. A condition that cannot be applied exactly as written is a 422, never ignored.
Operators per field type: see the Data API filtering guide. At most 20 conditions; in takes at most 100 values.
8192field or field:asc|desc on created_at, updated_at, or a declared non-json field. Nulls sort
last ascending and first descending. Default order is by id (creation order).
128The meta.next_cursor from the previous page, unchanged. Opaque and encrypted; bound to the sort it was issued for.
4096Records per page. Values above the maximum are clamped to it.
x >= 1