---
title: "Aggregate a dataset's spans"
description: "Aggregations of the dataset's spans whose start time is in [from, to) and that match every filter, grouped by up to two fields, per time bucket and in total. Functions: count, rate (count per second), countDistinct (approximate, uniqCombined), sum, avg, min, max, p50, p90, p95 and p99 (t-digest estimates), plus errors and errorRate (status error). Numeric fields are duration (nanoseconds) or span or resource attributes, parsed as numbers; spans whose value doesn't parse are skipped. Groups are ranked by the first aggregation's total; those past groupLimit add up into other, computed from their rows. Group values longer than 256 bytes are cut and the group is marked keyTruncated. A value is null where a group has no rows in a bucket, or no value parses. With no groupBy there is exactly one group. series false answers totals only (bucketSeconds null, starts empty). 422 query_too_expensive: narrow the time range or filters. 429 too_many_requests: too many console reads are running in the organization; retry after Retry-After. 503 source_unavailable: some of the data can't be read right now; there is never a partial answer. Not recorded in Trails; not idempotent and nothing is kept."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Observability API

`POST /v1/organizations/{orgId}/projects/{projectId}/obs/datasets/{datasetId}/traces/aggregate`

Aggregations of the dataset's spans whose start time is in [from, to) and that match every filter, grouped by up to two fields, per time bucket and in total. Functions: count, rate (count per second), countDistinct (approximate, uniqCombined), sum, avg, min, max, p50, p90, p95 and p99 (t-digest estimates), plus errors and errorRate (status error). Numeric fields are duration (nanoseconds) or span or resource attributes, parsed as numbers; spans whose value doesn't parse are skipped. Groups are ranked by the first aggregation's total; those past groupLimit add up into other, computed from their rows. Group values longer than 256 bytes are cut and the group is marked keyTruncated. A value is null where a group has no rows in a bucket, or no value parses. With no groupBy there is exactly one group. series false answers totals only (bucketSeconds null, starts empty). 422 query_too_expensive: narrow the time range or filters. 429 too_many_requests: too many console reads are running in the organization; retry after Retry-After. 503 source_unavailable: some of the data can't be read right now; there is never a partial answer. Not recorded in Trails; not idempotent and nothing is kept.

## Authentication

Requires one of the following:

- `apiKey`, http, header `Authorization`
- `oauth`, http, header `Authorization`
- `sessionCookie`, apiKey, in cookie

## Path parameters

- `AggregateSpans.path.orgId` (string, required)
  - format `uuid`
- `AggregateSpans.path.projectId` (string, required)
  - format `uuid`
- `AggregateSpans.path.datasetId` (string, required)
  - format `uuid`

## Request body

_Required._

- `AggregateSpans.aggregations` (array<object>, required)
  - `AggregateSpans.aggregations.fn` (unknown, required)
    - one of `"count"`, `"rate"`, `"countDistinct"`, `"sum"`, `"avg"`, `"min"`, `"max"`, `"p50"`, `"p90"`, `"p95"`, `"p99"`, `"errors"`, `"errorRate"`
  - `AggregateSpans.aggregations.field` (one of, optional)
    - one of: `string`, [AggregateAttributeField](/obs-api/schemas/AggregateAttributeField/)
- `AggregateSpans.from` (string, required) — UTC, millisecond precision: 2026-10-02T10:20:00.000Z.
  - format `date-time`
- `AggregateSpans.to` (string, required) — At most a day ahead; the window spans at most 400 days.
  - format `date-time`
- `AggregateSpans.bucketSeconds` (integer, optional) — Only with series. Rounded up to 10, 30, 60, 120, 300, 600, 1800, 3600, 7200, 10800, 21600, 43200 or 86400 seconds, and raised until the window has at most 1,440 buckets. Absent: chosen for at most 72.
  - min 1; max 86400
- `AggregateSpans.filters` (object, optional)
  - `AggregateSpans.filters.applications` (array<string>, optional)
    - minLength 1; maxLength 256
  - `AggregateSpans.filters.attributes` (array<object>, optional)
    - `AggregateSpans.filters.attributes.key` (string, required)
      - minLength 1; maxLength 256
    - `AggregateSpans.filters.attributes.op` (string, required) — notEquals: the key is absent, or holds another value. in: the key is present and holds one of values. notEquals and in are accepted once console reads are on (otherwise 400).
      - one of `"equals"`, `"notEquals"`, `"in"`, `"exists"`
    - `AggregateSpans.filters.attributes.scope` (string, optional) — record is the span's attributes; resource is its resource attributes.
      - one of `"record"`, `"resource"`; default `"record"`
    - `AggregateSpans.filters.attributes.value` (string, optional) — Required with equals and notEquals.
      - maxLength 1024
    - `AggregateSpans.filters.attributes.values` (array<string>, optional) — Required with in, and only with it.
      - maxLength 1024
  - `AggregateSpans.filters.kinds` (array<string>, optional)
    - one of `"unspecified"`, `"internal"`, `"server"`, `"client"`, `"producer"`, `"consumer"`
  - `AggregateSpans.filters.maxDurationNanos` (integer, optional)
    - min 0; max 9007199254740991
  - `AggregateSpans.filters.minDurationNanos` (integer, optional)
    - min 0; max 9007199254740991
  - `AggregateSpans.filters.rootOnly` (boolean, optional)
  - `AggregateSpans.filters.services` (array<string>, optional)
    - minLength 1; maxLength 256
  - `AggregateSpans.filters.spanNames` (array<string>, optional)
    - minLength 1; maxLength 256
  - `AggregateSpans.filters.statuses` (array<string>, optional)
    - one of `"unset"`, `"ok"`, `"error"`
  - `AggregateSpans.filters.traceId` (string, optional)
    - pattern `^[0-9a-fA-F]{32}$`
- `AggregateSpans.groupBy` (array<object>, optional)
  - `AggregateSpans.groupBy.field` (one of, required)
    - one of: `string`, [AggregateAttributeField](/obs-api/schemas/AggregateAttributeField/)
- `AggregateSpans.groupLimit` (integer, optional)
  - min 1; max 50; default `10`
- `AggregateSpans.series` (boolean, optional) — false: totals only.
  - default `true`

## Example request

```json
{
  "aggregations": [
    {
      "field": "string",
      "fn": "count"
    }
  ],
  "bucketSeconds": 1,
  "filters": {
    "applications": [
      "string"
    ],
    "attributes": [
      {
        "key": "string",
        "op": "equals",
        "scope": "record",
        "value": "string",
        "values": [
          "string"
        ]
      }
    ],
    "kinds": [
      "unspecified"
    ],
    "maxDurationNanos": 9007199254740991,
    "minDurationNanos": 9007199254740991,
    "rootOnly": true,
    "services": [
      "string"
    ],
    "spanNames": [
      "string"
    ],
    "statuses": [
      "unset"
    ],
    "traceId": "string"
  },
  "from": "2019-08-24T14:15:22Z",
  "groupBy": [
    {
      "field": "string"
    }
  ],
  "groupLimit": 10,
  "series": true,
  "to": "2019-08-24T14:15:22Z"
}
```

## Code samples

### cURL

```curl
curl --request POST \
  --url https://obs.ezghcloud.com/v1/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/obs/datasets/497f6eca-6276-4993-bfeb-53cbbbba6f08/traces/aggregate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "aggregations": [
    {
      "field": "string",
      "fn": "count"
    }
  ],
  "bucketSeconds": 1,
  "filters": {
    "applications": [
      "string"
    ],
    "attributes": [
      {
        "key": "string",
        "op": "equals",
        "scope": "record",
        "value": "string",
        "values": [
          "string"
        ]
      }
    ],
    "kinds": [
      "unspecified"
    ],
    "maxDurationNanos": 9007199254740991,
    "minDurationNanos": 9007199254740991,
    "rootOnly": true,
    "services": [
      "string"
    ],
    "spanNames": [
      "string"
    ],
    "statuses": [
      "unset"
    ],
    "traceId": "string"
  },
  "from": "2019-08-24T14:15:22Z",
  "groupBy": [
    {
      "field": "string"
    }
  ],
  "groupLimit": 10,
  "series": true,
  "to": "2019-08-24T14:15:22Z"
}
'
```

### TypeScript

```typescript
const url = 'https://obs.ezghcloud.com/v1/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/obs/datasets/497f6eca-6276-4993-bfeb-53cbbbba6f08/traces/aggregate';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    aggregations: [{field: 'string', fn: 'count'}],
    bucketSeconds: 1,
    filters: {
      applications: ['string'],
      attributes: [
        {
          key: 'string',
          op: 'equals',
          scope: 'record',
          value: 'string',
          values: ['string']
        }
      ],
      kinds: ['unspecified'],
      maxDurationNanos: 9007199254740991,
      minDurationNanos: 9007199254740991,
      rootOnly: true,
      services: ['string'],
      spanNames: ['string'],
      statuses: ['unset'],
      traceId: 'string'
    },
    from: '2019-08-24T14:15:22Z',
    groupBy: [{field: 'string'}],
    groupLimit: 10,
    series: true,
    to: '2019-08-24T14:15:22Z'
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://obs.ezghcloud.com/v1/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/obs/datasets/497f6eca-6276-4993-bfeb-53cbbbba6f08/traces/aggregate"

payload = {
    "aggregations": [
        {
            "field": "string",
            "fn": "count"
        }
    ],
    "bucketSeconds": 1,
    "filters": {
        "applications": ["string"],
        "attributes": [
            {
                "key": "string",
                "op": "equals",
                "scope": "record",
                "value": "string",
                "values": ["string"]
            }
        ],
        "kinds": ["unspecified"],
        "maxDurationNanos": 9007199254740991,
        "minDurationNanos": 9007199254740991,
        "rootOnly": True,
        "services": ["string"],
        "spanNames": ["string"],
        "statuses": ["unset"],
        "traceId": "string"
    },
    "from": "2019-08-24T14:15:22Z",
    "groupBy": [{ "field": "string" }],
    "groupLimit": 10,
    "series": True,
    "to": "2019-08-24T14:15:22Z"
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

The aggregations.

#### Example

```json
{
  "aggregations": [
    {}
  ],
  "bucketSeconds": 0,
  "groupBy": [
    "string"
  ],
  "groups": [
    {
      "key": {
        "property1": "string",
        "property2": "string"
      },
      "keyTruncated": true,
      "totals": [
        0
      ],
      "values": [
        [
          0
        ]
      ]
    }
  ],
  "groupsTruncated": true,
  "other": {
    "totals": [
      0
    ],
    "values": [
      [
        0
      ]
    ]
  },
  "percentiles": "tdigest",
  "source": {
    "rawFrom": "2019-08-24T14:15:22Z",
    "rollup": true
  },
  "starts": [
    "2019-08-24T14:15:22Z"
  ],
  "visibleThrough": {
    "lanes": [
      {
        "datasetId": "6586f21b-ad4d-4d06-a309-712af47184a2",
        "ingestedAt": "2019-08-24T14:15:22Z",
        "lane": 0
      }
    ],
    "token": "string"
  }
}
```

- `AggregateSpans.response.200.aggregations` (array<object>, required) — The aggregations, normalized, in request order.
- `AggregateSpans.response.200.bucketSeconds` (integer | null, required) — The bucket size used; null with series false.
- `AggregateSpans.response.200.groupBy` (array<string>, required) — Each groupBy field's label in a group's key: the well-known name, or record.<key> or resource.<key>.
- `AggregateSpans.response.200.groups` (array<object>, required)
  - `AggregateSpans.response.200.groups.key` (map<string>, required) — groupBy label to value; an absent attribute is empty.
  - `AggregateSpans.response.200.groups.keyTruncated` (boolean, required)
  - `AggregateSpans.response.200.groups.totals` (array<number | null>, required) — One value per aggregation, in request order; null where there are no rows or no value parses.
  - `AggregateSpans.response.200.groups.values` (array<array<number | null>>, required) — One entry per bucket (starts).
- `AggregateSpans.response.200.groupsTruncated` (boolean, required)
- `AggregateSpans.response.200.percentiles` (unknown, required)
- `AggregateSpans.response.200.source` (object, required) — How the answer was built: rollup false is from the records themselves.
  - `AggregateSpans.response.200.source.rollup` (boolean, required)
  - `AggregateSpans.response.200.source.rawFrom` (string, optional) — UTC, millisecond precision: 2026-10-02T10:20:00.000Z.
    - format `date-time`
- `AggregateSpans.response.200.starts` (array<string>, required) — Every bucket's start, epoch-aligned; the first and last may be partial.
  - format `date-time`
- `AggregateSpans.response.200.visibleThrough` (object, required)
  - `AggregateSpans.response.200.visibleThrough.lanes` (array<object>, required)
    - `AggregateSpans.response.200.visibleThrough.lanes.datasetId` (string, required)
      - format `uuid`
    - `AggregateSpans.response.200.visibleThrough.lanes.ingestedAt` (one of, required)
      - one of: [Instant](/obs-api/schemas/Instant/), `null`
    - `AggregateSpans.response.200.visibleThrough.lanes.lane` (integer, required)
  - `AggregateSpans.response.200.visibleThrough.token` (string, required) — Opaque: the accepted data this answer covers.
- `AggregateSpans.response.200.other` (object, optional) — Every group past groupLimit, added up. Present exactly when groupsTruncated.
  - `AggregateSpans.response.200.other.totals` (array<number | null>, required) — One value per aggregation, in request order; null where there are no rows or no value parses.
  - `AggregateSpans.response.200.other.values` (array<array<number | null>>, required)

### 400

invalid_request (with issues), invalid_cursor, or the endpoint's own 400 codes.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `AggregateSpans.response.400.error` (object, required)
  - `AggregateSpans.response.400.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `AggregateSpans.response.400.error.message` (string, required)
    - maxLength 1024
  - `AggregateSpans.response.400.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `AggregateSpans.response.400.error.issues.message` (string, required)
    - `AggregateSpans.response.400.error.issues.path` (string, required)
  - `AggregateSpans.response.400.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `AggregateSpans.response.400.error.quota.id` (string, required)
    - `AggregateSpans.response.400.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `AggregateSpans.response.400.error.quota.limit` (integer, required)
      - min 0
    - `AggregateSpans.response.400.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `AggregateSpans.response.400.error.quota.inFlight` (integer, optional)
      - min 0
    - `AggregateSpans.response.400.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `AggregateSpans.response.400.error.quota.region` (string, optional)
    - `AggregateSpans.response.400.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `AggregateSpans.response.400.error.quota.scopeResourceName` (string, optional)
    - `AggregateSpans.response.400.error.quota.used` (integer, optional)
      - min 0
    - `AggregateSpans.response.400.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 401

unauthenticated: no credential, or one that doesn't check out.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `AggregateSpans.response.401.error` (object, required)
  - `AggregateSpans.response.401.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `AggregateSpans.response.401.error.message` (string, required)
    - maxLength 1024
  - `AggregateSpans.response.401.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `AggregateSpans.response.401.error.issues.message` (string, required)
    - `AggregateSpans.response.401.error.issues.path` (string, required)
  - `AggregateSpans.response.401.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `AggregateSpans.response.401.error.quota.id` (string, required)
    - `AggregateSpans.response.401.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `AggregateSpans.response.401.error.quota.limit` (integer, required)
      - min 0
    - `AggregateSpans.response.401.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `AggregateSpans.response.401.error.quota.inFlight` (integer, optional)
      - min 0
    - `AggregateSpans.response.401.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `AggregateSpans.response.401.error.quota.region` (string, optional)
    - `AggregateSpans.response.401.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `AggregateSpans.response.401.error.quota.scopeResourceName` (string, optional)
    - `AggregateSpans.response.401.error.quota.used` (integer, optional)
      - min 0
    - `AggregateSpans.response.401.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 403

access_denied: the caller's policies don't allow the action; forbidden_origin: a cookie-authenticated write from an origin that isn't allowed; spend_limit_reached.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `AggregateSpans.response.403.error` (object, required)
  - `AggregateSpans.response.403.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `AggregateSpans.response.403.error.message` (string, required)
    - maxLength 1024
  - `AggregateSpans.response.403.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `AggregateSpans.response.403.error.issues.message` (string, required)
    - `AggregateSpans.response.403.error.issues.path` (string, required)
  - `AggregateSpans.response.403.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `AggregateSpans.response.403.error.quota.id` (string, required)
    - `AggregateSpans.response.403.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `AggregateSpans.response.403.error.quota.limit` (integer, required)
      - min 0
    - `AggregateSpans.response.403.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `AggregateSpans.response.403.error.quota.inFlight` (integer, optional)
      - min 0
    - `AggregateSpans.response.403.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `AggregateSpans.response.403.error.quota.region` (string, optional)
    - `AggregateSpans.response.403.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `AggregateSpans.response.403.error.quota.scopeResourceName` (string, optional)
    - `AggregateSpans.response.403.error.quota.used` (integer, optional)
      - min 0
    - `AggregateSpans.response.403.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 404

not_found: unknown, malformed, or in an organization the caller isn't in.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `AggregateSpans.response.404.error` (object, required)
  - `AggregateSpans.response.404.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `AggregateSpans.response.404.error.message` (string, required)
    - maxLength 1024
  - `AggregateSpans.response.404.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `AggregateSpans.response.404.error.issues.message` (string, required)
    - `AggregateSpans.response.404.error.issues.path` (string, required)
  - `AggregateSpans.response.404.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `AggregateSpans.response.404.error.quota.id` (string, required)
    - `AggregateSpans.response.404.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `AggregateSpans.response.404.error.quota.limit` (integer, required)
      - min 0
    - `AggregateSpans.response.404.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `AggregateSpans.response.404.error.quota.inFlight` (integer, optional)
      - min 0
    - `AggregateSpans.response.404.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `AggregateSpans.response.404.error.quota.region` (string, optional)
    - `AggregateSpans.response.404.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `AggregateSpans.response.404.error.quota.scopeResourceName` (string, optional)
    - `AggregateSpans.response.404.error.quota.used` (integer, optional)
      - min 0
    - `AggregateSpans.response.404.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 409

quota_exceeded (an allocation quota, with quota), idempotency_conflict, idempotency_in_progress (with Retry-After), organization_deletion_pending, operation_in_progress, or the endpoint's own 409 codes.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `AggregateSpans.response.409.error` (object, required)
  - `AggregateSpans.response.409.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `AggregateSpans.response.409.error.message` (string, required)
    - maxLength 1024
  - `AggregateSpans.response.409.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `AggregateSpans.response.409.error.issues.message` (string, required)
    - `AggregateSpans.response.409.error.issues.path` (string, required)
  - `AggregateSpans.response.409.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `AggregateSpans.response.409.error.quota.id` (string, required)
    - `AggregateSpans.response.409.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `AggregateSpans.response.409.error.quota.limit` (integer, required)
      - min 0
    - `AggregateSpans.response.409.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `AggregateSpans.response.409.error.quota.inFlight` (integer, optional)
      - min 0
    - `AggregateSpans.response.409.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `AggregateSpans.response.409.error.quota.region` (string, optional)
    - `AggregateSpans.response.409.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `AggregateSpans.response.409.error.quota.scopeResourceName` (string, optional)
    - `AggregateSpans.response.409.error.quota.used` (integer, optional)
      - min 0
    - `AggregateSpans.response.409.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 413

payload_too_large: the body is over the endpoint's limit (1 MiB unless it says otherwise).

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `AggregateSpans.response.413.error` (object, required)
  - `AggregateSpans.response.413.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `AggregateSpans.response.413.error.message` (string, required)
    - maxLength 1024
  - `AggregateSpans.response.413.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `AggregateSpans.response.413.error.issues.message` (string, required)
    - `AggregateSpans.response.413.error.issues.path` (string, required)
  - `AggregateSpans.response.413.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `AggregateSpans.response.413.error.quota.id` (string, required)
    - `AggregateSpans.response.413.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `AggregateSpans.response.413.error.quota.limit` (integer, required)
      - min 0
    - `AggregateSpans.response.413.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `AggregateSpans.response.413.error.quota.inFlight` (integer, optional)
      - min 0
    - `AggregateSpans.response.413.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `AggregateSpans.response.413.error.quota.region` (string, optional)
    - `AggregateSpans.response.413.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `AggregateSpans.response.413.error.quota.scopeResourceName` (string, optional)
    - `AggregateSpans.response.413.error.quota.used` (integer, optional)
      - min 0
    - `AggregateSpans.response.413.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 422

query_too_expensive.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `AggregateSpans.response.422.error` (object, required)
  - `AggregateSpans.response.422.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `AggregateSpans.response.422.error.message` (string, required)
    - maxLength 1024
  - `AggregateSpans.response.422.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `AggregateSpans.response.422.error.issues.message` (string, required)
    - `AggregateSpans.response.422.error.issues.path` (string, required)
  - `AggregateSpans.response.422.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `AggregateSpans.response.422.error.quota.id` (string, required)
    - `AggregateSpans.response.422.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `AggregateSpans.response.422.error.quota.limit` (integer, required)
      - min 0
    - `AggregateSpans.response.422.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `AggregateSpans.response.422.error.quota.inFlight` (integer, optional)
      - min 0
    - `AggregateSpans.response.422.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `AggregateSpans.response.422.error.quota.region` (string, optional)
    - `AggregateSpans.response.422.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `AggregateSpans.response.422.error.quota.scopeResourceName` (string, optional)
    - `AggregateSpans.response.422.error.quota.used` (integer, optional)
      - min 0
    - `AggregateSpans.response.422.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 429

too_many_requests, with Retry-After; or quota_exceeded (a rate, usage or concurrency quota, with quota), never with Retry-After.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `AggregateSpans.response.429.error` (object, required)
  - `AggregateSpans.response.429.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `AggregateSpans.response.429.error.message` (string, required)
    - maxLength 1024
  - `AggregateSpans.response.429.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `AggregateSpans.response.429.error.issues.message` (string, required)
    - `AggregateSpans.response.429.error.issues.path` (string, required)
  - `AggregateSpans.response.429.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `AggregateSpans.response.429.error.quota.id` (string, required)
    - `AggregateSpans.response.429.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `AggregateSpans.response.429.error.quota.limit` (integer, required)
      - min 0
    - `AggregateSpans.response.429.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `AggregateSpans.response.429.error.quota.inFlight` (integer, optional)
      - min 0
    - `AggregateSpans.response.429.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `AggregateSpans.response.429.error.quota.region` (string, optional)
    - `AggregateSpans.response.429.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `AggregateSpans.response.429.error.quota.scopeResourceName` (string, optional)
    - `AggregateSpans.response.429.error.quota.used` (integer, optional)
      - min 0
    - `AggregateSpans.response.429.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 500

internal_error: a bug; the details are in the logs, under the request ID.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `AggregateSpans.response.500.error` (object, required)
  - `AggregateSpans.response.500.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `AggregateSpans.response.500.error.message` (string, required)
    - maxLength 1024
  - `AggregateSpans.response.500.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `AggregateSpans.response.500.error.issues.message` (string, required)
    - `AggregateSpans.response.500.error.issues.path` (string, required)
  - `AggregateSpans.response.500.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `AggregateSpans.response.500.error.quota.id` (string, required)
    - `AggregateSpans.response.500.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `AggregateSpans.response.500.error.quota.limit` (integer, required)
      - min 0
    - `AggregateSpans.response.500.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `AggregateSpans.response.500.error.quota.inFlight` (integer, optional)
      - min 0
    - `AggregateSpans.response.500.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `AggregateSpans.response.500.error.quota.region` (string, optional)
    - `AggregateSpans.response.500.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `AggregateSpans.response.500.error.quota.scopeResourceName` (string, optional)
    - `AggregateSpans.response.500.error.quota.used` (integer, optional)
      - min 0
    - `AggregateSpans.response.500.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 503

unavailable: a dependency the request needs is down. Retry after Retry-After.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `AggregateSpans.response.503.error` (object, required)
  - `AggregateSpans.response.503.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `AggregateSpans.response.503.error.message` (string, required)
    - maxLength 1024
  - `AggregateSpans.response.503.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `AggregateSpans.response.503.error.issues.message` (string, required)
    - `AggregateSpans.response.503.error.issues.path` (string, required)
  - `AggregateSpans.response.503.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `AggregateSpans.response.503.error.quota.id` (string, required)
    - `AggregateSpans.response.503.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `AggregateSpans.response.503.error.quota.limit` (integer, required)
      - min 0
    - `AggregateSpans.response.503.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `AggregateSpans.response.503.error.quota.inFlight` (integer, optional)
      - min 0
    - `AggregateSpans.response.503.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `AggregateSpans.response.503.error.quota.region` (string, optional)
    - `AggregateSpans.response.503.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `AggregateSpans.response.503.error.quota.scopeResourceName` (string, optional)
    - `AggregateSpans.response.503.error.quota.used` (integer, optional)
      - min 0
    - `AggregateSpans.response.503.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.


Source: https://docs.ezghcloud.com/obs-api/AggregateSpans/index.md
