LOG IN SIGN UP
Documentation

Fastly offers logging to a number of formats and platforms. In addition to offering syslog streams, we offer logs shipped in various formats and to various hosted logging providers. We also provide information regarding logging in the Fastly Help Guides.

As always, if something does not work as expected or differs from the web interface, please contact us right away via our Support Desk or IRC (#fastly on Freenode, or webchat).

Authentication

Nearly all API calls require your request to be authenticated though a few do not. You will use API tokens to authenticate your requests. See our authentication page for more information.

API reference

The main entry point for the API is https://api.fastly.com/. For the sake of brevity, examples below omit this.

S3

Fastly will upload log messages to the S3 bucket, and in the format, specified in the S3 object.

Fields

field type description
access_key string

Your S3 account access key.

bucket_name string

The bucket name for S3 account.

created_at string

Time-stamp (GMT) when the endpoint was created.

deleted_at string

Time-stamp (GMT) when the endpoint was deleted.

domain string

The domain of the Amazon S3 endpoint.

format string

Apache style log formatting.

format_version integer

The version of the custom logging format used for the configured endpoint. Can be either 1 (the default, version 1 log format) or 2 (the version 2 log format).

gzip_level integer

What level of GZIP encoding to have when dumping logs (default 0, no compression).

message_type string

How the message should be formatted One of:

classic -

(default) RFC 3164 syslog prefix.

loggly -

RFC 5424 structured syslog.

logplex -

Heroku-style length prefixed syslog.

blank -

No prefix. Useful for writing JSON and CSV.

name string

The name of the s3 rule.

path string

The path to upload logs to.

period integer

How frequently the logs should be dumped (in seconds, default 3600).

placement string

Where in the generated VCL the logging call should be placed.

redundancy string

The S3 redundancy level.

response_condition string

When to execute the s3. If empty, always execute.

secret_key string

Your S3 account secret key.

server_side_encryption_kms_key_id string

Optional server-side KMS Key Id. Must be set if server_side_encryption is set to aws:kms.

server_side_encryption -

String Set this to AES256 or aws:kms to enable S3 Server Side Encryption.

service_id string

The alphanumeric string identifying a service.

timestamp_format string

strftime specified timestamp formatting (default "%Y-%m-%dT%H:%M:%S.000").

updated_at string

Time-stamp (GMT) when the endpoint was deleted.

version integer

The current version of a service.

Actions

GET /service/service_id/version/version/logging/s3

List all of the S3s for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/s3 HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
[
  {
    "access_key": "AKIAIOSFODNN7EXAMPLE",
    "bucket_name": "my_bucket_name",
    "created_at": "2016-05-23T19:48:33+00:00",
    "deleted_at": null,
    "domain": "s3.amazonaws.com",
    "format": "%h %l %u %t \"%r\" %>s %b",
    "format_version": "1",
    "gzip_level": 0,
    "message_type": "classic",
    "name": "test-s3",
    "path": null,
    "period": "3600",
    "placement": null,
    "redundancy": null,
    "response_condition": "",
    "secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
    "service_id": "SU1Z0isxPaozGVKXdv0eY",
    "timestamp_format": "%Y-%m-%dT%H:%M:%S.000",
    "updated_at": "2016-05-23T19:48:33+00:00",
    "version": "1"
  }
]
GET /service/service_id/version/version/logging/s3/name

Get the S3 for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/s3/test-s3 HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "access_key": "AKIAIOSFODNN7EXAMPLE",
  "bucket_name": "my_bucket_name",
  "created_at": "2016-05-23T19:48:33+00:00",
  "deleted_at": null,
  "domain": "s3.amazonaws.com",
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "gzip_level": 0,
  "message_type": "classic",
  "name": "test-s3",
  "path": null,
  "period": "3600",
  "placement": null,
  "redundancy": null,
  "response_condition": "",
  "secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "timestamp_format": "%Y-%m-%dT%H:%M:%S.000",
  "updated_at": "2016-05-23T19:48:33+00:00",
  "version": "1"
}
POST /service/service_id/version/version/logging/s3

Create a S3 for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
POST /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/s3 HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=test-s3&bucket_name=my_corporate_bucket&access_key=AKIAIOSFODNN7EXAMPLE&secret_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "access_key": "AKIAIOSFODNN7EXAMPLE",
  "bucket_name": "my_bucket_name",
  "created_at": "2016-05-23T19:48:33+00:00",
  "deleted_at": null,
  "domain": "s3.amazonaws.com",
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "gzip_level": 0,
  "message_type": "classic",
  "name": "test-s3",
  "path": null,
  "period": "3600",
  "placement": null,
  "redundancy": null,
  "response_condition": "",
  "secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "timestamp_format": "%Y-%m-%dT%H:%M:%S.000",
  "updated_at": "2016-05-23T19:48:33+00:00",
  "version": "1"
}
PUT /service/service_id/version/version/logging/s3/old_name

Update the S3 for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Parameters
parameter type description
old_name string

Old name of the S3 object (used to select the correct S3 object if the name has been changed).

Request Example
PUT /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/s3/test-s3 HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=updated-test-s3
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "access_key": "AKIAIOSFODNN7EXAMPLE",
  "bucket_name": "my_bucket_name",
  "created_at": "2016-05-23T19:48:33+00:00",
  "deleted_at": null,
  "domain": "s3.amazonaws.com",
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "gzip_level": 0,
  "message_type": "classic",
  "name": "updated-test-s3",
  "path": null,
  "period": "3600",
  "placement": null,
  "redundancy": null,
  "response_condition": "",
  "secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "timestamp_format": "%Y-%m-%dT%H:%M:%S.000",
  "updated_at": "2016-05-23T19:48:33+00:00",
  "version": "1"
}
DELETE /service/service_id/version/version/logging/s3/name

Delete the S3 for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
DELETE /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/s3/test-s3 HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "status": "ok"
}

S3 Canary

Fastly will upload log messages to the S3 bucket, and in the format, specified in the S3 Canary object. This is a temporary controller to test a new S3 library and, as such, is part of a limited availability release. For more information, see our product and feature life cycle descriptions. If you would like to try it, please contact support@fastly.com.

Fields

field type description
access_key string

Your S3 account access key.

bucket_name string

The bucket name for S3 account.

created_at string

Time-stamp (GMT) when the endpoint was created.

deleted_at string

Time-stamp (GMT) when the endpoint was deleted.

domain string

The domain of the Amazon S3 endpoint.

format string

Apache style log formatting.

format_version integer

The version of the custom logging format used for the configured endpoint. Can be either 1 (the default, version 1 log format) or 2 (the version 2 log format).

gzip_level integer

What level of GZIP encoding to have when dumping logs (default 0, no compression).

message_type string

How the message should be formatted One of:

classic -

(default) RFC 3164 syslog prefix.

loggly -

RFC 5424 structured syslog.

logplex -

Heroku-style length prefixed syslog.

blank -

No prefix. Useful for writing JSON and CSV.

name string

The name of the s3 rule.

path string

The path to upload logs to.

period integer

How frequently the logs should be dumped (in seconds, default 3600).

placement string

Where in the generated VCL the logging call should be placed.

redundancy string

The S3 redundancy level.

response_condition string

When to execute the s3. If empty, always execute.

secret_key string

Your S3 account secret key.

server_side_encryption_kms_key_id string

Optional server-side KMS Key Id. Must be set if server_side_encryption is set to aws:kms.

server_side_encryption string

Set this to AES256 or aws:kms to enable S3 Server Side Encryption.

service_id string

The alphanumeric string identifying a service.

timestamp_format string

strftime specified timestamp formatting (default "%Y-%m-%dT%H:%M:%S.000").

updated_at string

Time-stamp (GMT) when the endpoint was deleted.

version integer

The current version of a service.

Actions

GET /service/service_id/version/version/logging/s3canary

List all of the S3s for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/s3canary HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
[
  {
    "access_key": "AKIAIOSFODNN7EXAMPLE",
    "bucket_name": "my_bucket_name",
    "created_at": "2016-05-23T19:48:33+00:00",
    "deleted_at": null,
    "domain": "s3.amazonaws.com",
    "format": "%h %l %u %t \"%r\" %>s %b",
    "format_version": "1",
    "gzip_level": 0,
    "message_type": "classic",
    "name": "test-s3canary",
    "path": null,
    "period": "3600",
    "placement": null,
    "redundancy": null,
    "response_condition": "",
    "secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
    "service_id": "SU1Z0isxPaozGVKXdv0eY",
    "timestamp_format": "%Y-%m-%dT%H:%M:%S.000",
    "updated_at": "2016-05-23T19:48:33+00:00",
    "version": "1"
  }
]
GET /service/service_id/version/version/logging/s3canary/name

Get the S3 Canary for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/s3canary/test-s3canary HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "access_key": "AKIAIOSFODNN7EXAMPLE",
  "bucket_name": "my_bucket_name",
  "created_at": "2016-05-23T19:48:33+00:00",
  "deleted_at": null,
  "domain": "s3.amazonaws.com",
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "gzip_level": 0,
  "message_type": "classic",
  "name": "test-s3canary",
  "path": null,
  "period": "3600",
  "placement": null,
  "redundancy": null,
  "response_condition": "",
  "secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "timestamp_format": "%Y-%m-%dT%H:%M:%S.000",
  "updated_at": "2016-05-23T19:48:33+00:00",
  "version": "1"
}
POST /service/service_id/version/version/logging/s3canary

Create a S3 Canary for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
POST /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/s3canary HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=test-s3canary&bucket_name=my_corporate_bucket&access_key=AKIAIOSFODNN7EXAMPLE&secret_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "access_key": "AKIAIOSFODNN7EXAMPLE",
  "bucket_name": "my_bucket_name",
  "created_at": "2016-05-23T19:48:33+00:00",
  "deleted_at": null,
  "domain": "s3.amazonaws.com",
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "gzip_level": 0,
  "message_type": "classic",
  "name": "test-s3canary",
  "path": null,
  "period": "3600",
  "placement": null,
  "redundancy": null,
  "response_condition": "",
  "secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "timestamp_format": "%Y-%m-%dT%H:%M:%S.000",
  "updated_at": "2016-05-23T19:48:33+00:00",
  "version": "1"
}
PUT /service/service_id/version/version/logging/s3canary/old_name

Update the S3 Canary for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Parameters
parameter type description
old_name string

Old name of the S3 object (used to select the correct S3 object if the name has been changed).

Request Example
PUT /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/s3canary/test-s3canary HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=updated-test-s3canary
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "access_key": "AKIAIOSFODNN7EXAMPLE",
  "bucket_name": "my_bucket_name",
  "created_at": "2016-05-23T19:48:33+00:00",
  "deleted_at": null,
  "domain": "s3.amazonaws.com",
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "gzip_level": 0,
  "message_type": "classic",
  "name": "updated-test-s3canary",
  "path": null,
  "period": "3600",
  "placement": null,
  "redundancy": null,
  "response_condition": "",
  "secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "timestamp_format": "%Y-%m-%dT%H:%M:%S.000",
  "updated_at": "2016-05-23T19:48:33+00:00",
  "version": "1"
}
DELETE /service/service_id/version/version/logging/s3canary/name

Delete the S3 Canary for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
DELETE /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/s3canary/test-s3canary HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "status": "ok"
}

Cloudfiles

Fastly will upload log messages to your Rackspace Cloud Files account.

Fields

field type description
access_key string

Your Cloudfile account access key.

bucket_name string

The name of your Cloudfiles container.

created_at string

Time-stamp (GMT) when the endpoint was created.

deleted_at string

Time-stamp (GMT) when the endpoint was deleted.

format string

Apache style log formatting.

format_version integer

The version of the custom logging format used for the configured endpoint. Can be either 1 (the default, version 1 log format) or 2 (the version 2 log format).

gzip_level integer

What level of GZIP encoding to have when dumping logs (default 0, no compression).

message_type string

How the message should be formatted One of:

classic -

(default) RFC 3164 syslog prefix.

loggly -

RFC 5424 structured syslog.

logplex -

Heroku-style length prefixed syslog.

blank -

No prefix. Useful for writing JSON and CSV.

name string

The name of the Cloudfiles rule.

path string

The path to upload logs to.

period integer

How frequently the logs should be dumped (in seconds, default 3600).

placement string

Where in the generated VCL the logging call should be placed.

response_condition string

When to execute the cloudfiles. If empty, always execute.

service_id string

The alphanumeric string identifying a service.

timestamp_format string

The specified format of the log's timestamp.

updated_at string

Time-stamp (GMT) when the endpoint was deleted.

user string

The username for your Cloudfile account.

version integer

The current version of a service.

Actions

GET /service/service_id/version/version/logging/cloudfiles

List all of the cloudfiles for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/cloudfiles HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
[
  {
    "access_key": "AKIAIOSFODNN7EXAMPLE",
    "bucket_name": "my_corporate_bucket",
    "created_at": "2016-06-15T17:16:20+00:00",
    "deleted_at": null,
    "format": "%h %l %u %t \"%r\" %>s %b",
    "format_version": 1,
    "gzip_level": 0,
    "message_type": "classic",
    "name": "test-cloudfiles",
    "path": null,
    "period": "3600",
    "placement": null,
    "response_condition": "",
    "service_id": "SU1Z0isxPaozGVKXdv0eY",
    "timestamp_format": "%Y-%m-%dT%H:%M:%S.000",
    "updated_at": "2016-06-15T17:16:20+00:00",
    "user": "username",
    "version": "1"
  }
]
GET /service/service_id/version/version/logging/cloudfiles/name

Get the cloudfiles for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/cloudfiles/test-cloudfiles HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "access_key": "AKIAIOSFODNN7EXAMPLE",
  "bucket_name": "my_corporate_bucket",
  "created_at": "2016-06-15T17:16:20+00:00",
  "deleted_at": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": 1,
  "gzip_level": 0,
  "message_type": "classic",
  "name": "test-cloudfiles",
  "path": null,
  "period": "3600",
  "placement": null,
  "response_condition": "",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "timestamp_format": "%Y-%m-%dT%H:%M:%S.000",
  "updated_at": "2016-06-15T17:16:20+00:00",
  "user": "username",
  "version": "1"
}
POST /service/service_id/version/version/logging/cloudfiles

Create a cloudfiles for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
POST /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/cloudfiles HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=test-cloudfiles \
     &bucket_name=my_corporate_bucket \
     &access_key=AKIAIOSFODNN7EXAMPLE \
     &secret_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "access_key": "AKIAIOSFODNN7EXAMPLE",
  "bucket_name": "my_corporate_bucket",
  "created_at": "2016-06-15T17:16:20+00:00",
  "deleted_at": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": 1,
  "gzip_level": 0,
  "message_type": "classic",
  "name": "test-cloudfiles",
  "path": null,
  "period": "3600",
  "placement": null,
  "response_condition": "",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "timestamp_format": "%Y-%m-%dT%H:%M:%S.000",
  "updated_at": "2016-06-15T17:16:20+00:00",
  "user": "username",
  "version": "1"
}
PUT /service/service_id/version/version/logging/cloudfiles/old_name

Update the cloudfiles for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
PUT /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/cloudfiles/test-cloudfiles HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=updated-test-cloudfiles
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "access_key": "AKIAIOSFODNN7EXAMPLE",
  "bucket_name": "my_corporate_bucket",
  "created_at": "2016-06-15T17:16:20+00:00",
  "deleted_at": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": 1,
  "gzip_level": 0,
  "message_type": "classic",
  "name": "updated-test-cloudfiles",
  "path": null,
  "period": "3600",
  "placement": null,
  "response_condition": "",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "timestamp_format": "%Y-%m-%dT%H:%M:%S.000",
  "updated_at": "2016-06-15T17:16:20+00:00",
  "user": "username",
  "version": "1"
}
DELETE /service/service_id/version/version/logging/cloudfiles/name

Delete the cloudfiles for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
DELETE /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/cloudfiles/test-cloudfiles HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "status": "ok"
}

DigitalOcean Spaces

Fastly will upload log messages to the DigitalOcean Space in the format specified in the DigitalOcean Spaces object.

Fields

field type description
name string

The name of the DigitalOcean object.

service_id string

The alphanumeric string identifying a service.

version integer

The current version of a service.

bucket_name string

The name of the DigitalOcean Space.

access_key string

Your DigitalOcean Spaces account access key.

secret_key string

Your DigitalOcean Spaces account secret key.

domain string

The domain of the DigitalOcean Spaces endpoint (default "nyc3.digitaloceanspaces.com").

path string

The path to upload logs to.

period integer

How frequently the logs should be dumped (in seconds, default 3600).

timestamp_format string

strftime specified timestamp formatting (default "%Y-%m-%dT%H:%M:%S.000").

gzip_level integer

What level of GZIP encoding to have when dumping logs (default 0, no compression).

public_key string

A PGP public key that Fastly will use to encrypt your log files before writing them to disk.

format string

Apache style log formatting.

format_version integer

The version of the custom logging format used for the configured endpoint. Can be either 2 (the default, version 2 log format) or 1 (the version 1 log format).

message_type string

How the message should be formatted. One of:

classic -

(default) RFC 3164 syslog prefix.

loggly -

RFC 5424 structured syslog.

logplex -

Heroku-style length prefixed syslog.

blank -

No prefix. Useful for writing JSON and CSV.

placement string

Where in the generated VCL the logging call should be placed.

response_condition string

When to execute the DigitalOcean object. If empty, always execute.

created_at string

Time-stamp (GMT) when the endpoint was created.

updated_at string

Time-stamp (GMT) when the endpoint was deleted.

deleted_at string

Time-stamp (GMT) when the endpoint was deleted.

Actions

GET /service/service_id/version/version/logging/digitalocean

List all of the DigitalOcean Spaces for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/digitalocean HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
[
  {
    "access_key": "AKIAIOSFODNN7EXAMPLE",
    "bucket_name": "my_space_name",
    "created_at": "2016-05-23T19:48:33+00:00",
    "deleted_at": null,
    "domain": "nyc3.digitaloceanspaces.com",
    "format": "%h %l %u %t \"%r\" %>s %b",
    "format_version": "1",
    "gzip_level": 0,
    "message_type": "classic",
    "name": "test-digitalocean",
    "path": null,
    "period": "3600",
    "placement": null,
    "response_condition": "",
    "secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
    "service_id": "SU1Z0isxPaozGVKXdv0eY",
    "timestamp_format": "%Y-%m-%dT%H:%M:%S.000",
    "updated_at": "2016-05-23T19:48:33+00:00",
    "version": "1"
  }
]
GET /service/service_id/version/version/logging/digitalocean/name

Get the DigitalOcean Space for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/digitalocean/test-digitalocean HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "access_key": "AKIAIOSFODNN7EXAMPLE",
  "bucket_name": "my_space_name",
  "created_at": "2016-05-23T19:48:33+00:00",
  "deleted_at": null,
  "domain": "nyc3.digitaloceanspaces.com",
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "gzip_level": 0,
  "message_type": "classic",
  "name": "test-digitalocean",
  "path": null,
  "period": "3600",
  "placement": null,
  "response_condition": "",
  "secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "timestamp_format": "%Y-%m-%dT%H:%M:%S.000",
  "updated_at": "2016-05-23T19:48:33+00:00",
  "version": "1"
}
POST /service/service_id/version/version/logging/digitalocean

Create a DigitalOcean Space for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
POST /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/digitalocean HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=test-digitalocean&bucket_name=my_corporate_bucket&access_key=AKIAIOSFODNN7EXAMPLE&secret_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "access_key": "AKIAIOSFODNN7EXAMPLE",
  "bucket_name": "my_space_name",
  "created_at": "2016-05-23T19:48:33+00:00",
  "deleted_at": null,
  "domain": "nyc3.digitaloceanspaces.com",
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "gzip_level": 0,
  "message_type": "classic",
  "name": "test-digitalocean",
  "path": null,
  "period": "3600",
  "placement": null,
  "response_condition": "",
  "secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "timestamp_format": "%Y-%m-%dT%H:%M:%S.000",
  "updated_at": "2016-05-23T19:48:33+00:00",
  "version": "1"
}
PUT /service/service_id/version/version/logging/digitalocean/old_name

Update the DigitalOcean Space for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Parameters
parameter type description
old_name string

Old name of the DigitalOcean Spaces object (used to select the correct DigitalOcean Spaces object if the name has been changed).

Request Example
PUT /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/digitalocean/test-digitalocean HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=updated-test-digitalocean
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "access_key": "AKIAIOSFODNN7EXAMPLE",
  "bucket_name": "my_bucket_name",
  "created_at": "2016-05-23T19:48:33+00:00",
  "deleted_at": null,
  "domain": "nyc3.digitaloceanspaces.com",
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "gzip_level": 0,
  "message_type": "classic",
  "name": "updated-test-digitalocean",
  "path": null,
  "period": "3600",
  "placement": null,
  "response_condition": "",
  "secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "timestamp_format": "%Y-%m-%dT%H:%M:%S.000",
  "updated_at": "2016-05-23T19:48:33+00:00",
  "version": "1"
}
DELETE /service/service_id/version/version/logging/digitalocean/name

Delete the DigitalOcean Space for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
DELETE /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/digitalocean/test-digitalocean HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "status": "ok"
}

FTP

Fastly will upload log messages periodically to the server, and in the format, specified in the FTP object.

Fields

field type description
address string

An hostname or IPv4 address.

created_at string

Time-stamp (GMT) when the endpoint was created.

deleted_at string

Time-stamp (GMT) when the endpoint was deleted.

format string

Apache style log formatting.

format_version integer

The version of the custom logging format used for the configured endpoint. Can be either 1 (the default, version 1 log format) or 2 (the version 2 log format).

gzip_level integer

What level of GZIP encoding to have when dumping logs (default 0, no compression).

hostname string

Hostname used.

ipv4 string

IPv4 address of the host.

message_type string

How the message should be formatted One of:

classic -

(default) RFC 3164 syslog prefix.

loggly -

RFC 5424 structured syslog.

logplex -

Heroku-style length prefixed syslog.

blank -

No prefix. Useful for writing JSON and CSV.

name string

The name of the ftp endpoint.

password string

The password for the server (for anonymous use an email address).

path string

The path to upload log files to. If the path ends in / then it is treated as a directory.

period integer

How frequently the logs should be dumped (in seconds, default 3600).

placement string

Where in the generated VCL the logging call should be placed.

port integer

The port number.

response_condition string

When to execute the ftp. If empty, always execute.

service_id string

The alphanumeric string identifying a service.

timestamp_format string

strftime specified timestamp formatting (default "%Y-%m-%dT%H:%M:%S.000").

updated_at string

Time-stamp (GMT) when the endpoint was updated.

user string

The username for the server (can be anonymous).

version integer

The current version of a service.

Actions

GET /service/service_id/version/version/logging/ftp

List all of the FTPs for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/ftp HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
[
  {
    "address": "example.com",
    "created_at": "2016-05-17T18:27:29+00:00",
    "deleted_at": null,
    "format": "%h %l %u %t \"%r\" %>s %b",
    "format_version": "1",
    "gzip_level": "0",
    "hostname": "example.com",
    "ipv4": "127.0.0.1",
    "message_type": "classic",
    "name": "test-ftp",
    "password": "ftp@example.com",
    "path": "/",
    "period": "3600",
    "placement": null,
    "port": "514",
    "response_condition": "",
    "service_id": "SU1Z0isxPaozGVKXdv0eY",
    "timestamp_format": "%Y-%m-%dT%H:%M:%S.000",
    "updated_at": "2016-05-17T18:27:29+00:00",
    "user": "anonymous",
    "version": "1"
  }
]
GET /service/service_id/version/version/logging/ftp/name

Get the FTP for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/ftp/test-ftp HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "address": "example.com",
  "created_at": "2016-05-17T18:27:29+00:00",
  "deleted_at": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "gzip_level": 0,
  "hostname": "example.com",
  "ipv4": "127.0.0.1",
  "message_type": "classic",
  "name": "test-ftp",
  "password": "ftp@example.com",
  "path": "/",
  "period": "3600",
  "placement": null,
  "port": "514",
  "response_condition": "",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "timestamp_format": "%Y-%m-%dT%H:%M:%S.000",
  "updated_at": "2016-05-17T18:27:29+00:00",
  "user": "anonymous",
  "version": "1"
}
POST /service/service_id/version/version/logging/ftp

Create a FTP for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
POST /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/ftp HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=test-ftp&address=example.com&user=anonymous&password=ftp@example.com&path=/
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "address": "example.com",
  "created_at": "2016-05-17T18:27:29+00:00",
  "deleted_at": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "gzip_level": 0,
  "hostname": "example.com",
  "ipv4": "127.0.0.1",
  "message_type": "classic",
  "name": "test-ftp",
  "password": "ftp@example.com",
  "path": "/",
  "period": "3600",
  "placement": null,
  "port": "514",
  "response_condition": "",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "timestamp_format": "%Y-%m-%dT%H:%M:%S.000",
  "updated_at": "2016-05-17T18:27:29+00:00",
  "user": "anonymous",
  "version": "1"
}
PUT /service/service_id/version/version/logging/ftp/old_name

Update the FTP for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Parameters
parameter type description
old_name string

Old name of the FTP object (used to select the correct FTP object if the name has been changed).

Request Example
PUT /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/ftp/test-ftp HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=updated-test-ftp
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "address": "example.com",
  "created_at": "2016-05-17T18:27:29+00:00",
  "deleted_at": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "gzip_level": 0,
  "hostname": "example.com",
  "ipv4": "127.0.0.1",
  "message_type": "classic",
  "name": "updated-test-ftp",
  "password": "ftp@example.com",
  "path": "/",
  "period": "3600",
  "placement": null,
  "port": "514",
  "response_condition": "",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "timestamp_format": "%Y-%m-%dT%H:%M:%S.000",
  "updated_at": "2016-05-17T18:27:29+00:00",
  "user": "anonymous",
  "version": "1"
}
DELETE /service/service_id/version/version/logging/ftp/name

Delete the FTP for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
DELETE /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/ftp/test-ftp HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "status": "ok"
}

Google BigQuery Logging

Fastly will upload log messages to the Google BigQuery dataset and table, and in the format specified in the BigQuery object.

Fields

field type description
name string

The name of the BigQuery logging endpoint. Used as a primary key for API access.

service_id string

The alphanumeric string identifying a service.

version integer

The current version of a service.

format string

Apache style log formatting. Must produce JSON that matches the schema of your BigQuery table.

user string

Your Google Cloud Platform service account email address. The client_email field in your service account authentication JSON.

secret_key string

Your Google Cloud Platform account secret key. The private_key field in your service account authentication JSON.

project_id string

Your Google Cloud Platform project ID.

dataset string

Your BigQuery dataset.

table string

Your BigQuery table.

response_condition string

When to execute the BigQuery logging rule. If empty, always execute.

created_at string

Time-stamp (GMT) when the endpoint was created.

updated_at string

Time-stamp (GMT) when the endpoint was updated.

deleted_at string

Time-stamp (GMT) when the endpoint was deleted.

Actions

GET /service/service_id/version/version/logging/bigquery

List all of the BigQuerys for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/bigquery HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
[
  {
    "service_id": "SU1Z0isxPaozGVKXdv0eY",
    "name": "my_bigquery_logging",
    "format": "{\n \"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S%z}t\",\n  \"time_elapsed\":%{time.elapsed.usec}V,\n  \"is_tls\":%{if(req.is_ssl, \"true\", \"false\")}V,\n  \"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\n  \"geo_city\":\"%{client.geo.city}V\",\n  \"geo_country_code\":\"%{client.geo.country_code}V\",\n  \"request\":\"%{req.request}V\",\n  \"host\":\"%{req.http.Fastly-Orig-Host}V\",\n  \"url\":\"%{cstr_escape(req.url)}V\",\n  \"request_referer\":\"%{cstr_escape(req.http.Referer)}V\",\n  \"request_user_agent\":\"%{cstr_escape(req.http.User-Agent)}V\",\n  \"request_accept_language\":\"%{cstr_escape(req.http.Accept-Language)}V\",\n  \"request_accept_charset\":\"%{cstr_escape(req.http.Accept-Charset)}V\",\n  \"cache_status\":\"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\\\2\\\\3\") }V\"\n}",
    "user": "fastly-bigquery-log@example-fastly-log.iam.gserviceaccount.com",
    "project_id": "example-fastly-log",
    "dataset": "fastly_log_test",
    "table": "fastly_logs",
    "secret_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC7bPG9yaIYd5AL\nmvOaYvNozFJB/VWS53KWBll769kJvlmgMks6r6Xrv8w6rjxWKjZeDrnXVf7UDa0F\nckPPIFvXRxahftWFMGArw0lIvQzgT4/BlndXU5RNxfah/8m7q/GIF6oNYWzfJwvv\nzodxDUqIRH2e2JWidNRjElHuogYHLhV4O/od5pAkfDwak/ihuuh/2VA3Auwb3nph\ndX2F0JBs14oPKZUTYUUSzUQY5IMxSxYU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T12RKKjg8\nOxrYGz7vTfOIDOddyAiPhXPUSyyF/3uvCrIzUUsmeeUJ8xq9dVwQ5HS3pYuKVfDg\nXYHbG4w9UJaF1A+3xEdUsYglSLouo7z/67zH9tZXAoGBAKpsdjSd3R+llaAv2HQ8\nGMlN92UTr5i9w++QMXq4qspH5NEYqz3NHbKuYthZqxEsRUZbRP50eDWU4jvxFVJl\nLBFINp6B+3AsIme0YCyOaleB/Cy0347miSinSv2I6QiH6dQxHdHzrG+x1evS/76f\nKT0KS+ySjCAEWgg4v+mjUDUV\n-----END PRIVATE KEY-----\n",
    "created_at": "2016-05-17T20:23:15+00:00",
    "updated_at": "2016-05-17T20:23:15+00:00",
    "deleted_at": null,
    "response_condition": "",
  }
]
GET /service/service_id/version/version/logging/bigquery/name

Get the BigQuery Logging for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/bigquery/my_bigquery_logging HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "name": "my_bigquery_logging",
  "format": "{\n \"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S%z}t\",\n  \"time_elapsed\":%{time.elapsed.usec}V,\n  \"is_tls\":%{if(req.is_ssl, \"true\", \"false\")}V,\n  \"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\n  \"geo_city\":\"%{client.geo.city}V\",\n  \"geo_country_code\":\"%{client.geo.country_code}V\",\n  \"request\":\"%{req.request}V\",\n  \"host\":\"%{req.http.Fastly-Orig-Host}V\",\n  \"url\":\"%{cstr_escape(req.url)}V\",\n  \"request_referer\":\"%{cstr_escape(req.http.Referer)}V\",\n  \"request_user_agent\":\"%{cstr_escape(req.http.User-Agent)}V\",\n  \"request_accept_language\":\"%{cstr_escape(req.http.Accept-Language)}V\",\n  \"request_accept_charset\":\"%{cstr_escape(req.http.Accept-Charset)}V\",\n  \"cache_status\":\"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\\\2\\\\3\") }V\"\n}",
  "user": "fastly-bigquery-log@example-fastly-log.iam.gserviceaccount.com",
  "project_id": "example-fastly-log",
  "dataset": "fastly_log_test",
  "table": "fastly_logs",
  "secret_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC7bPG9yaIYd5AL\nmvOaYvNozFJB/VWS53KWBll769kJvlmgMks6r6Xrv8w6rjxWKjZeDrnXVf7UDa0F\nckPPIFvXRxahftWFMGArw0lIvQzgT4/BlndXU5RNxfah/8m7q/GIF6oNYWzfJwvv\nzodxDUqIRH2e2JWidNRjElHuogYHLhV4O/od5pAkfDwak/ihuuh/2VA3Auwb3nph\ndX2F0JBs14oPKZUTYUUSzUQY5IMxSxYUA4Q7W4v21x1EnJt+biXOrERk1rm4ieEE\nU3WkjR5c5gvG8xcWyYod87RNFELmIhCCytI1+t5C3Em/jPsQFtLzwHpbNhdW4oEm\nn7d06n75AgMBAAECggEAWRh26lNZfOwJS5sDRlbXgu/uAnSdI1JmxC6Mhz4cVGdq\nT57Y6DLrWuA4A4UkJYm3gorZiSXWF5PQthAVb/bf8bxXY7nZYpEWhnc09SD5aAAq\nREp0vMx8aWQ709K2YUJg+zDUo7u2d3YmVH8HH5TD43c7iDFJIIsNE3N4A0p+NxZ+\nw06FFW+fz/etrWiNyhrlTsbkMbSgU+GpFFBq1pCd0ni5d1YM1rsaAaUpmkwdjgjL\noDs+M/L/HtqfEhyZNdw8JF7EJXVE1bIl7/NL0rBInhyO28FcB56t/AG5nzXKFI/c\nc+IO7d6MOOqiGRLRWZItEpnyzuV8DZo461wy1hSvqQKBgQDhSsg2cHkTrtBW8x0A\n3BwB/ygdkkxm1OIvfioT+JBneRufUPvVIM2aPZBBGKEedDAmIGn/8f9XAHhKjs8B\nEsPRgE206s4+hnrTcK7AeWWPvM9FDkrkQCoJFuJrNy9mJt8gs7AnnoBa9u/J4naW\ne1tfC8fUfsa7kdzblDhcRQ8FhwKBgQDU+N4kPzIdUuJDadd6TkBbjUNPEfZzU5+t\nIike2VSRhApxAxviUnTDsTROwJRzKik9w7gIMka8Ek+nmLNMEtds77ttcGQRdu16\n+vT1iualiCJe+/iMbl+PiJtFwhEHECLU9QfgBVS6r2lDAlZA+w6nwCRiidlrObzO\nCXqVOzN3fwKBgAsrOuu//bClHP0ChnCReO38aU+1/gWnDiOOnKVq0DXhAiaOzD1P\nqAG6hZlEkFBDMPWzq62doKv+gPgpRkfmV0DenHuYnGrrHdG3p2IxYoCSuq/QupPA\nPpU+xjDMhpQI30zuu4/rQq+/yDl4+aoSKYB3xAtb0Zxg6dMU8QpZ/hmnAoGBAIFu\nIesbcQR7O8FGkMrmxZweNNrYCtQ57R/WU/FImWm6OnJGNmsMO6Q2jJiT12RKKjg8\nOxrYGz7vTfOIDOddyAiPhXPUSyyF/3uvCrIzUUsmeeUJ8xq9dVwQ5HS3pYuKVfDg\nXYHbG4w9UJaF1A+3xEdUsYglSLouo7z/67zH9tZXAoGBAKpsdjSd3R+llaAv2HQ8\nGMlN92UTr5i9w++QMXq4qspH5NEYqz3NHbKuYthZqxEsRUZbRP50eDWU4jvxFVJl\nLBFINp6B+3AsIme0YCyOaleB/Cy0347miSinSv2I6QiH6dQxHdHzrG+x1evS/76f\nKT0KS+ySjCAEWgg4v+mjUDUV\n-----END PRIVATE KEY-----\n",
  "created_at": "2016-05-17T20:23:15+00:00",
  "updated_at": "2016-05-17T20:23:15+00:00",
  "deleted_at": null,
  "response_condition": ""
}
POST /service/service_id/version/version/logging/bigquery

Create BigQuery Logging for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
POST /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/bigquery HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=my_bigquery_logging&project_id=example-fastly-log&dataset=fastly_log_test&table=fastly_logs&user=fastly-bigquery-log@example-fastly-log.iam.gserviceaccount.com&secret_key=-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC7bPG9yaIYd5AL\nmvOaYvNozFJB/VWS53KWBll769kJvlmgMks6r6Xrv8w6rjxWKjZeDrnXVf7UDa0F\nckPPIFvXRxahftWFMGArw0lIvQzgT4/BlndXU5RNxfah/8m7q/GIF6oNYWzfJwvv\nzodxDUqIRH2e2JWidNRjElHuogYHLhV4O/od5pAkfDwak/ihuuh/2VA3Auwb3nph\ndX2F0JBs14oPKZUTYUUSzUQY5IMxSxYUA4Q7W4v21x1EnJt+biXOrERk1rm4ieEE\nU3WkjR5c5gvG8xcWyYod87RNFELmIhCCytI1+t5C3Em/jPsQFtLzwHpbNhdW4oEm\nn7d06n75AgMBAAECggEAWRh26lNZfOwJS5sDRlbXgu/uAnSdI1JmxC6Mhz4cVGdq\nT57Y6DLrWuA4A4UkJYm3gorZiSXWF5PQthAVb/bf8bxXY7nZYpEWhnc09SD5aAAq\nREp0vMx8aWQ709K2YUJg+zDUo7u2d3YmVH8HH5TD43c7iDFJIIsNE3N4A0p+NxZ+\nw06FFW+fz/etrWiNyhrlTsbkMbSgU+GpFFBq1pCd0ni5d1YM1rsaAaUpmkwdjgjL\noDs+M/L/HtqfEhyZNdw8JF7EJXVE1bIl7/NL0rBInhyO28FcB56t/AG5nzXKFI/c\nc+IO7d6MOOqiGRLRWZItEpnyzuV8DZo461wy1hSvqQKBgQDhSsg2cHkTrtBW8x0A\n3BwB/ygdkkxm1OIvfioT+JBneRufUPvVIM2aPZBBGKEedDAmIGn/8f9XAHhKjs8B\nEsPRgE206s4+hnrTcK7AeWWPvM9FDkrkQCoJFuJrNy9mJt8gs7AnnoBa9u/J4naW\ne1tfC8fUfsa7kdzblDhcRQ8FhwKBgQDU+N4kPzIdUuJDadd6TkBbjUNPEfZzU5+t\nIike2VSRhApxAxviUnTDsTROwJRzKik9w7gIMka8Ek+nmLNMEtds77ttcGQRdu16\n+vT1iualiCJe+/iMbl+PiJtFwhEHECLU9QfgBVS6r2lDAlZA+w6nwCRiidlrObzO\nCXqVOzN3fwKBgAsrOuu//bClHP0ChnCReO38aU+1/gWnDiOOnKVq0DXhAiaOzD1P\nqAG6hZlEkFBDMPWzq62doKv+gPgpRkfmV0DenHuYnGrrHdG3p2IxYoCSuq/QupPA\nPpU+xjDMhpQI30zuu4/rQq+/yDl4+aoSKYB3xAtb0Zxg6dMU8QpZ/hmnAoGBAIFu\nIesbcQR7O8FGkMrmxZweNNrYCtQ57R/WU/FImWm6OnJGNmsMO6Q2jJiT12RKKjg8\nOxrYGz7vTfOIDOddyAiPhXPUSyyF/3uvCrIzUUsmeeUJ8xq9dVwQ5HS3pYuKVfDg\nXYHbG4w9UJaF1A+3xEdUsYglSLouo7z/67zH9tZXAoGBAKpsdjSd3R+llaAv2HQ8\nGMlN92UTr5i9w++QMXq4qspH5NEYqz3NHbKuYthZqxEsRUZbRP50eDWU4jvxFVJl\nLBFINp6B+3AsIme0YCyOaleB/Cy0347miSinSv2I6QiH6dQxHdHzrG+x1evS/76f\nKT0KS+ySjCAEWgg4v+mjUDUV\n-----END PRIVATE KEY-----\n
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "name": "my_bigquery_logging",
  "format": "{\n \"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S%z}t\",\n  \"time_elapsed\":%{time.elapsed.usec}V,\n  \"is_tls\":%{if(req.is_ssl, \"true\", \"false\")}V,\n  \"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\n  \"geo_city\":\"%{client.geo.city}V\",\n  \"geo_country_code\":\"%{client.geo.country_code}V\",\n  \"request\":\"%{req.request}V\",\n  \"host\":\"%{req.http.Fastly-Orig-Host}V\",\n  \"url\":\"%{cstr_escape(req.url)}V\",\n  \"request_referer\":\"%{cstr_escape(req.http.Referer)}V\",\n  \"request_user_agent\":\"%{cstr_escape(req.http.User-Agent)}V\",\n  \"request_accept_language\":\"%{cstr_escape(req.http.Accept-Language)}V\",\n  \"request_accept_charset\":\"%{cstr_escape(req.http.Accept-Charset)}V\",\n  \"cache_status\":\"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\\\2\\\\3\") }V\"\n}",
  "user": "fastly-bigquery-log@example-fastly-log.iam.gserviceaccount.com",
  "project_id": "example-fastly-log",
  "dataset": "fastly_log_test",
  "table": "fastly_logs",
  "secret_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC7bPG9yaIYd5AL\nmvOaYvNozFJB/VWS53KWBll769kJvlmgMks6r6Xrv8w6rjxWKjZeDrnXVf7UDa0F\nckPPIFvXRxahftWFMGArw0lIvQzgT4/BlndXU5RNxfah/8m7q/GIF6oNYWzfJwvv\nzodxDUqIRH2e2JWidNRjElHuogYHLhV4O/od5pAkfDwak/ihuuh/2VA3Auwb3nph\ndX2F0JBs14oPKZUTYUUSzUQY5IMxSxYUA4Q7W4v21x1EnJt+biXOrERk1rm4ieEE\nU3WkjR5c5gvG8xcWyYod87RNFELmIhCCytI1+t5C3Em/jPsQFtLzwHpbNhdW4oEm\nn7d06n75AgMBAAECggEAWRh26lNZfOwJS5sDRlbXgu/uAnSdI1JmxC6Mhz4cVGdq\nT57Y6DLrWuA4A4UkJYm3gorZiSXWF5PQthAVb/bf8bxXY7nZYpEWhnc09SD5aAAq\nREp0vMx8aWQ709K2YUJg+zDUo7u2d3YmVH8HH5TD43c7iDFJIIsNE3N4A0p+NxZ+\nw06FFW+fz/etrWiNyhrlTsbkMbSgU+GpFFBq1pCd0ni5d1YM1rsaAaUpmkwdjgjL\noDs+M/L/HtqfEhyZNdw8JF7EJXVE1bIl7/NL0rBInhyO28FcB56t/AG5nzXKFI/c\nc+IO7d6MOOqiGRLRWZItEpnyzuV8DZo461wy1hSvqQKBgQDhSsg2cHkTrtBW8x0A\n3BwB/ygdkkxm1OIvfioT+JBneRufUPvVIM2aPZBBGKEedDAmIGn/8f9XAHhKjs8B\nEsPRgE206s4+hnrTcK7AeWWPvM9FDkrkQCoJFuJrNy9mJt8gs7AnnoBa9u/J4naW\ne1tfC8fUfsa7kdzblDhcRQ8FhwKBgQDU+N4kPzIdUuJDadd6TkBbjUNPEfZzU5+t\nIike2VSRhApxAxviUnTDsTROwJRzKik9w7gIMka8Ek+nmLNMEtds77ttcGQRdu16\n+vT1iualiCJe+/iMbl+PiJtFwhEHECLU9QfgBVS6r2lDAlZA+w6nwCRiidlrObzO\nCXqVOzN3fwKBgAsrOuu//bClHP0ChnCReO38aU+1/gWnDiOOnKVq0DXhAiaOzD1P\nqAG6hZlEkFBDMPWzq62doKv+gPgpRkfmV0DenHuYnGrrHdG3p2IxYoCSuq/QupPA\nPpU+xjDMhpQI30zuu4/rQq+/yDl4+aoSKYB3xAtb0Zxg6dMU8QpZ/hmnAoGBAIFu\nIesbcQR7O8FGkMrmxZweNNrYCtQ57R/WU/FImWm6OnJGNmsMO6Q2jJiT12RKKjg8\nOxrYGz7vTfOIDOddyAiPhXPUSyyF/3uvCrIzUUsmeeUJ8xq9dVwQ5HS3pYuKVfDg\nXYHbG4w9UJaF1A+3xEdUsYglSLouo7z/67zH9tZXAoGBAKpsdjSd3R+llaAv2HQ8\nGMlN92UTr5i9w++QMXq4qspH5NEYqz3NHbKuYthZqxEsRUZbRP50eDWU4jvxFVJl\nLBFINp6B+3AsIme0YCyOaleB/Cy0347miSinSv2I6QiH6dQxHdHzrG+x1evS/76f\nKT0KS+ySjCAEWgg4v+mjUDUV\n-----END PRIVATE KEY-----\n",
  "created_at": "2016-05-17T20:23:15+00:00",
  "updated_at": "2016-05-17T20:23:15+00:00",
  "deleted_at": null,
  "response_condition": ""
}
PUT /service/service_id/version/version/logging/bigquery/old_name

Update the BigQuery for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Parameters
parameter type description
old_name string

Old name of the BigQuery object (used to select the correct BigQuery object if the name has been changed).

Request Example
PUT /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/bigquery/my_bigquery_logging HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=my_new_bigquery_name
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "name": "my_new_bigquery_logging",
  "format": "{\n \"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S%z}t\",\n  \"time_elapsed\":%{time.elapsed.usec}V,\n  \"is_tls\":%{if(req.is_ssl, \"true\", \"false\")}V,\n  \"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\n  \"geo_city\":\"%{client.geo.city}V\",\n  \"geo_country_code\":\"%{client.geo.country_code}V\",\n  \"request\":\"%{req.request}V\",\n  \"host\":\"%{req.http.Fastly-Orig-Host}V\",\n  \"url\":\"%{cstr_escape(req.url)}V\",\n  \"request_referer\":\"%{cstr_escape(req.http.Referer)}V\",\n  \"request_user_agent\":\"%{cstr_escape(req.http.User-Agent)}V\",\n  \"request_accept_language\":\"%{cstr_escape(req.http.Accept-Language)}V\",\n  \"request_accept_charset\":\"%{cstr_escape(req.http.Accept-Charset)}V\",\n  \"cache_status\":\"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\\\2\\\\3\") }V\"\n}",
  "user": "fastly-bigquery-log@example-fastly-log.iam.gserviceaccount.com",
  "project_id": "example-fastly-log",
  "dataset": "fastly_log_test",
  "table": "fastly_logs",
  "secret_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC7bPG9yaIYd5A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O38aU+1/gWnDiOOnKVq0DXhAiaOzD1P\nqAG6hZlEkFBDMPWzq62doKv+gPgpRkfmV0DenHuYnGrrHdG3p2IxYoCSuq/QupPA\nPpU+xjDMhpQI30zuu4/rQq+/yDl4+aoSKYB3xAtb0Zxg6dMU8QpZ/hmnAoGBAIFu\nIesbcQR7O8FGkMrmxZweNNrYCtQ57R/WU/FImWm6OnJGNmsMO6Q2jJiT12RKKjg8\nOxrYGz7vTfOIDOddyAiPhXPUSyyF/3uvCrIzUUsmeeUJ8xq9dVwQ5HS3pYuKVfDg\nXYHbG4w9UJaF1A+3xEdUsYglSLouo7z/67zH9tZXAoGBAKpsdjSd3R+llaAv2HQ8\nGMlN92UTr5i9w++QMXq4qspH5NEYqz3NHbKuYthZqxEsRUZbRP50eDWU4jvxFVJl\nLBFINp6B+3AsIme0YCyOaleB/Cy0347miSinSv2I6QiH6dQxHdHzrG+x1evS/76f\nKT0KS+ySjCAEWgg4v+mjUDUV\n-----END PRIVATE KEY-----\n",
  "created_at": "2016-05-17T20:23:15+00:00",
  "updated_at": "2016-05-17T20:23:15+00:00",
  "deleted_at": null,
  "response_condition": ""
}
DELETE /service/service_id/version/version/logging/bigquery/name

Delete the BigQuery Logging for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
DELETE /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/bigquery/my_bigquery_logging HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "status": "ok"
}

GCS Logging

Fastly will upload log messages to the GCS bucket, and in the format, specified in the GCS object.

Fields

field type description
bucket_name string

The bucket of the GCS bucket.

created_at string

Time-stamp (GMT) when the endpoint was created.

deleted_at string

Time-stamp (GMT) when the endpoint was deleted.

format string

Apache style log formatting (defaults to '%h %l %u %t "%r" %>s %b').

format_version integer

The version of the custom logging format used for the configured endpoint. Can be either 1 (the default, version 1 log format) or 2 (the version 2 log format).

gzip_level integer

What level of GZIP encoding to have when dumping logs (default 0, no compression).

message_type string

How the message should be formatted One of:

classic -

(default) RFC 3164 syslog prefix.

loggly -

RFC 5424 structured syslog.

logplex -

Heroku-style length prefixed syslog.

blank -

No prefix. Useful for writing JSON and CSV.

name string

The name of the GCS logging endpoint. Used as a primary key for API access.

path string

The path to upload logs to (default "/").

period integer

How frequently the logs should be dumped (in seconds, default 3600).

placement string

Where in the generated VCL the logging call should be placed.

response_condition string

When to execute the GCS logging rule. If empty, always execute.

secret_key string

Your GCS account secret key. The private_key field in your service account authentication JSON.

service_id string

The alphanumeric string identifying a service.

timestamp_format string

strftime specified timestamp formatting (default "%Y-%m-%dT%H:%M:%S.000").

updated_at string

Time-stamp (GMT) when the endpoint was updated.

user string

Your GCS service account email address. The client_email field in your service account authentication JSON.

version integer

The current version of a service.

Actions

GET /service/service_id/version/version/logging/gcs

List all of the GCSs for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/gcs HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
[
  {
    "bucket_name": "my_log_bucket",
    "created_at": "2016-05-17T20:23:15+00:00",
    "deleted_at": null,
    "format": "%h %l %u %t \"%r\" %>s %b",
    "format_version": "1",
    "gzip_level": 0,
    "message_type": "classic",
    "name": "my_gcs_logging",
    "path": null,
    "period": "3600",
    "placement": null,
    "response_condition": "",
    "secret_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC7bPG9yaIYd5AL\nmvOaYvNozFJB/VWS53KWBll769kJvlmgMks6r6Xrv8w6rjxWKjZeDrnXVf7UDa0F\nckPPIFvXRxahftWFMGArw0lIvQzgT4/BlndXU5RNxfah/8m7q/GIF6oNYWzfJwvv\nzodxDUqIRH2e2JWidNRjElHuogYHLhV4O/od5pAkfDwak/ihuuh/2VA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MrmxZweNNrYCtQ57R/WU/FImWm6OnJGNmsMO6Q2jJiT12RKKjg8\nOxrYGz7vTfOIDOddyAiPhXPUSyyF/3uvCrIzUUsmeeUJ8xq9dVwQ5HS3pYuKVfDg\nXYHbG4w9UJaF1A+3xEdUsYglSLouo7z/67zH9tZXAoGBAKpsdjSd3R+llaAv2HQ8\nGMlN92UTr5i9w++QMXq4qspH5NEYqz3NHbKuYthZqxEsRUZbRP50eDWU4jvxFVJl\nLBFINp6B+3AsIme0YCyOaleB/Cy0347miSinSv2I6QiH6dQxHdHzrG+x1evS/76f\nKT0KS+ySjCAEWgg4v+mjUDUV\n-----END PRIVATE KEY-----\n",
    "service_id": "SU1Z0isxPaozGVKXdv0eY",
    "timestamp_format": "%Y-%m-%dT%H:%M:%S.000",
    "updated_at": "2016-05-17T20:23:15+00:00",
    "user": null,
    "version": "1"
  }
]
GET /service/service_id/version/version/logging/gcs/name

Get the GCS Logging for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/gcs/my_gcs_logging HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "bucket_name": "my_log_bucket",
  "created_at": "2016-05-17T20:23:15+00:00",
  "deleted_at": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "gzip_level": 0,
  "message_type": "classic",
  "name": "my_gcs_logging",
  "path": null,
  "period": "3600",
  "placement": null,
  "response_condition": "",
  "secret_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC7bPG9yaIYd5AL\nmvOaYvNozFJB/VWS53KWBll769kJvlmgMks6r6Xrv8w6rjxWKjZeDrnXVf7UDa0F\nckPPIFvXRxahftWFMGArw0lIvQzgT4/BlndXU5RNxfah/8m7q/GIF6oNYWzfJwvv\nzodxDUqIRH2e2JWidN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MU8QpZ/hmnAoGBAIFu\nIesbcQR7O8FGkMrmxZweNNrYCtQ57R/WU/FImWm6OnJGNmsMO6Q2jJiT12RKKjg8\nOxrYGz7vTfOIDOddyAiPhXPUSyyF/3uvCrIzUUsmeeUJ8xq9dVwQ5HS3pYuKVfDg\nXYHbG4w9UJaF1A+3xEdUsYglSLouo7z/67zH9tZXAoGBAKpsdjSd3R+llaAv2HQ8\nGMlN92UTr5i9w++QMXq4qspH5NEYqz3NHbKuYthZqxEsRUZbRP50eDWU4jvxFVJl\nLBFINp6B+3AsIme0YCyOaleB/Cy0347miSinSv2I6QiH6dQxHdHzrG+x1evS/76f\nKT0KS+ySjCAEWgg4v+mjUDUV\n-----END PRIVATE KEY-----\n",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "timestamp_format": "%Y-%m-%dT%H:%M:%S.000",
  "updated_at": "2016-05-17T20:23:15+00:00",
  "user": null,
  "version": "1"
}
POST /service/service_id/version/version/logging/gcs

Create GCS Logging for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
POST /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/gcs HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=my_gcs_logging&bucket_name=my_log_bucket&access_key=1447182772-deadbeef479374nnphvhodh4nlp@developer.gserviceaccount.com&secret_key=-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC7bPG9yaIYd5AL\nmvOaYvNozFJB/VWS53KWBll769kJvlmgMks6r6Xrv8w6rjxWKjZeDrnXVf7UDa0F\nckPPIFvXRxahftWFMGArw0lIvQzgT4/BlndXU5RNxfah/8m7q/GIF6oNYWzfJwvv\nzodxDUqIRH2e2JWidNRjElHuogYHLhV4O/od5pAkfDwak/ihuuh/2VA3Auwb3nph\ndX2F0JBs14oPKZUTYUUSzUQY5IMxSxYUA4Q7W4v21x1EnJt+biX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TfOIDOddyAiPhXPUSyyF/3uvCrIzUUsmeeUJ8xq9dVwQ5HS3pYuKVfDg\nXYHbG4w9UJaF1A+3xEdUsYglSLouo7z/67zH9tZXAoGBAKpsdjSd3R+llaAv2HQ8\nGMlN92UTr5i9w++QMXq4qspH5NEYqz3NHbKuYthZqxEsRUZbRP50eDWU4jvxFVJl\nLBFINp6B+3AsIme0YCyOaleB/Cy0347miSinSv2I6QiH6dQxHdHzrG+x1evS/76f\nKT0KS+ySjCAEWgg4v+mjUDUV\n-----END PRIVATE KEY-----\n
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "bucket_name": "my_log_bucket",
  "created_at": "2016-05-17T20:23:15+00:00",
  "deleted_at": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "gzip_level": 0,
  "message_type": "classic",
  "name": "my_gcs_logging",
  "path": null,
  "period": "3600",
  "placement": null,
  "response_condition": "",
  "secret_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC7bPG9yaIYd5AL\nmvOaYvNozFJB/VWS53KWBll769kJvlmgMks6r6Xrv8w6rjxWKjZeDrnXVf7UDa0F\nckPPIFvXRxahftWFMGArw0lIvQzgT4/BlndXU5RNxfah/8m7q/GIF6oNYWzfJwvv\nzodxDUqIRH2e2JWidNRjElHuogYHLhV4O/od5pAkfDwak/ihuuh/2VA3Auwb3nph\ndX2F0JBs14oPKZUTYUUSzUQY5IMxSxYUA4Q7W4v21x1EnJt+biXOrERk1rm4ieEE\nU3WkjR5c5gvG8xcWyYod87RNFELmIhCCytI1+t5C3Em/jPsQFtLzwHpbNhdW4oEm\nn7d06n75AgMBAAECggEAWRh26lNZfOwJS5sDRlbXgu/uAnSdI1JmxC6Mhz4cVGdq\nT57Y6DLrWuA4A4UkJYm3gorZiSXWF5PQthAVb/bf8bxXY7nZYpEWhnc09SD5aAAq\nREp0vMx8aWQ709K2YUJg+zDUo7u2d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zrG+x1evS/76f\nKT0KS+ySjCAEWgg4v+mjUDUV\n-----END PRIVATE KEY-----\n",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "timestamp_format": "%Y-%m-%dT%H:%M:%S.000",
  "updated_at": "2016-05-17T20:23:15+00:00",
  "user": null,
  "version": "1"
}
PUT /service/service_id/version/version/logging/gcs/old_name

Update the GCS for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Parameters
parameter type description
old_name string

Old name of the GCS object (used to select the correct GCS object if the name has been changed).

Request Example
PUT /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/gcs/my_gcs_logging HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=my_new_gcs_name
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "name": "my_new_gcs_name",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "version": "1",
  "bucket_name": "my_log_bucket",
  "user": "1447182772-deadbeef479374nnphvhodh4nlp@developer.gserviceaccount.com",
  "secret_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC7bPG9yaIYd5AL\nmvOaYvNozFJB/VWS53KWBll769kJvlmgMks6r6Xrv8w6rjxWKjZeDrnXVf7UDa0F\nckPPIFvXRxahftWFMGArw0lIvQzgT4/BlndXU5RNxfah/8m7q/GIF6oNYWzfJwvv\nzodxDUqIRH2e2JWidNRjElHuogYHLhV4O/od5pAkfDwak/ihuuh/2VA3Auwb3nph\ndX2F0JBs14oPKZUTYUUSzUQY5IMxSxYUA4Q7W4v21x1EnJt+biXOrERk1rm4ieEE\nU3WkjR5c5gvG8xcWyYod87RNFELmIhCCytI1+t5C3Em/jPsQFtLzwHpbNhdW4oEm\nn7d06n75AgMBAAECggEAWRh26lNZfOwJS5sDRlbXgu/uAnSdI1JmxC6Mhz4cVGdq\nT57Y6DLrWuA4A4UkJYm3gorZiSXWF5P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50eDWU4jvxFVJl\nLBFINp6B+3AsIme0YCyOaleB/Cy0347miSinSv2I6QiH6dQxHdHzrG+x1evS/76f\nKT0KS+ySjCAEWgg4v+mjUDUV\n-----END PRIVATE KEY-----\n",
  "path": "",
  "response_condition": "",
  "format": "%h %l %u %t \"%r\" %>s %b",
  "timestamp_format": "%Y-%m-%dT%H:%M:%S.000"
}
DELETE /service/service_id/version/version/logging/gcs/name

Delete the GCS Logging for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
DELETE /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/gcs/my_gcs_logging HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "status": "ok"
}

Logshuttle

Fastly will upload log messages to the log-shuttle bucket, and in the format, specified in the logshuttle object.

Fields

field type description
created_at string

Time-stamp (GMT) when the endpoint was created.

deleted_at string

Time-stamp (GMT) when the endpoint was deleted.

format string

Apache style log formatting.

format_version integer

The version of the custom logging format used for the configured endpoint. Can be either 1 (the default, version 1 log format) or 2 (the version 2 log format).

name string

The name of the Log Shuttle rule.

placement string

Where in the generated VCL the logging call should be placed.

response_condition string

When to execute the logshuttle. If empty, always execute.

service_id string

The alphanumeric string identifying a service.

token string

The data authentication token associated with this endpoint.

updated_at string

Time-stamp (GMT) when the endpoint was updated.

url string

Your Log Shuttle endpoint url.

version integer

The current version of a service.

Actions

GET /service/service_id/version/version/logging/logshuttle

List all of the logshuttles for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/logshuttle HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
[
  {
    "created_at": "2016-06-02T22:31:06+00:00",
    "deleted_at": null,
    "format": "%h %l %u %t \"%r\" %>s %b",
    "format_version": 1,
    "name": "test-logshuttle",
    "placement": null,
    "response_condition": "",
    "service_id": "SU1Z0isxPaozGVKXdv0eY",
    "token": null,
    "updated_at": "2016-06-02T22:31:06+00:00",
    "url": "https://east.logplex.io/logs",
    "version": "1"
  }
]
GET /service/service_id/version/version/logging/logshuttle/name

Get the logshuttle for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/logshuttle/test-logshuttle HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "created_at": "2016-06-02T22:31:06+00:00",
  "deleted_at": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": 1,
  "name": "test-logshuttle",
  "placement": null,
  "response_condition": "",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "token": null,
  "updated_at": "2016-06-02T22:31:06+00:00",
  "url": "https://east.logplex.io/logs",
  "version": "1"
}
POST /service/service_id/version/version/logging/logshuttle

Create a logshuttle for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
POST /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/logshuttle HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=test-logshuttle \
     &app_name=t.abc123 \
     &url=https%3A%2F%2Feast.logplex.io%2Flogs
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "created_at": "2016-06-02T22:31:06+00:00",
  "deleted_at": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": 1,
  "name": "test-logshuttle",
  "placement": null,
  "response_condition": "",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "token": null,
  "updated_at": "2016-06-02T22:31:06+00:00",
  "url": "https://east.logplex.io/logs",
  "version": "1"
}
PUT /service/service_id/version/version/logging/logshuttle/old_name

Update the logshuttle for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Parameters
parameter type description
old_name string

Old name of the logshuttle object (used to select the correct logshuttle object if the name has been changed).

Request Example
PUT /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/logshuttle/test-logshuttle HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=updated-test-logshuttle
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "created_at": "2016-06-02T22:31:06+00:00",
  "deleted_at": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": 1,
  "name": "updated-test-logshuttle",
  "placement": null,
  "response_condition": "",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "token": null,
  "updated_at": "2016-06-02T22:31:06+00:00",
  "url": "https://east.logplex.io/logs",
  "version": "1"
}
DELETE /service/service_id/version/version/logging/logshuttle/name

Delete the logshuttle for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
DELETE /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/logshuttle/test-logshuttle HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "status": "ok"
}

Logentries

Fastly will stream log messages to the Logentries account, and in the format specified in the Logentries object.

Fields

field type description
created_at string

Time-stamp (GMT) when the endpoint was created.

deleted_at string

Time-stamp (GMT) when the endpoint was deleted.

format string

Apache style log formatting.

format_version integer

The version of the custom logging format used for the configured endpoint. Can be either 1 (the default, version 1 log format) or 2 (the version 2 log format).

name string

The name of the logentries rule.

placement string

Where in the generated VCL the logging call should be placed.

port integer

The port number.

response_condition string

When to execute the logentry. If empty, always execute.

service_id string

The alphanumeric string identifying a service.

token string

Use token based authentication (https://logentries.com/doc/input-token/).

updated_at string

Time-stamp (GMT) when the endpoint was updated.

use_tls boolean

Whether to use TLS for secure logging.

version integer

The current version of a service.

Actions

GET /service/service_id/version/version/logging/logentries

List all of the Logentries for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/logentries HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
[
  {
    "created_at": "2016-05-18T18:23:29+00:00",
    "deleted_at": null,
    "format": "%h %l %u %t \"%r\" %>s %b",
    "format_version": "1",
    "name": "test-logentries",
    "placement": null,
    "port": "5140",
    "response_condition": "",
    "service_id": "SU1Z0isxPaozGVKXdv0eY",
    "token": "790545ca-a792-4166-be69-970d1308512d",
    "updated_at": "2016-05-18T18:23:29+00:00",
    "use_tls": "0",
    "version": "1"
  }
]
GET /service/service_id/version/version/logging/logentries/name

Get the Logentry for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/logentries/test-logentries HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "created_at": "2016-05-18T18:23:29+00:00",
  "deleted_at": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "name": "test-logentries",
  "placement": null,
  "port": "5140",
  "response_condition": "",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "token": "790545ca-a792-4166-be69-970d1308512d",
  "updated_at": "2016-05-18T18:23:29+00:00",
  "use_tls": "0",
  "version": "1"
}
POST /service/service_id/version/version/logging/logentries

Create a Logentry for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
POST /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/logentries HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=test-logentries&port=5140&token=790545ca-a792-4166-be69-970d1308512d
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "created_at": "2016-05-18T18:23:29+00:00",
  "deleted_at": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "name": "test-logentries",
  "placement": null,
  "port": "5140",
  "response_condition": "",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "token": "790545ca-a792-4166-be69-970d1308512d",
  "updated_at": "2016-05-18T18:23:29+00:00",
  "use_tls": "0",
  "version": "1"
}
PUT /service/service_id/version/version/logging/logentries/old_name

Update the Logentry for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Parameters
parameter type description
old_name string

Old name of the Logentry object (used to select the correct Logentry object if the name has been changed).

Request Example
PUT /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/logentries/test-logentries HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=updated-test-logentries
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "created_at": "2016-05-18T18:23:29+00:00",
  "deleted_at": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "name": "updated-test-logentries",
  "placement": null,
  "port": "5140",
  "response_condition": "",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "token": "790545ca-a792-4166-be69-970d1308512d",
  "updated_at": "2016-05-18T18:23:29+00:00",
  "use_tls": "0",
  "version": "1"
}
DELETE /service/service_id/version/version/logging/logentries/name

Delete the Logentry for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
DELETE /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/logentries/test-logentries HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "status": "ok"
}

Loggly

Fastly will stream log messages to the Loggly account, and in the format specified in the Loggly object. This feature is part of a limited availability release. For more information, see our product and feature life cycle descriptions. If you would like to try it, please contact support@fastly.com.

Fields

field type description
name string

The name of the loggly rule.

format string

Apache style log formatting.

format_version integer

The version of the custom logging format used for the configured endpoint. Can be either 1 (the default, version 1 log format) or 2 (the version 2 log format).

token string

The token to use for authentication (https://www.loggly.com/docs/customer-token-authentication-token/).

response_condition string

When to execute the loggly. If empty, always execute.

placement string

Where in the generated VCL the logging call should be placed.

Actions

GET /service/service_id/version/version/logging/loggly/name

Get the Loggly for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/loggly/test-loggly HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "name": "test-loggly",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "version": "1",
  "response_condition": "",
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "token": "deadbeef",
  "placement": null
}
GET /service/service_id/version/version/logging/loggly

List all of the Logglies for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/loggly HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
[
{
  "name": "test-loggly",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "version": "1",
  "response_condition": "",
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "token": "deadbeef",
  "placement": null
}
]
POST /service/service_id/version/version/logging/loggly

Create a Loggly for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
POST /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/loggly HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=test-loggly&token=deadbeef
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "name": "test-loggly",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "version": "1",
  "response_condition": "",
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "token": "deadbeef",
  "placement": null
}
PUT /service/service_id/version/version/logging/loggly/old_name

Update the Loggly for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
PUT /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/loggly/test-loggly HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=updated-loggly
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "name": "updated-loggly",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "version": "1",
  "response_condition": "",
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "token": "deadbeef",
  "placement": null
}
DELETE /service/service_id/version/version/logging/loggly/name

Delete the Loggly for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
DELETE /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/loggly/test-loggly HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "status": "ok"
}

Heroku

Fastly will stream log messages to the Heroku account, and in the format specified in the Heroku object. This feature is part of a limited availability release. For more information, see our product and feature life cycle descriptions. If you would like to try it, please contact support@fastly.com.

Fields

field type description
name string

The name of the heroku rule.

format string

Apache style log formatting.

format_version integer

The version of the custom logging format used for the configured endpoint. Can be either 1 (the default, version 1 log format) or 2 (the version 2 log format).

placement string

Where in the generated VCL the logging call should be placed.

token string

The token to use for authentication (https://devcenter.heroku.com/articles/add-on-provider-log-integration).

url string

The url to stream logs to.

response_condition string

When to execute the heroku. If empty, always execute.

Actions

GET /service/service_id/version/version/logging/heroku/name

Get the Heroku for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/heroku/test-heroku HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "name": "test-heroku",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "version": "1",
  "response_condition": "",
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "placement": null,
  "token": "deadbeef",
  "url": "https://1.us.logplex.io/logs"
}
GET /service/service_id/version/version/logging/heroku

List all of the Herokus for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/heroku HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
[
{
  "name": "test-heroku",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "version": "1",
  "response_condition": "",
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "placement": null,
  "token": "deadbeef",
  "url": "https://1.us.logplex.io/logs"
}
]
POST /service/service_id/version/version/logging/heroku

Create a Heroku for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
POST /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/heroku HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=test-heroku&token=deadbeef&url=https://1.us.logplex.io/logs
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "name": "test-heroku",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "version": "1",
  "response_condition": "",
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "placement": null,
  "token": "deadbeef",
  "url": "https://1.us.logplex.io/logs"
}
PUT /service/service_id/version/version/logging/heroku/old_name

Update the Heroku for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
PUT /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/heroku/test-heroku HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=updated-heroku
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "name": "updated-heroku",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "version": "1",
  "response_condition": "",
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "placement": null,
  "token": "deadbeef",
  "url": "https://1.us.logplex.io/logs"
}
DELETE /service/service_id/version/version/logging/heroku/name

Delete the Heroku for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
DELETE /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/heroku/test-heroku HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "status": "ok"
}

Openstack

Fastly will upload log messages to the OpenStack bucket, and in the format, specified in the openstack object.

Fields

field type description
access_key string

Your OpenStack account access key.

bucket_name string

The name of your OpenStack container.

created_at string

Time-stamp (GMT) when the endpoint was created.

deleted_at string

Time-stamp (GMT) when the endpoint was deleted.

format string

Apache style log formatting.

format_version integer

The version of the custom logging format used for the configured endpoint. Can be either 1 (the default, version 1 log format) or 2 (the version 2 log format).

gzip_level integer

What level of GZIP encoding to have when dumping logs (default 0, no compression).

message_type string

How the message should be formatted One of:

classic -

(default) RFC 3164 syslog prefix.

loggly -

RFC 5424 structured syslog.

logplex -

Heroku-style length prefixed syslog.

blank -

No prefix. Useful for writing JSON and CSV.

name string

The name of the OpenStack rule.

path string

The path to upload logs to.

period integer

How frequently the logs should be dumped (in seconds, default 3600).

placement string

Where in the generated VCL the logging call should be placed.

response_condition string

When to execute the openstack. If empty, always execute.

service_id string

The alphanumeric string identifying a service.

timestamp_format string

strftime specified timestamp formatting (default "%Y-%m-%dT%H:%M:%S.000").

updated_at string

Time-stamp (GMT) when the endpoint was updated.

url string

Your OpenStack auth url.

user string

The username for your OpenStack account.

version integer

The current version of a service.

Actions

GET /service/service_id/version/version/logging/openstack

List all of the openstacks for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/openstack HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
[
  {
    "access_key": "AKIAIOSFODNN7EXAMPLE",
    "bucket_name": "my_corporate_bucket",
    "created_at": "2016-06-03T21:33:16+00:00",
    "deleted_at": null,
    "format": "%h %l %u %t \"%r\" %>s %b",
    "format_version": "1",
    "gzip_level": "0",
    "message_type": "classic",
    "name": "test-openstack",
    "path": "",
    "period": "3600",
    "placement": null,
    "response_condition": "",
    "service_id": "SU1Z0isxPaozGVKXdv0eY",
    "timestamp_format": "%Y-%m-%dT%H:%M:%S.000",
    "updated_at": "2016-06-03T21:37:21+00:00",
    "url": "https://auth.storage.memset.com/v1.0",
    "user": "Openstack Username",
    "version": "1"
  }
]
GET /service/service_id/version/version/logging/openstack/name

Get the openstack for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/openstack/test-openstack HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "access_key": "AKIAIOSFODNN7EXAMPLE",
  "bucket_name": "my_corporate_bucket",
  "created_at": "2016-06-03T21:33:16+00:00",
  "deleted_at": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "gzip_level": "0",
  "message_type": "classic",
  "name": "test-openstack",
  "path": "",
  "period": "3600",
  "placement": null,
  "response_condition": "",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "timestamp_format": "%Y-%m-%dT%H:%M:%S.000",
  "updated_at": "2016-06-03T21:37:21+00:00",
  "url": "https://auth.storage.memset.com/v1.0",
  "user": "Openstack Username",
  "version": "1"
}
POST /service/service_id/version/version/logging/openstack

Create a openstack for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
POST /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/openstack HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=test-openstack \
     &bucket_name=my_corporate_bucket \
     &access_key=AKIAIOSFODNN7EXAMPLE \
     &secret_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "access_key": "AKIAIOSFODNN7EXAMPLE",
  "bucket_name": "my_corporate_bucket",
  "created_at": "2016-06-03T21:33:16+00:00",
  "deleted_at": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "gzip_level": "0",
  "message_type": "classic",
  "name": "test-openstack",
  "path": "",
  "period": "3600",
  "placement": null,
  "response_condition": "",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "timestamp_format": "%Y-%m-%dT%H:%M:%S.000",
  "updated_at": "2016-06-03T21:37:21+00:00",
  "url": "https://auth.storage.memset.com/v1.0",
  "user": "Openstack Username",
  "version": "1"
}
PUT /service/service_id/version/version/logging/openstack/old_name

Update the openstack for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Parameters
parameter type description
old_name string

Old name of the openstack object (used to select the correct openstack object if the name has been changed).

Request Example
PUT /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/openstack/test-openstack HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=updated-test-openstack
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "access_key": "AKIAIOSFODNN7EXAMPLE",
  "bucket_name": "my_corporate_bucket",
  "created_at": "2016-06-03T21:33:16+00:00",
  "deleted_at": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "gzip_level": "0",
  "message_type": "classic",
  "name": "updated-test-openstack",
  "path": "",
  "period": "3600",
  "placement": null,
  "response_condition": "",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "timestamp_format": "%Y-%m-%dT%H:%M:%S.000",
  "updated_at": "2016-06-03T21:37:21+00:00",
  "url": "https://auth.storage.memset.com/v1.0",
  "user": "Openstack Username",
  "version": "1"
}
DELETE /service/service_id/version/version/logging/openstack/name

Delete the openstack for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
DELETE /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/openstack/test-openstack HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "status": "ok"
}

Papertrail

Fastly will stream log messages to the Papertrail account, and in the format specified in the Papertrail object.

Fields

field type description
address string

An hostname or IPv4 address.

created_at string

Time-stamp (GMT) when the endpoint was created.

deleted_at string

Time-stamp (GMT) when the endpoint was deleted.

format string

Apache style log formatting.

format_version integer

The version of the custom logging format used for the configured endpoint. Can be either 1 (the default, version 1 log format) or 2 (the version 2 log format).

name string

The name of the papertrail rule.

placement string

Where in the generated VCL the logging call should be placed.

port integer

The port number.

response_condition string

When to execute the papertrail. If empty, always execute.

service_id string

The alphanumeric string identifying a service.

updated_at string

Time-stamp (GMT) when the endpoint was updated.

version integer

The current version of a service.

Actions

GET /service/service_id/version/version/logging/papertrail

List all of the Papertrails for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/papertrail HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
[
  {
    "address": "example.com",
    "created_at": "2016-05-18T18:51:50+00:00",
    "deleted_at": null,
    "format": "%h %l %u %t \"%r\" %>s %b",
    "format_version": "1",
    "hostname": "example.com",
    "name": "test-papertrail",
    "placement": null,
    "port": "5140",
    "response_condition": "",
    "service_id": "SU1Z0isxPaozGVKXdv0eY",
    "updated_at": "2016-05-18T18:51:50+00:00",
    "version": "1"
  }
]
GET /service/service_id/version/version/logging/papertrail/name

Get the Papertrail for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/papertrail/test-papertrail HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "address": "example.com",
  "created_at": "2016-05-18T18:51:50+00:00",
  "deleted_at": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "hostname": "example.com",
  "name": "test-papertrail",
  "placement": null,
  "port": "5140",
  "response_condition": "",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "updated_at": "2016-05-18T18:51:50+00:00",
  "version": "1"
}
POST /service/service_id/version/version/logging/papertrail

Create a Papertrail for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
POST /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/papertrail HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=test-papertrail&address=example.com
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "address": "example.com",
  "created_at": "2016-05-18T18:51:50+00:00",
  "deleted_at": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "hostname": "example.com",
  "name": "test-papertrail",
  "placement": null,
  "port": "5140",
  "response_condition": "",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "updated_at": "2016-05-18T18:51:50+00:00",
  "version": "1"
}
PUT /service/service_id/version/version/logging/papertrail/old_name

Update the Papertrail for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Parameters
parameter type description
old_name string

Old name of the Papertrail object (used to select the correct Papertrail object if the name has been changed).

Request Example
PUT /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/papertrail/test-papertrail HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=updated-test-papertrail
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "address": "example.com",
  "created_at": "2016-05-18T18:51:50+00:00",
  "deleted_at": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "hostname": "example.com",
  "name": "updated-test-papertrail",
  "placement": null,
  "port": "5140",
  "response_condition": "",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "updated_at": "2016-05-18T18:51:50+00:00",
  "version": "1"
}
DELETE /service/service_id/version/version/logging/papertrail/name

Delete the Papertrail for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
DELETE /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/papertrail/test-papertrail HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "status": "ok"
}

Scalyr

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

Fields

field type description
name string

The name of the scalyr rule.

format string

Apache style log formatting.

format_version integer

The version of the custom logging format used for the configured endpoint. Can be either 1 (the default, version 1 log format) or 2 (the version 2 log format).

token string

The token to use for authentication (https://www.scalyr.com/keys).

response_condition string

When to execute the scalyr. If empty, always execute.

placement string

Where in the generated VCL the logging call should be placed.

Actions

GET /service/service_id/version/version/logging/scalyr/name

Get the Scalyr for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/scalyr/test-scalyr HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "name": "test-scalyr",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "version": "1",
  "response_condition": "",
  "placement": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "token": "deadbeef"
}
GET /service/service_id/version/version/logging/scalyr

List all of the Scalyrs for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/scalyr HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
[
{
  "name": "test-scalyr",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "version": "1",
  "response_condition": "",
  "placement": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "token": "deadbeef"
}
]
POST /service/service_id/version/version/logging/scalyr

Create a Scalyr for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
POST /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/scalyr HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=test-scalyr&token=deadbeef&url=https://1.us.logplex.io/logs
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "name": "test-scalyr",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "version": "1",
  "response_condition": "",
  "placement": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "token": "deadbeef"
}
PUT /service/service_id/version/version/logging/scalyr/old_name

Update the Scalyr for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
PUT /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/scalyr/test-scalyr HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=updated-scalyr
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "name": "updated-scalyr",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "version": "1",
  "response_condition": "",
  "placement": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "token": "deadbeef"
}
DELETE /service/service_id/version/version/logging/scalyr/name

Delete the Scalyr for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
DELETE /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/scalyr/test-scalyr HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "status": "ok"
}

Sumologic

Fastly will POST messages to the Sumo Logic account, and in the format, specified in the Sumologic object.

Fields

field type description
created_at string

Time-stamp (GMT) when the endpoint was created.

deleted_at string

Time-stamp (GMT) when the endpoint was deleted.

format string

Apache style log formatting.

format_version integer

The version of the custom logging format used for the configured endpoint. Can be either 1 (the default, version 1 log format) or 2 (the version 2 log format).

message_type string

How the message should be formatted One of:

classic -

(default) RFC 3164 syslog prefix.

loggly -

RFC 5424 structured syslog.

logplex -

Heroku-style length prefixed syslog.

blank -

No prefix. Useful for writing JSON and CSV.

name string

The name of the sumologic rule.

placement string

Where in the generated VCL the logging call should be placed.

response_condition string

When to execute the sumologic. If empty, always execute.

url string

The URL to POST to.

version integer

The current version of a service.

Actions

GET /service/service_id/version/version/logging/sumologic

List all of the Sumologics for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/sumologic HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
[
  {
    "created_at": "2016-05-23T21:37:09+00:00",
    "deleted_at": null,
    "format": "%h %l %u %t \"%r\" %>s %b",
    "format_version": "1",
    "message_type": "classic",
    "name": "test-sumologic",
    "placement": null,
    "response_condition": "",
    "service_id": "SU1Z0isxPaozGVKXdv0eY",
    "updated_at": "2016-05-23T21:37:09+00:00",
    "url": "https://endpoint1.collection.us2.sumologic.com/receiver/v1/http/your_end_point_here",
    "version": "1"
  }
]
GET /service/service_id/version/version/logging/sumologic/name

Get the Sumologic for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/sumologic/test-sumologic HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "created_at": "2016-05-23T21:37:09+00:00",
  "deleted_at": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "message_type": "classic",
  "name": "test-sumologic",
  "placement": null,
  "response_condition": "",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "updated_at": "2016-05-23T21:37:09+00:00",
  "url": "https://endpoint1.collection.us2.sumologic.com/receiver/v1/http/your_end_point_here",
  "version": "1"
}
POST /service/service_id/version/version/logging/sumologic

Create a Sumologic for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
POST /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/sumologic HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=test-sumologic&url=https://sumologic.net/v1/http/your_end_point_here
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "created_at": "2016-05-23T21:37:09+00:00",
  "deleted_at": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "message_type": "classic",
  "name": "test-sumologic",
  "response_condition": "",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "updated_at": "2016-05-23T21:37:09+00:00",
  "url": "https://endpoint1.collection.us2.sumologic.com/receiver/v1/http/your_end_point_here",
  "version": "1"
}
PUT /service/service_id/version/version/logging/sumologic/old_name

Update the Sumologic for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Parameters
parameter type description
old_name string

Old name of the Sumologic object (used to select the correct Sumologic object if the name has been changed).

Request Example
PUT /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/sumologic/test-sumologic HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=updated-test-sumologic
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "created_at": "2016-05-23T21:37:09+00:00",
  "deleted_at": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": "1",
  "message_type": "classic",
  "name": "updated-test-sumologic",
  "response_condition": "",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "updated_at": "2016-05-23T21:37:09+00:00",
  "url": "https://endpoint1.collection.us2.sumologic.com/receiver/v1/http/your_end_point_here",
  "version": "1"
}
DELETE /service/service_id/version/version/logging/sumologic/name

Delete the Sumologic for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
DELETE /service/SU1Z0isxPaozGVKXdv0eY/version/1/logging/sumologic/test-sumologic HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "status": "ok"
}

Syslog

Fastly will stream log messages to the location, and in the format, specified in the Syslog object.

Fields

field type description
address string

A hostname or IPv4 address.

created_at string

Time-stamp (GMT) when the endpoint was created.

deleted_at string

Time-stamp (GMT) when the endpoint was deleted.

format string

Apache style log formatting.

format_version integer

The version of the custom logging format used for the configured endpoint. Can be either 1 (the default, version 1 log format) or 2 (the version 2 log format).

hostname string

The hostname used for the syslog endpoint.

ipv4 string

The IPv4 address used for the syslog endpoint.

message_type string

How the message should be formatted One of:

classic -

(default) RFC 3164 syslog prefix.

loggly -

RFC 5424 structured syslog.

logplex -

Heroku-style length prefixed syslog.

blank -

No prefix. Useful for writing JSON and CSV.

name string

The name of the syslog rule.

placement string

Where in the generated VCL the logging call should be placed.

port integer

The port number.

response_condition string

When to execute the syslog. If empty, always execute.

service_id string

The alphanumeric string identifying a service.

tls_ca_cert string

A secure certificate to authenticate the server with.

tls_hostname string

Used during the TLS handshake to validate the certificate.

token string

Whether to prepend each message with a specific token.

updated_at string

Time-stamp (GMT) when the endpoint was updated.

use_tls boolean

Whether to use TLS for secure logging.

version integer

The current version of a service.

Actions

GET /service/service_id/version/version/syslog

List all of the Syslogs for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/syslog HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
[
  {
    "address": "example.com",
    "created_at": "2016-05-26T16:41:38+00:00",
    "deleted_at": null,
    "format": "%h %l %u %t \"%r\" %>s %b",
    "format_version": 1,
    "hostname": "example.com",
    "ipv4": null,
    "message_type": "classic",
    "name": "test-syslog",
    "placement": null,
    "port": "514",
    "response_condition": "",
    "service_id": "SU1Z0isxPaozGVKXdv0eY",
    "tls_ca_cert": null,
    "tls_hostname": null,
    "token": null,
    "updated_at": "2016-05-26T16:41:38+00:00",
    "use_tls": "0",
    "version": "1"
  }
]
GET /service/service_id/version/version/syslog/name

Get the Syslog for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
GET /service/SU1Z0isxPaozGVKXdv0eY/version/1/syslog/test-syslog HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "address": "example.com",
  "created_at": "2016-05-26T16:41:38+00:00",
  "deleted_at": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": 1,
  "hostname": "example.com",
  "ipv4": null,
  "message_type": "classic",
  "name": "test-syslog",
  "placement": null,
  "port": "514",
  "response_condition": "",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "tls_ca_cert": null,
  "tls_hostname": null,
  "token": null,
  "updated_at": "2016-05-26T16:41:38+00:00",
  "use_tls": "0",
  "version": "1"
}
POST /service/service_id/version/version/syslog

Create a Syslog for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
POST /service/SU1Z0isxPaozGVKXdv0eY/version/1/syslog HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=test-syslog&address=example.com
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "address": "example.com",
  "created_at": "2016-05-26T16:41:38+00:00",
  "deleted_at": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": 1,
  "hostname": "example.com",
  "ipv4": null,
  "message_type": "classic",
  "name": "test-syslog",
  "placement": null,
  "port": "514",
  "response_condition": "",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "tls_ca_cert": null,
  "tls_hostname": null,
  "token": null,
  "updated_at": "2016-05-26T16:41:38+00:00",
  "use_tls": "0",
  "version": "1"
}
PUT /service/service_id/version/version/syslog/old_name

Update the Syslog for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Parameters
parameter type description
old_name string

Old name of the Syslog object (used to select the correct Syslog object if the name has been changed).

Request Example
PUT /service/SU1Z0isxPaozGVKXdv0eY/version/1/syslog/test-syslog HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=updated-test-syslog
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "address": "example.com",
  "created_at": "2016-05-26T16:41:38+00:00",
  "deleted_at": null,
  "format": "%h %l %u %t \"%r\" %>s %b",
  "format_version": 1,
  "hostname": "example.com",
  "ipv4": null,
  "message_type": "classic",
  "name": "updated-test-syslog",
  "placement": null,
  "port": "514",
  "response_condition": "",
  "service_id": "SU1Z0isxPaozGVKXdv0eY",
  "tls_ca_cert": null,
  "tls_hostname": null,
  "token": null,
  "updated_at": "2016-05-26T16:41:38+00:00",
  "use_tls": "0",
  "version": "1"
}
DELETE /service/service_id/version/version/syslog/name

Delete the Syslog for a particular service and version

Authentication

API token of a user with at least Engineer permissions.

Request Example
DELETE /service/SU1Z0isxPaozGVKXdv0eY/version/1/syslog/test-syslog HTTP/1.1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
  "status": "ok"
}