Skip to content

Export the company’s action log

POST
/v1/companies/{id}/audit-exports
curl --request POST \
--url https://beta-api.plune.ai/v1/companies/example/audit-exports \
--header 'Content-Type: application/json' \
--cookie plune_session=<plune_session> \
--data '{ "format": "jsonl", "from": "2026-08-01T00:00:00.000Z", "to": "2026-10-30T00:00:00.000Z" }'

Always a background job of the company (no project): the log of every project of the company - in the Bin too, while it is there - and the company’s own log, merged by time; never the application owner’s admin journal. The file is kept a day, the job and the row 7 days, and the export itself becomes an entry audit.exported of the company’s log (who, the period, the filters, the format, the rows), so the next export holds it. At most 10 files kept at once; a file over 32 MiB fails its job with the word too_large (the list’s failure). 6 a minute. The owner and the managers of the company (ADR 0079 Р261 А), the session alone; the file holds the log of EVERY project of the company, the ones the caller is not a member of too. A company without Enterprise in active or grace is refused 403 enterprise_required.

id
required
string
Media type application/json

Any of entity, actorType, projectId leaves the company’s own entries out: they have none of the three.

object
format
required

JSON Lines (a line a record, diff and meta as they are) or CSV (flat columns, diff and meta as JSON in a cell).

string
Allowed values: jsonl csv
from
required

The start of the period, included.

string format: date-time
to
required

The end, excluded; at most 90 days after from.

string format: date-time
entity

Only the project entries about this kind of record (the values of GET /v1/audit).

string
actorType

Only the project entries by this kind of actor.

string
Allowed values: user token agent system
projectId

Only this project of the company.

string
Example
{
"format": "jsonl",
"from": "2026-08-01T00:00:00.000Z",
"to": "2026-10-30T00:00:00.000Z"
}

The job is open; the file is fetched from the list when it is done

Media type application/json
object
job
required

One long AI operation. Seven states: in_progress, action_needed (waits for a person — reason says for what), paused (the quota is spent; Resume, or it resumes by itself), blocked (an outside service failed — reason names it; no button), completed, failed (reason is the raw error; a person may Dismiss it), cancelled (a person’s Cancel — reason is «Cancelled by »; not an error, no button, listed for 24 hours like completed). progress is null while the operation does not know its size — never 0 / 0.

object
id
required
string format: uuid
kind
required

Which operation: ingest, sync, auto-analysis, and bin-empty — the Bin emptied by the server (#1388) — and runs-delete — runs deleted in the background (#1423) — today; open-ended.

string
>= 1 characters <= 64 characters
state
required
string
Allowed values: in_progress action_needed paused blocked completed failed cancelled
subjectId
required

What it works on — a run id, an import id.

string
nullable
subjectName
required

Its name as people know it — shown after the kind.

string
nullable <= 200 characters
progress
required

How far it got; null while the size is not known yet.

object
done
required
integer
total
required
integer
>= 1
reason
required

Why it stopped — only on action_needed, paused, blocked, failed, cancelled. A cancel reads «Cancelled by ».

string
nullable <= 2000 characters
cursor
required

The producer’s own token for where it resumes; null — a Retry starts from the beginning.

string
nullable <= 2000 characters
attempt
required

Which try this is: 1, and one more for each Retry. A producer sends it back in its reports (attempt), and a report of an earlier try is 409 stale_attempt.

integer
>= 1
createdAt
required
string format: date-time
startedAt
required
string format: date-time
nullable
finishedAt
required

Set on completed, failed and cancelled, and only there.

string format: date-time
nullable
runId

Only on a run-export job in GET /v1/jobs and in the answer of GET /v1/runs/{id}/export (202): the run the file is of, so «Export again» works from any browser. A completed export stays in the list 7 days (its file goes after 24 hours).

string
waitUntil

Only on a testrail-import or testrail-dry-run job in GET /v1/jobs while TestRail asked it to wait (its import is paused_rate_limit, #2269): when it goes on by itself. The job stays in_progress; no Resume is needed. Absent once that time has passed, while the step that goes on has not settled yet.

string format: date-time
updatedAt
required
string format: date-time
exportId
required
string
Example
{
"job": {
"state": "in_progress"
}
}

A period over 90 days (split it into several exports), from not before to, or a body that is not one

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

No session

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

Not the owner or a manager, or no Enterprise (code: enterprise_required)

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

A company the caller is not in, or a projectId that is not a project of it

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

10 files kept already, or the throttle

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}