Maintenance Windows

Update One Maintenance Window for One Project

Updates the maintenance window for the specified project. Urgent maintenance activities such as security patches can't wait for your chosen window. MongoDB Cloud starts those maintenance activities when needed. After you schedule maintenance for your cluster, you can't change your maintenance window until the current maintenance efforts complete. The maintenance procedure that MongoDB Cloud performs requires at least one replica set election during the maintenance window per replica set. Maintenance always begins as close to the scheduled hour as possible, but in-progress cluster updates or unexpected system issues could delay the start time. Updating the maintenance window will reset any maintenance deferrals for this project.

patch/api/atlas/v2/groups/{groupId}/maintenanceWindow

Request

  • Base URL
    https://cloud.mongodb.com
  • URL
    https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/maintenanceWindow
  • Auth
    • OAuth 2
      Client credentials
      Token URL: https://cloud.mongodb.com/api/oauth/token
    • or HTTP digest

Path parameters

groupIdstring required
Example:32b6e34b3d91647abb20e7b8

Unique 24-hexadecimal digit string that identifies your project. Use the /groups 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.

Query parameters

envelopeboolean

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.

Request body

autoDeferOnceEnabledboolean

Flag that indicates whether MongoDB Cloud should defer all maintenance windows for one week after you enable them. This setting controls the same underlying auto-deferral feature as the /maintenanceWindow/autoDefer endpoint. Use either this field (to set a specific value) or that endpoint (to toggle the current value). For most use cases, this field in the PATCH request is preferred because it allows setting an explicit value rather than toggling.

dayOfWeekinteger required

One-based integer that represents the day of the week that the maintenance window starts.

  • 1: Sunday.
  • 2: Monday.
  • 3: Tuesday.
  • 4: Wednesday.
  • 5: Thursday.
  • 6: Friday.
  • 7: Saturday.
hourOfDayinteger

Zero-based integer that represents the hour of the of the day that the maintenance window starts according to a 24-hour clock. Use 0 for midnight and 12 for noon.

numberOfDeferralsinteger

Number of times the current maintenance event for this project has been deferred.

startASAPboolean

Flag that indicates whether MongoDB Cloud starts the maintenance window immediately upon receiving this request. To start the maintenance window immediately for your project, MongoDB Cloud must have maintenance scheduled and you must set a maintenance window. This flag resets to false after MongoDB Cloud completes maintenance.

timeZoneIdstring

Identifier for the current time zone of the maintenance window. This can only be updated via the Project Settings UI.

Response

OK

Changes

No recorded changes to this operation across all 1 revision of this API.