---
title: Scalyr
summary: Fastly will stream log messages to the Scalyr account in the format specified in the Scalyr object.
url: https://www.fastly.com/documentation/reference/api/logging/scalyr
---

Fastly will stream log messages to the Scalyr account in the format specified in the Scalyr object.

## Data model

| Field | Type | Description |
|-------|------|-------------|
| `project_id` | string | The name of the logfile within Scalyr. |
| `region` | string | The region that log data will be sent to. |
| `token` | string | The token to use for authentication. |
| `format` | string | A Fastly <a href="https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/">log format string</a>. |
| `format_version` | integer | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in <code>vcl_log</code> if <code>format_version</code> is set to <code>2</code> and in <code>vcl_deliver</code> if <code>format_version</code> is set to <code>1</code>. |
| `log_processing_region` | string | The geographic region where the logs will be processed before streaming. Valid values are <code>us</code>, <code>eu</code>, and <code>none</code> for global. |
| `name` | string | The name for the real-time logging configuration. |
| `placement` | string | Where in the generated VCL the logging call should be placed. If not set, endpoints with <code>format_version</code> of 2 are placed in <code>vcl_log</code> and those with <code>format_version</code> of 1 are placed in <code>vcl_deliver</code>. |
| `response_condition` | string | The name of an existing condition in the configured endpoint, or leave blank to always execute. |
| `created_at` | string | Date and time in ISO 8601 format. (Read-only) |
| `deleted_at` | string | Date and time in ISO 8601 format. (Read-only) |
| `service_id` | string | Alphanumeric string identifying the service. (Read-only) |
| `updated_at` | string | Date and time in ISO 8601 format. (Read-only) |
| `version` | string | String identifying a service version. (Read-only) |

## API endpoints

### List Scalyr log endpoints

**GET** `/service/{service_id}/version/{version_id}/logging/scalyr`

List all of the Scalyrs for a particular service and version.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `service_id` | string | path | Yes | Alphanumeric string identifying the service. |
| `version_id` | integer | path | Yes | Integer identifying a service version. |

### Create a Scalyr log endpoint

**POST** `/service/{service_id}/version/{version_id}/logging/scalyr`

Create a Scalyr for a particular service and version.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `service_id` | string | path | Yes | Alphanumeric string identifying the service. |
| `version_id` | integer | path | Yes | Integer identifying a service version. |

### Get a Scalyr log endpoint

**GET** `/service/{service_id}/version/{version_id}/logging/scalyr/{logging_scalyr_name}`

Get the Scalyr for a particular service and version.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `logging_scalyr_name` | string | path | Yes | The name for the real-time logging configuration. |
| `service_id` | string | path | Yes | Alphanumeric string identifying the service. |
| `version_id` | integer | path | Yes | Integer identifying a service version. |

### Update the Scalyr log endpoint

**PUT** `/service/{service_id}/version/{version_id}/logging/scalyr/{logging_scalyr_name}`

Update the Scalyr for a particular service and version.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `logging_scalyr_name` | string | path | Yes | The name for the real-time logging configuration. |
| `service_id` | string | path | Yes | Alphanumeric string identifying the service. |
| `version_id` | integer | path | Yes | Integer identifying a service version. |

### Delete the Scalyr log endpoint

**DELETE** `/service/{service_id}/version/{version_id}/logging/scalyr/{logging_scalyr_name}`

Delete the Scalyr for a particular service and version.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `logging_scalyr_name` | string | path | Yes | The name for the real-time logging configuration. |
| `service_id` | string | path | Yes | Alphanumeric string identifying the service. |
| `version_id` | integer | path | Yes | Integer identifying a service version. |

