curl --request GET \
--url https://public-api.forestadmin.com/v1/project/{projectName}/admin-logs \
--header 'Authorization: Bearer <token>'import requests
url = "https://public-api.forestadmin.com/v1/project/{projectName}/admin-logs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://public-api.forestadmin.com/v1/project/{projectName}/admin-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://public-api.forestadmin.com/v1/project/{projectName}/admin-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>"
],
]);
$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://public-api.forestadmin.com/v1/project/{projectName}/admin-logs"
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://public-api.forestadmin.com/v1/project/{projectName}/admin-logs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.forestadmin.com/v1/project/{projectName}/admin-logs")
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{
"hasMore": false,
"parameters": {
"projectName": "Forest"
},
"data": [
{
"object": "adminLog",
"id": "rbCb98wCZ1y-_zv4wrXz",
"type": "update",
"initiator": "administrator",
"createdAt": "2024-03-14T15:09:26.535Z",
"resource": "team",
"newValue": {
"name": "Managers UK"
},
"user": {
"object": "user",
"id": 40,
"username": "Alice",
"email": "alice@forestadmin.com"
},
"previousValue": {
"name": "Managers"
}
},
{
"object": "adminLog",
"id": "fHCb9IXCZ1y_Pzv4wrXz",
"type": "add",
"initiator": "administrator",
"createdAt": "2024-03-14T15:11:28.148Z",
"resource": "user-project",
"newValue": {
"user": {
"object": "user",
"id": 45,
"username": "John",
"email": "john@forestadmin.com"
},
"role": {
"object": "role",
"name": "everything allowed"
},
"teams": [
{
"object": "team",
"name": "Managers UK"
}
],
"permissionLevel": "editor"
},
"user": {
"object": "user",
"id": 40,
"username": "Alice",
"email": "alice@forestadmin.com"
}
}
]
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}List admin logs
Returns admin logs for a specific project, sorted by createdAt in descending order (most recent first). Use the createdAt filter for pagination.
curl --request GET \
--url https://public-api.forestadmin.com/v1/project/{projectName}/admin-logs \
--header 'Authorization: Bearer <token>'import requests
url = "https://public-api.forestadmin.com/v1/project/{projectName}/admin-logs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://public-api.forestadmin.com/v1/project/{projectName}/admin-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://public-api.forestadmin.com/v1/project/{projectName}/admin-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>"
],
]);
$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://public-api.forestadmin.com/v1/project/{projectName}/admin-logs"
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://public-api.forestadmin.com/v1/project/{projectName}/admin-logs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.forestadmin.com/v1/project/{projectName}/admin-logs")
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{
"hasMore": false,
"parameters": {
"projectName": "Forest"
},
"data": [
{
"object": "adminLog",
"id": "rbCb98wCZ1y-_zv4wrXz",
"type": "update",
"initiator": "administrator",
"createdAt": "2024-03-14T15:09:26.535Z",
"resource": "team",
"newValue": {
"name": "Managers UK"
},
"user": {
"object": "user",
"id": 40,
"username": "Alice",
"email": "alice@forestadmin.com"
},
"previousValue": {
"name": "Managers"
}
},
{
"object": "adminLog",
"id": "fHCb9IXCZ1y_Pzv4wrXz",
"type": "add",
"initiator": "administrator",
"createdAt": "2024-03-14T15:11:28.148Z",
"resource": "user-project",
"newValue": {
"user": {
"object": "user",
"id": 45,
"username": "John",
"email": "john@forestadmin.com"
},
"role": {
"object": "role",
"name": "everything allowed"
},
"teams": [
{
"object": "team",
"name": "Managers UK"
}
],
"permissionLevel": "editor"
},
"user": {
"object": "user",
"id": 40,
"username": "Alice",
"email": "alice@forestadmin.com"
}
}
]
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}Authorizations
Bearer authentication
Path Parameters
The case sensitive project name
1Query Parameters
This specifies a limit on the number of objects to return, ranging between 1 and 100. Limit is set to 10 by default
1 < x <= 100The administrator email
The administrator id
x >= 1The type of action performed
add, remove, update, initial The entity that initiated the action
administrator, identityProvider, forestAdmin The resource affected by the action
user-project, role, team, environment Value to filter by
Maximum value to filter by (exclusive). This filter supports date-time values in ISO 8601 format (YYYY-MM-DDTHH:MM), e.g., 2024-06-04T09:21:26.159Z.
Minimum value to filter by (inclusive). This filter supports date-time values in ISO 8601 format (YYYY-MM-DDTHH:MM), e.g., 2024-06-04T09:21:26.159Z.
Minimum value to filter by (exclusive). This filter supports date-time values in ISO 8601 format (YYYY-MM-DDTHH:MM), e.g., 2024-06-04T09:21:26.159Z.
Maximum value to filter by (inclusive). This filter supports date-time values in ISO 8601 format (YYYY-MM-DDTHH:MM), e.g., 2024-06-04T09:21:26.159Z.
Was this page helpful?