Export a runtime end user's data for GDPR data portability
curl --request GET \
--url https://api.usehasp.com/v1/orgs/{organization}/end-users/{runtimeUser}/export \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.usehasp.com/v1/orgs/{organization}/end-users/{runtimeUser}/export"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.usehasp.com/v1/orgs/{organization}/end-users/{runtimeUser}/export', 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.usehasp.com/v1/orgs/{organization}/end-users/{runtimeUser}/export",
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://api.usehasp.com/v1/orgs/{organization}/end-users/{runtimeUser}/export"
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://api.usehasp.com/v1/orgs/{organization}/end-users/{runtimeUser}/export")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usehasp.com/v1/orgs/{organization}/end-users/{runtimeUser}/export")
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{
"object": "<string>",
"generated_at": "<string>",
"end_user": {
"id": "<string>",
"email": "<string>",
"name": "<string>",
"external_id": "<string>",
"external_provider": "<string>",
"status": "<string>",
"email_verified_at": "<string>",
"last_sign_in_at": "<string>",
"created_at": "<string>"
},
"sessions_last_90_days": [
{
"id": "<string>",
"app_id": "<string>",
"ip_address": "<string>",
"user_agent": "<string>",
"created_at": "<string>",
"last_activity_at": "<string>",
"expires_at": "<string>"
}
],
"app_access": [
{
"app_id": "<string>",
"first_seen_at": "<string>",
"last_seen_at": "<string>"
}
],
"audit_events_last_90_days": [
{
"id": "<string>",
"action": "<string>",
"created_at": "<string>"
}
]
}{
"success": false,
"error": {
"type": "authentication",
"code": "INVALID_API_KEY",
"message": "Bearer token is missing, malformed, or revoked.",
"param": null,
"details": null,
"retryable": false,
"request_id": "01JQREQ7XZQK5N6PZ1VVXHYB8T"
},
"meta": {
"request_id": "01JQREQ7XZQK5N6PZ1VVXHYB8T"
}
}{
"success": false,
"error": {
"type": "permission",
"code": "MISSING_SCOPE",
"message": "The caller is authenticated but lacks the scope or capability this route requires.",
"param": null,
"details": null,
"retryable": false,
"request_id": "01JQREQ7XZQK5N6PZ1VVXHYB8T"
},
"meta": {
"request_id": "01JQREQ7XZQK5N6PZ1VVXHYB8T"
}
}{
"message": "<string>"
}EndUserExport
Export a runtime end user's data for GDPR data portability
Sessions, app access, and audit events from the last 90 days.
GET
/
orgs
/
{organization}
/
end-users
/
{runtimeUser}
/
export
Export a runtime end user's data for GDPR data portability
curl --request GET \
--url https://api.usehasp.com/v1/orgs/{organization}/end-users/{runtimeUser}/export \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.usehasp.com/v1/orgs/{organization}/end-users/{runtimeUser}/export"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.usehasp.com/v1/orgs/{organization}/end-users/{runtimeUser}/export', 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.usehasp.com/v1/orgs/{organization}/end-users/{runtimeUser}/export",
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://api.usehasp.com/v1/orgs/{organization}/end-users/{runtimeUser}/export"
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://api.usehasp.com/v1/orgs/{organization}/end-users/{runtimeUser}/export")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usehasp.com/v1/orgs/{organization}/end-users/{runtimeUser}/export")
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{
"object": "<string>",
"generated_at": "<string>",
"end_user": {
"id": "<string>",
"email": "<string>",
"name": "<string>",
"external_id": "<string>",
"external_provider": "<string>",
"status": "<string>",
"email_verified_at": "<string>",
"last_sign_in_at": "<string>",
"created_at": "<string>"
},
"sessions_last_90_days": [
{
"id": "<string>",
"app_id": "<string>",
"ip_address": "<string>",
"user_agent": "<string>",
"created_at": "<string>",
"last_activity_at": "<string>",
"expires_at": "<string>"
}
],
"app_access": [
{
"app_id": "<string>",
"first_seen_at": "<string>",
"last_seen_at": "<string>"
}
],
"audit_events_last_90_days": [
{
"id": "<string>",
"action": "<string>",
"created_at": "<string>"
}
]
}{
"success": false,
"error": {
"type": "authentication",
"code": "INVALID_API_KEY",
"message": "Bearer token is missing, malformed, or revoked.",
"param": null,
"details": null,
"retryable": false,
"request_id": "01JQREQ7XZQK5N6PZ1VVXHYB8T"
},
"meta": {
"request_id": "01JQREQ7XZQK5N6PZ1VVXHYB8T"
}
}{
"success": false,
"error": {
"type": "permission",
"code": "MISSING_SCOPE",
"message": "The caller is authenticated but lacks the scope or capability this route requires.",
"param": null,
"details": null,
"retryable": false,
"request_id": "01JQREQ7XZQK5N6PZ1VVXHYB8T"
},
"meta": {
"request_id": "01JQREQ7XZQK5N6PZ1VVXHYB8T"
}
}{
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The organization ID
The runtime user ID
Response
⌘I