---
title: "Get log schemas"
method: GET
path: "/log-schemas"
tags: ["log-schemas"]
---

# Get log schemas

`GET /log-schemas`

Returns all log schemas usable by an account.

## Response `200`

The call was successful.

- LogSchema[] — An array of log schemas.
  - `type` 'access' | 'cdn' | 'csp-reports' | 'custom' | 'pageviews' | 'events', required — The type of log being defined.
  - `display` 'CDN logs' | 'CSP reports' | 'Pageview logs' | 'Traffic viewer' | 'Event logs', required — Display name for the type of log being defined.
  - `default_order` string, required — Defines the default behavior for sorting logs based on log fields. Ties are broken with the next log fields described in the ordering.
  - `fields` Field[], required — An array of fields.
    - `name` string, required — The name of the field.
    - `type` Type, required — A log field type.
      - `name` 'address' | 'array' | 'byte-count' | 'correlation-id' | 'country-code' | 'duration' | 'enum' | 'host' | 'label' | 'path' | 'port' | 'query' | 'script' | 'status-code' | 'string' | 'timestamp' | 'url' | 'url-map-id' | 'web-control-id', required — Name of the type
      - `element_type` Type — recursive
      - `values` EnumValue[] — When a Field is of enum type, the enum's values will be defined.
        - `value` string, required — Value of an enum element.
        - `display` string, required — How an enum element should be displayed.
    - `display` string, required — Display name for the defined field type.
    - `description` string, required — A description of the field.
    - `is_metric` boolean, required — Indicates whether the field can be used in a groupselect.
    - `aliases` string[] — A collection of alternate names for the field.
  - `retention` union, required
    - Retention[] — Array of applications' Log retention.
      - `online_age` integer — Days logs will be retained online.
    - Retention — Log retention details.
      - `online_age` integer — Days logs will be retained online.

---

[API](https://skmtc.dev/webscale/apis/webscale-apis.md) · [All operations](https://skmtc.dev/webscale/apis/webscale-apis/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/webscale/webscale-apis/revisions/c98d872b50cb/schema)
