---
title: "Get project instance logs"
method: GET
path: "/v1/projects/{projectId}/instances/{instanceName}/logs"
tags: ["Projects"]
---

# Get project instance logs

`GET /v1/projects/{projectId}/instances/{instanceName}/logs`

## Request

- Base URL: `https://api.spice.ai`
- URL: `https://api.spice.ai/v1/projects/{projectId}/instances/{instanceName}/logs`
- Auth: HTTP bearer

Returns the most recent log lines of one instance of a deployed project, oldest first, without color codes. The org's plan sets the largest `tail`. List the instance names with `GET /v1/projects/{projectId}/instances`.

## Path parameters

- `projectId` integer, required
- `instanceName` string, required

## Query parameters

- `tail` integer

## Headers

- `X-Org-Name` string

## Response `200`

The instance's most recent log lines

- object
  - `instance` string, required: The instance name
  - `tail` integer, required: The number of lines asked for
  - `lines` string[], required: Log lines, oldest first

## Other responses

- `400`: Invalid project ID or `tail`
- `401`: Unauthorized
- `403`: Insufficient scope (`code` is `insufficient_scope`), or `tail` is larger than the org's plan allows (`code` is `plan_limit`, and `max_tail` is the largest allowed `tail`).
- `404`: The project was not found, or the instance is not one of the project's instances (`code` is `instance_not_found`).
- `409`: The logs cannot be read in the project's current state. `code` is `project_not_deployed` when the project was never deployed, `project_paused` when it is paused, or `instance_offline` when the Cloud Connect runtime is offline and does not answer.
- `422`: The project is not fully configured
- `500`: Internal server error
- `503`: The project runtime did not answer

---

[API](https://skmtc.dev/spice/apis/spice-cloud-control-plane-api.md) - [All operations](https://skmtc.dev/spice/apis/spice-cloud-control-plane-api/llms.txt) - [OpenAPI document](https://skmtc.dev/spice/apis/spice-cloud-control-plane-api/revisions/5f3b75dd847d?raw)
