Configure an export's delivery destination
curl --request PUT \
--url https://{host}/api/system-management/public/v1/exports/{orgId}/{exportType}/destination \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"access_key_id": "<string>",
"account_key": "<string>",
"auth_method": "<string>",
"bucket": "<string>",
"endpoint": "<string>",
"iam_role_arn": "<string>",
"path_prefix": "<string>",
"provider": "<string>",
"region": "<string>",
"sas_token": "<string>",
"secret_access_key": "<string>",
"use_path_style": true,
"use_ssl": true
}
'import requests
url = "https://{host}/api/system-management/public/v1/exports/{orgId}/{exportType}/destination"
payload = {
"access_key_id": "<string>",
"account_key": "<string>",
"auth_method": "<string>",
"bucket": "<string>",
"endpoint": "<string>",
"iam_role_arn": "<string>",
"path_prefix": "<string>",
"provider": "<string>",
"region": "<string>",
"sas_token": "<string>",
"secret_access_key": "<string>",
"use_path_style": True,
"use_ssl": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
access_key_id: '<string>',
account_key: '<string>',
auth_method: '<string>',
bucket: '<string>',
endpoint: '<string>',
iam_role_arn: '<string>',
path_prefix: '<string>',
provider: '<string>',
region: '<string>',
sas_token: '<string>',
secret_access_key: '<string>',
use_path_style: true,
use_ssl: true
})
};
fetch('https://{host}/api/system-management/public/v1/exports/{orgId}/{exportType}/destination', 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://{host}/api/system-management/public/v1/exports/{orgId}/{exportType}/destination",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'access_key_id' => '<string>',
'account_key' => '<string>',
'auth_method' => '<string>',
'bucket' => '<string>',
'endpoint' => '<string>',
'iam_role_arn' => '<string>',
'path_prefix' => '<string>',
'provider' => '<string>',
'region' => '<string>',
'sas_token' => '<string>',
'secret_access_key' => '<string>',
'use_path_style' => true,
'use_ssl' => true
]),
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://{host}/api/system-management/public/v1/exports/{orgId}/{exportType}/destination"
payload := strings.NewReader("{\n \"access_key_id\": \"<string>\",\n \"account_key\": \"<string>\",\n \"auth_method\": \"<string>\",\n \"bucket\": \"<string>\",\n \"endpoint\": \"<string>\",\n \"iam_role_arn\": \"<string>\",\n \"path_prefix\": \"<string>\",\n \"provider\": \"<string>\",\n \"region\": \"<string>\",\n \"sas_token\": \"<string>\",\n \"secret_access_key\": \"<string>\",\n \"use_path_style\": true,\n \"use_ssl\": true\n}")
req, _ := http.NewRequest("PUT", 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.put("https://{host}/api/system-management/public/v1/exports/{orgId}/{exportType}/destination")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"access_key_id\": \"<string>\",\n \"account_key\": \"<string>\",\n \"auth_method\": \"<string>\",\n \"bucket\": \"<string>\",\n \"endpoint\": \"<string>\",\n \"iam_role_arn\": \"<string>\",\n \"path_prefix\": \"<string>\",\n \"provider\": \"<string>\",\n \"region\": \"<string>\",\n \"sas_token\": \"<string>\",\n \"secret_access_key\": \"<string>\",\n \"use_path_style\": true,\n \"use_ssl\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/system-management/public/v1/exports/{orgId}/{exportType}/destination")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"access_key_id\": \"<string>\",\n \"account_key\": \"<string>\",\n \"auth_method\": \"<string>\",\n \"bucket\": \"<string>\",\n \"endpoint\": \"<string>\",\n \"iam_role_arn\": \"<string>\",\n \"path_prefix\": \"<string>\",\n \"provider\": \"<string>\",\n \"region\": \"<string>\",\n \"sas_token\": \"<string>\",\n \"secret_access_key\": \"<string>\",\n \"use_path_style\": true,\n \"use_ssl\": true\n}"
response = http.request(request)
puts response.read_body{
"destination": {
"auth_method": "<string>",
"bucket": "<string>",
"credentials_rotated_at": "<string>",
"endpoint": "<string>",
"external_id": "<string>",
"has_credentials": true,
"iam_role_arn": "<string>",
"path_prefix": "<string>",
"provider": "<string>",
"region": "<string>",
"use_path_style": true,
"use_ssl": true
},
"enabled": true,
"export_type": "<string>",
"organization_id": "<string>",
"runtime_status": {
"health": {
"checked_at": "2023-11-07T05:31:56Z",
"message": "<string>",
"source": "<string>",
"state": "<string>"
},
"last_delivered_at": "2023-11-07T05:31:56Z",
"last_error": "<string>",
"last_error_at": "2023-11-07T05:31:56Z",
"last_file_name": "<string>"
}
}{
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Log Exports
Configure an export's delivery destination
PUT
/
api
/
system-management
/
public
/
v1
/
exports
/
{orgId}
/
{exportType}
/
destination
Configure an export's delivery destination
curl --request PUT \
--url https://{host}/api/system-management/public/v1/exports/{orgId}/{exportType}/destination \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"access_key_id": "<string>",
"account_key": "<string>",
"auth_method": "<string>",
"bucket": "<string>",
"endpoint": "<string>",
"iam_role_arn": "<string>",
"path_prefix": "<string>",
"provider": "<string>",
"region": "<string>",
"sas_token": "<string>",
"secret_access_key": "<string>",
"use_path_style": true,
"use_ssl": true
}
'import requests
url = "https://{host}/api/system-management/public/v1/exports/{orgId}/{exportType}/destination"
payload = {
"access_key_id": "<string>",
"account_key": "<string>",
"auth_method": "<string>",
"bucket": "<string>",
"endpoint": "<string>",
"iam_role_arn": "<string>",
"path_prefix": "<string>",
"provider": "<string>",
"region": "<string>",
"sas_token": "<string>",
"secret_access_key": "<string>",
"use_path_style": True,
"use_ssl": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
access_key_id: '<string>',
account_key: '<string>',
auth_method: '<string>',
bucket: '<string>',
endpoint: '<string>',
iam_role_arn: '<string>',
path_prefix: '<string>',
provider: '<string>',
region: '<string>',
sas_token: '<string>',
secret_access_key: '<string>',
use_path_style: true,
use_ssl: true
})
};
fetch('https://{host}/api/system-management/public/v1/exports/{orgId}/{exportType}/destination', 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://{host}/api/system-management/public/v1/exports/{orgId}/{exportType}/destination",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'access_key_id' => '<string>',
'account_key' => '<string>',
'auth_method' => '<string>',
'bucket' => '<string>',
'endpoint' => '<string>',
'iam_role_arn' => '<string>',
'path_prefix' => '<string>',
'provider' => '<string>',
'region' => '<string>',
'sas_token' => '<string>',
'secret_access_key' => '<string>',
'use_path_style' => true,
'use_ssl' => true
]),
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://{host}/api/system-management/public/v1/exports/{orgId}/{exportType}/destination"
payload := strings.NewReader("{\n \"access_key_id\": \"<string>\",\n \"account_key\": \"<string>\",\n \"auth_method\": \"<string>\",\n \"bucket\": \"<string>\",\n \"endpoint\": \"<string>\",\n \"iam_role_arn\": \"<string>\",\n \"path_prefix\": \"<string>\",\n \"provider\": \"<string>\",\n \"region\": \"<string>\",\n \"sas_token\": \"<string>\",\n \"secret_access_key\": \"<string>\",\n \"use_path_style\": true,\n \"use_ssl\": true\n}")
req, _ := http.NewRequest("PUT", 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.put("https://{host}/api/system-management/public/v1/exports/{orgId}/{exportType}/destination")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"access_key_id\": \"<string>\",\n \"account_key\": \"<string>\",\n \"auth_method\": \"<string>\",\n \"bucket\": \"<string>\",\n \"endpoint\": \"<string>\",\n \"iam_role_arn\": \"<string>\",\n \"path_prefix\": \"<string>\",\n \"provider\": \"<string>\",\n \"region\": \"<string>\",\n \"sas_token\": \"<string>\",\n \"secret_access_key\": \"<string>\",\n \"use_path_style\": true,\n \"use_ssl\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/system-management/public/v1/exports/{orgId}/{exportType}/destination")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"access_key_id\": \"<string>\",\n \"account_key\": \"<string>\",\n \"auth_method\": \"<string>\",\n \"bucket\": \"<string>\",\n \"endpoint\": \"<string>\",\n \"iam_role_arn\": \"<string>\",\n \"path_prefix\": \"<string>\",\n \"provider\": \"<string>\",\n \"region\": \"<string>\",\n \"sas_token\": \"<string>\",\n \"secret_access_key\": \"<string>\",\n \"use_path_style\": true,\n \"use_ssl\": true\n}"
response = http.request(request)
puts response.read_body{
"destination": {
"auth_method": "<string>",
"bucket": "<string>",
"credentials_rotated_at": "<string>",
"endpoint": "<string>",
"external_id": "<string>",
"has_credentials": true,
"iam_role_arn": "<string>",
"path_prefix": "<string>",
"provider": "<string>",
"region": "<string>",
"use_path_style": true,
"use_ssl": true
},
"enabled": true,
"export_type": "<string>",
"organization_id": "<string>",
"runtime_status": {
"health": {
"checked_at": "2023-11-07T05:31:56Z",
"message": "<string>",
"source": "<string>",
"state": "<string>"
},
"last_delivered_at": "2023-11-07T05:31:56Z",
"last_error": "<string>",
"last_error_at": "2023-11-07T05:31:56Z",
"last_file_name": "<string>"
}
}{
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Authorizations
ApiKeyOAuth2
A Barndoor API key, sent as Authorization: Bearer <key>. Keys are prefixed bdai_ and are opaque — do not attempt to decode one. Interchangeable with an OAuth 2.0 access token.
Headers
Client-supplied request correlation ID
Path Parameters
Organization ID
Export type, e.g. datadog-json or s3
Body
application/json