Ingest up to 1000 audit events
curl --request POST \
--url https://api.fact0.io/v1/events/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"events": [
{
"actor": {
"id": "<string>",
"email": "<string>"
},
"action": "<string>",
"resource": {
"id": "<string>",
"type": "<string>",
"name": "<string>"
},
"id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"metadata": {}
}
]
}
'import requests
url = "https://api.fact0.io/v1/events/batch"
payload = { "events": [
{
"actor": {
"id": "<string>",
"email": "<string>"
},
"action": "<string>",
"resource": {
"id": "<string>",
"type": "<string>",
"name": "<string>"
},
"id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"metadata": {}
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
events: [
{
actor: {id: '<string>', email: '<string>'},
action: '<string>',
resource: {id: '<string>', type: '<string>', name: '<string>'},
id: '<string>',
timestamp: '2023-11-07T05:31:56Z',
metadata: {}
}
]
})
};
fetch('https://api.fact0.io/v1/events/batch', 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.fact0.io/v1/events/batch",
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([
'events' => [
[
'actor' => [
'id' => '<string>',
'email' => '<string>'
],
'action' => '<string>',
'resource' => [
'id' => '<string>',
'type' => '<string>',
'name' => '<string>'
],
'id' => '<string>',
'timestamp' => '2023-11-07T05:31:56Z',
'metadata' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.fact0.io/v1/events/batch"
payload := strings.NewReader("{\n \"events\": [\n {\n \"actor\": {\n \"id\": \"<string>\",\n \"email\": \"<string>\"\n },\n \"action\": \"<string>\",\n \"resource\": {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {}\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.fact0.io/v1/events/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"events\": [\n {\n \"actor\": {\n \"id\": \"<string>\",\n \"email\": \"<string>\"\n },\n \"action\": \"<string>\",\n \"resource\": {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {}\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fact0.io/v1/events/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"events\": [\n {\n \"actor\": {\n \"id\": \"<string>\",\n \"email\": \"<string>\"\n },\n \"action\": \"<string>\",\n \"resource\": {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {}\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"accepted": 123,
"rejected": 123,
"ids": [
"<string>"
],
"errors": [
{
"index": 123,
"code": "<string>",
"message": "<string>"
}
]
}{
"accepted": 123,
"rejected": 123,
"ids": [
"<string>"
],
"errors": [
{
"index": 123,
"code": "<string>",
"message": "<string>"
}
],
"receipt_id": "<string>",
"status": "queued",
"error_message": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"committed_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Ingest
Ingest up to 1000 audit events
POST
/
v1
/
events
/
batch
Ingest up to 1000 audit events
curl --request POST \
--url https://api.fact0.io/v1/events/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"events": [
{
"actor": {
"id": "<string>",
"email": "<string>"
},
"action": "<string>",
"resource": {
"id": "<string>",
"type": "<string>",
"name": "<string>"
},
"id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"metadata": {}
}
]
}
'import requests
url = "https://api.fact0.io/v1/events/batch"
payload = { "events": [
{
"actor": {
"id": "<string>",
"email": "<string>"
},
"action": "<string>",
"resource": {
"id": "<string>",
"type": "<string>",
"name": "<string>"
},
"id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"metadata": {}
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
events: [
{
actor: {id: '<string>', email: '<string>'},
action: '<string>',
resource: {id: '<string>', type: '<string>', name: '<string>'},
id: '<string>',
timestamp: '2023-11-07T05:31:56Z',
metadata: {}
}
]
})
};
fetch('https://api.fact0.io/v1/events/batch', 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.fact0.io/v1/events/batch",
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([
'events' => [
[
'actor' => [
'id' => '<string>',
'email' => '<string>'
],
'action' => '<string>',
'resource' => [
'id' => '<string>',
'type' => '<string>',
'name' => '<string>'
],
'id' => '<string>',
'timestamp' => '2023-11-07T05:31:56Z',
'metadata' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.fact0.io/v1/events/batch"
payload := strings.NewReader("{\n \"events\": [\n {\n \"actor\": {\n \"id\": \"<string>\",\n \"email\": \"<string>\"\n },\n \"action\": \"<string>\",\n \"resource\": {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {}\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.fact0.io/v1/events/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"events\": [\n {\n \"actor\": {\n \"id\": \"<string>\",\n \"email\": \"<string>\"\n },\n \"action\": \"<string>\",\n \"resource\": {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {}\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fact0.io/v1/events/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"events\": [\n {\n \"actor\": {\n \"id\": \"<string>\",\n \"email\": \"<string>\"\n },\n \"action\": \"<string>\",\n \"resource\": {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {}\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"accepted": 123,
"rejected": 123,
"ids": [
"<string>"
],
"errors": [
{
"index": 123,
"code": "<string>",
"message": "<string>"
}
]
}{
"accepted": 123,
"rejected": 123,
"ids": [
"<string>"
],
"errors": [
{
"index": 123,
"code": "<string>",
"message": "<string>"
}
],
"receipt_id": "<string>",
"status": "queued",
"error_message": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"committed_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
API key prefixed with alk_live_. Write scope required for ingest.
Headers
Set to true for synchronous ingest
Available options:
true Query Parameters
Set to true for synchronous ingest
Available options:
true Body
application/json
Maximum array length:
1000Show child attributes
Show child attributes
⌘I