AuditLogDestinations
List AuditLogDestinations
Returns the audit log destinations of the workspace, newest first, with cursor pagination.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.audit_log_destinations.list()
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.auditLogDestinations.list();
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"limit": Optional[int],
"starting_after": Optional[str],
"ending_before": Optional[str],
}
{
limit?: number;
startingAfter?: string;
endingBefore?: string;
}
Show Response
Show Response
{
"object": str,
"data": [{
"id": str,
"display_name": str,
"description": Optional[str],
"url": str,
"status": Literal["AUDIT_LOG_DESTINATION_STATUS_ACTIVE", "AUDIT_LOG_DESTINATION_STATUS_PAUSED"],
"signing_secret_hint": Optional[str],
"secret_rotated_at": str, # optional
"created_at": str,
"updated_at": str,
"created_by_id": Optional[str],
"updated_by_id": Optional[str],
}],
"has_more": bool,
}
{
object: string;
data: {
id: string;
displayName: string;
description?: string;
url: string;
status: "AUDIT_LOG_DESTINATION_STATUS_ACTIVE" | "AUDIT_LOG_DESTINATION_STATUS_PAUSED";
signingSecretHint?: string;
secretRotatedAt?: Date;
createdAt: Date;
updatedAt: Date;
createdById?: string;
updatedById?: string;
}[];
hasMore: boolean;
}
Create an AuditLogDestination
Creates a signed webhook destination that receives every audit log event recorded in the workspace from this point on. The signing secret is returned once in this response and never again.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.audit_log_destinations.create(display_name="Security events archive", url="https://audit.example.com/events")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.auditLogDestinations.create({
displayName: "Security events archive",
url: "https://audit.example.com/events",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"display_name": str, # required
"url": str, # required
"description": Optional[str],
}
{
displayName: string; // required
description?: string;
url: string; // required
}
Show Response
Show Response
{
"destination": {
"id": str,
"display_name": str,
"description": Optional[str],
"url": str,
"status": Literal["AUDIT_LOG_DESTINATION_STATUS_ACTIVE", "AUDIT_LOG_DESTINATION_STATUS_PAUSED"],
"signing_secret_hint": Optional[str],
"secret_rotated_at": str, # optional
"created_at": str,
"updated_at": str,
"created_by_id": Optional[str],
"updated_by_id": Optional[str],
},
"signing_secret": str,
}
{
destination: {
id: string;
displayName: string;
description?: string;
url: string;
status: "AUDIT_LOG_DESTINATION_STATUS_ACTIVE" | "AUDIT_LOG_DESTINATION_STATUS_PAUSED";
signingSecretHint?: string;
secretRotatedAt?: Date;
createdAt: Date;
updatedAt: Date;
createdById?: string;
updatedById?: string;
};
signingSecret: string;
}
Retrieve an AuditLogDestination
Retrieves an audit log destination by ID. The signing secret is never returned.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.audit_log_destinations.get(destination_id="<id>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.auditLogDestinations.get({
destinationId: "<id>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"destination_id": str, # required
}
{
destinationId: string; // required
}
Show Response
Show Response
{
"destination": {
"id": str,
"display_name": str,
"description": Optional[str],
"url": str,
"status": Literal["AUDIT_LOG_DESTINATION_STATUS_ACTIVE", "AUDIT_LOG_DESTINATION_STATUS_PAUSED"],
"signing_secret_hint": Optional[str],
"secret_rotated_at": str, # optional
"created_at": str,
"updated_at": str,
"created_by_id": Optional[str],
"updated_by_id": Optional[str],
},
}
{
destination: {
id: string;
displayName: string;
description?: string;
url: string;
status: "AUDIT_LOG_DESTINATION_STATUS_ACTIVE" | "AUDIT_LOG_DESTINATION_STATUS_PAUSED";
signingSecretHint?: string;
secretRotatedAt?: Date;
createdAt: Date;
updatedAt: Date;
createdById?: string;
updatedById?: string;
};
}
Delete an AuditLogDestination
Deletes a destination and cancels its pending deliveries.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.audit_log_destinations.delete(destination_id="<id>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.auditLogDestinations.delete({
destinationId: "<id>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"destination_id": str, # required
}
{
destinationId: string; // required
}
Update an AuditLogDestination
Partially updates a destination. Setstatus to AUDIT_LOG_DESTINATION_STATUS_PAUSED to stop deliveries while retaining the backlog, and back to AUDIT_LOG_DESTINATION_STATUS_ACTIVE to drain it. The URL can only change while the destination is paused.
from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.audit_log_destinations.update(destination_id="<id>", display_name="<value>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.auditLogDestinations.update({
destinationId: "<id>",
updateAuditLogDestinationRequest: {
displayName: "<value>",
},
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"destination_id": str, # required
"display_name": Optional[str],
"description": Optional[str],
"url": Optional[str],
"status": Optional[Literal["AUDIT_LOG_DESTINATION_STATUS_ACTIVE", "AUDIT_LOG_DESTINATION_STATUS_PAUSED"]],
}
{
destinationId: string; // required
updateAuditLogDestinationRequest: { // required
displayName?: string;
description?: string;
url?: string;
status?: "AUDIT_LOG_DESTINATION_STATUS_ACTIVE" | "AUDIT_LOG_DESTINATION_STATUS_PAUSED";
};
}
Show Response
Show Response
{
"destination": {
"id": str,
"display_name": str,
"description": Optional[str],
"url": str,
"status": Literal["AUDIT_LOG_DESTINATION_STATUS_ACTIVE", "AUDIT_LOG_DESTINATION_STATUS_PAUSED"],
"signing_secret_hint": Optional[str],
"secret_rotated_at": str, # optional
"created_at": str,
"updated_at": str,
"created_by_id": Optional[str],
"updated_by_id": Optional[str],
},
}
{
destination: {
id: string;
displayName: string;
description?: string;
url: string;
status: "AUDIT_LOG_DESTINATION_STATUS_ACTIVE" | "AUDIT_LOG_DESTINATION_STATUS_PAUSED";
signingSecretHint?: string;
secretRotatedAt?: Date;
createdAt: Date;
updatedAt: Date;
createdById?: string;
updatedById?: string;
};
}
List Deliveries
Returns the delivery history of a destination, newest first, optionally filtered by status.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.audit_log_destinations.list_deliveries(destination_id="<id>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.auditLogDestinations.listDeliveries({
destinationId: "<id>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"destination_id": str, # required
"limit": Optional[int],
"starting_after": Optional[str],
"ending_before": Optional[str],
"status": List[Literal["AUDIT_LOG_DELIVERY_STATUS_PENDING", "AUDIT_LOG_DELIVERY_STATUS_DELIVERING", "AUDIT_LOG_DELIVERY_STATUS_SUCCEEDED", "AUDIT_LOG_DELIVERY_STATUS_FAILED", "AUDIT_LOG_DELIVERY_STATUS_CANCELLED"]], # optional
}
{
destinationId: string; // required
limit?: number;
startingAfter?: string;
endingBefore?: string;
status?: ("AUDIT_LOG_DELIVERY_STATUS_PENDING" | "AUDIT_LOG_DELIVERY_STATUS_DELIVERING" | "AUDIT_LOG_DELIVERY_STATUS_SUCCEEDED" | "AUDIT_LOG_DELIVERY_STATUS_FAILED" | "AUDIT_LOG_DELIVERY_STATUS_CANCELLED")[];
}
Show Response
Show Response
{
"object": str,
"data": [{
"id": str,
"destination_id": str,
"event_id": str,
"kind": Literal["AUDIT_LOG_DELIVERY_KIND_EVENT", "AUDIT_LOG_DELIVERY_KIND_REPLAY", "AUDIT_LOG_DELIVERY_KIND_TEST"],
"status": Literal["AUDIT_LOG_DELIVERY_STATUS_PENDING", "AUDIT_LOG_DELIVERY_STATUS_DELIVERING", "AUDIT_LOG_DELIVERY_STATUS_SUCCEEDED", "AUDIT_LOG_DELIVERY_STATUS_FAILED", "AUDIT_LOG_DELIVERY_STATUS_CANCELLED"],
"attempts": int,
"next_attempt_at": str, # optional
"last_attempt_at": str, # optional
"last_status_code": Optional[int],
"last_error": Optional[str],
"delivered_at": str, # optional
"created_at": str,
"replay_id": Optional[str],
}],
"has_more": bool,
}
{
object: string;
data: {
id: string;
destinationId: string;
eventId: string;
kind: "AUDIT_LOG_DELIVERY_KIND_EVENT" | "AUDIT_LOG_DELIVERY_KIND_REPLAY" | "AUDIT_LOG_DELIVERY_KIND_TEST";
status: "AUDIT_LOG_DELIVERY_STATUS_PENDING" | "AUDIT_LOG_DELIVERY_STATUS_DELIVERING" | "AUDIT_LOG_DELIVERY_STATUS_SUCCEEDED" | "AUDIT_LOG_DELIVERY_STATUS_FAILED" | "AUDIT_LOG_DELIVERY_STATUS_CANCELLED";
attempts: number;
nextAttemptAt?: Date;
lastAttemptAt?: Date;
lastStatusCode?: number;
lastError?: string;
deliveredAt?: Date;
createdAt: Date;
replayId?: string;
}[];
hasMore: boolean;
}
Replay an AuditLogDestination
Queues a new delivery for every retained audit event recorded in the time window, up to 10,000 events per request. Replays keep the original event IDs and never extend event retention.from orq_ai_sdk import Orq
from orq_ai_sdk.utils import parse_datetime
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.audit_log_destinations.replay(destination_id="<id>", from_=parse_datetime("2026-10-01T00:00:00Z"), to=parse_datetime("2026-10-15T00:00:00Z"))
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.auditLogDestinations.replay({
destinationId: "<id>",
replayAuditLogDeliveriesRequest: {
from: new Date("2026-10-01T00:00:00Z"),
to: new Date("2026-10-15T00:00:00Z"),
},
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"destination_id": str, # required
"from_": str, # required
"to": str, # required
}
{
destinationId: string; // required
replayAuditLogDeliveriesRequest: { // required
from: Date; // required
to: Date; // required
};
}
Show Response
Show Response
{
"replay_id": str,
"queued": int,
}
{
replayId: string;
queued: number;
}
Rotate Secret
Generates a new signing secret for the destination. Deliveries attempted after the rotation are signed with the new secret. The new secret is returned once in this response and never again.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.audit_log_destinations.rotate_secret(destination_id="<id>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.auditLogDestinations.rotateSecret({
destinationId: "<id>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"destination_id": str, # required
}
{
destinationId: string; // required
}
Show Response
Show Response
{
"destination": {
"id": str,
"display_name": str,
"description": Optional[str],
"url": str,
"status": Literal["AUDIT_LOG_DESTINATION_STATUS_ACTIVE", "AUDIT_LOG_DESTINATION_STATUS_PAUSED"],
"signing_secret_hint": Optional[str],
"secret_rotated_at": str, # optional
"created_at": str,
"updated_at": str,
"created_by_id": Optional[str],
"updated_by_id": Optional[str],
},
"signing_secret": str,
}
{
destination: {
id: string;
displayName: string;
description?: string;
url: string;
status: "AUDIT_LOG_DESTINATION_STATUS_ACTIVE" | "AUDIT_LOG_DESTINATION_STATUS_PAUSED";
signingSecretHint?: string;
secretRotatedAt?: Date;
createdAt: Date;
updatedAt: Date;
createdById?: string;
updatedById?: string;
};
signingSecret: string;
}
Test an AuditLogDestination
Sends a signed syntheticaudit_log.test event to the destination synchronously and returns the receiver outcome. Test deliveries appear in the delivery history.
from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.audit_log_destinations.test(destination_id="<id>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.auditLogDestinations.test({
destinationId: "<id>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"destination_id": str, # required
}
{
destinationId: string; // required
}
Show Response
Show Response
{
"delivery": {
"id": str,
"destination_id": str,
"event_id": str,
"kind": Literal["AUDIT_LOG_DELIVERY_KIND_EVENT", "AUDIT_LOG_DELIVERY_KIND_REPLAY", "AUDIT_LOG_DELIVERY_KIND_TEST"],
"status": Literal["AUDIT_LOG_DELIVERY_STATUS_PENDING", "AUDIT_LOG_DELIVERY_STATUS_DELIVERING", "AUDIT_LOG_DELIVERY_STATUS_SUCCEEDED", "AUDIT_LOG_DELIVERY_STATUS_FAILED", "AUDIT_LOG_DELIVERY_STATUS_CANCELLED"],
"attempts": int,
"next_attempt_at": str, # optional
"last_attempt_at": str, # optional
"last_status_code": Optional[int],
"last_error": Optional[str],
"delivered_at": str, # optional
"created_at": str,
"replay_id": Optional[str],
},
}
{
delivery: {
id: string;
destinationId: string;
eventId: string;
kind: "AUDIT_LOG_DELIVERY_KIND_EVENT" | "AUDIT_LOG_DELIVERY_KIND_REPLAY" | "AUDIT_LOG_DELIVERY_KIND_TEST";
status: "AUDIT_LOG_DELIVERY_STATUS_PENDING" | "AUDIT_LOG_DELIVERY_STATUS_DELIVERING" | "AUDIT_LOG_DELIVERY_STATUS_SUCCEEDED" | "AUDIT_LOG_DELIVERY_STATUS_FAILED" | "AUDIT_LOG_DELIVERY_STATUS_CANCELLED";
attempts: number;
nextAttemptAt?: Date;
lastAttemptAt?: Date;
lastStatusCode?: number;
lastError?: string;
deliveredAt?: Date;
createdAt: Date;
replayId?: string;
};
}