Record a downstream action
Record a downstream action linked to an audit event (lineage).
curl -X POST "https://api.autopil.ai/v1/audit/lineage" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"event_id": "evt_abc123",
"action_type": "loan_decision",
"detail": {
"outcome": "approved",
"amount": 250000
},
"outcome": "approved"
}'
import requests
import json
url = "https://api.autopil.ai/v1/audit/lineage"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"event_id": "evt_abc123",
"action_type": "loan_decision",
"detail": {
"outcome": "approved",
"amount": 250000
},
"outcome": "approved"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.autopil.ai/v1/audit/lineage", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"event_id": "evt_abc123",
"action_type": "loan_decision",
"detail": {
"outcome": "approved",
"amount": 250000
},
"outcome": "approved"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"event_id": "evt_abc123",
"action_type": "loan_decision",
"detail": {
"outcome": "approved",
"amount": 250000
},
"outcome": "approved"
}`)
req, err := http.NewRequest("POST", "https://api.autopil.ai/v1/audit/lineage", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.autopil.ai/v1/audit/lineage')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['X-API-Key'] = 'YOUR_API_KEY'
request.body = '{
"event_id": "evt_abc123",
"action_type": "loan_decision",
"detail": {
"outcome": "approved",
"amount": 250000
},
"outcome": "approved"
}'
response = http.request(request)
puts response.body
{}
POST
/v1/audit/lineage
POST
Base URLstring
Target server for requests. Edit to use your own host.
API Key (header: X-API-Key)
X-API-Keystring
RequiredAPI key with admin, read, or evaluate scope. Missing key → 401; invalid or revoked key → 403.
API key with
admin, read, or evaluate scope. Missing key → 401; invalid or revoked key → 403.
Content-Typestring
RequiredThe media type of the request body
Options: application/json
Request Preview
Response
Response will appear here after sending the request
Authentication
header
X-API-Keystring
RequiredAPI Key for authentication. API key with admin, read, or evaluate scope. Missing key → 401; invalid or revoked key → 403.
Responses
Was this page helpful?