MongoDB Flex Clusters API

Returns, adds, edits, and removes flex clusters.

Operations 6

GET /api/atlas/v2/groups/{groupId}/flexClusters Return All Flex Clusters from One Project #
POST /api/atlas/v2/groups/{groupId}/flexClusters Create One Flex Cluster in One Project #
DELETE /api/atlas/v2/groups/{groupId}/flexClusters/{name} Remove One Flex Cluster from One Project #
GET /api/atlas/v2/groups/{groupId}/flexClusters/{name} Return One Flex Cluster from One Project #
PATCH /api/atlas/v2/groups/{groupId}/flexClusters/{name} Update One Flex Cluster in One Project #
POST /api/atlas/v2/groups/{groupId}/flexClusters:tenantUpgrade Upgrade One Flex Cluster #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/mongodb-flex-clusters-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

mongodb-flex-clusters-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: "The MongoDB Atlas Administration API allows developers to manage all components in MongoDB Atlas.\n\nThe Atlas Administration API supports OAuth2 Service Accounts and HTTP Digest-based API keys. Service accounts are the recommended authentication method and API keys are considered a legacy option.\n\nTo authenticate with a Service Account, first exchange its client ID and secret for an access token using the OAuth 2.0 Client Credentials flow. Atlas provides a token endpoint at `POST https://cloud.mongodb.com/api/oauth/token`, which returns a Bearer token that is reusable and valid for 1 hour (3600 seconds).\n\nFor example, to [return a list of your organizations](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/operation/operation-listorgs) with [cURL](https://en.wikipedia.org/wiki/CURL), first generate an access token and then use that token to call the same Atlas Administration API endpoint shown in the current example:\n\n```\nACCESS_TOKEN=$(curl -fsS --request POST https://cloud.mongodb.com/api/oauth/token \\\n  --header \"Authorization: Basic $(printf '%s' \"${CLIENT_ID}:${CLIENT_SECRET}\" | base64 | tr -d '\\n')\" \\\n  --header \"Content-Type: application/x-www-form-urlencoded\" \\\n  --header \"Accept: application/json\" \\\n  --data \"grant_type=client_credentials\" | jq -r '.access_token')\n\ncurl --header \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n  --header \"Accept: application/vnd.atlas.2025-03-12+json\" \\\n  -X GET \"https://cloud.mongodb.com/api/atlas/v2/orgs?pretty=true\"\n```\n\nIf your organization requires an IP access list for the Atlas Administration API, the token can be created from any IP address, but the API call that uses the token must originate from an allowed IP.\n\nTo learn more, see [Get Started with the Atlas Administration API](https://www.mongodb.com/docs/atlas/configure-api-access/). For support, see [MongoDB Support](https://www.mongodb.com/support/get-started).\n\nYou can also explore the various endpoints available through the Atlas Administration API in MongoDB's [Postman workspace](https://www.postman.com/mongodb-devrel/workspace/mongodb-atlas-administration-apis/) (requires a Postman account)."
  license:
    name: CC BY-NC-SA 3.0 US
    url: https://creativecommons.org/licenses/by-nc-sa/3.0/us/
  termsOfService: https://www.mongodb.com/mongodb-management-service-terms-and-conditions
  title: MongoDB Atlas Administration Access Tracking Flex Clusters API
  version: '2.0'
  x-xgen-sha: 3d70e065843c008b9871ea7836c98c9de6f202f9
servers:
- url: https://cloud.mongodb.com
security:
- ServiceAccounts: []
- DigestAuth: []
tags:
- description: Returns, adds, edits, and removes flex clusters.
  name: Flex Clusters
paths:
  /api/atlas/v2/groups/{groupId}/flexClusters:
    get:
      description: Returns details for all flex clusters in the specified project. To use this resource, the requesting Service Account or API Key must have the Project Read Only role.
      operationId: listGroupFlexClusters
      parameters:
      - $ref: '#/components/parameters/envelope'
      - $ref: '#/components/parameters/groupId'
      - $ref: '#/components/parameters/includeCount'
      - $ref: '#/components/parameters/itemsPerPage'
      - $ref: '#/components/parameters/pageNum'
      - $ref: '#/components/parameters/pretty'
      responses:
        '200':
          content:
            application/vnd.atlas.2024-11-13+json:
              schema:
                $ref: '#/components/schemas/PaginatedFlexClusters20241113'
              x-xgen-version: '2024-11-13'
          description: OK
          headers:
            RateLimit-Limit:
              $ref: '#/components/headers/HeaderRateLimitLimit'
            RateLimit-Remaining:
              $ref: '#/components/headers/HeaderRateLimitRemaining'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/internalServerError'
      summary: Return All Flex Clusters from One Project
      tags:
      - Flex Clusters
      x-codeSamples:
      - lang: cURL
        label: Atlas CLI
        source: atlas api flexClusters listFlexClusters --help
      - lang: go
        label: Go
        source: "import (\n\t\"os\"\n\t\"context\"\n\t\"log\"\n\tsdk \"go.mongodb.org/atlas-sdk/v20250312001/admin\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tclientID := os.Getenv(\"MONGODB_ATLAS_CLIENT_ID\")\n\tclientSecret := os.Getenv(\"MONGODB_ATLAS_CLIENT_SECRET\")\n\n\t// See https://dochub.mongodb.org/core/atlas-go-sdk-oauth\n\tclient, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret))\n\n\tif err != nil {\n\t\tlog.Fatalf(\"Error: %v\", err)\n\t}\n\n\tparams = &sdk.ListGroupFlexClustersApiParams{}\n\tsdkResp, httpResp, err := client.FlexClustersApi.\n\t\tListGroupFlexClustersWithParams(ctx, params).\n\t\tExecute()\n}\n"
      - lang: cURL
        label: curl (Service Accounts)
        source: "curl --include --header \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n  --header \"Accept: application/vnd.atlas.2025-03-12+json\" \\\n  -X GET \"https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/flexClusters?pretty=true\""
      - lang: cURL
        label: curl (Digest)
        source: "curl --user \"${PUBLIC_KEY}:${PRIVATE_KEY}\" \\\n  --digest --include \\\n  --header \"Accept: application/vnd.atlas.2025-03-12+json\" \\\n  -X GET \"https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/flexClusters?pretty=true\""
      x-rolesRequirements:
      - Project Read Only
      x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Flex-Clusters/operation/listGroupFlexClusters
      x-xgen-operation-id-override: listFlexClusters
    post:
      description: Creates one flex cluster in the specified project. To use this resource, the requesting Service Account or API Key must have the Project Owner role.
      operationId: createGroupFlexCluster
      parameters:
      - $ref: '#/components/parameters/envelope'
      - $ref: '#/components/parameters/groupId'
      - $ref: '#/components/parameters/pretty'
      requestBody:
        content:
          application/vnd.atlas.2024-11-13+json:
            schema:
              $ref: '#/components/schemas/FlexClusterDescriptionCreate20241113'
        description: Create One Flex Cluster in One Project.
        required: true
      responses:
        '201':
          content:
            application/vnd.atlas.2024-11-13+json:
              schema:
                $ref: '#/components/schemas/FlexClusterDescription20241113'
              x-xgen-version: '2024-11-13'
          description: Created
          headers:
            RateLimit-Limit:
              $ref: '#/components/headers/HeaderRateLimitLimit'
            RateLimit-Remaining:
              $ref: '#/components/headers/HeaderRateLimitRemaining'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '402':
          $ref: '#/components/responses/paymentRequired'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/internalServerError'
      summary: Create One Flex Cluster in One Project
      tags:
      - Flex Clusters
      x-codeSamples:
      - lang: cURL
        label: Atlas CLI
        source: atlas api flexClusters createFlexCluster --help
      - lang: go
        label: Go
        source: "import (\n\t\"os\"\n\t\"context\"\n\t\"log\"\n\tsdk \"go.mongodb.org/atlas-sdk/v20250312001/admin\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tclientID := os.Getenv(\"MONGODB_ATLAS_CLIENT_ID\")\n\tclientSecret := os.Getenv(\"MONGODB_ATLAS_CLIENT_SECRET\")\n\n\t// See https://dochub.mongodb.org/core/atlas-go-sdk-oauth\n\tclient, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret))\n\n\tif err != nil {\n\t\tlog.Fatalf(\"Error: %v\", err)\n\t}\n\n\tparams = &sdk.CreateGroupFlexClusterApiParams{}\n\tsdkResp, httpResp, err := client.FlexClustersApi.\n\t\tCreateGroupFlexClusterWithParams(ctx, params).\n\t\tExecute()\n}\n"
      - lang: cURL
        label: curl (Service Accounts)
        source: "curl --include --header \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n  --header \"Accept: application/vnd.atlas.2025-03-12+json\" \\\n  --header \"Content-Type: application/json\" \\\n  -X POST \"https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/flexClusters\" \\\n  -d '{ <Payload> }'"
      - lang: cURL
        label: curl (Digest)
        source: "curl --user \"${PUBLIC_KEY}:${PRIVATE_KEY}\" \\\n  --digest --include \\\n  --header \"Accept: application/vnd.atlas.2025-03-12+json\" \\\n  --header \"Content-Type: application/json\" \\\n  -X POST \"https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/flexClusters\" \\\n  -d '{ <Payload> }'"
      x-rolesRequirements:
      - Project Owner
      x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Flex-Clusters/operation/createGroupFlexCluster
      x-xgen-operation-id-override: createFlexCluster
  /api/atlas/v2/groups/{groupId}/flexClusters/{name}:
    delete:
      description: Removes one flex cluster from the specified project. The flex cluster must have termination protection disabled in order to be deleted. To use this resource, the requesting Service Account or API Key must have the Project Owner role.
      operationId: deleteGroupFlexCluster
      parameters:
      - $ref: '#/components/parameters/envelope'
      - $ref: '#/components/parameters/pretty'
      - $ref: '#/components/parameters/groupId'
      - description: Human-readable label that identifies the flex cluster.
        in: path
        name: name
        required: true
        schema:
          pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$
          type: string
      responses:
        '204':
          content:
            application/vnd.atlas.2024-11-13+json:
              x-xgen-version: '2024-11-13'
          description: This endpoint does not return a response body.
          headers:
            RateLimit-Limit:
              $ref: '#/components/headers/HeaderRateLimitLimit'
            RateLimit-Remaining:
              $ref: '#/components/headers/HeaderRateLimitRemaining'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/internalServerError'
      summary: Remove One Flex Cluster from One Project
      tags:
      - Flex Clusters
      x-codeSamples:
      - lang: cURL
        label: Atlas CLI
        source: atlas api flexClusters deleteFlexCluster --help
      - lang: go
        label: Go
        source: "import (\n\t\"os\"\n\t\"context\"\n\t\"log\"\n\tsdk \"go.mongodb.org/atlas-sdk/v20250312001/admin\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tclientID := os.Getenv(\"MONGODB_ATLAS_CLIENT_ID\")\n\tclientSecret := os.Getenv(\"MONGODB_ATLAS_CLIENT_SECRET\")\n\n\t// See https://dochub.mongodb.org/core/atlas-go-sdk-oauth\n\tclient, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret))\n\n\tif err != nil {\n\t\tlog.Fatalf(\"Error: %v\", err)\n\t}\n\n\tparams = &sdk.DeleteGroupFlexClusterApiParams{}\n\thttpResp, err := client.FlexClustersApi.\n\t\tDeleteGroupFlexClusterWithParams(ctx, params).\n\t\tExecute()\n}\n"
      - lang: cURL
        label: curl (Service Accounts)
        source: "curl --include --header \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n  --header \"Accept: application/vnd.atlas.2025-03-12+json\" \\\n  -X DELETE \"https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/flexClusters/{name}\""
      - lang: cURL
        label: curl (Digest)
        source: "curl --user \"${PUBLIC_KEY}:${PRIVATE_KEY}\" \\\n  --digest --include \\\n  --header \"Accept: application/vnd.atlas.2025-03-12+json\" \\\n  -X DELETE \"https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/flexClusters/{name}\""
      x-rolesRequirements:
      - Project Owner
      x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Flex-Clusters/operation/deleteGroupFlexCluster
      x-xgen-operation-id-override: deleteFlexCluster
    get:
      description: Returns details for one flex cluster in the specified project. To use this resource, the requesting Service Account or API Key must have the Project Read Only role.
      operationId: getGroupFlexCluster
      parameters:
      - $ref: '#/components/parameters/groupId'
      - $ref: '#/components/parameters/envelope'
      - $ref: '#/components/parameters/pretty'
      - description: Human-readable label that identifies the flex cluster.
        in: path
        name: name
        required: true
        schema:
          pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$
          type: string
      responses:
        '200':
          content:
            application/vnd.atlas.2024-11-13+json:
              schema:
                $ref: '#/components/schemas/FlexClusterDescription20241113'
              x-xgen-version: '2024-11-13'
          description: OK
          headers:
            RateLimit-Limit:
              $ref: '#/components/headers/HeaderRateLimitLimit'
            RateLimit-Remaining:
              $ref: '#/components/headers/HeaderRateLimitRemaining'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/internalServerError'
      summary: Return One Flex Cluster from One Project
      tags:
      - Flex Clusters
      x-codeSamples:
      - lang: cURL
        label: Atlas CLI
        source: atlas api flexClusters getFlexCluster --help
      - lang: go
        label: Go
        source: "import (\n\t\"os\"\n\t\"context\"\n\t\"log\"\n\tsdk \"go.mongodb.org/atlas-sdk/v20250312001/admin\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tclientID := os.Getenv(\"MONGODB_ATLAS_CLIENT_ID\")\n\tclientSecret := os.Getenv(\"MONGODB_ATLAS_CLIENT_SECRET\")\n\n\t// See https://dochub.mongodb.org/core/atlas-go-sdk-oauth\n\tclient, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret))\n\n\tif err != nil {\n\t\tlog.Fatalf(\"Error: %v\", err)\n\t}\n\n\tparams = &sdk.GetGroupFlexClusterApiParams{}\n\tsdkResp, httpResp, err := client.FlexClustersApi.\n\t\tGetGroupFlexClusterWithParams(ctx, params).\n\t\tExecute()\n}\n"
      - lang: cURL
        label: curl (Service Accounts)
        source: "curl --include --header \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n  --header \"Accept: application/vnd.atlas.2025-03-12+json\" \\\n  -X GET \"https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/flexClusters/{name}?pretty=true\""
      - lang: cURL
        label: curl (Digest)
        source: "curl --user \"${PUBLIC_KEY}:${PRIVATE_KEY}\" \\\n  --digest --include \\\n  --header \"Accept: application/vnd.atlas.2025-03-12+json\" \\\n  -X GET \"https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/flexClusters/{name}?pretty=true\""
      x-rolesRequirements:
      - Project Read Only
      x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Flex-Clusters/operation/getGroupFlexCluster
      x-xgen-operation-id-override: getFlexCluster
    patch:
      description: Updates one flex cluster in the specified project. To use this resource, the requesting Service Account or API Key must have the Project Owner role.
      operationId: updateGroupFlexCluster
      parameters:
      - $ref: '#/components/parameters/envelope'
      - $ref: '#/components/parameters/groupId'
      - $ref: '#/components/parameters/pretty'
      - description: Human-readable label that identifies the flex cluster.
        in: path
        name: name
        required: true
        schema:
          pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$
          type: string
      requestBody:
        content:
          application/vnd.atlas.2024-11-13+json:
            schema:
              $ref: '#/components/schemas/FlexClusterDescriptionUpdate20241113'
        description: Update One Flex Cluster in One Project.
        required: true
      responses:
        '200':
          content:
            application/vnd.atlas.2024-11-13+json:
              schema:
                $ref: '#/components/schemas/FlexClusterDescription20241113'
              x-xgen-version: '2024-11-13'
          description: OK
          headers:
            RateLimit-Limit:
              $ref: '#/components/headers/HeaderRateLimitLimit'
            RateLimit-Remaining:
              $ref: '#/components/headers/HeaderRateLimitRemaining'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '402':
          $ref: '#/components/responses/paymentRequired'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '429':
          $ref: '#/components/responses/tooManyRequests'
      summary: Update One Flex Cluster in One Project
      tags:
      - Flex Clusters
      x-codeSamples:
      - lang: cURL
        label: Atlas CLI
        source: atlas api flexClusters updateFlexCluster --help
      - lang: go
        label: Go
        source: "import (\n\t\"os\"\n\t\"context\"\n\t\"log\"\n\tsdk \"go.mongodb.org/atlas-sdk/v20250312001/admin\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tclientID := os.Getenv(\"MONGODB_ATLAS_CLIENT_ID\")\n\tclientSecret := os.Getenv(\"MONGODB_ATLAS_CLIENT_SECRET\")\n\n\t// See https://dochub.mongodb.org/core/atlas-go-sdk-oauth\n\tclient, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret))\n\n\tif err != nil {\n\t\tlog.Fatalf(\"Error: %v\", err)\n\t}\n\n\tparams = &sdk.UpdateGroupFlexClusterApiParams{}\n\tsdkResp, httpResp, err := client.FlexClustersApi.\n\t\tUpdateGroupFlexClusterWithParams(ctx, params).\n\t\tExecute()\n}\n"
      - lang: cURL
        label: curl (Service Accounts)
        source: "curl --include --header \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n  --header \"Accept: application/vnd.atlas.2025-03-12+json\" \\\n  --header \"Content-Type: application/json\" \\\n  -X PATCH \"https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/flexClusters/{name}\" \\\n  -d '{ <Payload> }'"
      - lang: cURL
        label: curl (Digest)
        source: "curl --user \"${PUBLIC_KEY}:${PRIVATE_KEY}\" \\\n  --digest --include \\\n  --header \"Accept: application/vnd.atlas.2025-03-12+json\" \\\n  --header \"Content-Type: application/json\" \\\n  -X PATCH \"https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/flexClusters/{name}\" \\\n  -d '{ <Payload> }'"
      x-rolesRequirements:
      - Project Owner
      x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Flex-Clusters/operation/updateGroupFlexCluster
      x-xgen-operation-id-override: updateFlexCluster
  /api/atlas/v2/groups/{groupId}/flexClusters:tenantUpgrade:
    post:
      description: Upgrades a flex cluster to a dedicated cluster (M10+) in the specified project. To use this resource, the requesting Service Account or API Key must have the Project Cluster Manager role.
      operationId: tenantGroupFlexClusterUpgrade
      parameters:
      - $ref: '#/components/parameters/envelope'
      - $ref: '#/components/parameters/groupId'
      - $ref: '#/components/parameters/pretty'
      requestBody:
        content:
          application/vnd.atlas.2024-11-13+json:
            schema:
              $ref: '#/components/schemas/AtlasTenantClusterUpgradeRequest20240805'
        description: Details of the flex cluster upgrade in the specified project.
        required: true
      responses:
        '200':
          content:
            application/vnd.atlas.2024-11-13+json:
              schema:
                $ref: '#/components/schemas/FlexClusterDescription20241113'
              x-xgen-version: '2024-11-13'
          description: OK
          headers:
            RateLimit-Limit:
              $ref: '#/components/headers/HeaderRateLimitLimit'
            RateLimit-Remaining:
              $ref: '#/components/headers/HeaderRateLimitRemaining'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '402':
          $ref: '#/components/responses/paymentRequired'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/internalServerError'
      summary: Upgrade One Flex Cluster
      tags:
      - Flex Clusters
      x-codeSamples:
      - lang: cURL
        label: Atlas CLI
        source: atlas api flexClusters tenantUpgrade --help
      - lang: go
        label: Go
        source: "import (\n\t\"os\"\n\t\"context\"\n\t\"log\"\n\tsdk \"go.mongodb.org/atlas-sdk/v20250312001/admin\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tclientID := os.Getenv(\"MONGODB_ATLAS_CLIENT_ID\")\n\tclientSecret := os.Getenv(\"MONGODB_ATLAS_CLIENT_SECRET\")\n\n\t// See https://dochub.mongodb.org/core/atlas-go-sdk-oauth\n\tclient, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret))\n\n\tif err != nil {\n\t\tlog.Fatalf(\"Error: %v\", err)\n\t}\n\n\tparams = &sdk.TenantGroupFlexClusterUpgradeApiParams{}\n\tsdkResp, httpResp, err := client.FlexClustersApi.\n\t\tTenantGroupFlexClusterUpgradeWithParams(ctx, params).\n\t\tExecute()\n}\n"
      - lang: cURL
        label: curl (Service Accounts)
        source: "curl --include --header \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n  --header \"Accept: application/vnd.atlas.2025-03-12+json\" \\\n  --header \"Content-Type: application/json\" \\\n  -X POST \"https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/flexClusters:tenantUpgrade\" \\\n  -d '{ <Payload> }'"
      - lang: cURL
        label: curl (Digest)
        source: "curl --user \"${PUBLIC_KEY}:${PRIVATE_KEY}\" \\\n  --digest --include \\\n  --header \"Accept: application/vnd.atlas.2025-03-12+json\" \\\n  --header \"Content-Type: application/json\" \\\n  -X POST \"https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/flexClusters:tenantUpgrade\" \\\n  -d '{ <Payload> }'"
      x-rolesRequirements:
      - Project Cluster Manager
      x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Flex-Clusters/operation/tenantGroupFlexClusterUpgrade
      x-xgen-operation-id-override: tenantUpgrade
components:
  schemas:
    FlexConnectionStrings20241113:
      description: Collection of Uniform Resource Locators that point to the MongoDB database.
      externalDocs:
        description: Connection string URI format.
        url: https://docs.mongodb.com/manual/reference/connection-string/
      properties:
        standard:
          description: Public connection string that you can use to connect to this cluster. This connection string uses the `mongodb://` protocol.
          externalDocs:
            description: Connection String URI Format
            url: https://docs.mongodb.com/manual/reference/connection-string/
          readOnly: true
          type: string
        standardSrv:
          description: Public connection string that you can use to connect to this flex cluster. This connection string uses the `mongodb+srv://` protocol.
          externalDocs:
            description: Connection String URI Format
            url: https://docs.mongodb.com/manual/reference/connection-string/
          readOnly: true
          type: string
      readOnly: true
      title: Flex Cluster Connection Strings
      type: object
    ClusterDescriptionConnectionStringsPrivateEndpointEndpoint:
      description: Details of a private endpoint deployed for this cluster.
      properties:
        endpointId:
          description: Unique string that the cloud provider uses to identify the private endpoint.
          readOnly: true
          type: string
        providerName:
          description: Cloud provider in which MongoDB Cloud deploys the private endpoint.
          enum:
          - AWS
          - AZURE
          - GCP
          readOnly: true
          type: string
        region:
          description: Region where the private endpoint is deployed.
          readOnly: true
          type: string
      title: Cluster Private Endpoint Connection Strings Endpoint
      type: object
    AWSRegionConfig20240805:
      allOf:
      - $ref: '#/components/schemas/CloudRegionConfig20240805'
      - properties:
          analyticsAutoScaling:
            $ref: '#/components/schemas/AdvancedAutoScalingSettings'
          analyticsSpecs:
            $ref: '#/components/schemas/DedicatedHardwareSpec20240805'
          autoScaling:
            $ref: '#/components/schemas/AdvancedAutoScalingSettings'
          effectiveAnalyticsSpecs:
            $ref: '#/components/schemas/DedicatedHardwareSpec20240805'
          effectiveElectableSpecs:
            $ref: '#/components/schemas/DedicatedHardwareSpec20240805'
          effectiveReadOnlySpecs:
            $ref: '#/components/schemas/DedicatedHardwareSpec20240805'
          readOnlySpecs:
            $ref: '#/components/schemas/DedicatedHardwareSpec20240805'
        type: object
      description: Details that explain how MongoDB Cloud replicates data in one region on the specified MongoDB database.
      title: AWS Regional Replication Specifications
      type: object
    AWSHardwareSpec20240805:
      description: Hardware specifications for nodes deployed in the region.
      properties:
        diskIOPS:
          description: "Target IOPS (Input/Output Operations Per Second) desired for storage attached to this hardware.\n\n You can set different IOPS values on different shards when provisioned IOPS are supported.\n\n Change this parameter if you:\n\n- set `replicationSpecs[n].regionConfigs[m].providerName` to `AWS`.\n- set `replicationSpecs[n].regionConfigs[m].electableSpecs.instanceSize` to `M30` or greater (not including `Mxx_NVME` tiers).\n\n- set `replicationSpecs[n].regionConfigs[m].electableSpecs.ebsVolumeType` to `PROVISIONED`.\n\nThe maximum input/output operations per second (IOPS) depend on the selected `.instanceSize` and `.diskSizeGB`.\nThis parameter defaults to the cluster tier's standard IOPS value.\nChanging this value impacts cluster cost.\nMongoDB Cloud enforces minimum ratios of storage capacity to system memory for given cluster tiers. This keeps cluster performance consistent with large datasets.\n\n- Instance sizes `M10` to `M40` have a ratio of disk capacity to system memory of 60:1.\n- Instance sizes greater than `M40` have a ratio of 120:1."
          format: int32
          type: integer
        diskSizeGB:
          description: "Storage capacity of instance data volumes expressed in gigabytes. Increase this number to add capacity.\n\n This value must be equal for all shards and node types.\n\n This value is not configurable on M0/M2/M5 clusters.\n\n MongoDB Cloud requires this parameter if you set `replicationSpecs`.\n\n If you specify a disk size below the minimum (10 GB), this parameter defaults to the minimum disk size value. \n\n Storage charge calculations depend on whether you choose the default value or a custom value.\n\n The maximum value for disk storage cannot exceed 50 times the maximum RAM for the selected cluster. If you require more storage space, consider upgrading your cluster to a higher tier."
          externalDocs:
            description: Customize Storage
            url: https://dochub.mongodb.org/core/customize-storage
          format: double
          type: number
        ebsVolumeType:
          default: STANDARD
          description: "Type of storage you want to attach to your AWS-provisioned cluster.\n\n- `STANDARD` volume types can't exceed the default input/output operations per second (IOPS) rate for the selected volume size. \n\n- `PROVISIONED` volume types must fall within the allowable IOPS range for the selected volume size. You must set this value to (`PROVISIONED`) for NVMe clusters."
          enum:
          - STANDARD
          - PROVISIONED
          type: string
        instanceSize:
          description: Hardware specification for the instance sizes in this region in this shard. Each instance size has a default storage and memory capacity. Electable nodes and read-only nodes (known as "base nodes") within a single shard must use the same instance size. Analytics nodes can scale independently from base nodes within a shard. Both base nodes and analytics nodes can scale independently from their equivalents in other shards.
          enum:
          - M10
          - M20
          - M30
          - M40
          - M50
          - M60
          - M80
          - M100
          - M140
          - M200
          - M300
          - R40
          - R50
          - R60
          - R80
          - R200
          - R300
          - R400
          - R700
          - M40_NVME
          - M50_NVME
          - M60_NVME
          - M80_NVME
          - M200_NVME
          - M400_NVME
          title: AWS Instance Sizes
          type: string
        nodeCount:
          description: Number of nodes of the given type for MongoDB Cloud to deploy to the region.
          format: int32
          type: integer
      title: AWS Cluster Hardware Settings
      type: object
    PaginatedFlexClusters20241113:
      properties:
        links:
          description: List of one or more Uniform Resource Locators (URLs) that point to API sub-resources, related API resources, or both. RFC 5988 outlines these relationships.
          externalDocs:
            description: Web Linking Specification (RFC 5988)
            url: https://datatracker.ietf.org/doc/html/rfc5988
          items:
            $ref: '#/components/schemas/Link'
          readOnly: true
          type: array
        results:
          description: List of returned documents that MongoDB Cloud provides when completing this request.
          items:
            $ref: '#/components/schemas/FlexClusterDescription20241113'
          readOnly: true
          type: array
        totalCount:
          description: Total number of documents available. MongoDB Cloud omits this value if `includeCount` is set to `false`. The total number is an estimate and may not be exact.
          format: int32
          minimum: 0
          readOnly: true
          type: integer
      required:
      - results
      type: object
    FlexProviderSettings20241113:
      description: Group of cloud provider settings that configure the provisioned MongoDB flex cluster.
      properties:
        backingProviderName:
          description: Cloud service provider on which MongoDB Cloud provisioned the flex cluster.
          enum:
          - AWS
          - AZURE
          - GCP
          readOnly: true
          type: string
        diskSizeGB:
          description: Storage capacity available to the flex cluster expressed in gigabytes.
          format: double
          readOnly: true
          type: number
        providerName:
          default: FLEX
          description: Human-readable label that identifies the provider type.
          enum:
          - FLEX
          readOnly: true
          type: string
        regionName:
          description: Human-readable label that identifies the geographic location of your MongoDB flex cluster. The region you choose can a

# --- truncated at 32 KB (107 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/mongodb/refs/heads/main/openapi/mongodb-flex-clusters-api-openapi.yml