List Logs
curl --request POST \
--url https://api.stackone.com/logs \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"page": 1,
"page_size": 25,
"filters": {
"action_run_id": [
"adbf752f-6457-4ddd-89b3-98ae2252b83b"
],
"action_id": [
"get_employees"
],
"action_type": [
"sync"
],
"connector_key": [
"slack"
],
"connector_version": [
"1.0.0"
],
"connector_owner": [
"<string>"
],
"connector_profile_id": [
"<string>"
],
"category": [
"hris"
],
"request_id": [
"adbf752f-6457-4ddd-89b3-98ae2252b83b"
],
"provider": [
"hibob"
],
"service": [
"hris"
],
"resource": [
"employees"
],
"sub_resource": [
"documents"
],
"child_resource": [
"<string>"
],
"action": [
"create_employee"
],
"log_id": [
"adbf752f-6457-4ddd-89b3-98ae2252b83b"
],
"account_secure_id": [
"45355976281015164504"
],
"source_id": [
"1234567890"
],
"source_type": [
"DASHBOARD"
],
"source_value": [
"<string>"
],
"mode": [
"production"
],
"origin_owner_id": [
"owner-123"
],
"origin_owner_name": [
"<string>"
],
"auth_type": [
"<string>"
],
"auth_id": [
"<string>"
],
"user_agent": [
"<string>"
],
"ip_address": [
"<string>"
],
"session_id": [
"<string>"
],
"agent_id": [
"<string>"
],
"transport_type": [
"<string>"
],
"stream_type": [
"<string>"
],
"status_code": [
"200"
],
"success": true,
"is_background": true,
"start_time": "2025-01-01T00:00:00.000Z",
"end_time": "2025-01-31T23:59:59.999Z",
"http_method": [],
"log_type": [],
"tuples": [
"<string>"
]
}
}
'import requests
url = "https://api.stackone.com/logs"
payload = {
"page": 1,
"page_size": 25,
"filters": {
"action_run_id": ["adbf752f-6457-4ddd-89b3-98ae2252b83b"],
"action_id": ["get_employees"],
"action_type": ["sync"],
"connector_key": ["slack"],
"connector_version": ["1.0.0"],
"connector_owner": ["<string>"],
"connector_profile_id": ["<string>"],
"category": ["hris"],
"request_id": ["adbf752f-6457-4ddd-89b3-98ae2252b83b"],
"provider": ["hibob"],
"service": ["hris"],
"resource": ["employees"],
"sub_resource": ["documents"],
"child_resource": ["<string>"],
"action": ["create_employee"],
"log_id": ["adbf752f-6457-4ddd-89b3-98ae2252b83b"],
"account_secure_id": ["45355976281015164504"],
"source_id": ["1234567890"],
"source_type": ["DASHBOARD"],
"source_value": ["<string>"],
"mode": ["production"],
"origin_owner_id": ["owner-123"],
"origin_owner_name": ["<string>"],
"auth_type": ["<string>"],
"auth_id": ["<string>"],
"user_agent": ["<string>"],
"ip_address": ["<string>"],
"session_id": ["<string>"],
"agent_id": ["<string>"],
"transport_type": ["<string>"],
"stream_type": ["<string>"],
"status_code": ["200"],
"success": True,
"is_background": True,
"start_time": "2025-01-01T00:00:00.000Z",
"end_time": "2025-01-31T23:59:59.999Z",
"http_method": [],
"log_type": [],
"tuples": ["<string>"]
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
page: 1,
page_size: 25,
filters: {
action_run_id: ['adbf752f-6457-4ddd-89b3-98ae2252b83b'],
action_id: ['get_employees'],
action_type: ['sync'],
connector_key: ['slack'],
connector_version: ['1.0.0'],
connector_owner: ['<string>'],
connector_profile_id: ['<string>'],
category: ['hris'],
request_id: ['adbf752f-6457-4ddd-89b3-98ae2252b83b'],
provider: ['hibob'],
service: ['hris'],
resource: ['employees'],
sub_resource: ['documents'],
child_resource: ['<string>'],
action: ['create_employee'],
log_id: ['adbf752f-6457-4ddd-89b3-98ae2252b83b'],
account_secure_id: ['45355976281015164504'],
source_id: ['1234567890'],
source_type: ['DASHBOARD'],
source_value: ['<string>'],
mode: ['production'],
origin_owner_id: ['owner-123'],
origin_owner_name: ['<string>'],
auth_type: ['<string>'],
auth_id: ['<string>'],
user_agent: ['<string>'],
ip_address: ['<string>'],
session_id: ['<string>'],
agent_id: ['<string>'],
transport_type: ['<string>'],
stream_type: ['<string>'],
status_code: ['200'],
success: true,
is_background: true,
start_time: '2025-01-01T00:00:00.000Z',
end_time: '2025-01-31T23:59:59.999Z',
http_method: [],
log_type: [],
tuples: ['<string>']
}
})
};
fetch('https://api.stackone.com/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.stackone.com/logs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'page' => 1,
'page_size' => 25,
'filters' => [
'action_run_id' => [
'adbf752f-6457-4ddd-89b3-98ae2252b83b'
],
'action_id' => [
'get_employees'
],
'action_type' => [
'sync'
],
'connector_key' => [
'slack'
],
'connector_version' => [
'1.0.0'
],
'connector_owner' => [
'<string>'
],
'connector_profile_id' => [
'<string>'
],
'category' => [
'hris'
],
'request_id' => [
'adbf752f-6457-4ddd-89b3-98ae2252b83b'
],
'provider' => [
'hibob'
],
'service' => [
'hris'
],
'resource' => [
'employees'
],
'sub_resource' => [
'documents'
],
'child_resource' => [
'<string>'
],
'action' => [
'create_employee'
],
'log_id' => [
'adbf752f-6457-4ddd-89b3-98ae2252b83b'
],
'account_secure_id' => [
'45355976281015164504'
],
'source_id' => [
'1234567890'
],
'source_type' => [
'DASHBOARD'
],
'source_value' => [
'<string>'
],
'mode' => [
'production'
],
'origin_owner_id' => [
'owner-123'
],
'origin_owner_name' => [
'<string>'
],
'auth_type' => [
'<string>'
],
'auth_id' => [
'<string>'
],
'user_agent' => [
'<string>'
],
'ip_address' => [
'<string>'
],
'session_id' => [
'<string>'
],
'agent_id' => [
'<string>'
],
'transport_type' => [
'<string>'
],
'stream_type' => [
'<string>'
],
'status_code' => [
'200'
],
'success' => true,
'is_background' => true,
'start_time' => '2025-01-01T00:00:00.000Z',
'end_time' => '2025-01-31T23:59:59.999Z',
'http_method' => [
],
'log_type' => [
],
'tuples' => [
'<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.stackone.com/logs"
payload := strings.NewReader("{\n \"page\": 1,\n \"page_size\": 25,\n \"filters\": {\n \"action_run_id\": [\n \"adbf752f-6457-4ddd-89b3-98ae2252b83b\"\n ],\n \"action_id\": [\n \"get_employees\"\n ],\n \"action_type\": [\n \"sync\"\n ],\n \"connector_key\": [\n \"slack\"\n ],\n \"connector_version\": [\n \"1.0.0\"\n ],\n \"connector_owner\": [\n \"<string>\"\n ],\n \"connector_profile_id\": [\n \"<string>\"\n ],\n \"category\": [\n \"hris\"\n ],\n \"request_id\": [\n \"adbf752f-6457-4ddd-89b3-98ae2252b83b\"\n ],\n \"provider\": [\n \"hibob\"\n ],\n \"service\": [\n \"hris\"\n ],\n \"resource\": [\n \"employees\"\n ],\n \"sub_resource\": [\n \"documents\"\n ],\n \"child_resource\": [\n \"<string>\"\n ],\n \"action\": [\n \"create_employee\"\n ],\n \"log_id\": [\n \"adbf752f-6457-4ddd-89b3-98ae2252b83b\"\n ],\n \"account_secure_id\": [\n \"45355976281015164504\"\n ],\n \"source_id\": [\n \"1234567890\"\n ],\n \"source_type\": [\n \"DASHBOARD\"\n ],\n \"source_value\": [\n \"<string>\"\n ],\n \"mode\": [\n \"production\"\n ],\n \"origin_owner_id\": [\n \"owner-123\"\n ],\n \"origin_owner_name\": [\n \"<string>\"\n ],\n \"auth_type\": [\n \"<string>\"\n ],\n \"auth_id\": [\n \"<string>\"\n ],\n \"user_agent\": [\n \"<string>\"\n ],\n \"ip_address\": [\n \"<string>\"\n ],\n \"session_id\": [\n \"<string>\"\n ],\n \"agent_id\": [\n \"<string>\"\n ],\n \"transport_type\": [\n \"<string>\"\n ],\n \"stream_type\": [\n \"<string>\"\n ],\n \"status_code\": [\n \"200\"\n ],\n \"success\": true,\n \"is_background\": true,\n \"start_time\": \"2025-01-01T00:00:00.000Z\",\n \"end_time\": \"2025-01-31T23:59:59.999Z\",\n \"http_method\": [],\n \"log_type\": [],\n \"tuples\": [\n \"<string>\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.stackone.com/logs")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"page\": 1,\n \"page_size\": 25,\n \"filters\": {\n \"action_run_id\": [\n \"adbf752f-6457-4ddd-89b3-98ae2252b83b\"\n ],\n \"action_id\": [\n \"get_employees\"\n ],\n \"action_type\": [\n \"sync\"\n ],\n \"connector_key\": [\n \"slack\"\n ],\n \"connector_version\": [\n \"1.0.0\"\n ],\n \"connector_owner\": [\n \"<string>\"\n ],\n \"connector_profile_id\": [\n \"<string>\"\n ],\n \"category\": [\n \"hris\"\n ],\n \"request_id\": [\n \"adbf752f-6457-4ddd-89b3-98ae2252b83b\"\n ],\n \"provider\": [\n \"hibob\"\n ],\n \"service\": [\n \"hris\"\n ],\n \"resource\": [\n \"employees\"\n ],\n \"sub_resource\": [\n \"documents\"\n ],\n \"child_resource\": [\n \"<string>\"\n ],\n \"action\": [\n \"create_employee\"\n ],\n \"log_id\": [\n \"adbf752f-6457-4ddd-89b3-98ae2252b83b\"\n ],\n \"account_secure_id\": [\n \"45355976281015164504\"\n ],\n \"source_id\": [\n \"1234567890\"\n ],\n \"source_type\": [\n \"DASHBOARD\"\n ],\n \"source_value\": [\n \"<string>\"\n ],\n \"mode\": [\n \"production\"\n ],\n \"origin_owner_id\": [\n \"owner-123\"\n ],\n \"origin_owner_name\": [\n \"<string>\"\n ],\n \"auth_type\": [\n \"<string>\"\n ],\n \"auth_id\": [\n \"<string>\"\n ],\n \"user_agent\": [\n \"<string>\"\n ],\n \"ip_address\": [\n \"<string>\"\n ],\n \"session_id\": [\n \"<string>\"\n ],\n \"agent_id\": [\n \"<string>\"\n ],\n \"transport_type\": [\n \"<string>\"\n ],\n \"stream_type\": [\n \"<string>\"\n ],\n \"status_code\": [\n \"200\"\n ],\n \"success\": true,\n \"is_background\": true,\n \"start_time\": \"2025-01-01T00:00:00.000Z\",\n \"end_time\": \"2025-01-31T23:59:59.999Z\",\n \"http_method\": [],\n \"log_type\": [],\n \"tuples\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stackone.com/logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"page\": 1,\n \"page_size\": 25,\n \"filters\": {\n \"action_run_id\": [\n \"adbf752f-6457-4ddd-89b3-98ae2252b83b\"\n ],\n \"action_id\": [\n \"get_employees\"\n ],\n \"action_type\": [\n \"sync\"\n ],\n \"connector_key\": [\n \"slack\"\n ],\n \"connector_version\": [\n \"1.0.0\"\n ],\n \"connector_owner\": [\n \"<string>\"\n ],\n \"connector_profile_id\": [\n \"<string>\"\n ],\n \"category\": [\n \"hris\"\n ],\n \"request_id\": [\n \"adbf752f-6457-4ddd-89b3-98ae2252b83b\"\n ],\n \"provider\": [\n \"hibob\"\n ],\n \"service\": [\n \"hris\"\n ],\n \"resource\": [\n \"employees\"\n ],\n \"sub_resource\": [\n \"documents\"\n ],\n \"child_resource\": [\n \"<string>\"\n ],\n \"action\": [\n \"create_employee\"\n ],\n \"log_id\": [\n \"adbf752f-6457-4ddd-89b3-98ae2252b83b\"\n ],\n \"account_secure_id\": [\n \"45355976281015164504\"\n ],\n \"source_id\": [\n \"1234567890\"\n ],\n \"source_type\": [\n \"DASHBOARD\"\n ],\n \"source_value\": [\n \"<string>\"\n ],\n \"mode\": [\n \"production\"\n ],\n \"origin_owner_id\": [\n \"owner-123\"\n ],\n \"origin_owner_name\": [\n \"<string>\"\n ],\n \"auth_type\": [\n \"<string>\"\n ],\n \"auth_id\": [\n \"<string>\"\n ],\n \"user_agent\": [\n \"<string>\"\n ],\n \"ip_address\": [\n \"<string>\"\n ],\n \"session_id\": [\n \"<string>\"\n ],\n \"agent_id\": [\n \"<string>\"\n ],\n \"transport_type\": [\n \"<string>\"\n ],\n \"stream_type\": [\n \"<string>\"\n ],\n \"status_code\": [\n \"200\"\n ],\n \"success\": true,\n \"is_background\": true,\n \"start_time\": \"2025-01-01T00:00:00.000Z\",\n \"end_time\": \"2025-01-31T23:59:59.999Z\",\n \"http_method\": [],\n \"log_type\": [],\n \"tuples\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"log_id": "adbf752f-6457-4ddd-89b3-98ae2252b83b",
"log_type": "action",
"action_run_id": "adbf752f-6457-4ddd-89b3-98ae2252b83b",
"event_time": "2021-01-01T00:00:00Z",
"start_time": "2021-01-01T00:00:00Z",
"end_time": "2021-01-01T00:00:00Z",
"duration_ms": 356,
"project_id": "dev-project-68574",
"account_id": "45355976281015164504",
"success": true,
"status_code": 200,
"connector_key": "workday",
"connector_version": "1.0.0",
"connector_owner": "stackone",
"mode": "production",
"http_method": "GET",
"url": "https://api.stackone.com/unified/hris/employees",
"source_type": "DASHBOARD",
"source_id": "1234567890",
"source_value": "ACCOUNT_TESTER",
"auth_type": "API_KEY",
"auth_id": "auth-123",
"user_agent": "Mozilla/5.0",
"ip_address": "192.168.1.1",
"session_id": "session-123",
"agent_id": "agent-123",
"transport_type": "HTTP",
"stream_type": "HTTP",
"is_background": false,
"origin_owner_id": "owner-123",
"origin_owner_name": "Test Owner",
"action_id": "get_employees",
"connector_profile_id": "profile-123",
"action_type": "sync",
"category": "hris",
"risk_level": "low",
"tier2_score": 0.5
}
],
"query": {
"page": 1,
"page_size": 25
},
"total": 100
}{
"statusCode": 400,
"message": "Bad Request",
"timestamp": "2023-05-30T00:00:00.000Z",
"data": {
"statusCode": 400,
"message": "Bad Request",
"headers": {
"content-type": "application/json",
"x-request-id": "5678c28b211dace4e0a0f9171e6b88c5"
}
},
"provider_errors": [
{
"status": 400,
"url": "https://api.provider.com/v1/resource",
"raw": {
"message": "Invalid input parameters"
},
"headers": {
"content-type": "application/json",
"x-request-id": "5678c28b211dace4e0a0f9171e6b88c5"
}
}
]
}{
"statusCode": 401,
"message": "Unauthorized",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 403,
"message": "Forbidden resource",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 404,
"message": "Not Found",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 408,
"message": "Request timed out",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 409,
"message": "Conflict",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 422,
"message": "Unprocessable Entity",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 429,
"message": "Too many requests",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 500,
"message": "Internal server error",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 501,
"message": "Not Implemented",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 502,
"message": "Bad Gateway",
"timestamp": "2023-05-30T00:00:00.000Z"
}Returns a paginated list of logs. Each log includes a log_type discriminator field with possible values: action or unified. Use the log_type filter to request specific types.
POST
/
logs
List Logs
curl --request POST \
--url https://api.stackone.com/logs \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"page": 1,
"page_size": 25,
"filters": {
"action_run_id": [
"adbf752f-6457-4ddd-89b3-98ae2252b83b"
],
"action_id": [
"get_employees"
],
"action_type": [
"sync"
],
"connector_key": [
"slack"
],
"connector_version": [
"1.0.0"
],
"connector_owner": [
"<string>"
],
"connector_profile_id": [
"<string>"
],
"category": [
"hris"
],
"request_id": [
"adbf752f-6457-4ddd-89b3-98ae2252b83b"
],
"provider": [
"hibob"
],
"service": [
"hris"
],
"resource": [
"employees"
],
"sub_resource": [
"documents"
],
"child_resource": [
"<string>"
],
"action": [
"create_employee"
],
"log_id": [
"adbf752f-6457-4ddd-89b3-98ae2252b83b"
],
"account_secure_id": [
"45355976281015164504"
],
"source_id": [
"1234567890"
],
"source_type": [
"DASHBOARD"
],
"source_value": [
"<string>"
],
"mode": [
"production"
],
"origin_owner_id": [
"owner-123"
],
"origin_owner_name": [
"<string>"
],
"auth_type": [
"<string>"
],
"auth_id": [
"<string>"
],
"user_agent": [
"<string>"
],
"ip_address": [
"<string>"
],
"session_id": [
"<string>"
],
"agent_id": [
"<string>"
],
"transport_type": [
"<string>"
],
"stream_type": [
"<string>"
],
"status_code": [
"200"
],
"success": true,
"is_background": true,
"start_time": "2025-01-01T00:00:00.000Z",
"end_time": "2025-01-31T23:59:59.999Z",
"http_method": [],
"log_type": [],
"tuples": [
"<string>"
]
}
}
'import requests
url = "https://api.stackone.com/logs"
payload = {
"page": 1,
"page_size": 25,
"filters": {
"action_run_id": ["adbf752f-6457-4ddd-89b3-98ae2252b83b"],
"action_id": ["get_employees"],
"action_type": ["sync"],
"connector_key": ["slack"],
"connector_version": ["1.0.0"],
"connector_owner": ["<string>"],
"connector_profile_id": ["<string>"],
"category": ["hris"],
"request_id": ["adbf752f-6457-4ddd-89b3-98ae2252b83b"],
"provider": ["hibob"],
"service": ["hris"],
"resource": ["employees"],
"sub_resource": ["documents"],
"child_resource": ["<string>"],
"action": ["create_employee"],
"log_id": ["adbf752f-6457-4ddd-89b3-98ae2252b83b"],
"account_secure_id": ["45355976281015164504"],
"source_id": ["1234567890"],
"source_type": ["DASHBOARD"],
"source_value": ["<string>"],
"mode": ["production"],
"origin_owner_id": ["owner-123"],
"origin_owner_name": ["<string>"],
"auth_type": ["<string>"],
"auth_id": ["<string>"],
"user_agent": ["<string>"],
"ip_address": ["<string>"],
"session_id": ["<string>"],
"agent_id": ["<string>"],
"transport_type": ["<string>"],
"stream_type": ["<string>"],
"status_code": ["200"],
"success": True,
"is_background": True,
"start_time": "2025-01-01T00:00:00.000Z",
"end_time": "2025-01-31T23:59:59.999Z",
"http_method": [],
"log_type": [],
"tuples": ["<string>"]
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
page: 1,
page_size: 25,
filters: {
action_run_id: ['adbf752f-6457-4ddd-89b3-98ae2252b83b'],
action_id: ['get_employees'],
action_type: ['sync'],
connector_key: ['slack'],
connector_version: ['1.0.0'],
connector_owner: ['<string>'],
connector_profile_id: ['<string>'],
category: ['hris'],
request_id: ['adbf752f-6457-4ddd-89b3-98ae2252b83b'],
provider: ['hibob'],
service: ['hris'],
resource: ['employees'],
sub_resource: ['documents'],
child_resource: ['<string>'],
action: ['create_employee'],
log_id: ['adbf752f-6457-4ddd-89b3-98ae2252b83b'],
account_secure_id: ['45355976281015164504'],
source_id: ['1234567890'],
source_type: ['DASHBOARD'],
source_value: ['<string>'],
mode: ['production'],
origin_owner_id: ['owner-123'],
origin_owner_name: ['<string>'],
auth_type: ['<string>'],
auth_id: ['<string>'],
user_agent: ['<string>'],
ip_address: ['<string>'],
session_id: ['<string>'],
agent_id: ['<string>'],
transport_type: ['<string>'],
stream_type: ['<string>'],
status_code: ['200'],
success: true,
is_background: true,
start_time: '2025-01-01T00:00:00.000Z',
end_time: '2025-01-31T23:59:59.999Z',
http_method: [],
log_type: [],
tuples: ['<string>']
}
})
};
fetch('https://api.stackone.com/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.stackone.com/logs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'page' => 1,
'page_size' => 25,
'filters' => [
'action_run_id' => [
'adbf752f-6457-4ddd-89b3-98ae2252b83b'
],
'action_id' => [
'get_employees'
],
'action_type' => [
'sync'
],
'connector_key' => [
'slack'
],
'connector_version' => [
'1.0.0'
],
'connector_owner' => [
'<string>'
],
'connector_profile_id' => [
'<string>'
],
'category' => [
'hris'
],
'request_id' => [
'adbf752f-6457-4ddd-89b3-98ae2252b83b'
],
'provider' => [
'hibob'
],
'service' => [
'hris'
],
'resource' => [
'employees'
],
'sub_resource' => [
'documents'
],
'child_resource' => [
'<string>'
],
'action' => [
'create_employee'
],
'log_id' => [
'adbf752f-6457-4ddd-89b3-98ae2252b83b'
],
'account_secure_id' => [
'45355976281015164504'
],
'source_id' => [
'1234567890'
],
'source_type' => [
'DASHBOARD'
],
'source_value' => [
'<string>'
],
'mode' => [
'production'
],
'origin_owner_id' => [
'owner-123'
],
'origin_owner_name' => [
'<string>'
],
'auth_type' => [
'<string>'
],
'auth_id' => [
'<string>'
],
'user_agent' => [
'<string>'
],
'ip_address' => [
'<string>'
],
'session_id' => [
'<string>'
],
'agent_id' => [
'<string>'
],
'transport_type' => [
'<string>'
],
'stream_type' => [
'<string>'
],
'status_code' => [
'200'
],
'success' => true,
'is_background' => true,
'start_time' => '2025-01-01T00:00:00.000Z',
'end_time' => '2025-01-31T23:59:59.999Z',
'http_method' => [
],
'log_type' => [
],
'tuples' => [
'<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.stackone.com/logs"
payload := strings.NewReader("{\n \"page\": 1,\n \"page_size\": 25,\n \"filters\": {\n \"action_run_id\": [\n \"adbf752f-6457-4ddd-89b3-98ae2252b83b\"\n ],\n \"action_id\": [\n \"get_employees\"\n ],\n \"action_type\": [\n \"sync\"\n ],\n \"connector_key\": [\n \"slack\"\n ],\n \"connector_version\": [\n \"1.0.0\"\n ],\n \"connector_owner\": [\n \"<string>\"\n ],\n \"connector_profile_id\": [\n \"<string>\"\n ],\n \"category\": [\n \"hris\"\n ],\n \"request_id\": [\n \"adbf752f-6457-4ddd-89b3-98ae2252b83b\"\n ],\n \"provider\": [\n \"hibob\"\n ],\n \"service\": [\n \"hris\"\n ],\n \"resource\": [\n \"employees\"\n ],\n \"sub_resource\": [\n \"documents\"\n ],\n \"child_resource\": [\n \"<string>\"\n ],\n \"action\": [\n \"create_employee\"\n ],\n \"log_id\": [\n \"adbf752f-6457-4ddd-89b3-98ae2252b83b\"\n ],\n \"account_secure_id\": [\n \"45355976281015164504\"\n ],\n \"source_id\": [\n \"1234567890\"\n ],\n \"source_type\": [\n \"DASHBOARD\"\n ],\n \"source_value\": [\n \"<string>\"\n ],\n \"mode\": [\n \"production\"\n ],\n \"origin_owner_id\": [\n \"owner-123\"\n ],\n \"origin_owner_name\": [\n \"<string>\"\n ],\n \"auth_type\": [\n \"<string>\"\n ],\n \"auth_id\": [\n \"<string>\"\n ],\n \"user_agent\": [\n \"<string>\"\n ],\n \"ip_address\": [\n \"<string>\"\n ],\n \"session_id\": [\n \"<string>\"\n ],\n \"agent_id\": [\n \"<string>\"\n ],\n \"transport_type\": [\n \"<string>\"\n ],\n \"stream_type\": [\n \"<string>\"\n ],\n \"status_code\": [\n \"200\"\n ],\n \"success\": true,\n \"is_background\": true,\n \"start_time\": \"2025-01-01T00:00:00.000Z\",\n \"end_time\": \"2025-01-31T23:59:59.999Z\",\n \"http_method\": [],\n \"log_type\": [],\n \"tuples\": [\n \"<string>\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.stackone.com/logs")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"page\": 1,\n \"page_size\": 25,\n \"filters\": {\n \"action_run_id\": [\n \"adbf752f-6457-4ddd-89b3-98ae2252b83b\"\n ],\n \"action_id\": [\n \"get_employees\"\n ],\n \"action_type\": [\n \"sync\"\n ],\n \"connector_key\": [\n \"slack\"\n ],\n \"connector_version\": [\n \"1.0.0\"\n ],\n \"connector_owner\": [\n \"<string>\"\n ],\n \"connector_profile_id\": [\n \"<string>\"\n ],\n \"category\": [\n \"hris\"\n ],\n \"request_id\": [\n \"adbf752f-6457-4ddd-89b3-98ae2252b83b\"\n ],\n \"provider\": [\n \"hibob\"\n ],\n \"service\": [\n \"hris\"\n ],\n \"resource\": [\n \"employees\"\n ],\n \"sub_resource\": [\n \"documents\"\n ],\n \"child_resource\": [\n \"<string>\"\n ],\n \"action\": [\n \"create_employee\"\n ],\n \"log_id\": [\n \"adbf752f-6457-4ddd-89b3-98ae2252b83b\"\n ],\n \"account_secure_id\": [\n \"45355976281015164504\"\n ],\n \"source_id\": [\n \"1234567890\"\n ],\n \"source_type\": [\n \"DASHBOARD\"\n ],\n \"source_value\": [\n \"<string>\"\n ],\n \"mode\": [\n \"production\"\n ],\n \"origin_owner_id\": [\n \"owner-123\"\n ],\n \"origin_owner_name\": [\n \"<string>\"\n ],\n \"auth_type\": [\n \"<string>\"\n ],\n \"auth_id\": [\n \"<string>\"\n ],\n \"user_agent\": [\n \"<string>\"\n ],\n \"ip_address\": [\n \"<string>\"\n ],\n \"session_id\": [\n \"<string>\"\n ],\n \"agent_id\": [\n \"<string>\"\n ],\n \"transport_type\": [\n \"<string>\"\n ],\n \"stream_type\": [\n \"<string>\"\n ],\n \"status_code\": [\n \"200\"\n ],\n \"success\": true,\n \"is_background\": true,\n \"start_time\": \"2025-01-01T00:00:00.000Z\",\n \"end_time\": \"2025-01-31T23:59:59.999Z\",\n \"http_method\": [],\n \"log_type\": [],\n \"tuples\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stackone.com/logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"page\": 1,\n \"page_size\": 25,\n \"filters\": {\n \"action_run_id\": [\n \"adbf752f-6457-4ddd-89b3-98ae2252b83b\"\n ],\n \"action_id\": [\n \"get_employees\"\n ],\n \"action_type\": [\n \"sync\"\n ],\n \"connector_key\": [\n \"slack\"\n ],\n \"connector_version\": [\n \"1.0.0\"\n ],\n \"connector_owner\": [\n \"<string>\"\n ],\n \"connector_profile_id\": [\n \"<string>\"\n ],\n \"category\": [\n \"hris\"\n ],\n \"request_id\": [\n \"adbf752f-6457-4ddd-89b3-98ae2252b83b\"\n ],\n \"provider\": [\n \"hibob\"\n ],\n \"service\": [\n \"hris\"\n ],\n \"resource\": [\n \"employees\"\n ],\n \"sub_resource\": [\n \"documents\"\n ],\n \"child_resource\": [\n \"<string>\"\n ],\n \"action\": [\n \"create_employee\"\n ],\n \"log_id\": [\n \"adbf752f-6457-4ddd-89b3-98ae2252b83b\"\n ],\n \"account_secure_id\": [\n \"45355976281015164504\"\n ],\n \"source_id\": [\n \"1234567890\"\n ],\n \"source_type\": [\n \"DASHBOARD\"\n ],\n \"source_value\": [\n \"<string>\"\n ],\n \"mode\": [\n \"production\"\n ],\n \"origin_owner_id\": [\n \"owner-123\"\n ],\n \"origin_owner_name\": [\n \"<string>\"\n ],\n \"auth_type\": [\n \"<string>\"\n ],\n \"auth_id\": [\n \"<string>\"\n ],\n \"user_agent\": [\n \"<string>\"\n ],\n \"ip_address\": [\n \"<string>\"\n ],\n \"session_id\": [\n \"<string>\"\n ],\n \"agent_id\": [\n \"<string>\"\n ],\n \"transport_type\": [\n \"<string>\"\n ],\n \"stream_type\": [\n \"<string>\"\n ],\n \"status_code\": [\n \"200\"\n ],\n \"success\": true,\n \"is_background\": true,\n \"start_time\": \"2025-01-01T00:00:00.000Z\",\n \"end_time\": \"2025-01-31T23:59:59.999Z\",\n \"http_method\": [],\n \"log_type\": [],\n \"tuples\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"log_id": "adbf752f-6457-4ddd-89b3-98ae2252b83b",
"log_type": "action",
"action_run_id": "adbf752f-6457-4ddd-89b3-98ae2252b83b",
"event_time": "2021-01-01T00:00:00Z",
"start_time": "2021-01-01T00:00:00Z",
"end_time": "2021-01-01T00:00:00Z",
"duration_ms": 356,
"project_id": "dev-project-68574",
"account_id": "45355976281015164504",
"success": true,
"status_code": 200,
"connector_key": "workday",
"connector_version": "1.0.0",
"connector_owner": "stackone",
"mode": "production",
"http_method": "GET",
"url": "https://api.stackone.com/unified/hris/employees",
"source_type": "DASHBOARD",
"source_id": "1234567890",
"source_value": "ACCOUNT_TESTER",
"auth_type": "API_KEY",
"auth_id": "auth-123",
"user_agent": "Mozilla/5.0",
"ip_address": "192.168.1.1",
"session_id": "session-123",
"agent_id": "agent-123",
"transport_type": "HTTP",
"stream_type": "HTTP",
"is_background": false,
"origin_owner_id": "owner-123",
"origin_owner_name": "Test Owner",
"action_id": "get_employees",
"connector_profile_id": "profile-123",
"action_type": "sync",
"category": "hris",
"risk_level": "low",
"tier2_score": 0.5
}
],
"query": {
"page": 1,
"page_size": 25
},
"total": 100
}{
"statusCode": 400,
"message": "Bad Request",
"timestamp": "2023-05-30T00:00:00.000Z",
"data": {
"statusCode": 400,
"message": "Bad Request",
"headers": {
"content-type": "application/json",
"x-request-id": "5678c28b211dace4e0a0f9171e6b88c5"
}
},
"provider_errors": [
{
"status": 400,
"url": "https://api.provider.com/v1/resource",
"raw": {
"message": "Invalid input parameters"
},
"headers": {
"content-type": "application/json",
"x-request-id": "5678c28b211dace4e0a0f9171e6b88c5"
}
}
]
}{
"statusCode": 401,
"message": "Unauthorized",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 403,
"message": "Forbidden resource",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 404,
"message": "Not Found",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 408,
"message": "Request timed out",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 409,
"message": "Conflict",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 422,
"message": "Unprocessable Entity",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 429,
"message": "Too many requests",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 500,
"message": "Internal server error",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 501,
"message": "Not Implemented",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 502,
"message": "Bad Gateway",
"timestamp": "2023-05-30T00:00:00.000Z"
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
application/json
Was this page helpful?
⌘I