---
title: Audit logs | Runware Docs
url: https://runware.ai/docs/serverless/api-audit-logs
description: The organization's record of who changed what, one entry per committed write to this API.
relatedDocuments:
  - https://runware.ai/docs/serverless/api
  - https://runware.ai/docs/serverless/monitoring
  - https://runware.ai/docs/serverless/api-environments
---
## Introduction

The audit log is **the organization's record of who changed what**. Only writes are recorded, and each committed write records one entry with the credential that made it, the environment it was scoped to, and the fields it changed. Only a write that changed something records an entry.

`actor` is the credential as it was named when the write ran, so a key renamed or deleted since still reads the way it did then. `source` is `console` for an org-scoped token and `api` for an API key. `detail` holds the change itself, each field as `{"from": …, "to": …}`, and a secret write records that its value changed without the value.

**A `denied` entry is a secret write refused with `403`** because the organization's tenancy is not active, with the refusal under `refusal`. It is written after the refusal is answered, so it is best effort, and it stops once the organization's deletion or purge has begun.

Entries are kept until the organization is purged, and deleting an app keeps its entries.

## List audit logs

GETapi.serverless.runware.ai/v1/audit-logs

Returns the organization's audit log, newest first. Each committed write records one entry, attributed to the credential that made it: an org-scoped token is the console and an API key is every other client. A write that changes nothing records no entry. A secret write refused with `403` because the organization's tenancy is not active records an entry with `status` `denied` on a best-effort basis: it is written after the refusal is answered, and is not written once the organization's deletion or purge has begun. Invocations, task polls and reads record nothing. Entries are kept until the organization is purged; deleting an app keeps its entries. A cursor is valid only with the `q`, `source` and `status` it was issued under, ignoring the case of `q`.

> [!NOTE]
> `q` matches `action`, `actor.name` and each target id as a literal substring, ignoring case. A cursor is valid only with the `q`, `source` and `status` it was issued under, so changing any of them means starting again.

### [Request](#list-audit-logs-request)

Query

### [q](#list-audit-logs-query-q)

- **Type**: `string`
- **Min**: `1`
- **Max**: `100`

Case-insensitive literal substring match against `action`, `actor.name` and each target `id`. An entry matching any of them is returned.

### [source](#list-audit-logs-query-source)

- **Type**: `string`

`console` for an org-scoped token, `api` for an API key.

**Allowed values**: `console` `api`

### [status](#list-audit-logs-query-status)

- **Type**: `string`

`success` when the write committed, `denied` when a secret write was refused with `403` because the organization's tenancy is not active.

**Allowed values**: `success` `denied`

### [limit](#list-audit-logs-query-limit)

- **Type**: `integer`
- **Format**: `int32`
- **Min**: `1`
- **Max**: `100`
- **Default**: `20`

Maximum number of items to return.

### [cursor](#list-audit-logs-query-cursor)

- **Type**: `string`

Opaque pagination cursor returned by a previous call, as `nextCursor` or, on the operations that offer one, `prevCursor`.

### [Response](#list-audit-logs-response)

### [nextCursor](#list-audit-logs-response-nextcursor)

- **Type**: `string (nullable)`

Cursor for the next page. Null when there are no more items.

### [data](#list-audit-logs-response-data)

- **Type**: `object[] (18 properties)`
- **Required**: true

#### [id](#list-audit-logs-response-data-id)

- **Type**: `string`
- **Required**: true

Opaque entry identifier.

#### [occurredAt](#list-audit-logs-response-data-occurredat)

- **Type**: `string (date-time)`
- **Required**: true
- **Format**: `date-time`

When the write ran.

#### [action](#list-audit-logs-response-data-action)

- **Type**: `string`
- **Required**: true

**Possible values**: `app.create` `app.update` `app.delete` `app.deploy` `app.stop` `app.resume` `app.favorite` `app.build.delete` `app.version.delete` `source.create` `source.complete` `source.delete` `secret.create` `secret.update` `secret.delete` `secret.copy` `secret.batch.create` `secret.attach` `secret.detach` `variable.put` `variable.delete` `connector.create` `connector.update` `connector.delete` `connector.attach` `connector.detach` `connector.test` `environment.create` `environment.update` `environment.delete` `environment.defaults.update`

#### [status](#list-audit-logs-response-data-status)

- **Type**: `string`
- **Required**: true

`success` when the write committed, `denied` when a secret write was refused with `403` because the organization's tenancy is not active.

**Possible values**: `success` `denied`

#### [actor](#list-audit-logs-response-data-actor)

- **Type**: `object (3 properties)`
- **Required**: true

The credential that made the write, as it was named at write time.

##### [kind](#list-audit-logs-response-data-actor-kind)

- **Type**: `string`
- **Required**: true

`token` for an org-scoped token, `apiKey` for an API key.

**Possible values**: `token` `apiKey`

##### [id](#list-audit-logs-response-data-actor-id)

- **Type**: `string`
- **Required**: true

The token subject or the API key id. Opaque.

##### [name](#list-audit-logs-response-data-actor-name)

- **Type**: `string`
- **Required**: true

The token's name claim or the API key's name, copied when the write ran.

#### [source](#list-audit-logs-response-data-source)

- **Type**: `string`
- **Required**: true

`console` for an org-scoped token, `api` for an API key.

**Possible values**: `console` `api`

#### [clientAddress](#list-audit-logs-response-data-clientaddress)

- **Type**: `string`

The caller's IP address. Omitted when it is not known.

#### [environment](#list-audit-logs-response-data-environment)

- **Type**: `object (2 properties)`

The environment the write was scoped to. Omitted when it had none.

##### [id](#list-audit-logs-response-data-environment-id)

- **Type**: `string (uuid)`
- **Format**: `UUID v4`

Omitted when `production` had no row when the request resolved it.

##### [name](#list-audit-logs-response-data-environment-name)

- **Type**: `string`
- **Required**: true

#### [targets](#list-audit-logs-response-data-targets)

- **Type**: `object[] (2 properties)`
- **Required**: true

What the write acted on, by the identifier this API addresses it with: an app by `appId`, a version by its number, a secret, variable, connector or environment by name, and a build or source upload by id. `environment.defaults.update` names none.

##### [type](#list-audit-logs-response-data-targets-type)

- **Type**: `string`
- **Required**: true

**Possible values**: `app` `version` `build` `secret` `variable` `connector` `environment` `source`

##### [id](#list-audit-logs-response-data-targets-id)

- **Type**: `string`
- **Required**: true

#### [detail](#list-audit-logs-response-data-detail)

- **Type**: `object`
- **Required**: true

The non-secret change, under the names and in the shapes this API uses for the fields. A changed field is `{"from": …, "to": …}`, with configuration fields under `configuration`. An app update that rolls a new version names it under `versionNumber`, even when no field changed. A build delete that cancels an in-flight build records the status it left the build in under `status`, as a plain value. A secret write names the secret and records that its value changed, never the value. A denied entry carries the refusal under `refusal`.

#### [requestId](#list-audit-logs-response-data-requestid)

- **Type**: `string`

The request id the API answered with. Omitted when it is not known.

### [Errors](#list-audit-logs-errors)

<table><tbody><tr><td data-rw-cid-pz7tphoj="true">Status</td><td data-rw-cid-pz7tphoj="true">When</td></tr><tr><td data-rw-cid-pz7tphoj="true"><code data-rw-cid-pz7tphoj="">400</code></td><td data-rw-cid-pz7tphoj="true">The request was malformed and could not be parsed (e.g. invalid JSON). A well-formed request that fails validation returns <code class="component-Code">422</code> instead.</td></tr><tr><td data-rw-cid-pz7tphoj="true"><code data-rw-cid-pz7tphoj="">401</code></td><td data-rw-cid-pz7tphoj="true">Missing or invalid credentials</td></tr><tr><td data-rw-cid-pz7tphoj="true"><code data-rw-cid-pz7tphoj="">422</code></td><td data-rw-cid-pz7tphoj="true">The request was well-formed but semantically invalid (e.g. a missing or out-of-range field). A request that could not be parsed returns <code class="component-Code">400</code>. The <code class="component-Code">errors</code> array carries one entry per offending field.</td></tr><tr><td data-rw-cid-pz7tphoj="true"><code data-rw-cid-pz7tphoj="">500</code></td><td data-rw-cid-pz7tphoj="true">Unexpected server error</td></tr><tr><td data-rw-cid-pz7tphoj="true"><code data-rw-cid-pz7tphoj="">503</code></td><td data-rw-cid-pz7tphoj="true">A required service is temporarily unavailable</td></tr></tbody></table>