---
title: "Update default tenant limits"
method: PATCH
path: "/_api/limits/defaults"
tags: ["Administration"]
---

# Update default tenant limits

`PATCH /_api/limits/defaults`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/macrometa/apis/macrometa-api-reference/docs/_api/limits/defaults/patch.ts> (a function with typed inputs; its response is checked against the schema)

Update default tenant limits.

 **Note**: Omitted data fields keep their current value.

## Request body

- TenantLimitsValue
  - `apiServer` ApiServerLimitsExample
    - `maxRequestPerMinute` integer: Rate limiting at the gateway proxy. This value indicates the maximum number of requests per minute for a tenant, including all http/https requests for any component coming from a regions LoadBalancer. If the value is 0, rate limiting is disabled.
  - `cep` CepLimitsExample: The limits values for CEP feature
    - `maxPublishedWorkers` integer: Max number of published workers.
    - `maxWorkersMemoryMB` integer: Max total memory size in MB of all the stream workers for the tenant.
    - `maxMemoryMBPerWorker` integer: Max memory size in MB per stream worker for the tenant.
    - `maxWorkersCpuSecondsPerMinute` integer: Max CPU seconds per minute for stream worker
    - `maxWorkersThroughputInMBPerMinute` integer: Max IN throughput per minute in MB for stream workers.
    - `maxWorkersThroughputOutMBPerMinute` integer: Max OUT throughput per minute in MB for stream workers.
    - `maxLogsLengthKBPerMinutePerWorker` integer: Max logs length per minute in KB for each stream worker.
    - `maxCpuSecondsPerMinutePerWorker` integer: Max CPU seconds per minute for each stream worker.54
  - `database` DatabaseLimitsExample
    - `maxDocumentSize` integer: The maximum document size in bytes.
    - `maxDocumentsReturnedByQuery` integer: The maximum documents returned by a query, or 0 to disable this limit. The page size for the query is equal to this value (if set), preventing c8db from creating a persistent cursor for queries.
    - `maxQueryExecutionTimeInMs` integer: The maximum time allowed for a query to complete processing.
    - `maxQueryMemoryBytes` integer: The maximum bytes of memory allowed to be used by a query during processing.
    - `maxGeoFabricsPerTenant` integer: The maximum number of fabric a tenant can create. Use 0 to disable.
    - `maxCollectionsPerFabric` integer: The maximum number of collections per fabric a tenant can create. Use 0 to disable.
    - `maxGraphsPerFabric` integer: The maximum number of graph collections per fabric a tenant can create. Use 0 to disable.
    - `maxIndexes` integer: The maximum number of indexes per fabric a tenant can create. Use 0 to disable.
    - `maxViewsPerFabric` integer: The maximum number of views per fabric a tenant can create. Use 0 to disable.
    - `maxRequestsPerDay` integer: The maximum number of API requests per day for a tenant, including UI requests to the APIs. Use 0 to disable. This only applies for tenants with the 'tenant.trial' property in _tenants set to *true*.
    - `maxStoragePerRegion` integer: The maximum storage (in bytes) allowed to be used by a tenant in a region. Use 0 to disable. This only applies for tenants with the 'FREE' billing plan. **Note**: As the metadata is also get counted in storage size calculation, the required storage size could be more than the total documents size stored in database.
    - `maxRestQLUsagePerFabric` integer: The maximum number of RestQL queries per fabric a tenant can run in a day. Use 0 to disable.
    - `maxRestQLUsagePerDay` integer: The maximum number of RestQL requests can be ran by a tenant in a day. Use 0 to disable.
    - `maxDocumentsImportedPerAPICall` integer: The maximum number of documents a tenant can import in a single API call. Use 0 to disable.
  - `eventhub` EventhubLimitsExample: The limits values for eventhub feature
    - `maxEventhubProducersCount` integer: Max eventhub producers count.
    - `maxEventhubConsumersCount` integer: Max eventhub consumers count
  - `streamsGlobal` StreamsLimitsExample
    - `maxStreamsCount` integer: Max streams count.
    - `maxProducersCount` integer: Max streams producer count.
    - `maxConsumersCount` integer: Max streams consumer count.
    - `maxSubscriptionsCount` integer: Max streams subscriptions count.
    - `maxBacklogMessageTTLMin` integer: Max streams backlog messagaes TTL in minute.
    - `maxBacklogStorageSizeMB` integer: Max streams backlog storage size in MB.
    - `maxDispatchThrottlingRateInByte` integer: Max streams byte dispatch rate per minute.
  - `streamsLocal` StreamsLimitsExample
    - `maxStreamsCount` integer: Max streams count.
    - `maxProducersCount` integer: Max streams producer count.
    - `maxConsumersCount` integer: Max streams consumer count.
    - `maxSubscriptionsCount` integer: Max streams subscriptions count.
    - `maxBacklogMessageTTLMin` integer: Max streams backlog messagaes TTL in minute.
    - `maxBacklogStorageSizeMB` integer: Max streams backlog storage size in MB.
    - `maxDispatchThrottlingRateInByte` integer: Max streams byte dispatch rate per minute.
  - `dataMeshIntegration` DmiLimitsExample: The limits values for Data Mesh Integrations feature.
    - `maxConnections` integer: Max number of connections.
    - `maxWorkflows` integer: Max number of workflows.

## Response `200`

Successfully updated the default tenant limits.

- object
  - `code` integer: HTTP response code.
  - `error` boolean: Flag if there is an error in response. *False* for this response.
  - `result` TenantLimitsValue
    - `apiServer` ApiServerLimitsExample
      - `maxRequestPerMinute` integer: Rate limiting at the gateway proxy. This value indicates the maximum number of requests per minute for a tenant, including all http/https requests for any component coming from a regions LoadBalancer. If the value is 0, rate limiting is disabled.
    - `cep` CepLimitsExample: The limits values for CEP feature
      - `maxPublishedWorkers` integer: Max number of published workers.
      - `maxWorkersMemoryMB` integer: Max total memory size in MB of all the stream workers for the tenant.
      - `maxMemoryMBPerWorker` integer: Max memory size in MB per stream worker for the tenant.
      - `maxWorkersCpuSecondsPerMinute` integer: Max CPU seconds per minute for stream worker
      - `maxWorkersThroughputInMBPerMinute` integer: Max IN throughput per minute in MB for stream workers.
      - `maxWorkersThroughputOutMBPerMinute` integer: Max OUT throughput per minute in MB for stream workers.
      - `maxLogsLengthKBPerMinutePerWorker` integer: Max logs length per minute in KB for each stream worker.
      - `maxCpuSecondsPerMinutePerWorker` integer: Max CPU seconds per minute for each stream worker.54
    - `database` DatabaseLimitsExample
      - `maxDocumentSize` integer: The maximum document size in bytes.
      - `maxDocumentsReturnedByQuery` integer: The maximum documents returned by a query, or 0 to disable this limit. The page size for the query is equal to this value (if set), preventing c8db from creating a persistent cursor for queries.
      - `maxQueryExecutionTimeInMs` integer: The maximum time allowed for a query to complete processing.
      - `maxQueryMemoryBytes` integer: The maximum bytes of memory allowed to be used by a query during processing.
      - `maxGeoFabricsPerTenant` integer: The maximum number of fabric a tenant can create. Use 0 to disable.
      - `maxCollectionsPerFabric` integer: The maximum number of collections per fabric a tenant can create. Use 0 to disable.
      - `maxGraphsPerFabric` integer: The maximum number of graph collections per fabric a tenant can create. Use 0 to disable.
      - `maxIndexes` integer: The maximum number of indexes per fabric a tenant can create. Use 0 to disable.
      - `maxViewsPerFabric` integer: The maximum number of views per fabric a tenant can create. Use 0 to disable.
      - `maxRequestsPerDay` integer: The maximum number of API requests per day for a tenant, including UI requests to the APIs. Use 0 to disable. This only applies for tenants with the 'tenant.trial' property in _tenants set to *true*.
      - `maxStoragePerRegion` integer: The maximum storage (in bytes) allowed to be used by a tenant in a region. Use 0 to disable. This only applies for tenants with the 'FREE' billing plan. **Note**: As the metadata is also get counted in storage size calculation, the required storage size could be more than the total documents size stored in database.
      - `maxRestQLUsagePerFabric` integer: The maximum number of RestQL queries per fabric a tenant can run in a day. Use 0 to disable.
      - `maxRestQLUsagePerDay` integer: The maximum number of RestQL requests can be ran by a tenant in a day. Use 0 to disable.
      - `maxDocumentsImportedPerAPICall` integer: The maximum number of documents a tenant can import in a single API call. Use 0 to disable.
    - `eventhub` EventhubLimitsExample: The limits values for eventhub feature
      - `maxEventhubProducersCount` integer: Max eventhub producers count.
      - `maxEventhubConsumersCount` integer: Max eventhub consumers count
    - `streamsGlobal` StreamsLimitsExample
      - `maxStreamsCount` integer: Max streams count.
      - `maxProducersCount` integer: Max streams producer count.
      - `maxConsumersCount` integer: Max streams consumer count.
      - `maxSubscriptionsCount` integer: Max streams subscriptions count.
      - `maxBacklogMessageTTLMin` integer: Max streams backlog messagaes TTL in minute.
      - `maxBacklogStorageSizeMB` integer: Max streams backlog storage size in MB.
      - `maxDispatchThrottlingRateInByte` integer: Max streams byte dispatch rate per minute.
    - `streamsLocal` StreamsLimitsExample
      - `maxStreamsCount` integer: Max streams count.
      - `maxProducersCount` integer: Max streams producer count.
      - `maxConsumersCount` integer: Max streams consumer count.
      - `maxSubscriptionsCount` integer: Max streams subscriptions count.
      - `maxBacklogMessageTTLMin` integer: Max streams backlog messagaes TTL in minute.
      - `maxBacklogStorageSizeMB` integer: Max streams backlog storage size in MB.
      - `maxDispatchThrottlingRateInByte` integer: Max streams byte dispatch rate per minute.
    - `dataMeshIntegration` DmiLimitsExample: The limits values for Data Mesh Integrations feature.
      - `maxConnections` integer: Max number of connections.
      - `maxWorkflows` integer: Max number of workflows.

## Other responses

- `400`: Failed due to missing or malformed data. Verify that all parameters are complete.
- `401`: Failed because you do not have administrator permissions.
- `403`: Failed to validate because you do not have access to the server.

---

[API](https://skmtc.dev/macrometa/apis/macrometa-api-reference.md) - [All operations](https://skmtc.dev/macrometa/apis/macrometa-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/macrometa/apis/macrometa-api-reference/revisions/2006b6d7f31d?raw)
