Bootstrap the app
curl --request GET \
--url https://{org}.usehasp.run/api/hasp/v1/bootstrap \
--header 'X-Hasp-AppId: <x-hasp-appid>' \
--cookie hasp-runtime-session=import requests
url = "https://{org}.usehasp.run/api/hasp/v1/bootstrap"
headers = {
"cookie": "hasp-runtime-session=",
"X-Hasp-AppId": "<x-hasp-appid>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {cookie: 'hasp-runtime-session=', 'X-Hasp-AppId': '<x-hasp-appid>'}
};
fetch('https://{org}.usehasp.run/api/hasp/v1/bootstrap', 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/bootstrap",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "hasp-runtime-session=",
CURLOPT_HTTPHEADER => [
"X-Hasp-AppId: <x-hasp-appid>"
],
]);
$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/bootstrap"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "hasp-runtime-session=")
req.Header.Add("X-Hasp-AppId", "<x-hasp-appid>")
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/bootstrap")
.header("cookie", "hasp-runtime-session=")
.header("X-Hasp-AppId", "<x-hasp-appid>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{org}.usehasp.run/api/hasp/v1/bootstrap")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = 'hasp-runtime-session='
request["X-Hasp-AppId"] = '<x-hasp-appid>'
response = http.request(request)
puts response.read_body{
"user": {
"id": "<string>",
"name": "<string>",
"email": "<string>"
},
"org": {
"id": "<string>",
"role": "<string>"
},
"role": "<string>",
"app": {
"id": "<string>",
"name": "<string>",
"type": "<string>"
},
"limits": {
"maxPageSize": 123,
"maxRecordCount": 123,
"rateLimitPerMinute": 123
}
}{
"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>"
}
}Bootstrap
Bootstrap the app
The signed-in user, their org and app role, the app, and the Data API limits
that apply to it. Called with the runtime session; a public app also answers
an anonymous caller, with user: null and the viewer role.
GET
/
bootstrap
Bootstrap the app
curl --request GET \
--url https://{org}.usehasp.run/api/hasp/v1/bootstrap \
--header 'X-Hasp-AppId: <x-hasp-appid>' \
--cookie hasp-runtime-session=import requests
url = "https://{org}.usehasp.run/api/hasp/v1/bootstrap"
headers = {
"cookie": "hasp-runtime-session=",
"X-Hasp-AppId": "<x-hasp-appid>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {cookie: 'hasp-runtime-session=', 'X-Hasp-AppId': '<x-hasp-appid>'}
};
fetch('https://{org}.usehasp.run/api/hasp/v1/bootstrap', 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/bootstrap",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "hasp-runtime-session=",
CURLOPT_HTTPHEADER => [
"X-Hasp-AppId: <x-hasp-appid>"
],
]);
$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/bootstrap"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "hasp-runtime-session=")
req.Header.Add("X-Hasp-AppId", "<x-hasp-appid>")
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/bootstrap")
.header("cookie", "hasp-runtime-session=")
.header("X-Hasp-AppId", "<x-hasp-appid>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{org}.usehasp.run/api/hasp/v1/bootstrap")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = 'hasp-runtime-session='
request["X-Hasp-AppId"] = '<x-hasp-appid>'
response = http.request(request)
puts response.read_body{
"user": {
"id": "<string>",
"name": "<string>",
"email": "<string>"
},
"org": {
"id": "<string>",
"role": "<string>"
},
"role": "<string>",
"app": {
"id": "<string>",
"name": "<string>",
"type": "<string>"
},
"limits": {
"maxPageSize": 123,
"maxRecordCount": 123,
"rateLimitPerMinute": 123
}
}{
"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
The signed-in user's session on the app runtime host; what the JS SDK uses.
Headers
The id of the published app to bootstrap.