How to export a pipe audit logs report using the exportPipeAuditLogsReport GraphQL mutation
Overview
The exportPipeAuditLogsReport mutation creates an asynchronous export job that fetches pipe audit logs and delivers a downloadable report file. You can filter by activity type, date range, and user, and choose between CSV and JSONL output formats.
The export is delivered in one of two ways:
- Email (default): a download link is sent to the requesting user's email once processing is complete.
- Webhook: the signed download URL is made available via the
auditLogExportRequestquery as soon as processing is complete, allowing programmatic polling.
Prerequisites
- Authentication: This mutation requires the
id_tokenfrom your Pipefy session cookie to authenticate requests to the activities service. - Permissions: The authenticated user must have the pipe admin role on the target pipe.
- Pipe UUID: You must know the UUID of the pipe you want to export logs for. See Get resource IDs.
Mutation Reference
Full signature
mutation ExportPipeAuditLogsReport(
$pipeUuid: ID!
$auditLogType: AuditLogTypeEnum
$outputFormat: AuditLogOutputFormat
$deliveryMethod: AuditLogDeliveryMethod
$searchTerm: String
$filterDateFrom: DateTime
$filterDateTo: DateTime
) {
exportPipeAuditLogsReport(input: {
pipeUuid: $pipeUuid
auditLogType: $auditLogType
outputFormat: $outputFormat
deliveryMethod: $deliveryMethod
searchTerm: $searchTerm
filterDateFrom: $filterDateFrom
filterDateTo: $filterDateTo
}) {
success
correlationId
}
}
Arguments
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
pipeUuid | ID | Yes | — | UUID of the pipe |
auditLogType | AuditLogTypeEnum | No | null (all) | Scope export to a specific activity type |
outputFormat | AuditLogOutputFormat | No | CSV | File format for the exported report |
deliveryMethod | AuditLogDeliveryMethod | No | EMAIL | How the export is delivered |
searchTerm | String | No | "" | Filter logs by user name or email (case-insensitive) |
filterDateFrom | DateTime | No | 30 days ago (beginning of day) | Start of the date range (inclusive) |
filterDateTo | DateTime | No | Yesterday (end of day) | End of the date range (inclusive) |
AuditLogTypeEnum values
AuditLogTypeEnum values| Value | Description |
|---|---|
card_activity | Activities related to card execution |
configuration_changes | Activities related to pipe configuration changes |
| (omitted) | All activity types |
AuditLogOutputFormat values
AuditLogOutputFormat values| Value | Description |
|---|---|
CSV | Comma-separated values with UTF-8 BOM header |
JSONL | JSON Lines — one JSON object per line ({ "user": ..., "action": ..., "date": ... }) |
AuditLogDeliveryMethod values
AuditLogDeliveryMethod values| Value | Description |
|---|---|
EMAIL | A download link is sent to the user's email when the export is ready |
WEBHOOK | The signed download URL is available via the auditLogExportRequest query |
Response fields
| Field | Type | Description |
|---|---|---|
success | Boolean | true if the export job was created successfully |
correlationId | ID | Unique identifier for this export request. Use it to poll the auditLogExportRequest query when deliveryMethod is WEBHOOK |
Business Rules
Date range
filterDateFromis normalized to the beginning of the day (00:00:00).filterDateTois normalized to the end of the day (23:59:59).filterDateTomust be afterfilterDateFrom.filterDateTocannot be in the future.- The maximum range between
filterDateFromandfilterDateTois 30 days. filterDateFromcannot be older than 180 days from today.
Rate limit
Each user can create at most 6 export requests per day. Exceeding this limit returns a UsageLimitExceededError. See the API reference for details.
Usage Examples
Minimal — email delivery, all activities, last 30 days
mutation {
exportPipeAuditLogsReport(input: {
pipeUuid: "87654321-4321-4321-4321-cba987654321"
}) {
success
correlationId
}
}
{
"data": {
"exportPipeAuditLogsReport": {
"success": true,
"correlationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}
}
Filter by activity type and date range
mutation ExportPipeAuditLogsReport(
$pipeUuid: ID!
$auditLogType: AuditLogTypeEnum
$filterDateFrom: DateTime
$filterDateTo: DateTime
) {
exportPipeAuditLogsReport(input: {
pipeUuid: $pipeUuid
auditLogType: $auditLogType
filterDateFrom: $filterDateFrom
filterDateTo: $filterDateTo
}) {
success
correlationId
}
}
{
"pipeUuid": "87654321-4321-4321-4321-cba987654321",
"auditLogType": "card_activity",
"filterDateFrom": "2025-03-01T00:00:00Z",
"filterDateTo": "2025-03-30T23:59:59Z"
}
Webhook delivery with JSONL format
When deliveryMethod is WEBHOOK, the signed download URL is not sent by email. Instead, poll the auditLogExportRequest query using the correlationId returned by the mutation.
Step 1 — Request the export
mutation ExportPipeAuditLogsReport(
$pipeUuid: ID!
$outputFormat: AuditLogOutputFormat
$deliveryMethod: AuditLogDeliveryMethod
) {
exportPipeAuditLogsReport(input: {
pipeUuid: $pipeUuid
outputFormat: $outputFormat
deliveryMethod: $deliveryMethod
}) {
success
correlationId
}
}
{
"pipeUuid": "87654321-4321-4321-4321-cba987654321",
"outputFormat": "JSONL",
"deliveryMethod": "WEBHOOK"
}
Step 2 — Poll for status and signed URL
query AuditLogExportRequest($correlationId: ID!) {
auditLogExportRequest(correlationId: $correlationId) {
status
signedUrl
signedUrlExpiresAt
}
}
{
"correlationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
Poll until status is finished. The signedUrl field will contain the pre-signed download URL, valid for up to 7 days.
Export File Structure
Each export contains three columns regardless of the output format:
| Column | Description |
|---|---|
user | Name of the user who performed the action |
action | Description of the action |
date | Timestamp of the action (ISO 8601) |
CSV example
User,Action,Date
John Doe,Created card "Q3 Review",2025-03-15T14:32:00Z
Jane Smith,Moved card to "Done",2025-03-15T15:10:00Z
JSONL example
{"user":"John Doe","action":"Created card \"Q3 Review\"","date":"2025-03-15T14:32:00Z"}
{"user":"Jane Smith","action":"Moved card to \"Done\"","date":"2025-03-15T15:10:00Z"}
Error Handling
Common error scenarios
| Scenario | Error type | Message |
|---|---|---|
| User is not a pipe admin | Permission denied | Permission denied |
filterDateTo before filterDateFrom | InvalidInputError | filter_date_to must be after filter_date_from |
| Date range exceeds 30 days | InvalidInputError | date range cannot exceed 30 days |
filterDateFrom older than 180 days | InvalidInputError | filter_date_from cannot be older than 180 days |
filterDateTo in the future | InvalidInputError | filter_date_to cannot be in the future |
| Daily request limit reached | UsageLimitExceededError | You've reached the daily limit for audit log export requests... |
Error response shape
{
"data": {
"exportPipeAuditLogsReport": null
},
"errors": [
{
"message": "filter_date_to must be after filter_date_from",
"locations": [{ "line": 2, "column": 3 }],
"path": ["exportPipeAuditLogsReport"]
}
]
}
