List audit logs for a project
curl --request GET \
--url https://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod/project/{projectId}/audit-logs \
--header 'Authorization: Bearer <token>' \
--header 'Tenant-Id: <tenant-id>'import requests
url = "https://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod/project/{projectId}/audit-logs"
headers = {
"Tenant-Id": "<tenant-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Tenant-Id': '<tenant-id>', Authorization: 'Bearer <token>'}
};
fetch('https://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod/project/{projectId}/audit-logs', 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://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod/project/{projectId}/audit-logs",
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>",
"Tenant-Id: <tenant-id>"
],
]);
$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://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod/project/{projectId}/audit-logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Tenant-Id", "<tenant-id>")
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://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod/project/{projectId}/audit-logs")
.header("Tenant-Id", "<tenant-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod/project/{projectId}/audit-logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Tenant-Id"] = '<tenant-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"edges": [
{
"node": {
"id": "<string>",
"sk": "<string>",
"type_pk": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"audit_log_type": "<string>",
"changes": [
{
"field": "<string>",
"old": "<string>",
"new": "<string>"
}
],
"changes_json": "<string>",
"username": "<string>"
},
"cursor": "<string>"
}
],
"pageInfo": {
"endCursor": "<string>",
"hasNextPage": true
}
}{
"code": "common.internal_error",
"error": "<string>",
"meta": {}
}{
"code": "common.internal_error",
"error": "<string>",
"meta": {}
}{
"code": "common.internal_error",
"error": "<string>",
"meta": {}
}{
"code": "common.internal_error",
"error": "<string>",
"meta": {}
}{
"code": "common.internal_error",
"error": "<string>",
"meta": {}
}{
"code": "common.internal_error",
"error": "<string>",
"meta": {}
}Projects
List audit logs for a project
GET
/
project
/
{projectId}
/
audit-logs
List audit logs for a project
curl --request GET \
--url https://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod/project/{projectId}/audit-logs \
--header 'Authorization: Bearer <token>' \
--header 'Tenant-Id: <tenant-id>'import requests
url = "https://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod/project/{projectId}/audit-logs"
headers = {
"Tenant-Id": "<tenant-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Tenant-Id': '<tenant-id>', Authorization: 'Bearer <token>'}
};
fetch('https://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod/project/{projectId}/audit-logs', 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://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod/project/{projectId}/audit-logs",
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>",
"Tenant-Id: <tenant-id>"
],
]);
$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://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod/project/{projectId}/audit-logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Tenant-Id", "<tenant-id>")
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://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod/project/{projectId}/audit-logs")
.header("Tenant-Id", "<tenant-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod/project/{projectId}/audit-logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Tenant-Id"] = '<tenant-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"edges": [
{
"node": {
"id": "<string>",
"sk": "<string>",
"type_pk": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"audit_log_type": "<string>",
"changes": [
{
"field": "<string>",
"old": "<string>",
"new": "<string>"
}
],
"changes_json": "<string>",
"username": "<string>"
},
"cursor": "<string>"
}
],
"pageInfo": {
"endCursor": "<string>",
"hasNextPage": true
}
}{
"code": "common.internal_error",
"error": "<string>",
"meta": {}
}{
"code": "common.internal_error",
"error": "<string>",
"meta": {}
}{
"code": "common.internal_error",
"error": "<string>",
"meta": {}
}{
"code": "common.internal_error",
"error": "<string>",
"meta": {}
}{
"code": "common.internal_error",
"error": "<string>",
"meta": {}
}{
"code": "common.internal_error",
"error": "<string>",
"meta": {}
}Authorizations
BearerAuthApiKeyAuth
Bearer token in the Authorization header (e.g. JWT / Cognito access token).
Headers
ID of the tenant (current tenant context).
Path Parameters
Project identifier.
Query Parameters
Maximum number of items to return.
Required range:
x >= 1Opaque cursor for the next page of results.