# List activity log

Return workspace activity events in reverse-chronological order.

Endpoint: GET /workspaces/{workspace_id}/logs
Version: 0.27.5
Security: Auth

## Path parameters:

  - `workspace_id` (string, required)
    Unique identifier (UUID) of the workspace.

## Query parameters:

  - `page` (integer)
    1-based page index. Defaults to `1` when omitted.

  - `limit` (integer)
    Page size. Defaults to `30`, capped at `100`.

  - `sort_by` (string)
    Sort field. Prefix with `-` for descending order (e.g. `-created_at`).

  - `type` (array)
    Filter log events by type.

  - `actor_id` (string)
    Filter log events by actor user UUID.

  - `from` (string)
    Return only events emitted at or after this timestamp.

  - `to` (string)
    Return only events emitted before this timestamp.

## Response 200 fields (application/json):

  - `items` (array, required)

  - `items.workspace_id` (string, required)
    Unique identifier (UUID v4).
    Example: 550e8400-e29b-41d4-a716-446655440000

  - `items.type` (string, required)
    Discriminator for activity log event types.
    Enum: "workspace.created", "workspace.renamed", "workspace_member.joined", "workspace_member.role_changed", "workspace_member.removed", "project.created", "project.renamed", "project.deleted", "project_member.added", "project_member.role_changed", "project_member.removed", "invitation.created", "invitation.accepted", "invitation.declined", "invitation.revoked", "invitation.expired", "api_key.created", "api_key.revoked", "rpc_key.created", "rpc_key.revoked", "mgt_key.created", "mgt_key.revoked"

  - `items.data` (any, required)
    Event-specific payload. The `type` field inside the payload echoes the top-level `type` and acts as the discriminator; switch on it to get a typed `data` shape (e.g. `project.renamed` yields `{ old_name, new_name, ... }`). Payload shapes are documented per event type in this schema.

  - `items.data.type` (string, required)
    Enum: "workspace.created"

  - `items.data.workspace_name` (string, required)
    Workspace name at the time of the event.
    Example: My Workspace

  - `items.data.old_name` (string, required)
    Workspace name before the rename.
    Example: Old Name

  - `items.data.new_name` (string, required)
    Workspace name after the rename.
    Example: New Name

  - `items.data.role` (string, required)
    Role assigned to a user within a workspace.
    Enum: "owner", "admin", "member"

  - `items.data.project_name` (string, required)
    Project name at the time of the event.
    Example: Production

  - `items.data.old_name` (string, required)
    Project name before the rename.
    Example: Old

  - `items.data.new_name` (string, required)
    Project name after the rename.
    Example: New

  - `items.data.project_name` (string, required)
    Project name at the time of deletion.
    Example: Production

  - `items.data.role` (string, required)
    Project-level role for a workspace member.
    Enum: "editor", "viewer"

  - `items.data.recipient_email` (string, required)
    Email address.
    Example: user@example.com

  - `items.data.workspace_role` (string, required)
    Subset of `WorkspaceRole` that can be assigned to a member: `admin` or `member`. `owner` is excluded; it's set when a workspace is created and can't be granted afterwards. Used for invitations and member role changes.
    Enum: "admin", "member"

  - `items.data.project_grants` (array)
    Bundled project grants the invitation will apply on accept.

  - `items.data.project_grants.project` (object, required)
    Basic project info used when referencing a project from another resource.
    Example: {"id":"0193d4a1-7e02-7d29-8d8a-3b0e5a7c8f12","name":"Production","created_at":"2024-01-15T10:30:00Z"}

  - `items.data.project_grants.project.name` (string, required)
    Human-readable project name.
    Example: Production

  - `items.data.project_grants.project.created_at` (string, required)
    Timestamp when the resource was created. RFC 3339 / ISO 8601, UTC.
    Example: 2024-01-15T10:30:00Z

  - `items.data.key_name` (string, required)
    Human-readable key name.
    Example: Production key

  - `items.data.key_preview` (string, required)
    First 6 characters of the random body, i.e. the 6 characters immediately after the `vilna_{type}_` prefix. For raw key `vilna_api_a1B2c3D4e5F6g7H8i9J0k1L2m3N4o5` the preview is `a1B2c3`. Safe to display in UIs for identifying a key without exposing the secret.
    Example: a1B2c3

  - `items.created_at` (string, required)
    Timestamp when the event was emitted.
    Example: 2024-01-15T10:30:00Z

  - `references` (object, required)
    Entities referenced by events in this page, keyed by ID.
    Example: {"users":{}}

  - `meta` (object, required)
    Pagination metadata returned on every list response. `page` and `limit` echo the values used to build this page (defaults are applied when the request omits them). `total` and `total_pages` reflect the full result set after any filters are applied.
    Example: {"limit":20,"page":1,"total":42,"total_pages":3}

  - `meta.limit` (integer, required)
    Page size used to build this response.

  - `meta.page` (integer, required)
    Index of the page returned, starting at 1.

  - `meta.total` (integer, required)
    Total number of items matching the request across all pages.

  - `meta.total_pages` (integer, required)
    Total number of pages available at the current `limit`.

## Response 400 fields (application/problem+json):

  - `type` (string, required)
    A URI that identifies the error type.
Open it in a browser to read about this category of error.
    Example: https://docs.vilna.io/apis/problems/internal-error

  - `title` (string, required)
    A short summary of the error type.
Use `detail` for information specific to this occurrence.
    Example: Bad Request

  - `status` (integer, required)
    The HTTP status code for this error.
Matches the status code of the HTTP response.
    Example: 400

  - `detail` (string)
    A human-readable explanation of what went wrong in this specific case.
May be localized.
    Example: The address is already assigned to another invoice

  - `instance` (string)
    A URI that identifies this specific error occurrence.
Include this value when contacting support.
    Example: /errors?id=XXXXXX-xxxxx

  - `code` (string, required)
    Stable machine-readable error code (`{domain}.{reason}`) for programmatic error handling. Unlike the HTTP `status` or free-form `detail`, this code is guaranteed not to change between versions for a given error condition, so it is safe to branch on in client code. Defaults to `unspecified` when the server has not assigned a specific code.
    Example: resource.not_found

  - `fields` (array)
    List of invalid fields in the request

  - `fields.name` (string, required)
    The name of the invalid field
    Example: meta

  - `fields.reason` (string, required)
    Why this field is invalid
    Example: Exceeded maximum data size — must not exceed 1000 characters

## Response 401 fields (application/problem+json):

  - `type` (string, required)
    A URI that identifies the error type.
Open it in a browser to read about this category of error.
    Example: https://docs.vilna.io/apis/problems/internal-error

  - `title` (string, required)
    A short summary of the error type.
Use `detail` for information specific to this occurrence.
    Example: Bad Request

  - `status` (integer, required)
    The HTTP status code for this error.
Matches the status code of the HTTP response.
    Example: 400

  - `detail` (string)
    A human-readable explanation of what went wrong in this specific case.
May be localized.
    Example: The address is already assigned to another invoice

  - `instance` (string)
    A URI that identifies this specific error occurrence.
Include this value when contacting support.
    Example: /errors?id=XXXXXX-xxxxx

  - `code` (string, required)
    Stable machine-readable error code (`{domain}.{reason}`) for programmatic error handling. Unlike the HTTP `status` or free-form `detail`, this code is guaranteed not to change between versions for a given error condition, so it is safe to branch on in client code. Defaults to `unspecified` when the server has not assigned a specific code.
    Example: resource.not_found

## Response 403 fields (application/problem+json):

  - `type` (string, required)
    A URI that identifies the error type.
Open it in a browser to read about this category of error.
    Example: https://docs.vilna.io/apis/problems/internal-error

  - `title` (string, required)
    A short summary of the error type.
Use `detail` for information specific to this occurrence.
    Example: Bad Request

  - `status` (integer, required)
    The HTTP status code for this error.
Matches the status code of the HTTP response.
    Example: 400

  - `detail` (string)
    A human-readable explanation of what went wrong in this specific case.
May be localized.
    Example: The address is already assigned to another invoice

  - `instance` (string)
    A URI that identifies this specific error occurrence.
Include this value when contacting support.
    Example: /errors?id=XXXXXX-xxxxx

  - `code` (string, required)
    Stable machine-readable error code (`{domain}.{reason}`) for programmatic error handling. Unlike the HTTP `status` or free-form `detail`, this code is guaranteed not to change between versions for a given error condition, so it is safe to branch on in client code. Defaults to `unspecified` when the server has not assigned a specific code.
    Example: resource.not_found

## Response 404 fields (application/problem+json):

  - `type` (string, required)
    A URI that identifies the error type.
Open it in a browser to read about this category of error.
    Example: https://docs.vilna.io/apis/problems/internal-error

  - `title` (string, required)
    A short summary of the error type.
Use `detail` for information specific to this occurrence.
    Example: Bad Request

  - `status` (integer, required)
    The HTTP status code for this error.
Matches the status code of the HTTP response.
    Example: 400

  - `detail` (string)
    A human-readable explanation of what went wrong in this specific case.
May be localized.
    Example: The address is already assigned to another invoice

  - `instance` (string)
    A URI that identifies this specific error occurrence.
Include this value when contacting support.
    Example: /errors?id=XXXXXX-xxxxx

  - `code` (string, required)
    Stable machine-readable error code (`{domain}.{reason}`) for programmatic error handling. Unlike the HTTP `status` or free-form `detail`, this code is guaranteed not to change between versions for a given error condition, so it is safe to branch on in client code. Defaults to `unspecified` when the server has not assigned a specific code.
    Example: resource.not_found

## Response default fields (application/problem+json):

  - `type` (string, required)
    A URI that identifies the error type.
Open it in a browser to read about this category of error.
    Example: https://docs.vilna.io/apis/problems/internal-error

  - `title` (string, required)
    A short summary of the error type.
Use `detail` for information specific to this occurrence.
    Example: Bad Request

  - `status` (integer, required)
    The HTTP status code for this error.
Matches the status code of the HTTP response.
    Example: 400

  - `detail` (string)
    A human-readable explanation of what went wrong in this specific case.
May be localized.
    Example: The address is already assigned to another invoice

  - `instance` (string)
    A URI that identifies this specific error occurrence.
Include this value when contacting support.
    Example: /errors?id=XXXXXX-xxxxx

  - `code` (string, required)
    Stable machine-readable error code (`{domain}.{reason}`) for programmatic error handling. Unlike the HTTP `status` or free-form `detail`, this code is guaranteed not to change between versions for a given error condition, so it is safe to branch on in client code. Defaults to `unspecified` when the server has not assigned a specific code.
    Example: resource.not_found

