> For the complete documentation index, see [llms.txt](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v1/llms.txt)

# Configure One Query Limit for One Federated Database Instance

> PATCH /api/atlas/v1.0/groups/{groupId}/dataFederation/{tenantName}/limits/{limitName}
> 
> Creates or updates one query limit for one federated database instance.


## Role requirements
  - Project Owner


## Servers
- https://cloud.mongodb.com: https://cloud.mongodb.com


## Authentication methods
- Service accounts
- Digest auth


## Parameters

### Path parameters

- **groupId** (string)
  Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access.

  **NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.

- **tenantName** (string)
  Human-readable label that identifies the federated database instance to which the query limit applies.

- **limitName** (string)
  Human-readable label that identifies this data federation instance limit.

  | Limit Name | Description | Default |
  | --- | --- | --- |
  | `bytesProcessed.query` | Limit on the number of bytes processed during a single data federation query | N/A |
  | `bytesProcessed.daily` | Limit on the number of bytes processed for the data federation instance for the current day | N/A |
  | `bytesProcessed.weekly` | Limit on the number of bytes processed for the data federation instance for the current week | N/A |
  | `bytesProcessed.monthly` | Limit on the number of bytes processed for the data federation instance for the current month | N/A |


### Query parameters

- **envelope** (boolean)
  Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body.


### Body: application/json (object)
Creates or updates one query limit for one federated database instance.
- **overrunPolicy** (string)
  Only used for Data Federation limits. Action to take when the usage limit is exceeded. If limit span is set to QUERY, this is ignored because MongoDB Cloud stops the query when it exceeds the usage limit.

- **value** (integer(int64))
  Amount to set the limit to.



## Responses
### 200
OK

#### Body: application/json (object)
- **currentUsage** (integer(int64))
  Amount that indicates the current usage of the limit.

- **defaultLimit** (integer(int64))
  Default value of the limit.

- **lastModifiedDate** (string(date-time))
  Only used for Data Federation limits. Timestamp that indicates when this usage limit was last modified. This field uses the ISO 8601 timestamp format in UTC.

- **maximumLimit** (integer(int64))
  Maximum value of the limit.

- **name** (string)
  Human-readable label that identifies the user-managed limit to modify.

- **overrunPolicy** (string)
  Only used for Data Federation limits. Action to take when the usage limit is exceeded. If limit span is set to QUERY, this is ignored because MongoDB Cloud stops the query when it exceeds the usage limit.

- **tenantName** (string)
  Human-readable label that identifies the Federated Database Instance. If specified, the usage limit is for the specified federated database instance only. If omitted, the usage limit is for all federated database instances in the project.

- **value** (integer(int64))
  Amount to set the limit to.


### 400
Bad Request.

#### Body: application/json (object)
- **badRequestDetail** (object)
  Bad request detail.

- **detail** (string | null)
  Describes the specific conditions or reasons that cause each type of error.

- **error** (integer(int32))
  HTTP status code returned with this error.

- **errorCode** (string)
  Application error code returned with this error.

- **parameters** (array[object])
  Parameters used to give more information about the error.

- **policiesCausingDecision** (array[object])
  Atlas Resource Policies that caused the request to be denied. Returned only when `errorCode` is `ATLAS_RESOURCE_POLICIES_VIOLATION_NOT_AUTHORIZED`.

- **reason** (string | null)
  Application error message returned with this error.


### 401
Unauthorized.

#### Body: application/json (object)
- **badRequestDetail** (object)
  Bad request detail.

- **detail** (string | null)
  Describes the specific conditions or reasons that cause each type of error.

- **error** (integer(int32))
  HTTP status code returned with this error.

- **errorCode** (string)
  Application error code returned with this error.

- **parameters** (array[object])
  Parameters used to give more information about the error.

- **policiesCausingDecision** (array[object])
  Atlas Resource Policies that caused the request to be denied. Returned only when `errorCode` is `ATLAS_RESOURCE_POLICIES_VIOLATION_NOT_AUTHORIZED`.

- **reason** (string | null)
  Application error message returned with this error.


### 403
Forbidden.

#### Body: application/json (object)
- **badRequestDetail** (object)
  Bad request detail.

- **detail** (string | null)
  Describes the specific conditions or reasons that cause each type of error.

- **error** (integer(int32))
  HTTP status code returned with this error.

- **errorCode** (string)
  Application error code returned with this error.

- **parameters** (array[object])
  Parameters used to give more information about the error.

- **policiesCausingDecision** (array[object])
  Atlas Resource Policies that caused the request to be denied. Returned only when `errorCode` is `ATLAS_RESOURCE_POLICIES_VIOLATION_NOT_AUTHORIZED`.

- **reason** (string | null)
  Application error message returned with this error.


### 404
Not Found.

#### Body: application/json (object)
- **badRequestDetail** (object)
  Bad request detail.

- **detail** (string | null)
  Describes the specific conditions or reasons that cause each type of error.

- **error** (integer(int32))
  HTTP status code returned with this error.

- **errorCode** (string)
  Application error code returned with this error.

- **parameters** (array[object])
  Parameters used to give more information about the error.

- **policiesCausingDecision** (array[object])
  Atlas Resource Policies that caused the request to be denied. Returned only when `errorCode` is `ATLAS_RESOURCE_POLICIES_VIOLATION_NOT_AUTHORIZED`.

- **reason** (string | null)
  Application error message returned with this error.


### 500
Internal Server Error.

#### Body: application/json (object)
- **badRequestDetail** (object)
  Bad request detail.

- **detail** (string | null)
  Describes the specific conditions or reasons that cause each type of error.

- **error** (integer(int32))
  HTTP status code returned with this error.

- **errorCode** (string)
  Application error code returned with this error.

- **parameters** (array[object])
  Parameters used to give more information about the error.

- **policiesCausingDecision** (array[object])
  Atlas Resource Policies that caused the request to be denied. Returned only when `errorCode` is `ATLAS_RESOURCE_POLICIES_VIOLATION_NOT_AUTHORIZED`.

- **reason** (string | null)
  Application error message returned with this error.



[Powered by Bump.sh](https://bump.sh)
