Get list of company activity logs
curl --request GET \
--url https://api.kinsta.com/v2/company/{id}/activity-logs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.kinsta.com/v2/company/{id}/activity-logs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.kinsta.com/v2/company/{id}/activity-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://api.kinsta.com/v2/company/{id}/activity-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://api.kinsta.com/v2/company/{id}/activity-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://api.kinsta.com/v2/company/{id}/activity-logs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kinsta.com/v2/company/{id}/activity-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{
"company": {
"activity_logs": {
"items": [
{
"id": 34181968,
"site_id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
"created_at": 1665382600770,
"is_done": true,
"has_failed": false,
"has_warning": false,
"type": "deleteSite",
"public_error": "The environment is blocked by another process. Please try again a bit later.",
"ip_address": "203.0.113.42",
"descriptions": [
"Delete site \"Test ABC\""
],
"initiated_by": {
"id": "admin-user",
"role": "admin",
"full_name": "Jane",
"first_name": "Smith"
},
"user_agent_info": {
"browser_name": "Chrome",
"browser_version": "126.0.0",
"os_name": "macOS"
},
"api_key_info": {
"id": "cf5b98a0-6fdd-4997-9c1f-e73d566533be",
"name": "Public API Key"
}
}
],
"total": 42
}
}
}{
"message": "No or invalid API key provided to the request",
"status": 401,
"data": "<unknown>"
}{
"message": "Could not find data or the user does not have permissions to retrieve it",
"status": 404,
"data": "<unknown>"
}{
"message": "Error occurred while processing your request",
"status": 500,
"data": "<unknown>"
}Activity Logs
Get list of company activity logs
GET
/
company
/
{id}
/
activity-logs
Get list of company activity logs
curl --request GET \
--url https://api.kinsta.com/v2/company/{id}/activity-logs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.kinsta.com/v2/company/{id}/activity-logs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.kinsta.com/v2/company/{id}/activity-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://api.kinsta.com/v2/company/{id}/activity-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://api.kinsta.com/v2/company/{id}/activity-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://api.kinsta.com/v2/company/{id}/activity-logs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kinsta.com/v2/company/{id}/activity-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{
"company": {
"activity_logs": {
"items": [
{
"id": 34181968,
"site_id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
"created_at": 1665382600770,
"is_done": true,
"has_failed": false,
"has_warning": false,
"type": "deleteSite",
"public_error": "The environment is blocked by another process. Please try again a bit later.",
"ip_address": "203.0.113.42",
"descriptions": [
"Delete site \"Test ABC\""
],
"initiated_by": {
"id": "admin-user",
"role": "admin",
"full_name": "Jane",
"first_name": "Smith"
},
"user_agent_info": {
"browser_name": "Chrome",
"browser_version": "126.0.0",
"os_name": "macOS"
},
"api_key_info": {
"id": "cf5b98a0-6fdd-4997-9c1f-e73d566533be",
"name": "Public API Key"
}
}
],
"total": 42
}
}
}{
"message": "No or invalid API key provided to the request",
"status": 401,
"data": "<unknown>"
}{
"message": "Could not find data or the user does not have permissions to retrieve it",
"status": 404,
"data": "<unknown>"
}{
"message": "Error occurred while processing your request",
"status": 500,
"data": "<unknown>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Example:
10
Example:
3
Available options:
siteActions, kinstaDns, migrations, billing, notifications, userManagement, personalSettings, samlSso Example:
"siteActions"
Available options:
da, de, en, es, fr, it, ja, nl, pt, sv Response
Successfully found activity logs
Show child attributes
Show child attributes
⌘I