List user activity logs
curl --request GET \
--url https://{subdomain}.mihu.ai/api/v1/user-activity-logs \
--header 'Authorization: Bearer <token>'import requests
url = "https://{subdomain}.mihu.ai/api/v1/user-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://{subdomain}.mihu.ai/api/v1/user-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://{subdomain}.mihu.ai/api/v1/user-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://{subdomain}.mihu.ai/api/v1/user-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://{subdomain}.mihu.ai/api/v1/user-activity-logs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.mihu.ai/api/v1/user-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{
"success": true,
"message": "Activity logs retrieved",
"data": {
"logs": [
{
"user": {
"name": "Jane Doe",
"email": "jane@example.com"
},
"product": "loop",
"method": "GET",
"url": "/api/v1/conversations",
"status_code": 200,
"scope": "conversations",
"granted": true,
"ip": "203.0.113.10",
"user_agent": "<string>",
"token_id": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"total": 120,
"per_page": 25,
"current_page": 1,
"last_page": 5,
"from": 1,
"to": 25
}
}
}User Activity Logs
List user activity logs
Returns the activity trail of team members using the workspace through per-user tokens: which endpoints they called, whether access was granted, and from where. With a workspace API token the full team’s activity is returned; with a per-user token only that user’s own activity is returned. Results are newest first.
GET
/
api
/
v1
/
user-activity-logs
List user activity logs
curl --request GET \
--url https://{subdomain}.mihu.ai/api/v1/user-activity-logs \
--header 'Authorization: Bearer <token>'import requests
url = "https://{subdomain}.mihu.ai/api/v1/user-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://{subdomain}.mihu.ai/api/v1/user-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://{subdomain}.mihu.ai/api/v1/user-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://{subdomain}.mihu.ai/api/v1/user-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://{subdomain}.mihu.ai/api/v1/user-activity-logs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.mihu.ai/api/v1/user-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{
"success": true,
"message": "Activity logs retrieved",
"data": {
"logs": [
{
"user": {
"name": "Jane Doe",
"email": "jane@example.com"
},
"product": "loop",
"method": "GET",
"url": "/api/v1/conversations",
"status_code": 200,
"scope": "conversations",
"granted": true,
"ip": "203.0.113.10",
"user_agent": "<string>",
"token_id": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"total": 120,
"per_page": 25,
"current_page": 1,
"last_page": 5,
"from": 1,
"to": 25
}
}
}Authorizations
Use a Bearer token to access these API endpoints. Example: "Bearer {your-token}"
Query Parameters
Required range:
x <= 100Filter by the team member's email address
Filter by the product that made the request (e.g. loop)
Filter by whether access was granted
Filter by HTTP method
Available options:
GET, POST, PUT, PATCH, DELETE Filter by response status code
Example:
403
Partial match on the requested URL
Example:
"conversations"
Only activity at or after this date/time (ISO 8601)
Only activity at or before this date/time (ISO 8601)
Available options:
asc, desc