---
openapi: 3.1.0
info:
  description: |-
    # End-of-Life (EOL) Notice

    **APP SERVICES HAVE REACHED END-OF-LIFE (EOL)**
    Atlas Device Sync, SDKs, Data API, GraphQL, Static Hosting, and
    HTTPS Endpoints have reached EOL on
    September 30, 2025. Database triggers remain available.

    This impacts additional App Service capabilities, including
    authentication and user management, functions, Wire Protocol, and data
    access permissions. API endpoints related to these features are deprecated.

    For more information, refer to the
    Deprecation page: https://www.mongodb.com/docs/atlas/app-services/deprecation/.

    # API Overview

    The App Services Admin API lets you programmatically perform
    administrative tasks over HTTPS. This includes defining &
    configuring things like:

    - App Deployment & Security
    - APIs & Endpoints
    - Authentication & User Management
    - Data Sources
    - Device Sync
    - Environments
    - Functions
    - Logs
    - Rules
    - Schemas
    - Static Hosting
    - Triggers
    - Usage & Billing Metrics
    - Values & Secrets

    The Admin API is for application development, configuration, and
    deployment. To use the features you configure with the
    Admin API, client applications connect with an HTTPS API specific
    to your App.

    ## Project & Application IDs

    **Note**: The terms _Project ID_ and _Group ID_ are interchangeable.

    Atlas App Services Admin API endpoints frequently require you to include two parameters in the URL:

    - Your Atlas _Project ID_ (also sometimes called a _Group ID_)
    - Your App Services _Application ID_

    ### Project ID

    You can find your Project ID from the MongoDB Atlas dashboard or with the MongoDB Atlas CLI.

    ### Application ID

    To find an Application ID, make a request to the [List
    Apps](#operation/adminListApplications) endpoint for your project.
    You'll need an `access_token` to make this request. To learn how to
    get one, see [Get an Admin API Session Access
    Token](#get-an-admin-api-session-access-token).

    ```sh
    curl --request GET \
      --header 'Authorization: Bearer <access_token>' \
      https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps
    ```

    This will return a list of objects describing each App Services App
    in the provided project/group. For Admin API requests, your
    Application ID is the ObjectId value in the `_id` field, _not_ the
    `client_app_id`.

    ```json
    [
      {
        "_id": "5997529e46224c6e42gb6dd9",
        "group_id": "57879f6cc4b32dbe440bb8c5",
        "domain_id": "5886619e46124e4c42fb5dd8",
        "client_app_id": "myapp-abcde",
        "name": "myapp",
        "location": "US-VA",
        "deployment_model": "GLOBAL",
        "last_used": 1615153544,
        "last_modified": 0,
        "product": "standard",
        "environment": ""
      }
    ]
    ```

    ## Get an Admin API Session Access Token

    Every request to the App Services Admin API must include a valid,
    unexpired access token issued by the MongoDB Cloud API. You include
    this token in the `Authorization` header of each request using the
    bearer auth scheme.

    You need a valid [MongoDB Atlas programmatic API
    key](https://docs.atlas.mongodb.com/configure-api-access) for
    MongoDB Atlas to get a token.

    Once you have an API key pair, call the authentication endpoint:

    ```shell
    curl --request POST \
      --header 'Content-Type: application/json' \
      --header 'Accept: application/json' \
      --data '{"username": "<Public API Key>", "apiKey": "<Private API Key>"}' \
      https://services.cloud.mongodb.com/api/admin/v3.0/auth/providers/mongodb-cloud/login
    ```

    If authentication succeeds, App Services returns an access token as
    part of the JSON response document:

    ```json
    {
      "access_token": "<access_token>",
      "refresh_token": "<refresh_token>",
      "user_id": "<user_id>",
      "device_id": "<device_id>"
    }
    ```

    The `access_token` represents a limited-time authorization to interact
    with the Admin API. To authenticate a request, include the token in a
    [Bearer token](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication)
    `Authorization` header.

    ```http
    Authorization: Bearer <access_token>
    ```

    ## Refresh an Admin API Session Access Token

    Session access tokens expire 30 minutes after they are issued. When
    you login, the response also includes a `refresh_token` that you can
    use to get a new access token. This is useful because you only need
    to log in with credentials one time. After that you can use the
    refresh token to re-authenticate for as long as its valid.

    By default, refresh tokens expire 60 days after being issued. You can
    customize refresh token expiration for a minimum of 30 minutes or a
    maximum of 5 years.

    To refresh your authentication and get a new `access_token`, call
    the auth session endpoint with your `refresh_token` in the
    `Authorization` header:

    ```shell
    curl --request POST \
      --header 'Authorization: Bearer <refresh_token>' \
      https://services.cloud.mongodb.com/api/admin/v3.0/auth/session
    ```

    If the refresh token is valid, the response body includes a new
    `access_token` that's valid for the next 30 minutes:

    ```json
    {
      "access_token": "<access_token>"
    }
    ```

  version: "3.0"
  title: MongoDB Atlas App Services Admin API
servers:
  - url: https://services.cloud.mongodb.com/api/admin/v3.0
    description: The root API resource and starting point for the App Services API.
paths:
  "/auth/providers":
    get:
      tags:
        - admin
      operationId: getAdminAuthProviders
      summary: List App Services Admin Auth Providers
      deprecated: true
      responses:
        "200":
          description: Successfully enumerated available authentication providers.
          content:
            application/json:
              schema:
                type: array
                description: An array of authentication providers.
                items:
                  "$ref": "#/components/schemas/BaseAuthProvider"
      security: []
  "/auth/providers/mongodb-cloud/login":
    post:
      tags:
        - admin
      operationId: adminLogin
      summary: Authenticate as an App Services administrator
      description: |
        Authenticate as an App Services administrator using an Atlas
        programmatic API key pair. To learn more, see [Get An Admin API
        Session Access Token](#get-an-admin-api-session-access-token).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                username:
                  type: string
                apiKey:
                  type: string
              required:
                - username
                - apiKey
      responses:
        "200":
          description: Authentication was successful.
          content:
            application/json:
              schema:
                properties:
                  access_token:
                    type: string
                    description: |-
                      An access token you may provide in the `Authorization` header of API
                      requests. [The App Services API Authentication section](#section/Get-Authentication-Tokens) demonstrates how to use this token.
                  refresh_token:
                    type: string
                    description: |
                      A refresh token you may provide in the `Authorization` header of
                      [POST auth/session](#section/adminCreateSession)
                      to obtain a new `access_token` for the current user session.
                  user_id:
                    type: string
                    description: The unique `_id` value of the MongoDB Cloud user.
                  device_id:
                    type: string
      security: []
  "/auth/profile":
    get:
      tags:
        - admin
      operationId: getAdminProfile
      summary: Get information about the currently logged in user
      responses:
        "200":
          description: The profile was successfully retrieved.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/AdminUser"
  "/auth/session":
    post:
      tags:
        - admin
      operationId: adminCreateSession
      summary: Obtain a session access token
      responses:
        "201":
          description: Successfully created.
          content:
            application/json:
              schema:
                properties:
                  access_token:
                    type: string
        "401":
          description: Invalid token
          content:
            application/json:
              schema:
                oneOf:
                  - allOf:
                      - $ref: "#/components/schemas/Error"
                      - properties:
                          error:
                            const: "invalid refresh token: incorrect token type"
                        description: |-
                          The request did not use bearer token
                          authentication with a valid refresh token. Make
                          sure the Authorization header contains the
                          `refresh_token`, not the `access_token`.
      security:
        - refreshAuth: []
    delete:
      tags:
        - admin
      operationId: adminDeleteSession
      summary: Delete a session access token
      responses:
        "204":
          description: Deleted
        "401":
          description: Invalid token or session
          content:
            application/json:
              schema:
                oneOf:
                  - allOf:
                      - $ref: "#/components/schemas/Error"
                      - properties:
                          error:
                            const: "invalid refresh token: incorrect token type"
                        description: |-
                          The request did not use bearer token
                          authentication with a valid refresh token. Make
                          sure the Authorization header contains the
                          `refresh_token`, not the `access_token`.
                  - allOf:
                      - $ref: "#/components/schemas/Error"
                      - properties:
                          error:
                            const: "invalid session: failed to find refresh token"
                          error_code:
                            const: "InvalidSession"
                        description: |-
                          The provided refresh token does not match any
                          current sessions.

  "/provider_regions":
    get:
      tags:
        - deploy
      operationId: adminListAppRegions
      summary: List all available Atlas App cloud regions
      description: |-
        Return a list of all supported cloud regions in which you can
        deploy an Atlas App.
      responses:
        "200":
          description: A list of all available Atlas App cloud region names.
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/CloudProviderRegion"
  "/groups/{groupId}/apps":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
    get:
      tags:
        - apps
      operationId: adminListApplications
      summary: List all App Services Apps in an Atlas project/group
      description: |-
        List all App Services Apps within an Atlas
        [project/group](https://docs.atlas.mongodb.com/tutorial/manage-projects/).
      parameters:
        - in: query
          name: product
          required: false
          schema:
            type: string
            enum:
              - standard
              - atlas
              - data-api
              - device-sync
          style: simple
          explode: false
          description: |-
            One or more specific App Services product types. If specified,
            this endpoint only returns Apps of the specified product type(s).

            Most apps use the `standard` product type, which this
            endpoint returns by default. The `atlas`, `data-api`, and `device-sync`
            product types represent special apps for
            [Atlas Triggers](https://docs.mongodb.com/atlas/triggers),
            [Atlas Data API](https://docs.mongodb.com/atlas/api/data-api/),
            and [Atlas Device Sync](https://www.mongodb.com/docs/atlas/app-services/sync/)
            that you can access through the Atlas UI.

            You can specify multiple product types as a comma-separated list:

            ```
            /groups/{groupId}/apps?product=atlas,data-api
            ```
      responses:
        "200":
          description: Successfully listed.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/AppInstance"
    post:
      tags:
        - apps
      operationId: adminCreateApplication
      summary: Create a new app
      parameters:
        - name: defaults
          in: query
          required: false
          schema:
            type: boolean
          description: Whether or not to create a default application.
        - name: product
          in: query
          required: false
          schema:
            type: string
            enum:
              - standard
              - atlas
              - data-api
              - device-sync
          description: |-
            The App's product type. Apps use the `standard` product type
            by default. For most apps, you do not need to specify a
            `product` at all, or should specify `standard`.

            The `atlas`, `data-api`, and `device-sync`
            product types represent special apps for
            [Atlas Triggers](https://docs.mongodb.com/atlas/triggers),
            [Atlas Data API](https://docs.mongodb.com/atlas/api/data-api/),
            and [Atlas Device Sync](https://www.mongodb.com/docs/atlas/app-services/sync/)
            that you can access through the Atlas UI.
      requestBody:
        description: The application to create.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AppConstructor"
      responses:
        "201":
          description: The application was successfully created.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/AppInstance"
        "400":
          "$ref": "#/components/responses/BadRequest"
  "/groups/{groupId}/apps/{appId}":
    get:
      tags:
        - apps
      operationId: adminGetApplication
      summary: Get an app
      responses:
        "200":
          description: The application was successfully retrieved.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/AppInstance"
    delete:
      tags:
        - apps
      operationId: adminDeleteApplication
      summary: Delete an app
      responses:
        "204":
          description: The application was successfully deleted.
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
  "/groups/{groupId}/apps/{appId}/export":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - in: query
        name: deployment
        required: false
        description: The `_id` of a specific deployment to export. If not specified, export the latest deployment.
        example: 6373362f01a569d5cd571c68
        schema:
          type: string
      - in: query
        name: source_control
        required: false
        description: |-
          If `true`, the exported directory is suitable for automatic
          deployment from GitHub or other source control.

          Cannot be used with the `template` query parameter.
        schema:
          type: boolean
          default: false
      - in: query
        name: template
        required: false
        description: |-
          If `true`, the exported directory does not include any
          identifiers or other data that would tie the app to a specific
          deployment instance.

          Cannot be used with the `source_control` query parameter.
        schema:
          type: boolean
          default: false
      - in: query
        name: version
        required: false
        description: |-
          The configuration file schema version to export. This value
          corresponds to `config_version` in `root_config.json`.
        example: 20210101
        schema:
          type: string
    get:
      tags:
        - apps
      operationId: adminExportApplication
      summary: Export an app as a zip file
      description: |-
        **The Export Endpoint is deprecated. Instead, call the [Pull App
        Configuration Files](#operation/adminPullAppConfiguration)
        endpoint with an ``Accept: application/zip`` header.**

        [Export](https://www.mongodb.com/docs/atlas/app-services/apps/export/)
        an application as a zip file.
      responses:
        "200":
          description: The application was successfully exported.

  "/groups/{groupId}/apps/{appId}/event_subscriptions":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - name: type
        description: |-
          The type of event subscription to return.

          - `DATABASE`: Return Database Triggers
          - `AUTHENTICATION`: Return Authentication Triggers
          - `SCHEDULED`: Return Scheduled Triggers
          - `SYNCTRANSLATOR`: Return Device Sync translators
        in: query
        required: false
        schema:
          type: string
          enum:
            - DATABASE
            - AUTHENTICATION
            - SCHEDULED
            - SYNCTRANSLATOR
          x-enumDescriptions:
            DATABASE: Return Database Triggers
            AUTHENTICATION: Return Authentication Triggers
            SCHEDULED: Return Scheduled Triggers
            SYNCTRANSLATOR: Return Device Sync translators
    get:
      tags:
        - event-subscriptions
      operationId: adminListEventSubscriptions
      summary: List Event Subscriptions
      description: Get all event subscriptions.
      responses:
        "200":
          description: Success.
          content:
            application/json:
              schema:
                type: array
                description: |-
                  A list of all event subscriptions for the app. To see
                  Device Sync translator subscriptions, call this
                  endpoint with the query parameter
                  `?type=SYNCTRANSLATOR`.
                items:
                  $ref: "#/components/schemas/EventSubscription"
  "/groups/{groupId}/apps/{appId}/event_subscriptions/{eventSubscriptionId}":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/EventSubscriptionId"
    get:
      tags:
        - event-subscriptions
      operationId: adminGetEventSubscription
      summary: Get an Event Subscription
      description: Return information about an event subscription.
      responses:
        "200":
          description: Success.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EventSubscription"

  "/groups/{groupId}/apps/{appId}/event_subscriptions/{eventSubscriptionId}/execution":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/EventSubscriptionId"
    get:
      tags:
        - event-subscriptions
      operationId: adminGetLatestEventSubscriptionExecution
      summary: Get the Latest Event Subscription Execution
      description: Return information about the most recent execution of an event subscription.
      responses:
        "200":
          description: Success.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                  resource_id:
                    type: object
                  completed_at:
                    type: object
                    description: |-
                      The last time a batch was processed from the event stream.

                      The value of `completed_at` should be relatively
                      close to the current time. If `completed_at` is
                      not updating over time, it might mean that the
                      event processor (e.g. Device Sync) is down or
                      stuck.
                  cluster_time:
                    type: object
                    description: |-
                      The time of the latest event in the most recently processed batch.

                      If the value of `cluster_time` is significantly
                      earlier than the `completed_at` time, the event
                      processor (e.g. Device Sync) is lagging behind the event.

  "/groups/{groupId}/apps/{appId}/triggers":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
    get:
      tags:
        - triggers
      operationId: adminListTriggers
      summary: Get all triggers
      description: Get a list of all [triggers](https://www.mongodb.com/docs/atlas/app-services/triggers/overview/) in your application.
      responses:
        "200":
          description: Successfully listed triggers.
          content:
            application/json:
              schema:
                type: array
                description: A list of all database, authentication, and scheduled triggers defined for the app.
                items:
                  "$ref": "#/components/schemas/Trigger"
    post:
      tags:
        - triggers
      operationId: adminCreateTrigger
      summary: Create a trigger
      description: Create a new [trigger](https://www.mongodb.com/docs/atlas/app-services/triggers/overview/) in your application.
      requestBody:
        description: A configuration for a database, scheduled, or authentication trigger.
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/TriggerConstructor"
      responses:
        "201":
          description: Successfully created.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Trigger"

  "/groups/{groupId}/apps/{appId}/triggers/{triggerId}":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/TriggerId"
    get:
      tags:
        - triggers
      operationId: adminGetTrigger
      summary: Get a trigger
      description: Get the configuration for an existing [trigger](https://www.mongodb.com/docs/atlas/app-services/triggers/overview/) in your application.
      responses:
        "200":
          description: Successfully retrieved trigger.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Trigger"
    put:
      tags:
        - triggers
      operationId: adminUpdateTrigger
      summary: Update a trigger
      description: Modify an existing [trigger](https://www.mongodb.com/docs/atlas/app-services/triggers/overview/) in your application.
      requestBody:
        description: The updated trigger configuration.
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/Trigger"
      responses:
        "204":
          description: Successfully updated the trigger.
        "409":
          description: Encountered an error while updating the trigger.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Error"
    delete:
      tags:
        - triggers
      operationId: adminDeleteTrigger
      summary: Delete a trigger
      description: Remove an existing [trigger](https://www.mongodb.com/docs/atlas/app-services/triggers/overview/) from your application.
      responses:
        "200":
          description: Successfully deleted the trigger.
          content:
            application/json:
              schema:
                properties: {}

  "/groups/{groupId}/apps/{appId}/triggers/{triggerId}/resume":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/TriggerId"
    put:
      tags:
        - triggers
      operationId: adminResumeTrigger
      summary: Resume a suspended trigger
      description: Resume a [suspended](https://www.mongodb.com/docs/atlas/app-services/triggers/database-triggers/#suspended-triggers) database trigger.
      requestBody:
        description: Configuration options for the resume operation.
        content:
          application/json:
            schema:
              type: object
              properties:
                disable_token:
                  type: boolean
                  description: |-
                    If `true`, resumes the trigger without
                    processing missed events. Otherwise, attempts to resume the 
                    trigger from the first change event after it failed by using 
                    a resume token.
      responses:
        "204":
          description: Successfully resumed the trigger.
        "404":
          description: Trigger not found.
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: string
                    description: A description of the error that App Services encountered.

  "/groups/{groupId}/apps/{appId}/values":
    get:
      tags:
        - values
      operationId: adminListValues
      description: |-
        List all [values](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets)
        defined in an application.
      summary: |-
        List all values defined in an application.
      responses:
        "200":
          description: |-
            [values](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets) were
            successfully enumerated.
          content:
            application/json:
              schema:
                items:
                  "$ref": "#/components/schemas/ValueSummary"
    post:
      tags:
        - values
      operationId: adminCreateValue
      summary: Define a Value in an application
      description: |-
        Define a [Value](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets) in
        an application.
      requestBody:
        description: The value to create.
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/NewValue"
      responses:
        "201":
          description: |-
            The [value](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets) was
            successfully defined.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/NewValue"
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"

  "/groups/{groupId}/apps/{appId}/values/{valueId}":
    get:
      tags:
        - values
      operationId: adminGetValue
      summary: |-
        Retrieve a value definition from an application
      description: |-
        Retrieve a [value](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets)
        definition from an application.
      responses:
        "200":
          description: Successfully retrieved the value.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Value"
    delete:
      tags:
        - values
      operationId: adminDeleteValue
      summary: |-
        Delete a value defined in an application.
      description: |-
        Delete a [value](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets)
        defined in an application.
      responses:
        "204":
          description: Successfully deleted the value.
    put:
      tags:
        - values
      operationId: adminUpdateValue
      summary: Update a value definition in an application
      description: |-
        Update a [value](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets)
        definition in an application.
      responses:
        "200":
          description: Successfully updated the value.
          content:
            application/json:
              schema:
                items:
                  "$ref": "#/components/schemas/NewValue"
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/ValueId"

  "/groups/{groupId}/apps/{appId}/multi_data_sources":
    post:
      tags:
        - services
      operationId: adminLinkMultiDataSources
      summary: Link multiple data sources
      description: |-
        Call this endpoint to link multiple data sources to an App. The total 
        limit of linked data sources per App is 100. Data Sources linked by this
        endpoint will have `ReadAndWrite` default rules. 
      requestBody:
        content:
          application/json:
            schema:
              type: array
              description: Limit of 25 linked data sources in the payload. 
              items:
                $ref: "#/components/schemas/LinkingDataSourceConstructor"
      responses:
        "201":
          description: No content
        "400":
          description: |-
            - Data Sources exceeds the limit of 25 in the payload
            - Data Sources exceed the limit of 100 on the App
            - Multiple Default Rules for a single Data Source 
            - Type of Data Source is neither "mongodb-atlas" nor "datalake"
            - Linking failed for at least one Data Source
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/FailedLinkingDataSourceResponse" 
                  - $ref: "#/components/schemas/Error"
      parameters:
        - "$ref": "#/components/parameters/GroupId"
        - "$ref": "#/components/parameters/AppId"

  "/groups/{groupId}/apps/{appId}/services":
    get:
      tags:
        - services
      operationId: adminListServices
      summary: List all data sources and third-party services
      description: |-
        List all [data sources](https://www.mongodb.com/docs/atlas/app-services/mongodb/) and [third-party
        services [Deprecated]](https://www.mongodb.com/docs/atlas/app-services/reference/services/).
      responses:
        "200":
          description: Successfully listed services.
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/ServiceResponse"
    post:
      tags:
        - services
      operationId: adminCreateService
      summary: Create a data source or third-party service
      description: |-
        Create a [data source](https://www.mongodb.com/docs/atlas/app-services/mongodb/) or [third-party
        service [Deprecated]](https://www.mongodb.com/docs/atlas/app-services/reference/services/).
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - $ref: "#/components/schemas/AtlasClusterServiceConstructor"
                - $ref: "#/components/schemas/AtlasFederatedInstance"
                - $ref: "#/components/schemas/ThirdPartyServiceConstructor"

      responses:
        "201":
          description: Successfully created.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/AtlasCluster"
                  - $ref: "#/components/schemas/AtlasFederatedInstance"
                  - $ref: "#/components/schemas/ThirdPartyService"
        "409":
          description: There is already a service with the given `name`.
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"

  "/groups/{groupId}/apps/{appId}/services/{serviceId}":
    get:
      tags:
        - services
      operationId: adminGetService
      summary: Get a data source or third-party service
      description: >-
        Get a [data source](https://www.mongodb.com/docs/atlas/app-services/mongodb/)
        or [third-party service [Deprecated]](https://www.mongodb.com/docs/atlas/app-services/reference/services/).
      responses:
        "200":
          description: Successfully retrieved.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/AtlasCluster"
                  - $ref: "#/components/schemas/AtlasFederatedInstance"
                  - $ref: "#/components/schemas/ThirdPartyService"
    delete:
      tags:
        - services
      operationId: adminDeleteService
      summary: Delete a data source or third-party service
      description: |-
        Delete a [data source](https://www.mongodb.com/docs/atlas/app-services/mongodb/)
        or [third-party service [Deprecated]](https://www.mongodb.com/docs/atlas/app-services/reference/services/).
      responses:
        "204":
          description: Successfully deleted.
    patch:
      tags:
        - services
      operationId: adminUpdateService
      summary: Update a service
      description: Update a service.
      responses:
        "200":
          description: Successfully updated.
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/ServiceId"
  "/groups/{groupId}/apps/{appId}/services/{datasourceId}/commands/validate_documents":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/DatasourceId"
    post:
      tags:
        - schemas
      operationId: adminValidateDocuments
      summary: Sample & Validate Documents
      description: |-
        Query a subset of documents in a collection and validate each match against a schema.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - database_name
                - collection_name
                - from_schema
              properties:
                database_name:
                  type: string
                  description: The name of the database that contains the collection to validate.
                collection_name:
                  type: string
                  description: The name of the collection to validate.
                from_schema:
                  type: object
                  description: The EJSON schema to validate sampled documents against.
                query:
                  type: object
                  default: {}
                  description: |-
                    A [MongoDB query](https://www.mongodb.com/docs/manual/tutorial/query-documents/)
                    that matches documents in the collection. The result of running this query is the
                    sample population. Use this to narrow the sample to a subset of documents in the
                    collection.
                limit:
                  type: number
                  default: 10000
                  description: The maximum number of documents to sample.
                sort:
                  type: object
                  default: {}
                  description: |-
                    A [MongoDB sort](https://www.mongodb.com/docs/manual/reference/method/cursor.sort/) for the collection.
                    Use this to determine which end of a range query to start sampling from.
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error_code:
                          "$ref": "#/components/schemas/ValidationError"
                          description: The type of the schema validation error.
                        error_count:
                          type: number
                          description: The number of sampled documents that failed this validation.
                        field:
                          type: string
                          description: The path of the field that failed this validation.
                          examples:
                            - (root)._id
                            - (root).name
                        failed_ids:
                          type: array
                          description: A list of the `_id` values for sampled documents that failed this validation.
                          items:
                            type: string
                        failed_documents_query:
                          type: object
                          description: A MongoDB query filter that matches sampled documents that failed this validation.
                  total_processed_count:
                    type: number
                    description: The total number of documents that were sampled.
                  total_error_count:
                    type: number
                    description: The total number of documents that failed any validation.
  "/groups/{groupId}/apps/{appId}/services/{serviceId}/commands/{commandName}":
    post:
      tags:
        - services
      operationId: adminRunCommand
      summary: Run a command associated with a service
      deprecated: true
      description: |-
        Run a command associated with a
        [service](https://www.mongodb.com/docs/atlas/app-services/reference/services).
      responses:
        "200":
          description: Successfully executed.
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/ServiceId"
      - "$ref": "#/components/parameters/CommandName"
  "/groups/{groupId}/apps/{appId}/services/{serviceId}/commands/build_info":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/ServiceId"
    get:
      tags:
        - services
      operationId: getBuildInfo
      summary: Get information about the underlying Atlas mongod
      responses:
        "200":
          description: The build information was successfully retrieved.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/BuildInfo"
  "/groups/{groupId}/apps/{appId}/services/{serviceId}/config":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/ServiceId"
    get:
      tags:
        - services
      operationId: adminGetServiceConfig
      summary: Get a Service Configuration
      description: |-
        Get configuration of [data
        sources](https://www.mongodb.com/docs/atlas/app-services/mongodb/)
        and [third-party services [Deprecated]](https://www.mongodb.com/docs/atlas/app-services/reference/services/).
      responses:
        "200":
          description: Successfully retrieved.
          content:
            application/json:
              schema:
                items:
                  anyOf:
                    - $ref: "#/components/schemas/AtlasCluster"
                    - $ref: "#/components/schemas/AtlasFederatedInstance"
                    - $ref: "#/components/schemas/ThirdPartyService"
    patch:
      tags:
        - services
      operationId: adminUpdateServiceConfig
      summary: Update a Service Configuration
      description: |
        Update a [Data Source](https://www.mongodb.com/docs/atlas/app-services/mongodb/) or
        [Third-Party Service [Deprecated]](https://www.mongodb.com/docs/atlas/app-services/reference/services/)
        configuration.
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - $ref: "#/components/schemas/AtlasClusterServiceConfigInstance"
                - $ref: "#/components/schemas/AtlasFederatedInstance"
                - $ref: "#/components/schemas/ThirdPartyServiceConstructor"
      responses:
        "204":
          description: Successfully updated.
  "/groups/{groupId}/apps/{appId}/services/{serviceId}/rules":
    get:
      tags:
        - rules
      operationId: adminListRules
      summary: Get all rules
      deprecated: true
      description: List all [data access rules](https://www.mongodb.com/docs/atlas/app-services/rules).
      responses:
        "200":
          description: Successfully listed.
          content:
            application/json:
              schema:
                items:
                  oneOf:
                    - "$ref": "#/components/schemas/Rule"
                    - "$ref": "#/components/schemas/ThirdPartyServiceRule"
    post:
      tags:
        - rules
      operationId: adminCreateRule
      summary: Create a rule
      deprecated: true
      description: Create a [data access rule](https://www.mongodb.com/docs/atlas/app-services/rules).
      requestBody:
        required: true
        description: The rule to create.
        content:
          application/json:
            schema:
              oneOf:
                - "$ref": "#/components/schemas/Rule"
                - "$ref": "#/components/schemas/ThirdPartyServiceRule"
      responses:
        "201":
          description: Successfully created.
          content:
            application/json:
              schema:
                properties:
                  _id:
                    type: string
                  name:
                    type: string
        "409":
          description: There is already a rule with the given `name`.
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/ServiceId"
  "/groups/{groupId}/apps/{appId}/services/{serviceId}/rules/{ruleId}":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/ServiceId"
      - "$ref": "#/components/parameters/RuleId"
    get:
      tags:
        - rules
      operationId: adminGetRule
      summary: Get a rule
      deprecated: true
      description: Get a specific [data access rule](https://www.mongodb.com/docs/atlas/app-services/rules).
      responses:
        "200":
          description: Successfully retrieved.
          content:
            application/json:
              schema:
                oneOf:
                  - "$ref": "#/components/schemas/Rule"
                  - "$ref": "#/components/schemas/ThirdPartyServiceRule"
    delete:
      tags:
        - rules
      operationId: adminDeleteRule
      summary: Delete a rule
      deprecated: true
      description: Delete a [data access rule](https://www.mongodb.com/docs/atlas/app-services/rules).
      responses:
        "204":
          description: Successfully deleted.
    put:
      tags:
        - rules
      operationId: adminUpdateRule
      summary: Update a rule
      deprecated: true
      description: Update a [data access rule](https://www.mongodb.com/docs/atlas/app-services/rules).
      requestBody:
        required: true
        description: The new state of the rule.
        content:
          application/json:
            schema:
              oneOf:
                - "$ref": "#/components/schemas/Rule"
                - "$ref": "#/components/schemas/ThirdPartyServiceRule"
      responses:
        "200":
          description: Successfully updated.
  "/groups/{groupId}/apps/{appId}/services/{serviceId}/default_rule":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/ServiceId"
    get:
      tags:
        - rules
      operationId: adminGetDefaultRule
      summary: Get default roles and filters
      deprecated: true
      description: Get the current [default roles and filters](https://www.mongodb.com/docs/atlas/app-services/rules/#default-rules).
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DefaultRule"
        "404":
          description: No default rule is defined.
          content:
            application/json:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/BasicError"
                  - properties:
                      error:
                        enum:
                          - "default rule does not exist on service"
    post:
      tags:
        - rules
      operationId: adminCreateDefaultRule
      summary: Create default roles and filters
      deprecated: true
      description: Create [default roles and filters](https://www.mongodb.com/docs/atlas/app-services/rules/#default-rules) for a data source.
      requestBody:
        required: true
        description: A default rule configuration object.
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/DefaultRuleConstructor"
      responses:
        "201":
          description: Created default rule.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DefaultRule"
        "400":
          description: Default rule already exists.
          content:
            application/json:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/BasicError"
                  - properties:
                      error:
                        enum:
                          - "default rule already exists"
    put:
      tags:
        - rules
      operationId: adminUpdateDefaultRule
      summary: Update default roles and filters
      deprecated: true
      description: Modify the [default roles and filters](https://www.mongodb.com/docs/atlas/app-services/rules/#default-rules) of a data source.
      requestBody:
        required: true
        description: The updated default rule configuration object.
        content:
          application/json:
            schema:
              allOf:
                - "$ref": "#/components/schemas/DefaultRule"
                - required: ["_id"]
      responses:
        "204":
          description: Successfully modified the default rule.
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/BasicError"
                  - properties:
                      error:
                        enum:
                          - "default rule does not exist"
                          - "service default rule id mismatch"
    delete:
      tags:
        - rules
      operationId: adminDeleteDefaultRule
      summary: Delete default roles and filters
      deprecated: true
      description: Delete the [default roles and filters](https://www.mongodb.com/docs/atlas/app-services/rules/#default-rules) of a data source.
      responses:
        "204":
          description: Deleted the default rule.
        "404":
          description: Default rule does not exist.
          content:
            application/json:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/BasicError"
                  - properties:
                      error:
                        enum:
                          - "default rule does not exist for app service"
  "/groups/{groupId}/apps/{appId}/services/{serviceId}/commands/generate_schema":
    post:
      tags:
        - services
      operationId: adminGenerateSchema
      summary: Generate a JSON schema from sample
      description: Sample a subset of documents in a collection to generate a JSON schema.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - database_name
                - collection_name
                - limit
              properties:
                database_name:
                  type: string
                  description: The name of the database that contains the collection.
                collection_name:
                  type: string
                  description:
                    The name of the collection to sample and generate a
                    schema for.
                limit:
                  type: integer
                  description: The maximum number of documents to include in the sample.
      responses:
        "200":
          description: Successfully generated schema
          content:
            application/json:
              schema:
                type: object
                properties:
                  schema:
                    type: object
                    description: The generated JSON schema
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/ServiceId"
  "/groups/{groupId}/apps/{appId}/services/{serviceId}/incoming_webhooks":
    get:
      tags:
        - webhooks
      operationId: adminListWebhooks
      summary: List webhooks
      deprecated: true
      description: List webhooks.
      responses:
        "200":
          description: Successfully listed incoming webhooks.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/IncomingWebhook"
    post:
      tags:
        - webhooks
      operationId: adminCreateWebhook
      summary: Create a webhook
      deprecated: true
      description: Create a webhook.
      requestBody:
        description: The webhook to create.
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/IncomingWebhook"
      responses:
        "201":
          description: Successfully created.
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/ServiceId"
  "/groups/{groupId}/apps/{appId}/services/{serviceId}/incoming_webhooks/{incomingWebhookId}":
    get:
      tags:
        - webhooks
      operationId: adminGetWebhook
      summary: Retrieve a webhook
      description: Retrieve a webhook.
      responses:
        "200":
          description: Successfully retrieved.
    delete:
      tags:
        - webhooks
      operationId: adminDeleteWebhook
      summary: Delete a webhook
      description: Delete a webhook.
      responses:
        "204":
          description: Successfully deleted.
    put:
      tags:
        - webhooks
      operationId: adminUpdateWebhook
      summary: Update a webhook
      description: Update a webhook.
      requestBody:
        required: true
        description: The updated state of the webhook.
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/IncomingWebhook"
      responses:
        "200":
          description: Successfully updated.
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/ServiceId"
      - "$ref": "#/components/parameters/IncomingWebhookId"
  "/groups/{groupId}/apps/{appId}/service/{serviceId}/config":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/ServiceId"
    get:
      tags:
        - sync
      operationId: adminGetFlexSync
      summary: Get Flexible Sync information
      description: |-
        Retrieve sync data for a specific Atlas App Services App when using
        [Flexible Sync](https://www.mongodb.com/docs/atlas/app-services/sync/get-started/).
      responses:
        "200":
          description: Successfully retrieved.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/SyncDataResponse"
  "/groups/{groupId}/apps/{appId}/sync/data":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
    get:
      tags:
        - sync
      operationId: adminGetSync
      summary: Get Partition-Based Sync information
      deprecated: true
      description: |-
        Retrieve partition field data when using 
        [Partition-Based Sync](https://www.mongodb.com/docs/atlas/app-services/reference/partition-based-sync).
      responses:
        "200":
          description: Successfully retrieved.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/PbsSyncResponse"
      parameters:
        - in: query
          name: service_id
          required: true
          schema:
            type: string
          description: The Service ID for the linked cluster.
  "/groups/{groupId}/apps/{appId}/push/notifications":
    get:
      tags:
        - notifications
      operationId: adminListNotifications
      summary: List push notifications
      deprecated: true
      description: |-
        List [push notifications](https://www.mongodb.com/docs/atlas/app-services/reference/push-notifications).
      parameters:
        - name: state
          in: query
          description: Only list notifications with the given state.
          required: false
          schema:
            "$ref": "#/components/schemas/MessageState"
      responses:
        "200":
          description: Successfully listed.
          content:
            application/json:
              schema:
                items:
                  "$ref": "#/components/schemas/Message"
    post:
      tags:
        - notifications
      operationId: adminCreateNotification
      summary: Create a push notification
      deprecated: true
      description: |-
        Create a [push
        notification](https://www.mongodb.com/docs/atlas/app-services/reference/push-notifications).
      requestBody:
        required: true
        description: The notification to create.
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/NewMessage"
      responses:
        "201":
          description: Successfully created.
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"

  "/groups/{groupId}/apps/{appId}/pull":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
    get:
      tags:
        - apps
      operationId: adminPullAppConfiguration
      summary: Pull App Configuration Files
      description: |
        Download the current App configuration. You can choose to
        download in two different formats:

        - A compressed zip file that contains the configuration file
          directory. This is most useful when you're working with the
          CLI, a version control system, or another environment based on
          the file system.

        - A single JSON object that contains the entire configuration.
          This is most useful when you're working with the API or
          another environment that can parse JSON.

        You specify which format to download by setting the `Accept`
        header.
      responses:
        200:
          description: Pull successful
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PushPullAppConfig"
            application/zip:
              schema:
                type: string
                format: binary
                description: A zip file containing the App configuration file directory
        400:
          description: Invalid request
        500:
          description: Error pulling configuration

  "/groups/{groupId}/apps/{appId}/push":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
    patch:
      tags:
        - apps
      operationId: adminPushAppConfiguration
      summary: Push App Configuration Files
      description: |
        Upload a new full App configuration. This operation overwrites
        the entire existing App configuration.

        **Note:** If your App configuration includes any references to a
        Secret, you must [create the
        Secret](#operation/adminCreateASecret) before you push the
        configuration.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PushPullAppConfig"
      responses:
        204:
          description: Push successful
        400:
          description: Invalid request
        500:
          description: Error pulling configuration

  "/groups/{groupId}/apps/{appId}/push/notifications/{messageId}":
    get:
      tags:
        - notifications
      operationId: adminGetMessage
      summary: Retrieve a push notification message
      deprecated: true
      description: |-
        Retrieve a [push
        notification](https://www.mongodb.com/docs/atlas/app-services/reference/push-notifications)
        message.
      responses:
        "200":
          description: Successfully retrieved.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Message"
    delete:
      tags:
        - notifications
      operationId: adminDeleteMessage
      summary: Delete a push notification message
      deprecated: true
      description: |-
        Delete a [push
        notification](https://www.mongodb.com/docs/atlas/app-services/reference/push-notifications)
        message.
      responses:
        "204":
          description: Successfully deleted.
    put:
      tags:
        - notifications
      operationId: adminUpdateMessage
      summary: Update a push notification
      deprecated: true
      description: |-
        Update a [push
        notification](https://www.mongodb.com/docs/atlas/app-services/reference/push-notifications)
        message.
      responses:
        "200":
          description: Successfully updated.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Message"
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/MessageId"
  "/groups/{groupId}/apps/{appId}/push/notifications/{messageId}/type":
    put:
      tags:
        - notifications
      operationId: adminSetMessageType
      summary: Set a push notification's type
      deprecated: true
      description: |-
        Set a [push
        notification's](https://www.mongodb.com/docs/atlas/app-services/reference/push-notifications)
        type.
      responses:
        "200":
          description: Successfully set.
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/MessageId"
  "/groups/{groupId}/apps/{appId}/push/notifications/{messageId}/send":
    post:
      tags:
        - notifications
      operationId: adminSendMessage
      summary: Send a push notification
      deprecated: true
      description: |-
        Send a [push
        notification](https://www.mongodb.com/docs/atlas/app-services/reference/push-notifications).
      responses:
        "200":
          description: Successfully sent.
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/MessageId"

  "/groups/{groupId}/apps/{appId}/users":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
    get:
      tags:
        - users
      operationId: adminListUsers
      summary: List users
      deprecated: true
      description: List confirmed [user accounts](https://www.mongodb.com/docs/atlas/app-services/authentication#std-label-user-accounts).
      parameters:
        - "$ref": "#/components/parameters/UsersAfter"
        - "$ref": "#/components/parameters/UsersSort"
        - "$ref": "#/components/parameters/UsersDesc"
      responses:
        "200":
          description: Successfully listed.
          content:
            application/json:
              schema:
                type: array
                maxItems: 50
                description: At most 50 results per request.
                items:
                  "$ref": "#/components/schemas/User"
    post:
      tags:
        - users
      operationId: adminCreateUser
      summary: Create a user
      deprecated: true
      description: |-
        Create a new
        [email/password](https://www.mongodb.com/docs/atlas/app-services/authentication/email-password/)
        user account.

        *Note:* You cannot create user accounts through the Admin API
        for any authentication provider other than email/password.
      requestBody:
        required: true
        description: The user to create
        content:
          application/json:
            schema:
              properties:
                email:
                  type: string
                password:
                  type: string
              required:
                - email
                - password
      responses:
        "201":
          description: Successfully created.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/User"

  "/groups/{groupId}/apps/{appId}/users/verify_token":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
    post:
      tags:
        - users
      operationId: adminVerifyUserAccessToken
      summary: Verify & decode an access token
      deprecated: true
      description: |-
        Verify a that a user's client access token is valid.
      requestBody:
        required: true
        description: |-
          The user's client access token. The access token represents a logged in application user. This is not the same as the
          [``access_token``](https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#section/Get-Authentication-Tokens)
          that you use to work with the Admin API.
        content:
          application/json:
            schema:
              properties:
                token:
                  type: string
              required:
                - token
      responses:
        "200":
          description: Token is valid or expired.
          content:
            application/json:
              schema:
                oneOf:
                  - type: string
                    const: "token expired"
                    description: The token is valid but has expired.
                  - type: object
                    description: The token is valid and is not expired.
                    properties:
                      sub:
                        type: string
                        description: User ID.
                      aud:
                        type: string
                        description: |-
                          Specifies which Resource Servers the JWT is valid for. Omitted
                          if empty.
                      exp:
                        type: integer
                        description: The Unix timestamp when the JWT expires.
                      iat:
                        type: integer
                        description: The Unix timestamp when the JWT was issued.
                      iss:
                        type: string
                        description: The issuer of the JWT.
                      custom_user_data:
                        type: object
                        description: |-
                          Contains [custom user
                          data](https://www.mongodb.com/docs/atlas/app-services/users/custom-metadata/#custom-user-data)
                          if it exists for the user. Only present if the access token is created
                          after custom user data is enabled and configured. Omitted if empty.
                      domain_id:
                        type: string
                      data:
                        type: string
                        description:
                          "Optional: any metadata stored with the token. Omitted
                          if empty."
                      device_id:
                        type: string
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Error"
        "401":
          description: Invalid Session
          content:
            application/json:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/Error"
                  - properties:
                      error:
                        const: "invalid session"
                      error_code:
                        const: "InvalidSession"
  "/groups/{groupId}/apps/{appId}/users/{userId}":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/UserId"
    get:
      tags:
        - users
      operationId: adminGetUser
      summary: Get a User
      deprecated: true
      description: Get a specific [user account](https://www.mongodb.com/docs/atlas/app-services/authentication) by ID.
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/User"
    delete:
      tags:
        - users
      operationId: adminDeleteUser
      summary: Delete a user
      deprecated: true
      description: Delete a specific [user account](https://www.mongodb.com/docs/atlas/app-services/authentication) by ID.
      responses:
        "204":
          description: Deleted

  "/groups/{groupId}/apps/{appId}/users/{userId}/reset_email":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/UserId"
    patch:
      tags:
        - users
      operationId: adminResetUserEmail
      summary: Change a user's email
      deprecated: true
      description: Change the email address for an [email/password user](https://www.mongodb.com/docs/atlas/app-services/authentication/email-password/) by ID.
      requestBody:
        required: true
        description: The new email address for the user.
        content:
          application/json:
            schema:
              properties:
                email:
                  type: string
                  description: The new email for the user.
              required:
                - email
            example: { "email": "new_email@example.com" }
      responses:
        "204":
          description: No Content
        "400":
          description: |-
            - Payload is formatted incorrectly.
            - The email in the payload is not a string.
            - The email in payload has 0 or greater than 128 characters.
            - The user does not have a local-userpass identity.
        "404":
          description: The appId, groupId, or userId is invalid.

  "/groups/{groupId}/apps/{appId}/users/{userId}/devices":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/UserId"
    get:
      tags:
        - users
      operationId: adminListDevices
      summary: List a user's devices
      deprecated: true
      responses:
        "200":
          description: Successfully listed.
          content:
            application/json:
              schema:
                items:
                  type: object

  "/groups/{groupId}/apps/{appId}/users/{userId}/logout":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/UserId"
    put:
      tags:
        - users
      operationId: adminUserLogout
      summary: Revoke user sessions
      deprecated: true
      description: |-
        Revoke all of a [user](https://www.mongodb.com/docs/atlas/app-services/authentication)'s
        sessions.
      responses:
        "204":
          description: Successfully revoked.

  "/groups/{groupId}/apps/{appId}/users/{userId}/enable":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/UserId"
    put:
      tags:
        - users
      operationId: adminEnableUser
      summary: Enable a user
      deprecated: true
      description: Enable a [user](https://www.mongodb.com/docs/atlas/app-services/authentication).
      responses:
        "204":
          description: Successfully enabled.

  "/groups/{groupId}/apps/{appId}/users/{userId}/disable":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/UserId"
    put:
      tags:
        - users
      operationId: adminDisableUser
      summary: Disable a user
      deprecated: true
      description: Disable a [user](https://www.mongodb.com/docs/atlas/app-services/authentication).
      responses:
        "204":
          description: Successfully disabled.

  "/groups/{groupId}/apps/{appId}/user_registrations/pending_users":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - in: query
        name: after
        required: false
        schema:
          type: string
        description: |-
          The unique ``_id`` for a pending user. ``List pending users`` can return 50
          pending users at a time. To view additional results, find the ``_id`` of the
          last pending user listed in the previous call to ``list pending users``. Call
          ``list pending users`` again, passing the ``_id`` to the after parameter.

    get:
      tags:
        - users
      operationId: adminListPendingUsers
      summary: List pending users
      deprecated: true
      description: List pending user account registrations. Returns up to 50 pending users in a call.
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  required:
                    - _id
                    - domain_id
                    - login_ids
                  properties:
                    _id:
                      type: string
                      description: The unique pending user account ID
                    user_id:
                      type: string
                    domain_id:
                      type: string
                    login_ids:
                      type: array
                      description: A list of identities associated with the pending user
                      items:
                        required:
                          - id_type
                          - id
                        properties:
                          id_type:
                            type: string
                            enum:
                              - email
                          id:
                            type: string
                            description: The pending user's username. For example, this is an email/password user's email address.
                example:
                  [
                    {
                      "_id": "63754f968a605a78ea6939e7",
                      "domain_id": "60c8f69864c0a72d14bb534c",
                      "login_ids":
                        [{ "id_type": "email", "id": "someone@example.com" }],
                      "user_id": "",
                    },
                    {
                      "_id": "63754fd83c001970b1e5ea66",
                      "domain_id": "60c8f69864c0a73e3e11c22b",
                      "login_ids":
                        [{ "id_type": "email", "id": "joe@example.com" }],
                      "user_id": "",
                    },
                  ]

  "/groups/{groupId}/apps/{appId}/user_registrations/by_email/{email}":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/Email"
    delete:
      tags:
        - users
      operationId: adminDeletePendingEmailPasswordUser
      summary: Delete a pending email/password authentication user
      deprecated: true
      description: Delete a pending [user](https://www.mongodb.com/docs/atlas/app-services/authentication).
      responses:
        "204":
          description: Successfully deleted.

  "/groups/{groupId}/apps/{appId}/user_registrations/by_email/{email}/send_confirm":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/Email"
    post:
      tags:
        - email
      operationId: adminSendConfirmationEmail
      summary: Send a confirmation email
      deprecated: true
      description: |-
        Send a [confirmation
        email](https://www.mongodb.com/docs/atlas/app-services/authentication/email-password/).
      responses:
        "200":
          description: Successfully sent.

  "/groups/{groupId}/apps/{appId}/user_registrations/by_email/{email}/confirm":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/Email"
    post:
      tags:
        - email
      operationId: adminConfirmPendingUser
      summary: Confirm a pending user
      deprecated: true
      description: Confirm a pending [user](https://www.mongodb.com/docs/atlas/app-services/authentication).
      responses:
        "204":
          description: Successfully confirmed.

  "/groups/{groupId}/apps/{appId}/user_registrations/by_email/{email}/run_confirm":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/Email"
    post:
      tags:
        - email
      operationId: adminRerunPendingUserConfirmation
      summary: Rerun a user confirmation workflow
      deprecated: true
      description: |-
        Reruns a pending user's [confirmation workflow](https://www.mongodb.com/docs/atlas/app-services/authentication).
      responses:
        "202":
          description: Successfully re-ran confirmation workflow.
        "400":
          description: |-
            User is already confirmed or Email/Password authentication is not
            enabled.
        "404":
          description: User does not exist.

  "/groups/{groupId}/apps/{appId}/debug/execute_function":
    post:
      tags:
        - functions
      operationId: adminExecuteFunction
      summary: Execute a function
      description: Execute a [function](https://www.mongodb.com/docs/atlas/app-services/functions/) for testing.
      parameters:
        - name: user_id
          in: query
          description: |-
            The user as which to execute the function. Either `user_id` or
            `run_as_system` is required. You cannot specify both.
          schema:
            type: string
          required: true
        - name: run_as_system
          in: query
          description: |-
            Determine whether or not to run as system user. Either `run_as_system`
            or `user_id` is required. You cannot specify both.
          schema:
            type: boolean
          required: true
      requestBody:
        required: true
        description: The function to execute.
        content:
          application/json:
            schema:
              properties:
                service:
                  type: string
                  description: The service to use when calling this function.
                name:
                  type: string
                  description: The name of the function you want to run.
                arguments:
                  type: array
                  description: Any arguments that your function needs.
                  items:
                    type: string
              required:
                - name
      responses:
        "200":
          description: Successfully executed.
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: object
                  logs: {}
                  result:
                    type: object
                  stats:
                    properties:
                      execution_time:
                        type: string
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
  "/groups/{groupId}/apps/{appId}/debug/execute_function_source":
    post:
      tags:
        - functions
      operationId: adminExecuteFunctionSource
      summary: Execute a function's source code for testing
      description: |-
        Execute a [function](https://www.mongodb.com/docs/atlas/app-services/functions/)'s source code
        for testing.
      parameters:
        - name: user_id
          in: query
          description: |-
            The user as which to execute the function. Either `user_id` or
            `run_as_system` is required. You cannot specify both.
          schema:
            type: string
          required: true
        - name: run_as_system
          in: query
          description: |-
            Determine whether or not to run as system user. Either `run_as_system`
            or `user_id` is required. You cannot specify both.
          schema:
            type: boolean
          required: true
      requestBody:
        required: true
        description: The source to execute.
        content:
          application/json:
            schema:
              properties:
                eval_source:
                  type: string
                  description: |-
                    This JSON expression must evaluate to `true` before the function may
                    run. If this field is blank, it will evaluate to `true`.
                source:
                  type: string
              required:
                - source
      responses:
        "200":
          description: Successfully executed.
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: object
                  logs: {}
                  result:
                    type: object
                  stats:
                    properties:
                      execution_time:
                        type: string
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"

  "/groups/{groupId}/apps/{appId}/auth_providers":
    get:
      tags:
        - authproviders
      operationId: adminListAuthProviders
      summary: List authentication providers in a Atlas App Services App
      deprecated: true
      description: |-
        List [authentication providers](https://www.mongodb.com/docs/atlas/app-services/authentication/)
        within a Atlas App Services App.
      responses:
        "200":
          description: Successfully listed.
          content:
            application/json:
              schema:
                items:
                  "$ref": "#/components/schemas/BaseAuthProvider"
    post:
      tags:
        - authproviders
      operationId: adminCreateAuthProvider
      summary: Create an authentication provider
      deprecated: true
      description: |-
        Create an [authentication provider](https://www.mongodb.com/docs/atlas/app-services/authentication/).
      requestBody:
        required: true
        description: ""
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/AuthProviderConstructor"
      responses:
        "201":
          description: Successfully created.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/AuthProvider"
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
  "/groups/{groupId}/apps/{appId}/auth_providers/{providerId}":
    get:
      tags:
        - authproviders
      operationId: adminGetAuthProvider
      summary: Retrieve information about authentication provider
      deprecated: true
      description: |-
        Retrieve information about one of an application's [authentication
        providers](https://www.mongodb.com/docs/atlas/app-services/authentication/).
      responses:
        "200":
          description: Successfully retrieved.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/AuthProvider"
    delete:
      tags:
        - authproviders
      operationId: adminDeleteAuthProvider
      summary: Delete an authentication provider
      deprecated: true
      description: |-
        Delete an [authentication provider](https://www.mongodb.com/docs/atlas/app-services/authentication/).
      responses:
        "204":
          description: Successfully deleted.
    patch:
      tags:
        - authproviders
      operationId: adminUpdateAuthProvider
      summary: Update an authentication provider
      deprecated: true
      description: |-
        Update an [authentication provider](https://www.mongodb.com/docs/atlas/app-services/authentication/).
      requestBody:
        required: true
        description: ""
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/AuthProviderConstructor"
      responses:
        "204":
          description: Successfully updated.
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/ProviderId"
  "/groups/{groupId}/apps/{appId}/auth_providers/{providerId}/disable":
    put:
      tags:
        - authproviders
      operationId: adminDisableAuthProvider
      summary: Disable an authentication provider
      deprecated: true
      description: |-
        Disable an [authentication provider](https://www.mongodb.com/docs/atlas/app-services/authentication/).
      responses:
        "204":
          description: Successfully disabled.
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/ProviderId"
  "/groups/{groupId}/apps/{appId}/auth_providers/{providerId}/enable":
    put:
      tags:
        - authproviders
      operationId: adminEnableAuthProvider
      summary: Enable an authentication provider
      deprecated: true
      description: |-
        Enable an [authentication provider](https://www.mongodb.com/docs/atlas/app-services/authentication/).
      responses:
        "204":
          description: Successfully enabled.
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/ProviderId"
  "/groups/{groupId}/apps/{appId}/security/allowed_request_origins":
    get:
      tags:
        - security
      operationId: adminListAllowedRequestOrigins
      summary: List allowed HTTP origins
      description: |-
        List the allowed [HTTP
        origins](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin)
        from which App Services should allow requests.
      responses:
        "200":
          description: Successfully listed.
          content:
            application/json:
              schema:
                items:
                  type: string
    post:
      tags:
        - security
      operationId: adminSetAllowedRequestOrigins
      summary: Set allowed HTTP origins
      description: |-
        Set the allowed [HTTP
        origins](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin)
        from which App Services should allow requests.
      requestBody:
        required: true
        description: A list of HTTP origins.
        content:
          application/json:
            schema:
              items:
                description: An HTTP origin. Must be of the form `<scheme>://<host>[:port]`.
                type: string
      responses:
        "204":
          description: The allowed HTTP origins were successfully set.
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
  "/groups/{groupId}/apps/{appId}/security/access_list":
    get:
      tags:
        - security
      operationId: allowedIPAccessListGet
      summary: List the allowed entries in the Access List
      description: List the allowed entries in the Access List of your Atlas App Services App.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                items:
                  properties:
                    current_ip:
                      type: string
                    allowed_ips:
                      type: array
                      items:
                        type: object
                        properties:
                          _id:
                            type: string
                            format: ObjectID
                            description: ObjectID
                          address:
                            type: string
                          ip:
                            type: string
                            format: net.IP
                            description: net.IP
                          network:
                            type: string
                            format: net.IPNet
                            description: net.IPNet
                          comment:
                            type: string
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
    post:
      tags:
        - security
      operationId: allowedIPAccessListCreate
      summary: Create an IP address or CIDR block in the Access List
      description: |-
        Create an IP address or CIDR block in the Access List for your App Services
        app.
      requestBody:
        description: The IP Access List entry to create.
        required: true
        content:
          application/json:
            schema:
              properties:
                address:
                  type: string
                  description: The value of the IP address or CIDR block.
                comment:
                  type: string
                  description: An optional comment included in the Access List entry.
              required:
                - address
      responses:
        "201":
          description: ""
          content:
            application/json:
              schema:
                type: object
                properties:
                  _id:
                    type: string
                    format: ObjectID
                    description: ObjectID
                  address:
                    type: string
                  ip:
                    type: string
                    format: net.IP
                    description: net.IP
                  network:
                    type: string
                    format: net.IPNet
                    description: net.IPNet
                  comment:
                    type: string
  "/groups/{groupId}/apps/{appId}/security/access_list/{ipId}":
    patch:
      tags:
        - security
      operationId: allowedIPAccessListUpdate
      summary: Modify an IP address or CIDR block in the Access List
      description: |-
        Modify an IP address or CIDR block in the Access List of your App Services
        app
      requestBody:
        description: The updated value of the IP Access List entry.
        required: true
        content:
          application/json:
            schema:
              properties:
                address:
                  type: string
                  description: The modified value of the IP address or CIDR block.
                comment:
                  type: string
                  description: An optional comment included in the Access List entry.
              required:
                - address
      responses:
        "201":
          description: ""
          content:
            application/json:
              schema:
                type: object
                properties:
                  _id:
                    type: string
                    format: ObjectID
                    description: ObjectID
                  address:
                    type: string
                  ip:
                    type: string
                    format: net.IP
                    description: net.IP
                  network:
                    type: string
                    format: net.IPNet
                    description: net.IPNet
                  comment:
                    type: string
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - name: ipId
        in: path
        description: |-
          The IP address entry denoted by `ip_id` with the information given in
          the request body
        schema:
          type: string
        required: true
    delete:
      tags:
        - security
      operationId: allowedIPAccessListDelete
      summary: Delete an IP address or CIDR block from the Access List
      description: |-
        Delete an IP address or CIDR block from the Access List of your App Services
        app
      responses:
        "204":
          description: Deleted
        "404":
          description: No IP addresses or CIDR blocks to delete
  "/groups/{groupId}/apps/{appId}/security/private_endpoints":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
    get:
      operationId: adminGetPrivateEndpoints
      tags:
        - security
      summary: List VPC Private Endpoints
      description: |
        Get a list of all private endpoints configured for the App.
      responses:
        200:
          description: Successfully listed endpoints.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/PrivateEndpoint"
        404:
          description: Not Found
    post:
      operationId: adminCreatePrivateEndpoint
      tags:
        - security
      summary: Create a VPC Private Endpoint
      description: |
        Configure a new private endpoint for the App.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PrivateEndpointCreate"
      responses:
        201:
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PrivateEndpoint"
        400:
          description: |-
           - Bad Request
           - VPC endpoint id (cloud_provider_endpoint_id) is invalid
           - Endpoint type is "legacy"

  "/groups/{groupId}/apps/{appId}/security/private_endpoints/{privateEndpointId}":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/PrivateEndpointId"
    get:
      operationId: adminGetPrivateEndpoint
      tags:
        - security
      summary: Get a VPC Private Endpoint
      description: |
        Get a specific private endpoint configuration.
      responses:
        200:
          description: Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PrivateEndpoint"
        404:
          description: Not Found
    put:
      operationId: adminUpdatePrivateEndpoint
      tags:
        - security
      summary: Modify a VPC Private Endpoint
      description: |
        Update the configuration of a private endpoint.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PrivateEndpointCreate"
      responses:
        200:
          description: Updated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PrivateEndpoint"
        400:
          description: |-
            - VPC endpoint id (cloud_provider_endpoint_id) is invalid
            - Attempted to change endpoint type
        404:
          description: Not Found

    delete:
      operationId: adminDeletePrivateEndpoint
      tags:
        - security
      summary: Delete a VPC Private Endpoint
      description: |
        Delete a private endpoint.
      responses:
        204:
          description: Deleted
        404:
          description: Not Found
  "/groups/{groupId}/apps/{appId}/security/private_endpoint_service_infos":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
    get:
      operationId: adminListPrivateEndpointServices
      tags:
        - security
      summary: List VPC Private Endpoint Services
      description: |
        Get a list of all private endpoint services configured for the App.
      responses:
        200:
          description: Successfully listed services.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/PrivateEndpointServiceInfo"

  "/groups/{groupId}/apps/{appId}/security/allow_non_vpc_client_requests":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
    post:
      operationId: allowNonVpcClientRequests
      tags:
        - security
      summary: Toggle Non-VPC Requests
      description: |
        For Apps with Private Endpoints enabled, toggle whether or not the App processes requests that originate from outside of the VPC.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties: 
                allow_non_vpc_client_requests:
                  type: boolean
                  description: |
                    Set to `true` to allow non-VPC requests.
                    Set to `false` to restrict non-VPC requests.
      responses:
        204:
          description: |
            Successfully enabled/disabled non-VPC access.

  "/groups/{groupId}/apps/{appId}/security/refresh_token_expiration":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
    get:
      tags:
        - security
      operationId: adminGetRefreshTokenExpiration
      summary: Get User Refresh Token Expiration Time
      description: |-
        Get the current expiration time in seconds for user session refresh tokens.
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RefreshTokenExpiration"
        "404":
          description: Group or App Not Found
    put:
      tags:
        - security
      operationId: adminSetRefreshTokenExpiration
      summary: Set User Refresh Token Expiration Time
      description: |-
        Set the expiration time in seconds for user session refresh tokens.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RefreshTokenExpiration"
      responses:
        "204":
          description: Expiration time updated
        "400":
          description: Invalid expiration time
        "404":
          description: Group or App Not Found
  "/groups/{groupId}/apps/{appId}/metrics":
    get:
      tags:
        - metrics
      operationId: adminGetMetrics
      summary: Retrieve App Services metrics
      description: |-
        Retrieves a variety of metrics, including: Compute Time, Data Transfer,
        Sync Minutes, Requests Succeeded, Requests Failed. For a complete list
        of available metrics, see [App
        Services Metrics Reference](https://mongodb.com/docs/atlas/app-services/reference/metrics).
      parameters:
        - "$ref": "#/components/parameters/GroupId"
        - "$ref": "#/components/parameters/AppId"
        - name: start
          in: query
          description: |-
            The ISO-8601 date and time of the start of the query period (e.g. "2022-10-27T14:01:01Z").
          schema:
            type: string
          required: true
        - name: end
          in: query
          description: |-
            The ISO-8601 date and time of the end of the query period (e.g. "2022-12-27T14:01:01Z").
          schema:
            type: string
          required: true
        - name: granularity
          in: query
          description: |-
            Specifies the granularity of the query period as an
            [ISO-8601 duration value](https://en.wikipedia.org/wiki/ISO_8601#Durations). Examples
            include "P31D" (31 day), "PT1H" (1 hour), and "PT5M" (5 minutes).
          schema:
            type: string
          required: true
        - name: metrics
          in: query
          schema:
            type: string
            enum:
              - ACTIVE_OPEN_SYNC_SESSIONS
              - AUTH_EGRESS_BYTES
              - AUTH_FAILED_REQUESTS
              - AUTH_RESPONSE_MS
              - AUTH_SUCCESSFUL_LOGIN
              - AUTH_SUCCESSFUL_REQUESTS
              - AUTH_TOTAL_USERS
              - ENDPOINTS_COMPUTE_MS
              - ENDPOINTS_EGRESS_BYTES
              - ENDPOINTS_FAILED_REQUEST
              - ENDPOINTS_RESPONSE_MS
              - ENDPOINTS_SUCCESSFUL_REQUESTS
              - GRAPHQL_RESPONSE_MS
              - GRAPHQL_COMPUTE_MS
              - GRAPHQL_EGRESS_BYTES
              - GRAPHQL_FAILED_REQUESTS
              - GRAPHQL_SUCCESSFUL_REQUESTS
              - LF_RESPONSE_MS
              - OVERALL_COMPUTE_MS
              - OVERALL_EGRESS_BYTES
              - OVERALL_FAILED_REQUESTS
              - OVERALL_SUCCESSFUL_REQUESTS
              - OVERALL_SYNC_MINUTES
              - SDK_COMPUTE_MS
              - SDK_EGRESS_BYTES
              - SDK_FAILED_REQUESTS
              - SDK_FNS_RESPONSE_MS
              - SDK_MQL_COMPUTE_MS
              - SDK_MQL_EGRESS_BYTES
              - SDK_MQL_FAILED_REQUESTS
              - SDK_MQL_RESPONSE_MS
              - SDK_MQL_SUCCESSFUL_REQUESTS
              - SDK_SUCCESSFUL_REQUESTS
              - SYNC_CLIENT_BOOTSTRAP_MS
              - SYNC_CLIENT_UPLOADS_INVALID
              - SYNC_CURRENT_OPLOG_LAG_MS_SUM
              - SYNC_EGRESS_BYTES
              - SYNC_FAILED_REQUESTS
              - SYNC_HISTORY_WRITE_MS
              - SYNC_MINUTES
              - SYNC_NUM_INTEGRATION_ATTEMPTS
              - SYNC_NUM_UNSYNCABLE_DOC
              - SYNC_OT_MS
              - SYNC_SESSIONS_ENDED
              - SYNC_SESSIONS_STARTED
              - SYNC_SUCCESSFUL_REQUESTS
              - SYNC_UPLOAD_PROPS_MS
              - TRIGGERS_COMPUTE_MS
              - TRIGGERS_CURRENT_OPLOG_LAG_MS_SUM
              - TRIGGERS_EGRESS_BYTES
              - TRIGGERS_FAILED_REQUESTS
              - TRIGGERS_RESPONSE_MS
              - TRIGGERS_SUCCESSFUL_REQUESTS
          description: |-
            The name of the metric to filter by. For detailed information 
            on the available metrics and their units, see [App Services 
            Metrics Reference](https://mongodb.com/docs/atlas/app-services/reference/metrics).
          required: false
      responses:
        "200":
          description: Successfully retrieved.
          content:
            application/json:
              schema:
                type: object
                required:
                  - app_id
                  - app_name
                  - end
                  - granularity
                  - group_id
                  - start
                  - measurements
                properties:
                  measurements:
                    type: array
                    description: The list of metrics.
                    items:
                      type: object
                      properties:
                        data_points:
                          type: array
                          description: A set of data points for the given metric.
                          items:
                            type: object
                            properties:
                              timestamp:
                                type: string
                                description: |-
                                  The ISO-8601 date and time of the measurement.
                              value:
                                type: number
                                description: |-
                                  The value of the measurement in the unit
                                  specified by the metric's `unit` property.
                        name:
                          type: string
                          description: |-
                            The name of the metric. For a complete list of
                            available metrics and their units, see [App Services
                            Metrics
                            Reference](https://mongodb.com/docs/atlas/app-services/reference/metrics).
                        units:
                          type: string
                          description: The unit of each data point's `value` property.
                  app_id:
                    type: string
                    description: |-
                      The app ID sent in the request.
                  app_name:
                    type: string
                    description: |-
                      The app's human-readable name.
                  group_id:
                    type: string
                    description: |-
                      The group ID sent in the request.
                  start:
                    type: string
                    example: "2022-10-27T14:01:01Z"
                    description: |-
                      The date and time (ISO-8601 format) of the earliest requested measurement.
                  end:
                    type: string
                    example: "2022-12-27T14:01:01Z"
                    description: |-
                      The date and time (ISO-8601 format) of the latest requested measurement.
                  granularity:
                    type: string
                    description: |-
                      The requested granularity of the metrics in [ISO-8601 duration format](https://en.wikipedia.org/wiki/ISO_8601#Durations).
  "/groups/{groupId}/apps/{appId}/logs":
    get:
      tags:
        - logs
      operationId: adminGetLogs
      summary: Retrieve App Services logs
      parameters:
        - name: co_id
          in: query
          description: Return only log messages associated with the given request Correlation ID.
          schema:
            type: string
          required: false
        - name: errors_only
          in: query
          description: |-
            The value of this field does not matter. If included in the request,
            this endpoint only returns error logs (even if the value is set to `false`).
            If this field is excluded from the request, this endpoint only returns non-error logs.
          schema:
            type: boolean
          required: false
        - name: user_id
          in: query
          schema:
            type: string
          description: Return only log messages associated with the given `user_id`.
          required: false
        - name: start_date
          in: query
          schema:
            type: string
          description: |-
            The date and time in ISO 8601 at which to begin returning results,
            exclusive.
          required: false
        - name: end_date
          in: query
          schema:
            type: string
          description: |-
            The date and time in ISO 8601 at which to cease returning results,
            inclusive.
          required: false
        - name: skip
          in: query
          schema:
            type: integer
          description: |-
            The offset number of matching log entries to skip before including them
            in the response.
          required: false
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
          description: |-
            The maximum number of log entries to include in the response. If the
            query matches more than this many logs, it returns documents in
            ascending order by date until the limit is reached.
          required: false
        - name: type
          in: query
          schema:
            type: string
            enum:
              - TRIGGER_FAILURE
              - TRIGGER_ERROR_HANDLER
              - DB_TRIGGER
              - AUTH_TRIGGER
              - SCHEDULED_TRIGGER
              - FUNCTION
              - SERVICE_FUNCTION
              - STREAM_FUNCTION
              - SERVICE_STREAM_FUNCTION
              - AUTH
              - WEBHOOK
              - ENDPOINT
              - PUSH
              - API
              - API_KEY
              - GRAPHQL
              - SYNC_CONNECTION_START
              - SYNC_CONNECTION_END
              - SYNC_SESSION_START
              - SYNC_SESSION_END
              - SYNC_CLIENT_WRITE
              - SYNC_ERROR
              - SYNC_OTHER
              - SCHEMA_ADDITIVE_CHANGE
              - SCHEMA_GENERATION
              - SCHEMA_VALIDATION
              - LOG_FORWARDER
          description: The kind of log you would like to retrieve.
          required: false
      responses:
        "200":
          description: Successfully retrieved.
          content:
            application/json:
              schema:
                type: object
                required:
                  - nextEndDate
                  - nextSkip
                properties:
                  logs:
                    type: array
                    maxItems: 100
                    description: At most 100 results per request.
                    items:
                      $ref: "#/components/schemas/AppLog"
                  nextEndDate:
                    type: string
                    description: |-
                      The end date and time of the next page of log entries in ISO 8601
                      format. App Services paginates the result sets of queries that match
                      more than 100 log entries and includes this field in paginated
                      responses. To get the next page of up to 100 entries, pass this value as
                      the `end_date` parameter in a subsequent request.
                  nextSkip:
                    type: integer
                    description: |-
                      The offset into the next page of log entries in ISO 8601 format. MongoDB
                      App Services paginates the result sets of queries that match more than 100 log
                      entries and includes this field in paginated responses where the first
                      entry on the next page has the same timestamp as the last entry on this
                      page. To get the next page of up to 100 entries, pass this value, if it
                      is present, as the `skip` parameter in a subsequent request.
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
  "/groups/{groupId}/apps/{appId}/log_forwarders":
    parameters:
      - $ref: "#/components/parameters/GroupId"
      - $ref: "#/components/parameters/AppId"
    get:
      tags: ["log_forwarders"]
      operationId: "listLogForwarders"
      summary: "List log forwarders."
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/LogForwarder"
    post:
      tags: ["log_forwarders"]
      operationId: "createLogForwarder"
      summary: "Create a log forwarder."
      requestBody:
        required: true
        description: "A log forwarder configuration"
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/LogForwarderConstructor"
      responses:
        201:
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LogForwarder"
  "/groups/{groupId}/apps/{appId}/log_forwarders/{forwarderId}":
    parameters:
      - $ref: "#/components/parameters/GroupId"
      - $ref: "#/components/parameters/AppId"
      - $ref: "#/components/parameters/ForwarderId"
    get:
      tags: ["log_forwarders"]
      operationId: "getLogForwarder"
      summary: "Get a specific log forwarder."
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LogForwarder"
    patch:
      tags: ["log_forwarders"]
      operationId: "updateLogForwarder"
      summary: "Update a log forwarder."
      requestBody:
        required: true
        description: "A log forwarder configuration"
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/LogForwarderConstructor"
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LogForwarder"
    delete:
      tags: ["log_forwarders"]
      operationId: "deleteGwarder"
      summary: "Delete a log forwarder."
      responses:
        204:
          description: No Content
  "/groups/{groupId}/apps/{appId}/log_forwarders/{forwarderId}/enable":
    parameters:
      - $ref: "#/components/parameters/GroupId"
      - $ref: "#/components/parameters/AppId"
      - $ref: "#/components/parameters/ForwarderId"
    put:
      tags: ["log_forwarders"]
      operationId: "enableLogForwarder"
      summary: "Enable a log forwarder."
      responses:
        204:
          description: No Content
  "/groups/{groupId}/apps/{appId}/log_forwarders/{forwarderId}/disable":
    parameters:
      - $ref: "#/components/parameters/GroupId"
      - $ref: "#/components/parameters/AppId"
      - $ref: "#/components/parameters/ForwarderId"
    put:
      tags: ["log_forwarders"]
      operationId: "disableLogForwarder"
      summary: "Disable a log forwarder."
      responses:
        204:
          description: No Content
  "/groups/{groupId}/apps/{appId}/api_keys":
    get:
      tags:
        - apikeys
      operationId: adminListApiKeys
      summary: List API keys
      deprecated: true
      description: |-
        List [API keys](https://www.mongodb.com/docs/atlas/app-services/authentication/api-key)
        associated with a Atlas App Services App.
      responses:
        "200":
          description: The API keys were successfully listed.
          content:
            application/json:
              schema:
                items:
                  properties:
                    _id:
                      type: string
                    name:
                      type: string
                    disabled:
                      type: boolean
    post:
      tags:
        - apikeys
      operationId: adminCreateApiKey
      summary: Create a new API key
      deprecated: true
      description: |-
        Create a new [API key](https://www.mongodb.com/docs/atlas/app-services/authentication/api-key).
      requestBody:
        description: The API key to create.
        required: true
        content:
          application/json:
            schema:
              properties:
                name:
                  type: string
              required:
                - name
      responses:
        "201":
          description: The API key was successfully created.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ApiKey"
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
  "/groups/{groupId}/apps/{appId}/api_keys/{apiKeyId}":
    get:
      tags:
        - apikeys
      operationId: adminGetApiKey
      summary: Retrieve information about an API key
      deprecated: true
      description: |-
        Retrieve information about an [API key](https://www.mongodb.com/docs/atlas/app-services/authentication/api-key).
      responses:
        "200":
          description: The API key was successfully retrieved.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ApiKeyResponse"
    delete:
      tags:
        - apikeys
      operationId: adminDeleteApiKey
      summary: Delete an API key
      deprecated: true
      description: |-
        Delete an [API key](https://www.mongodb.com/docs/atlas/app-services/authentication/api-key).
      responses:
        "204":
          description: The API key was successfully deleted.
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/ApiKeyId"
  "/groups/{groupId}/apps/{appId}/api_keys/{apiKeyId}/enable":
    put:
      tags:
        - apikeys
      operationId: adminEnableApiKey
      summary: Enable an API key
      deprecated: true
      description: |-
        Enable an [API key](https://www.mongodb.com/docs/atlas/app-services/authentication/api-key).
      responses:
        "204":
          description: The API key was successfully enabled.
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/ApiKeyId"
  "/groups/{groupId}/apps/{appId}/api_keys/{apiKeyId}/disable":
    put:
      tags:
        - apikeys
      operationId: adminDisableApiKey
      summary: Disable an API key
      deprecated: true
      description: |-
        Disable an [API key](https://www.mongodb.com/docs/atlas/app-services/authentication/api-key).
      responses:
        "204":
          description: The API key was successfully disabled.
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/ApiKeyId"
  "/groups/{groupId}/apps/{appId}/custom_user_data":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
    get:
      tags:
        - custom-user-data
      operationId: adminGetCustomUserDataConfig
      summary: Get the Custom User Data Configuration
      deprecated: true
      description: |-
        Get the [Custom User
        Data](https://www.mongodb.com/docs/atlas/app-services/users/enable-custom-user-data/)
        configuration for an Atlas App Services App.
      responses:
        "200":
          description: Ok
          content:
            application/json:
              schema:
                description: The current custom user data configuration
                $ref: "#/components/schemas/CustomUserDataConfig"
    patch:
      tags:
        - custom-user-data
      operationId: adminSetCustomUserDataConfig
      summary: Configure Custom User Data
      deprecated: true
      description: |-
        Modify the [Custom User
        Data](https://www.mongodb.com/docs/atlas/app-services/users/enable-custom-user-data/)
        configuration for an Atlas App Services App.
      requestBody:
        content:
          application/json:
            schema:
              description: An updated custom user data configuration
              $ref: "#/components/schemas/CustomUserDataConfig"
      responses:
        "204":
          description: Success

  "/groups/{groupId}/apps/{appId}/secrets":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
    get:
      tags:
        - secrets
      operationId: adminGetAllSecrets
      summary: List secrets
      description: |-
        List [secrets](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets/define-and-manage-secrets/#define-a-secret)
        associated with a Atlas App Services App.
      responses:
        "200":
          description: The Secrets were successfully listed.
          content:
            application/json:
              schema:
                items:
                  properties:
                    _id:
                      type: string
                    name:
                      type: string
    post:
      tags:
        - secrets
      operationId: adminCreateASecret
      summary: |-
        Create a new Secret
      description: |-
        Create a new
        [Secret](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets/define-and-manage-secrets).
      requestBody:
        description: The Secret to create.
        required: true
        content:
          application/json:
            schema:
              properties:
                name:
                  type: string
                value:
                  type: string
              required:
                - name
                - value
      responses:
        "201":
          description: The Secret was successfully created.
          content:
            application/json:
              schema:
                properties:
                  _id:
                    type: string
                  name:
                    type: string
  "/groups/{groupId}/apps/{appId}/secrets/{secretId}":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/SecretId"
    put:
      tags:
        - secrets
      operationId: adminModifyASecret
      summary: Modify a Secret
      description: |-
        Modify a
        [Secret](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets/define-and-manage-secrets)
        associated with a Atlas App Services App.
      requestBody:
        description: The modified value of the Secret.
        required: true
        content:
          application/json:
            schema:
              properties:
                _id:
                  type: string
                name:
                  type: string
                value:
                  type: string
              required:
                - name
                - value
      responses:
        "204":
          description: No body returned for response
    delete:
      tags:
        - secrets
      operationId: adminDeleteSecret
      summary: Delete a Secret
      description: |-
        Delete a
        [Secret](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets/define-and-manage-secrets)
        associated with a Atlas App Services App.
      responses:
        "204":
          description: The Secret was successfully deleted.
  "/groups/{groupId}/apps/{appId}/functions":
    get:
      tags:
        - functions
      operationId: adminListFunctions
      summary: List Functions
      description: List [Functions](https://www.mongodb.com/docs/atlas/app-services/functions/).
      responses:
        "200":
          description: Successfully listed.
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/FunctionSummary"
    post:
      tags:
        - functions
      operationId: adminCreateFunction
      summary: Create a new Function
      description: Create a new [Function](https://www.mongodb.com/docs/atlas/app-services/functions/).
      requestBody:
        description: The function to create
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/FunctionConstructor"
      responses:
        "201":
          description: The function was successfully created.
          content:
            application/json:
              schema:
                properties:
                  _id:
                    type: string
                    description: Unique identifier for the function.
                  name:
                    type: string
                    description: Name for the function specified in the `name` field of the request.
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
  "/groups/{groupId}/apps/{appId}/functions/{functionId}":
    get:
      tags:
        - functions
      operationId: adminGetFunction
      summary: Retrieve a Function
      description: Retrieve a [Function](https://www.mongodb.com/docs/atlas/app-services/functions/).
      responses:
        "200":
          description: The function was successfully retrieved.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Function"
    delete:
      tags:
        - functions
      operationId: adminDeleteFunction
      summary: Delete a Function
      description: Delete a [Function](https://www.mongodb.com/docs/atlas/app-services/functions/).
      responses:
        "204":
          description: The function was successfully deleted.
    put:
      tags:
        - functions
      operationId: adminUpdateFunction
      summary: Update a Function
      description: Update a [Function](https://www.mongodb.com/docs/atlas/app-services/functions/).
      responses:
        "200":
          description: The function was successfully updated.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/FunctionConstructor"
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/FunctionId"
  "/groups/{groupId}/apps/{appId}/dependencies":
    get:
      tags:
        - dependencies
      operationId: adminGetAllDependencies
      summary: List external dependencies
      description: |-
        List [external
        dependencies](https://www.mongodb.com/docs/atlas/app-services/functions/dependencies/) uploaded
        to the Atlas App Services App.
      responses:
        "200":
          description: The function was successfully retrieved.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DependenciesSummary"
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"

  "/groups/{groupId}/apps/{appId}/deploy/config":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
    get:
      tags:
        - deploy
      operationId: adminGetDeploymentConfig
      summary: Get the Deployment Configuration
      description: See information about how your App deploys changes.
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeploymentConfig"
    patch:
      tags:
        - deploy
      operationId: adminConfigureDeployment
      summary: Configure Deployment
      description: Modify an App's deployment configuration to customize how the App deploys changes.
      requestBody:
        content:
          application/json:
            schema:
              description: An updated deployment configuration
              $ref: "#/components/schemas/DeploymentConfig"
      responses:
        "204":
          description: Success

  "/groups/{groupId}/apps/{appId}/deployments":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
    get:
      tags:
        - deploy
      operationId: adminListDeployments
      summary: List recent deployments
      description: Return the 25 most recent application deployments.
      responses:
        "200":
          description: Successfully listed.
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/Deployment"
  "/groups/{groupId}/apps/{appId}/deployments/{deploymentId}":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/DeploymentId"
    get:
      tags:
        - deploy
      operationId: adminGetDeployment
      summary: Get a deployment
      description: Get information about a recent deployment of the application.
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Deployment"
  "/groups/{groupId}/apps/{appId}/deployments/{deploymentId}/redeploy":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/DeploymentId"
    post:
      tags:
        - deploy
      operationId: adminRedeployDeployment
      summary: Redeploy a Deployment
      description: Redeploy a previously-deployed version of an App.
      responses:
        "204":
          description: Successfully redeployed
        "404":
          description: Deployment not found
          content:
            application/json:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/Error"
                  - properties:
                      error:
                        const: "deployment not found"
                      error_code:
                        const: "DeploymentNotFound"

  "/groups/{groupId}/apps/{appId}/drafts":
    get:
      tags:
        - deploy
      operationId: adminListDeploymentDrafts
      summary: Get Current Deployment Draft
      description: Return the current application deployment draft, if applicable.
      responses:
        "200":
          description: Successfully listed.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DeploymentDraft"
    post:
      tags:
        - deploy
      operationId: adminCreateDeploymentDraft
      summary: Create a Deployment Draft
      description: Create a new application deployment draft, if none exists.
      responses:
        "201":
          description: Successfully created draft.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DeploymentDraft"
        "409":
          description: Draft already exists
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Error"
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
  "/groups/{groupId}/apps/{appId}/drafts/{draftId}":
    delete:
      tags:
        - deploy
      operationId: adminDiscardDraft
      summary: Discard the specified deployment draft
      description: Discard the specified application deployment draft.
      responses:
        "204":
          description: The draft was successfully discarded.
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/DraftId"
  "/groups/{groupId}/apps/{appId}/drafts/{draftId}/deployment":
    post:
      tags:
        - deploy
      operationId: adminDeployDraft
      summary: Deploy a deployment draft
      description: Deploy the specified application deployment draft.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  description: |
                    The name of the deployment. To deploy a draft
                    without a name, use an empty string.
      responses:
        "201":
          description: The draft was successfully deployed.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Deployment"
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/DraftId"
  "/groups/{groupId}/apps/{appId}/drafts/{draftId}/diff":
    get:
      tags:
        - deploy
      operationId: adminDeployDraftDiff
      summary: Diff a draft with the current deployment
      description: |-
        Return a diff between the currently deployed application and the
        specified draft.
      responses:
        "200":
          description: Successfully diffed draft.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Diff"
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/DraftId"

  "/groups/{groupId}/apps/{appId}/environment":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
    put:
      operationId: adminSetEnvironment
      summary: Set the App Environment
      description: Set the App's active environment
      tags:
        - environments
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                environment:
                  $ref: "#/components/schemas/NullableAppEnvironment"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AppInstance"
        "400":
          description: Invalid environment
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"

  "/groups/{groupId}/apps/{appId}/environment_values":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
    get:
      operationId: adminListEnvironmentValues
      summary: List All Environment Values
      description: |-
        Get basic information about all environment values in the App.
        Results do not include the environment-specific `values`. For
        details on a specific environment, call [Get an Environment
        Value](#tag/environments/operation/adminGetEnvironmentValue).
      tags:
        - environments
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/EnvironmentValueDescription"
        "400":
          "$ref": "#/components/responses/BadRequest"

    post:
      operationId: adminCreateEnvironmentValue
      summary: Create an Environment Value
      description: Define a new environment value.
      tags:
        - environments
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EnvironmentValue"
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EnvironmentValueDescription"
        "409":
          description: Environment value name already exists
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"

  "/groups/{groupId}/apps/{appId}/environment_values/{environmentValueId}":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/EnvironmentValueId"
    get:
      operationId: adminGetEnvironmentValue
      summary: Get an Environment Value
      description: Get details about a specific environment value
      tags:
        - environments
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EnvironmentValue"
        "404":
          $ref: "#/components/responses/EnvironmentValueNotFound"

    put:
      operationId: adminModifyEnvironmentValue
      summary: Modify an Environment Value
      description: Modify an existing environment value
      tags:
        - environments
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EnvironmentValue"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EnvironmentValueDescription"
        "404":
          $ref: "#/components/responses/EnvironmentValueNotFound"

    delete:
      operationId: adminDeleteEnvironmentValue
      summary: Delete an Environment Value
      description: Delete an existing environment value
      tags:
        - environments
      responses:
        "204":
          description: Deleted
        "404":
          $ref: "#/components/responses/EnvironmentValueNotFound"

  "/groups/{groupId}/apps/{appId}/hosting/config":
    get:
      tags:
        - hosting
      operationId: adminGetHostingConfig
      summary: Get Hosting Configuration
      deprecated: true
      description: |
        Returns the current hosting configuration. Hosting is active
        if the response includes `status: "setup_ok"`.
      responses:
        200:
          description: Successfully get hosting configuration
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/HostingConfiguration"
    patch:
      tags:
        - hosting
      operationId: adminEnableDisableHosting
      summary: Enable/Disable Hosting
      deprecated: true
      description: |
        Enable or disable App Services Hosting for your app.
        Changes to hosting can take up to 15 minutes to take effect.
        This endpoint does not notify you when the changes have taken effect,
        only that the change operation was successfully received by the server.

        You can see if the hosting enablement/disablement is complete
        by calling the [Get Hosting Configuration](#operation/adminGetHostingConfig) endpoint.

      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                enabled:
                  type: boolean
                  description: |
                    Set to `true` to enable App Services Hosting.
                    Set to `false` to disable App Services Hosting.
      responses:
        204:
          description: |
            Successfully enabled/disabled App Services Hosting.

    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
  "/groups/{groupId}/apps/{appId}/hosting/assets":
    get:
      tags:
        - hosting
      operationId: adminGetAllHostedAssets
      summary: List all hosted assets
      deprecated: true
      deprecated: true
      deprecated: true
      responses:
        "200":
          description: Successfully listed hosted files.
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/HostedAssetMetadata"
    post:
      tags:
        - hosting
      operationId: adminMoveCopyHostedAsset
      summary: Move or copy a hosted asset
      deprecated: true
      description: Move or copy a hosted asset to a new resource path.
      requestBody:
        description: |-
          The hosted asset file and its metadata. (Must use
          `Content-Type: multipart/mixed`)
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                move_from:
                  type: string
                  description: |-
                    The current resource path of the asset to move. Must be used with
                    `move_to`.
                move_to:
                  type: string
                  description: |-
                    The resource path to which the asset will move. Must be used with
                    `move_from`.
                copy_from:
                  type: string
                  description: |-
                    The current resource path of the asset to copy. Must be used with
                    `copy_to`.
                copy_to:
                  type: string
                  description: |-
                    The resource path to which the asset will be copied. Must be used with
                    `copy_from`.
      responses:
        "204":
          description: Successfully moved/copied the hosted asset.
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
  "/groups/{groupId}/apps/{appId}/hosting/assets/asset":
    get:
      tags:
        - hosting
      operationId: adminGetHostedAsset
      summary: Retrieve metadata for a specific hosted asset
      deprecated: true
      parameters:
        - "$ref": "#/components/parameters/AssetResourcePath"
        - "$ref": "#/components/parameters/AssetResourcePathPrefix"
      responses:
        "200":
          description: Successfully retrieved metadata for the hosted file.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/HostedAssetMetadata"
        "404":
          description: Asset not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
    put:
      tags:
        - hosting
      operationId: adminUploadHostedAsset
      summary: Upload or replace a hosted asset
      deprecated: true
      description: Upload or replace a hosted asset at a specific resource path.
      parameters:
        - "$ref": "#/components/parameters/AssetResourcePath"
      requestBody:
        description: |-
          The hosted asset file and its metadata. (Must use
          `Content-Type: multipart/mixed`)
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                meta:
                  type: object
                  "$ref": "#/components/schemas/AssetMetadata"
                  required:
                    - meta
                    - file
                  description: |-
                    An [asset metadata
                    document](https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#std-label-asset-metadata-document)
                    (encoded as JSON).
                file:
                  type: string
                  format: binary
                  description: The asset file to upload (encoded as binary).
      responses:
        "204":
          description: Successfully added/replaced the hosted asset.
        "400":
          "$ref": "#/components/responses/BadRequest"
    patch:
      tags:
        - hosting
      operationId: adminUpdateHostedAsset
      summary: Update the metadata attributes of a hosted asset
      deprecated: true
      description: |-
        Update the metadata attributes of a hosted asset at a specific resource
        path.
      parameters:
        - "$ref": "#/components/parameters/AssetResourcePath"
      responses:
        "204":
          description: Successfully updated the hosted asset.
        "400":
          "$ref": "#/components/responses/BadRequest"
      requestBody:
        description: |-
          The new metadata attributes for the hosted asset. These attributes
          replace all existing attributes for the file.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                attributes:
                  type: array
                  items:
                    "$ref": "#/components/schemas/MetadataAttribute"
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
  "/groups/{groupId}/measurements":
    get:
      tags:
        - billing
      operationId: adminMeasurements
      summary: List group billing usage in a given period
      description: |-
        List the request, compute, sync, and data transfer usage in a given
        period for [billing](https://www.mongodb.com/docs/atlas/app-services/billing) purposes.
      parameters:
        - "$ref": "#/components/parameters/GroupId"
        - name: start
          in: query
          description: |-
            The ISO 8601 date and time of the start of the query period. Default is
            00:00:00 UTC on the first day of the current month.
          schema:
            type: string
          required: false
        - name: end
          in: query
          description: |-
            The ISO 8601 date and time of the end of the query period. Default is
            23:59:59 UTC on the last day of the current month.
          schema:
            type: string
          required: false
        - name: granularity
          in: query
          description: |-
            Specifies the granularity of the query period, either P31D (31 day) or
            PT1H (1 hour). Default is P31D.
          schema:
            type: string
            enum:
              - P31D
              - PT1H
          required: false
      responses:
        "200":
          description: The measurements were successfully returned.
          content:
            application/json:
              schema:
                properties:
                  start:
                    type: string
                    description: |-
                      The [RFC 3339](https://tools.ietf.org/html/3339) date and time of the
                      start of the query period, which can be specified with the `start` query
                      parameter.
                  end:
                    type: string
                    description: |-
                      The [RFC 3339](https://tools.ietf.org/html/3339) date and time of the
                      end of the query period, which can be specified with the `end` query
                      parameter.
                  granularity:
                    type: string
                    description: |-
                      The granularity, which can be specified with the `granularity` query
                      parameter.
                  group_id:
                    type: string
                    description: |-
                      The Atlas [Group
                      ID](https://docs.atlas.mongodb.com/tutorial/manage-projects/).
                  measurements:
                    type: array
                    description: The array of measurements.
                    items:
                      properties:
                        name:
                          type: string
                          enum:
                            - request_count
                            - compute_time
                            - data_out
                            - sync_time
                          description: |-
                            The usage metric represented by each data point. See
                            [billing](https://www.mongodb.com/docs/atlas/app-services/billing).
                        units:
                          type: string
                          enum:
                            - "<empty string>"
                            - HOURS
                            - GIGABYTES
                          description: The unit of the `value` of each data point.
                        data_points:
                          type: array
                          description: |-
                            The array of data points for this measurement. A finer `granularity`
                            results in more data points.
                          items:
                            properties:
                              timestamp:
                                type: string
                                description:
                                  The ISO 8601 date and time of the data
                                  point.
                              value:
                                type: number
                                description:
                                  The value at the time in the `unit` of
                                  the measurement.
        "400":
          "$ref": "#/components/responses/BadRequest"
  "/groups/{groupId}/apps/{appId}/measurements":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
    get:
      tags:
        - billing
      operationId: adminAppMeasurements
      summary: List app billing usage
      description: |-
        List the request, compute, sync, data transfer, and memory usage of a
        specific app in a given period for
        [billing](https://www.mongodb.com/docs/atlas/app-services/billing) purposes.
      parameters:
        - "$ref": "#/components/parameters/GroupId"
        - "$ref": "#/components/parameters/AppId"
        - name: start
          in: query
          description: |-
            The ISO 8601 date and time of the start of the query period. Default is
            00:00:00 UTC on the first day of the current month.
          schema:
            type: string
          required: false
        - name: end
          in: query
          description: |-
            The ISO 8601 date and time of the end of the query period. Default is
            23:59:59 UTC on the last day of the current month.
          schema:
            type: string
          required: false
        - name: granularity
          in: query
          description: |-
            Specifies the granularity of the query period, either P31D (31 day) or
            PT1H (1 hour). Default is P31D.
          schema:
            type: string
            enum:
              - P31D
              - PT1H
          required: false
      responses:
        "200":
          description: The measurements were successfully returned.
          content:
            application/json:
              schema:
                properties:
                  start:
                    type: string
                    description: |-
                      The RFC 3339 date and time of the start of the query period, which can
                      be specified with the `start` query parameter.
                  end:
                    type: string
                    description: |-
                      The RFC 3339 date and time of the end of the query period, which can be
                      specified with the `end` query parameter.
                  granularity:
                    type: string
                    description: |-
                      The granularity, which can be specified with the `granularity` query
                      parameter.
                  group_id:
                    type: string
                    description: |-
                      The Atlas [Group
                      ID](https://docs.atlas.mongodb.com/tutorial/manage-projects/).
                  appId:
                    type: string
                    description: The Atlas App Services App ID specified by the `appId` path parameter.
                  appName:
                    type: string
                    description:
                      The name of the Atlas App Services App specified by the `appId`
                      path parameter.
                  measurements:
                    type: array
                    description: The array of measurements.
                    items:
                      properties:
                        name:
                          type: string
                          enum:
                            - request_count
                            - compute_time
                            - data_out
                            - sync_time
                            - mem_usage
                          description: |-
                            The usage metric represented by each data point. See
                            [billing](https://www.mongodb.com/docs/atlas/app-services/billing).
                        units:
                          type: string
                          enum:
                            - "<empty string>"
                            - HOURS
                            - GIGABYTES
                            - GIGABYTE_SECONDS
                          description: The unit of the `value` of each data point.
                        data_points:
                          type: array
                          description: |-
                            The array of data points for this measurement. A finer `granularity`
                            results in more data points.
                          items:
                            properties:
                              timestamp:
                                type: string
                                description:
                                  The ISO 8601 date and time of the data
                                  point.
                              value:
                                type: number
                                description:
                                  The value at the time in the `unit` of
                                  the measurement.
        "400":
          "$ref": "#/components/responses/BadRequest"
  "/groups/{groupId}/apps/{appId}/schemas":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
    get:
      tags:
        - schemas
      operationId: adminListSchemas
      summary: List schemas
      deprecated: true
      description: List all defined [schemas](https://www.mongodb.com/docs/atlas/app-services/schemas).
      responses:
        "200":
          description: "Ok"
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/SchemaMetadataInstance"
    post:
      tags:
        - schemas
      operationId: adminCreateSchema
      summary: Create a schema
      deprecated: true
      description: |-
        Define a new [schema](https://www.mongodb.com/docs/atlas/app-services/schemas) 
        for a linked collection. When creating a schema with this endpoint, 
        ensure that the JSON payload is completely unescaped. Incorrectly 
        escaped JSON formats can lead to errors.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - required:
                    - metadata
                - $ref: "#/components/schemas/FullSchema"
      responses:
        "200":
          description: "Ok"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SchemaMetadataInstance"
  "/groups/{groupId}/apps/{appId}/schemas/{schemaId}":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/SchemaId"
    get:
      tags:
        - schemas
      operationId: adminGetSchema
      summary: Get a schema
      deprecated: true
      description: Get a specific [schema](https://www.mongodb.com/docs/atlas/app-services/schemas) by its `_id` value.
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/FullSchema"
    put:
      tags:
        - schemas
      operationId: adminUpdateSchema
      summary: Update a schema
      deprecated: true
      description: Replace an existing [schema](https://www.mongodb.com/docs/atlas/app-services/schemas) with a new one.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/FullSchema"
      responses:
        "204":
          description: No Content
    delete:
      tags:
        - schemas
      operationId: adminDeleteSchema
      summary: Delete a schema
      deprecated: true
      description: Delete a specific [schema](https://www.mongodb.com/docs/atlas/app-services/schemas) by its `_id` value.
      responses:
        "204":
          description: No Content

  "/groups/{groupId}/apps/{appId}/endpoints":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"

    get:
      tags:
        - endpoints
      operationId: adminGetAllEndpoints
      summary: Get all endpoints
      deprecated: true
      description: Get all [endpoint](https://www.mongodb.com/docs/atlas/app-services/data-api/custom-endpoints/) configurations.
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  allOf:
                    - "$ref": "#/components/schemas/Endpoint"
                    - properties:
                        function_name:
                          type: string

    post:
      tags:
        - endpoints
      operationId: adminCreateEndpoint
      summary: Create an endpoint
      deprecated: true
      description: Create a new [endpoint](https://www.mongodb.com/docs/atlas/app-services/data-api/custom-endpoints/).
      requestBody:
        description: A valid [configuration object](https://www.mongodb.com/docs/atlas/app-services/reference/config/https_endpoints/) for the new endpoint.
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/Endpoint"
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/Endpoint"
                  - properties:
                      function_name:
                        type: string

  "/groups/{groupId}/apps/{appId}/endpoints/{endpointId}":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/EndpointId"

    get:
      tags:
        - endpoints
      operationId: adminGetEndpoint
      summary: Get an endpoint
      deprecated: true
      description: Get a specific [endpoint](https://www.mongodb.com/docs/atlas/app-services/data-api/custom-endpoints/)'s configuration.
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/Endpoint"
                  - properties:
                      function_name:
                        type: string

    put:
      tags:
        - endpoints
      operationId: adminModifyEndpoint
      summary: Modify an endpoint
      deprecated: true
      description: Modify an existing [endpoint](https://www.mongodb.com/docs/atlas/app-services/data-api/custom-endpoints/) configuration.
      requestBody:
        description: A valid, updated [configuration object](https://www.mongodb.com/docs/atlas/app-services/reference/config/https_endpoints/) for the endpoint.
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/Endpoint"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/Endpoint"
                  - properties:
                      function_name:
                        type: string

    delete:
      tags:
        - endpoints
      operationId: adminDeleteEndpoint
      summary: Delete an endpoint
      deprecated: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                properties: {}

  "/groups/{groupId}/apps/{appId}/data_api/config":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
    get:
      tags:
        - data-api
      operationId: adminGetDataApiConfig
      summary: Get the Data API Configuration
      deprecated: true
      description: Get your app's [Data API](https://www.mongodb.com/docs/atlas/app-services/data-api/generated-endpoints/) configuration.
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DataApiConfig"
    post:
      tags:
        - data-api
      operationId: adminCreateDataApiConfig
      summary: Enable the Data API
      deprecated: true
      description: Create your app's [Data API](https://www.mongodb.com/docs/atlas/app-services/data-api/generated-endpoints/) configuration.
      requestBody:
        description: A valid [configuration object](https://www.mongodb.com/docs/atlas/app-services/reference/config/https_endpoints/#data-api-configuration) for the endpoint.
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/DataApiConfig"
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DataApiConfig"
    patch:
      tags:
        - data-api
      operationId: adminModifyDataApiConfig
      summary: Modify the Data API
      deprecated: true
      description: Update your app's [Data API](https://www.mongodb.com/docs/atlas/app-services/data-api/generated-endpoints/) configuration.
      requestBody:
        description: A valid [configuration object](https://www.mongodb.com/docs/atlas/app-services/reference/config/https_endpoints/#data-api-configuration) for the endpoint.
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/DataApiConfig"
      responses:
        "204":
          description: No content

  "/groups/{groupId}/apps/{appId}/data_api/versions":
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
    get:
      tags:
        - data-api
      operationId: adminGetDataApiVersions
      summary: List Data API versions
      deprecated: true
      description: List all possible Data API versions.
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/DataApiVersion"

  /groups/{groupId}/apps/{appId}/graphql:
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
    post:
      tags:
        - graphql
      operationId: adminRunGraphQLOperation
      summary: Run a query or mutation
      deprecated: true
      description: |-
        Run a query or mutation as a system user that bypasses
        authentication and data access rules. You can access metadata
        about your API, including its schema, with an
        [introspection](https://graphql.org/learn/introspection/) query.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required: ["query"]
              properties:
                query:
                  type: string
                  description: |-
                    A stringified `.graphql` file that contains one or
                    more valid GraphQL operations for your API. If more
                    than one operation is defined, you must specify
                    which operation to run in `operationName`.
                  example: "query AllTasks { tasks(query: { status: $status }) { _id owner } }"
                variables:
                  type: string
                  description: |-
                    A stringified JSON object where each field name maps
                    a value to a variable in the specified operation.
                  example: '{ "status": "complete" }'
                operationName:
                  type: string
                  description: |-
                    The name of the GraphQL operation specified in
                    `query` to run.
                  example: AllTasks
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: The result of the specified operation.
                required: ["data"]
                properties:
                  data:
                    type: [object, "null"]
                    description: The result of a successful operation. If `null`, the operation had errors.
                  errors:
                    type: array
                    description: A list of errors encountered while running an operation.
                    minItems: 1
                    items:
                      type: object
                      description: An error encountered while running an operation.
                      required: ["message", "locations"]
                      properties:
                        message:
                          type: string
                          description: A message that describes the error.
                        locations:
                          type: array
                          description: A list of one or more locations in the operation that caused the error.
                          items:
                            type: object
                            required: ["line", "column"]
                            minItems: 1
                            description: The operation line and column numbers that caused an error.
                            properties:
                              line:
                                type: integer
                              column:
                                type: integer
  /groups/{groupId}/apps/{appId}/graphql/config:
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
    get:
      tags:
        - graphql
      operationId: adminGetGraphQLConfig
      summary: Get GraphQL API Configuration
      deprecated: true
      description: Get your app's [GraphQL API](https://www.mongodb.com/docs/atlas/app-services/graphql/) configuration.
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/GraphQLConfig"
    put:
      tags:
        - graphql
      operationId: adminUpdateGraphQLConfig
      summary: Update GraphQL API Configuration
      deprecated: true
      description: Update your app's [GraphQL API](https://www.mongodb.com/docs/atlas/app-services/graphql/) configuration.
      requestBody:
        description: A valid [GraphQL API configuration object](https://www.mongodb.com/docs/atlas/app-services/reference/config/graphql#std-label-appconfig-graphql).
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/GraphQLConfig"
      responses:
        "204":
          description: Updated
        "400":
          description: Cannot Set `use_natural_pluralization` to `false`
  /groups/{groupId}/apps/{appId}/graphql/custom_resolvers:
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
    get:
      tags:
        - graphql
      operationId: adminGetAllCustomResolvers
      summary: Get all custom resolvers
      deprecated: true
      description: Get all [custom resolver](https://www.mongodb.com/docs/atlas/app-services/graphql/custom-resolvers/) configurations from your app's GraphQL API.
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/CustomResolver"
    post:
      tags:
        - graphql
      operationId: adminCreateCustomResolver
      summary: Create a custom resolver
      deprecated: true
      description: Create a new [custom resolver](https://www.mongodb.com/docs/atlas/app-services/graphql/custom-resolvers/).
      requestBody:
        description: A valid [custom resolver configuration](https://www.mongodb.com/docs/atlas/app-services/reference/config/graphql#std-label-appconfig-custom-resolver) object.
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/CustomResolver"
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CustomResolver"
  /groups/{groupId}/apps/{appId}/graphql/custom_resolvers/{customResolverId}:
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
      - "$ref": "#/components/parameters/CustomResolverId"
    get:
      tags:
        - graphql
      operationId: adminGetCustomResolver
      summary: Get a custom resolver
      deprecated: true
      description: Get a specific [custom resolver](https://www.mongodb.com/docs/atlas/app-services/graphql/custom-resolvers/) configuration.
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CustomResolver"
    put:
      tags:
        - graphql
      operationId: adminModifyCustomResolver
      summary: Modify a custom resolver
      deprecated: true
      description: Modify an existing [custom resolver](https://www.mongodb.com/docs/atlas/app-services/graphql/custom-resolvers/) configuration.
      requestBody:
        description: A valid, updated [custom resolver configuration](https://www.mongodb.com/docs/atlas/app-services/reference/config/graphql#std-label-appconfig-custom-resolver) object.
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/CustomResolver"
      responses:
        "204":
          description: Updated
    delete:
      tags:
        - graphql
      operationId: adminDeleteCustomResolver
      summary: Delete a custom resolver
      deprecated: true
      description: Delete an existing [custom resolver](https://www.mongodb.com/docs/atlas/app-services/graphql/custom-resolvers/) configuration.
      responses:
        "204":
          description: Deleted

  /groups/{groupId}/apps/{appId}/validation_settings/graphql:
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
    get:
      tags:
        - graphql
      operationId: adminGetGraphQLValidationSettings
      summary: Get validation settings
      description: Get the current validation level and action for reads and writes.
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/GraphQLValidationSettings"
    put:
      tags:
        - graphql
      operationId: adminSetGraphQLValidationSettings
      summary: Modify validation settings
      description: Set the validation level and action for reads and writes.
      requestBody:
        description: The updated validation levels and actions.
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/GraphQLValidationSettings"
      responses:
        "204":
          description: Updated
  /groups/{groupId}/apps/{appId}/validation_settings/null_type_schema_validation:
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
    get:
      tags:
        - schemas
      operationId: adminGetNullTypeSchemaValidationSetting
      summary: Get Null Type Schema Validation Setting
      description: Check if [null type schema validation](https://www.mongodb.com/docs/atlas/app-services/schemas/enforce-a-schema/#validate-null-types) is enabled.
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/NullTypeSchemaValidationSetting"
    put:
      tags:
        - schemas
      operationId: adminSetNullTypeSchemaValidationSetting
      summary: Set Null Type Schema Validation Setting
      description: Enable or disable [null type schema validation](https://www.mongodb.com/docs/atlas/app-services/schemas/enforce-a-schema/#validate-null-types).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/NullTypeSchemaValidationSetting"
      responses:
        "204":
          description: Updated
  /groups/{groupId}/apps/{appId}/deployment_migration:
    parameters:
      - "$ref": "#/components/parameters/GroupId"
      - "$ref": "#/components/parameters/AppId"
    get:
      tags:
        - deploy
      operationId: adminGetDeploymentMigration
      summary: Get a Deployment Migration
      description: Get metadata and status for the current deployment migration, if one exists.
      responses:
        "200":
          description: Ok
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DeploymentMigration"
        "404":
          description: App not found
    put:
      tags:
        - deploy
      operationId: adminCreateDeploymentMigration
      summary: Create a Deployment Migration
      description: Start a new deployment migration.
      requestBody:
        description: The deployment model and cloud provider region that the App should migrate to.
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/AppDeploymentSettings"
            example:
              {
                "deployment_model": "LOCAL",
                "provider_region": "aws-us-east-1",
              }
      responses:
        "204":
          description: Migration started
        "400":
          description: Request is invalid, incomplete, or a no-op
        "404":
          description: App not found

components:
  parameters:
    AssetResourcePath:
      name: path
      in: query
      description: The resource path of a hosted asset.
      required: true
      schema:
        type: string
    AssetResourcePathPrefix:
      name: prefix
      in: query
      description: |-
        Return only those assets where the resource path begins with the
        specified prefix.
      required: false
      schema:
        type: string
    GroupId:
      name: groupId
      description: |-
        An Atlas [Project/Group
        ID](https://docs.atlas.mongodb.com/tutorial/manage-projects/).
      in: path
      required: true
      schema:
        type: string
    AppId:
      name: appId
      description: |-
        The ObjectID of your application.
        [The App Services API Project and Application IDs section](#section/Project-and-Application-IDs) demonstrates how to find this
        value.
      in: path
      required: true
      schema:
        type: string
    DeploymentId:
      name: deploymentId
      description: |-
        The `_id` value of an application deployment.
      in: path
      required: true
      schema:
        type: string
    EnvironmentValueId:
      name: environmentValueId
      description: |-
        The `_id` value of an environment value.
      in: path
      required: true
      schema:
        type: string
    ForwarderId:
      name: "forwarderId"
      description: The _id ObjectID of a log forwarder.
      in: "path"
      required: true
      schema:
        type: string
    PrivateEndpointId:
      name: "privateEndpointId"
      description: The _id ObjectID of a VPC private endpoint.
      in: "path"
      required: true
      schema:
        type: string
    UsersAfter:
      name: after
      required: false
      description: The `id` of the last user returned by a previous paginated request.
      in: query
      schema:
        type: string
    UsersSort:
      name: sort
      required: false
      description: |-
        The field name to sort results by. The only valid value is the
        default: `_id`.
      in: query
      schema:
        type: string
    UsersDesc:
      name: desc
      required: false
      description: |-
        If `true`, returns sorted results in descending order. If not specified
        or set to `false`, results return in ascending order.
      in: query
      schema:
        type: boolean
    FunctionId:
      name: functionId
      description: The unique `_id` value of a function.
      in: path
      required: true
      schema:
        type: string
    DatasourceId:
      name: datasourceId
      description: The unique `_id` value of a MongoDB data source.
      in: path
      required: true
      schema:
        type: string
    EventSubscriptionId:
      name: eventSubscriptionId
      description: The unique `_id` value of an event subscription.
      in: path
      required: true
      schema:
        type: string
    ServiceId:
      name: serviceId
      description: The unique `_id` value of a service.
      in: path
      required: true
      schema:
        type: string
    SecretId:
      name: secretId
      description: The unique `_id` value of a secret.
      in: path
      required: true
      schema:
        type: string
    CommandName:
      name: commandName
      description: Command name
      in: path
      required: true
      schema:
        type: string
    ValueId:
      name: valueId
      description: The unique `_id` value of a value.
      in: path
      required: true
      schema:
        type: string
    DraftId:
      name: draftId
      description: The unique `_id` value of a draft.
      in: path
      required: true
      schema:
        type: string
    RuleId:
      name: ruleId
      description: The unique `_id` value of a rule.
      in: path
      required: true
      schema:
        type: string
    IncomingWebhookId:
      name: incomingWebhookId
      description: The unique `_id` value of an incoming webhook
      in: path
      required: true
      schema:
        type: string
    Email:
      name: email
      description: Email address
      in: path
      required: true
      schema:
        type: string
    MessageId:
      name: messageId
      description: Message ID
      in: path
      required: true
      schema:
        type: string
    UserId:
      name: userId
      description: User Account ID
      in: path
      required: true
      schema:
        type: string
    ProviderId:
      name: providerId
      description: The unique `_id` value of an authentication provider
      in: path
      required: true
      schema:
        type: string
    ApiKeyId:
      name: apiKeyId
      description: The unique `_id` value of an API key
      in: path
      required: true
      schema:
        type: string
    TriggerId:
      name: triggerId
      description: The unique `_id` value of a trigger.
      in: path
      required: true
      schema:
        type: string
    SchemaId:
      name: schemaId
      description: The unique `_id` value of a schema.
      in: path
      required: true
      schema:
        type: string
    EndpointId:
      name: endpointId
      description: The unique `_id` value of an endpoint
      in: path
      required: true
      schema:
        type: string
    CustomResolverId:
      name: customResolverId
      description: The unique `_id` value of a custom resolver.
      in: path
      required: true
      schema:
        type: string
  schemas:
    ApiKey:
      properties:
        _id:
          type: string
        key:
          type: string
        name:
          type: string
        disabled:
          type: string
    ApiKeyResponse:
      properties:
        _id:
          type: string
        name:
          type: string
        disabled:
          type: string

    DeploymentMigration:
      properties:
        status:
          title: DeploymentMigrationStatus
          type: string
          enum:
            - "started"
            - "downtime"
            - "enabling_event_subscriptions"
            - "cleanup"
            - "successful"
            - "failed"
        message:
          type: string
          description: A description of the current migration status.
        updated_at:
          type: string
          description: A timestamp of the most recent update to the deployment migration.
        from:
          description: The App's deployment model and cloud provider region at the start of the migration
          $ref: "#/components/schemas/AppDeploymentSettings"
        to:
          description: |-
            The migration's target deployment model and cloud provider
            region. At the end of a successful migration, the App uses
            these deployment settings instead of the settings described
            by `from`.
          $ref: "#/components/schemas/AppDeploymentSettings"
    AppDeploymentSettings:
      properties:
        deployment_model:
          $ref: "#/components/schemas/DeploymentModel"
        provider_region:
          $ref: "#/components/schemas/CloudProviderRegionId"
    DeploymentLocation:
      type: string
      description: |-
        An identifier of the location where an app server is physically
        deployed to, regardless of the cloud provider that hosts the
        app.
      enum:
        - US-VA
        - US-OR
        - DE-FF
        - IE
        - AU
        - IN-MB
        - SG
        - BR-SP
    App:
      type: object
      properties:
        name:
          type: string
          description: |-
            The name of the application. Must begin with a letter and
            may only contain ASCII letters, numbers, underscores, and
            hyphens.
          example: "MyApp"
        provider_region:
          description: |-
            The short identifier of a cloud provider-specific deployment region.
            Some regions are available for global deployment while others are
            only available for local apps. See [Cloud Deployment
            Regions](https://www.mongodb.com/docs/atlas/app-services/apps/deployment-models-and-regions/).
          $ref: "#/components/schemas/CloudProviderRegionId"
        location:
          $ref: "#/components/schemas/DeploymentLocation"
          description: |-
            The application's physical deployment location. This should
            agree with the more specific `provider_region` value. For
            example, an App with a `provider_region` of `aws-us-west-2`
            maps to a `location` of `US-OR`.
        deployment_model:
          $ref: "#/components/schemas/DeploymentModel"
        environment:
          $ref: "#/components/schemas/NullableAppEnvironment"
    AppConstructor:
      description: An object that describes a new app to create
      allOf:
        - $ref: "#/components/schemas/App"
        - type: object
          properties:
            template_id:
              type: string
              description: |-
                The id of an [App Services template
                app](https://www.mongodb.com/docs/atlas/app-services/reference/template-apps)
                to use as a base for the new app.
            data_source:
              "$ref": "#/components/schemas/DataSource"
    AppInstance:
      description: A specific, existing application.
      allOf:
        - $ref: "#/components/schemas/App"
        - type: object
          properties:
            _id:
              type: string
              description: The application's unique internal ID.
              example: "633209ffd3bd3478005d1bac"
            client_app_id:
              type: string
              description: The application's public App ID.
              example: "myapp-abcde"
            domain_id:
              type: string
              description: The application's associated domain ID.
              example: "63320a2b5f9de9a6e0a213e8"
            group_id:
              type: string
              description: |-
                The application's [Atlas Project/Group ID](https://docs.atlas.mongodb.com/tutorial/manage-projects/).
              example: "5b2ec991973129243223a114"
            last_used:
              type: integer
              description: The time this app was last used in [UNIX time](https://en.wikipedia.org/wiki/Unix_time) (i.e. the number of seconds since Jan 1, 1970).
              example: 1664224746
            last_modified:
              type: integer
              description: The time this app was last modified in [UNIX time](https://en.wikipedia.org/wiki/Unix_time) (i.e. the number of seconds since Jan 1, 1970).
              example: 1656440824
            product:
              type: string
              description: The product this app is for.
              enum:
                - standard
                - atlas
                - data-api
                - device-sync
    NullableAppEnvironment:
      allOf:
        - type: string
          description: The application's environment. An empty string indicates that the app does not have a specified environment.
          enum:
            - ""
            - "development"
            - "testing"
            - "qa"
            - "production"
        - $ref: "#/components/schemas/AppEnvironment"
    AppEnvironment:
      type: string
      description: The application's environment.
      example: "production"
      enum:
        - "development"
        - "testing"
        - "qa"
        - "production"
    DeploymentModel:
      type: string
      description: An application [deployment model](https://www.mongodb.com/docs/atlas/app-services/apps/deployment-models-and-regions/#deployment-models).
      enum:
        - "GLOBAL"
        - "LOCAL"
    CloudProviderRegionId:
      oneOf:
        - $ref: "#/components/schemas/AwsDeploymentRegion"
        - $ref: "#/components/schemas/AzureDeploymentRegion"
        - $ref: "#/components/schemas/GcpDeploymentRegion"
    AwsDeploymentRegion:
      type: string
      title: AwsDeploymentRegion
      enum:
        - "aws-us-east-1"
        - "aws-us-west-2"
        - "aws-us-east-2"
        - "aws-eu-central-1"
        - "aws-eu-west-1"
        - "aws-eu-west-2"
        - "aws-ap-southeast-1"
        - "aws-ap-southeast-2"
        - "aws-ap-south-1"
        - "aws-sa-east-1"
    AzureDeploymentRegion:
      type: string
      title: AzureDeploymentRegion
      enum:
        - "azure-eastus2"
        - "azure-westus"
        - "azure-westeurope"
        - "azure-eastasia"
        - "azure-southeastasia"
    GcpDeploymentRegion:
      type: string
      title: GcpDeploymentRegion
      enum:
        - "gcp-us-central1"
        - "gcp-us-east4"
        - "gcp-us-west1"
        - "gcp-europe-west1"
        - "gcp-asia-south1"
    CloudProviderRegion:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/CloudProviderRegionId"
          description: |-
            The short identifier of a cloud provider-specific deployment region.
            Some regions are available for global deployment while others are
            only available for local apps. See [Cloud Deployment
            Regions](https://www.mongodb.com/docs/atlas/app-services/apps/deployment-models-and-regions/#cloud-deployment-regions).
          example: "aws-us-east-1"
        name:
          type: string
          description: A descriptive name for the region.
          example: "Virginia (us-east-1)"
        cloud_provider:
          type: string
          description: The cloud provider that hosts the region.
          example: "aws"
        country:
          type: string
          description: The country where the region is physically hosted.
          example: "usa"
        deployment_models:
          type: array
          description: |-
            The [deployment
            models](https://www.mongodb.com/docs/atlas/app-services/apps/deployment-models-and-regions/#deployment-models)
            that this region supports.
          items:
            $ref: "#/components/schemas/DeploymentModel"
          example: ["GLOBAL", "LOCAL"]
    BaseCustomUserDataConfig:
      type: object
      properties:
        database_name:
          type: string
          description: |-
            The name of the database that contains custom user data.
          example: "myapp"
        collection_name:
          type: string
          description: |-
            The name of the collection that contains custom user data.
          example: "users"
        user_id_field:
          type: string
          description: |-
            The name of a field that appears in every custom user data
            document and that contains the user account ID of each
            document's corresponding user.
          example: "user_account_id"
        enabled:
          type: boolean
          description: |-
            If `true`, custom user data is enabled.
    CustomUserDataConstructor:
      allOf:
        - $ref: "#/components/schemas/BaseCustomUserDataConfig"
        - type: object
          required:
            - mongo_service_name
          properties:
            mongo_service_name:
              type: string
              description: |-
                The name of the linked MongoDB data source that contains
                custom user data.
              example: "mongodb-atlas"
            on_user_creation_function_name:
              type: string
              description: |-
                The name of a [user creation
                function](https://www.mongodb.com/docs/atlas/app-services/users/enable-custom-user-data/#std-label-user-creation-function)
                that runs whenever a new user registers.
              example: "myFunction"
    CustomUserDataConfig:
      allOf:
        - $ref: "#/components/schemas/BaseCustomUserDataConfig"
        - type: object
          properties:
            mongo_service_id:
              type: string
              description: |-
                The _id value of a linked MongoDB data source.
                    
                You can list services with the
                [Get all services endpoint](#operation/adminListServices).

                Data sources are services whose `type` is "mongodb-atlas".
                Use the `_id` value for the data source you want to link to
                the Trigger.
              example: "63c060ed32043ef4c93c2a9c"
            on_user_creation_function_id:
              type: string
              description: |-
                The `_id` value of a [user creation
                function](https://www.mongodb.com/docs/atlas/app-services/users/enable-custom-user-data/#std-label-user-creation-function)
                that runs whenever a new user registers.
              example: "63c055d8019a6ab879f661d6"
    BasicError:
      type: object
      properties:
        error:
          type: string
    BuildInfo:
      type: object
      properties:
        version:
          type: string
          description: |-
            Human-readable version information about the mongod instance. This
            string will take the format `<major>.<minor>.<patch>`.
        gitVersion:
          type: string
          description: |-
            The commit identifier that identifies the state of the code use to build
            the mongod.
        versionArray:
          type: array
          description: |-
            An array that conveys version information about the mongod instance. See
            version for a more readable version of this string.
          items:
            type: integer
        javascriptEngine:
          type: string
          description: |-
            A string that reports the JavaScript engine used in the mongod instance.
            By default, this is `mozjs` after version `3.2`, and previously `V8`.
        bits:
          type: string
          description: |-
            A number that reflects the target processor architecture of the mongod
            binary.
        debug:
          type: boolean
          description: |-
            A boolean that reflects whether or not the `mongod` instance was built
            with debugging options.
        maxBsonObjectSize:
          type: integer
          description: |-
            A number that reports the [Maximum BSON Document
            Size](https://www.mongodb.com/docs/manual/reference/limits#std-label-limit-bson-document-size)
    DependenciesSummary:
      type: object
      properties:
        _id:
          type: string
          description: The dependency collection's unique internal ID.
        location:
          type: string
          description: The application's deployment region.
        user_id:
          type: string
          description: |-
            The unique `_id` value of the MongoDB Cloud user that uploaded the
            dependency collection.
        last_modified:
          type: integer
          description: |-
            The time at which the dependencies were uploaded in [Unix
            time](https://en.wikipedia.org/wiki/Unix_time) (number of seconds since
            January 1, 1970 at 00:00 UTC).
        dependencies_list:
          type: array
          description: |-
            An array of documents that each describe a dependency uploaded to the
            application.
          items:
            "$ref": "#/components/schemas/Dependency"
    Dependency:
      type: object
      properties:
        name:
          type: string
          description: The name of the uploaded dependency.
        version:
          type: string
          description: The version of the uploaded dependency.
    DeploymentDraft:
      type: object
      properties:
        _id:
          type: string
          description: The unique ID of the draft.
        user_id:
          type: string
          description:
            The unique `_id` value of the MongoDB Cloud user that created
            the draft.
        app:
          "$ref": "#/components/schemas/AppInstance"
    Deployment:
      type: object
      properties:
        _id:
          type: string
          description: The unique ID of the deployment.
        name:
          type: string
          description: |-
            The name of the deployment. By default, this is the same
            value as ``_id``.
        app_id:
          type: string
          description: The unique `_id` value of the Atlas App Services App.
        draft_id:
          type: string
          description: |-
            The unique `_id` value of the deployment draft associated with the
            deployment, if applicable.
        user_id:
          type: string
          description:
            The unique `_id` value of the MongoDB Cloud user that deployed
            the draft.
        deployed_at:
          type: integer
          description: |-
            The time at which the deployment was made. Represented as the number of
            seconds since January 1, 1970.
        origin:
          type: string
          description: The deployment method used to create the deployment.
        commit:
          type: string
          description: The commit hash of the deployment (Automatic GitHub Deployment)
        status:
          type: string
          description: |-
            A message that indicates whether or not the deployment was
            successful.
        status_error_message:
          type: string
          description: |-
            The error message of the error that caused the deployment to fail, if
            applicable.
        diff_url:
          type: string
          description: |-
            A link to the diff of changes in the deployment
        remote_location:
          $ref: "#/components/schemas/DeploymentLocation"
    DeploymentConfig:
      type: object
      description: A configuration file that controls your app's deployment behavior.
      required:
        - ui_drafts_disabled
        - automatic_deployment
      properties:
        ui_drafts_disabled:
          type: boolean
          description: |-
            If `true`, every change made in the Admin UI deploys
            automatically on save. If `false`, changes are grouped into
            a deployment draft that you deploy separately.
        automatic_deployment:
          type: object
          description: Configuration for automatic deployment methods
          properties:
            enabled:
              type: boolean
              description: If `true`, the app automatically deploys using the method defined for `provider`.
            provider:
              type: string
              description: The type of automatic deployment.
              enum:
                - "github"
            installation_ids:
              type: array
              description: |-
                The unique ID values of automatic deployment provider
                installations. For example, the `id` value of a [GitHub app
                installation](https://docs.github.com/en/rest/apps/installations).
              items:
                type: string
        last_modified:
          type: number
          description: The time this configuration was last modified represented by the number of seconds since the UNIX epoch.
    Diff:
      type: object
      properties:
        diffs:
          type: array
          description: |-
            A list where each item is the line-by-line diff for a specific
            configuration file.
          items:
            type: string
        hosting_files_diff:
          type: object
          description: |-
            The filenames of hosted files that have been added, removed, or
            modified.
          properties:
            added:
              type: array
              items:
                type: string
                description: |-
                  A list where each element is the name of a file that was added in the
                  draft.
            deleted:
              type: array
              items:
                type: string
                description: |-
                  A list where each element is the name of a file that was deleted in the
                  draft.
            modified:
              type: array
              items:
                type: string
                description: |-
                  A list where each element is the name of a file that was changed in the
                  draft.
    Endpoint:
      allOf:
        - $ref: "#/components/schemas/BaseEndpoint"
        - required:
            - function_id
          properties:
            _id:
              type: string
              description: The endpoint's unique ID.
            function_id:
              type: string
              description: The endpoint function's unique ID.
    EndpointConstructor:
      allOf:
        - $ref: "#/components/schemas/BaseEndpoint"
        - required:
            - function_name
          properties:
            function_name:
              type: string
              description: The endpoint functions's name.
    BaseEndpoint:
      type: object
      required:
        - disabled
        - function_id
        - http_method
        - respond_result
        - return_type
        - route
        - validation_method
      properties:
        route:
          type: string
        http_method:
          type: string
          enum:
            - "GET"
            - "POST"
            - "PUT"
            - "PATCH"
            - "DELETE"
            - "*"
        function_id:
          type: string
        validation_method:
          type: string
          enum:
            - "NO_VALIDATION"
            - "SECRET_AS_QUERY_PARAM"
            - "VERIFY_PAYLOAD"
        secret_id:
          type: string
          description: |-
            If `validation_method` is set to `"SECRET_AS_QUERY_PARAM"`
            or `"VERIFY_PAYLOAD"`, this is the `_id` of the
            [Secret](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets/)
            that authorizes requests.
        return_type:
          $ref: "#/components/schemas/EndpointDataFormat"
          description: The default [data format](https://mongodb.com/docs/atlas/app-services/data-api/#data-formats) returned by custom HTTPS endpoints.
        respond_result:
          type: boolean
        fetch_custom_user_data:
          type: boolean
        create_user_on_auth:
          type: boolean
        disabled:
          type: boolean
    EndpointDataFormat:
      type: string
      description: A [data format](https://mongodb.com/docs/atlas/app-services/data-api/#data-formats) supported by the Data API & custom endpoints.
      enum:
        - JSON
        - EJSON
    EnvironmentValueDescription:
      properties:
        _id:
          type: string
          description: The environment value's internal ID
        name:
          type: string
          description: The environment value name
        last_modified:
          type: number
          description: The time this configuration was last modified represented by the number of seconds since the UNIX epoch.
    EnvironmentValue:
      allOf:
        - $ref: "#/components/schemas/EnvironmentValueDescription"
        - properties:
            values:
              type: object
              description: |-
                An object that maps environment names to values. The
                environment value resolves to the current active
                environment's mapped value.

                If no value is mapped to the current active environment,
                the environment value resolves to `undefined`.
              properties:
                none:
                  $ref: "#/components/schemas/AnyValue"
                development:
                  $ref: "#/components/schemas/AnyValue"
                testing:
                  $ref: "#/components/schemas/AnyValue"
                qa:
                  $ref: "#/components/schemas/AnyValue"
                production:
                  $ref: "#/components/schemas/AnyValue"
    SpecificEnvironmentValues:
      type: object
      properties:
        values:
          type: object
          additionalProperties:
            $ref: "#/components/schemas/AnyValue"
    AllEnvironmentValues:
      type: object
      properties:
        values:
          type: object
          description: |-
            An object that maps each possible environment name to
            definitions of the environment values available in that
            environment.
          properties:
            none:
              $ref: "#/components/schemas/SpecificEnvironmentValues"
            development:
              $ref: "#/components/schemas/SpecificEnvironmentValues"
            testing:
              $ref: "#/components/schemas/SpecificEnvironmentValues"
            qa:
              $ref: "#/components/schemas/SpecificEnvironmentValues"
            production:
              $ref: "#/components/schemas/SpecificEnvironmentValues"
    AnyValue:
      description: Any valid JSON value
    DataApiVersion:
      type: string
      description: A supported version of the Data API.
      enum:
        - v1
    DataApiConfig:
      type: object
      required:
        - disabled
        - versions
        - return_type
        - validation_method
      properties:
        disabled:
          type: boolean
        versions:
          type: array
          items:
            $ref: "#/components/schemas/DataApiVersion"
        return_type:
          $ref: "#/components/schemas/EndpointDataFormat"
          description: The default [data format](https://mongodb.com/docs/atlas/app-services/data-api/#data-formats) returned by Data API endpoints.
        create_user_on_auth:
          type: boolean
        run_as_user_id:
          type: string
          description: An application user's account ID. If defined, endpoints will always run as the specified user.
        run_as_user_id_script_source:
          type: string
          description: |-
            Stringified source code for a function that returns an
            application user's account ID. If defined, endpoints execute
            the function on every request and run as the user with the
            ID returned from the function.
        validation_method:
          type: string
          enum:
            - "NO_VALIDATION"
            - "SECRET_AS_QUERY_PARAM"
            - "VERIFY_PAYLOAD"
        secret_name:
          type: string
          description: |-
            If `validation_method` is set to `"SECRET_AS_QUERY_PARAM"`
            or `"VERIFY_PAYLOAD"`, this is the `name` of the
            [Secret](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets/)
            that authorizes requests.
        can_evaluate:
          type: object
          description: |-
            A JSON expression that evaluates to `true` if an endpoint is
            allowed to run in response to an incoming request.
    Error:
      type: object
      properties:
        error:
          type: string
          description: A message that describes the error.
        error_code:
          type: string
          description: The error type.
    AtlasClusterConstructor:
      title: AtlasClusterConstructor
      allOf:
        - $ref: "#/components/schemas/ServiceConfig"
        - required:
            - config
            - rules
          properties:
            config:
              $ref: "#/components/schemas/AtlasClusterServiceConfig"
            default_rule:
              $ref: "#/components/schemas/DefaultRuleConstructor"
            rules:
              type: array
              items:
                $ref: "#/components/schemas/RuleConstructor"
    AtlasCluster:
      allOf:
        - properties:
            _id:
              type: string
              description: The cluster's unique ID.
        - $ref: "#/components/schemas/AtlasClusterServiceConstructor"

    AtlasClusterServiceConfig:
      type: object
      required:
        - clusterName
        - readPreference
        - wireProtocolEnabled
      properties:
        clusterName:
          type: string
          example: Cluster0
          description: |-
            The cluster name of the data source within. The name may be at
            most 64 characters long and must only contain ASCII letters, numbers,
            underscores, and hyphens.
        readPreference:
          type: string
          enum:
            - primary
            - primaryPreferred
            - secondary
            - secondaryPreferred
            - nearest
          description: >-
            The [read preference](https://www.mongodb.com/docs/atlas/app-services/mongodb/read-preference/)
            mode for read requests to the data source.
        readPreferenceTagSets:
          type: array
          items:
            $ref: "#/components/schemas/ReadPreferencesTagSet"
          description: Target read operations to specific members of a replica set.
        wireProtocolEnabled:
          type: boolean
          description: >-
            If true, clients may [connect to the app over the
            MongoDB Wire Protocol [Deprecated]](https://www.mongodb.com/docs/atlas/app-services/mongodb/wire-protocol/#connect-over-the-wire-protocol).

    AtlasClusterServiceConfigInstance:
      $ref: "#/components/schemas/AtlasClusterServiceConfig"
      properties:
        clusterId:
          type: number
          example: 05e821b3975d271289f372e3a
          description: The service ID.
        groupName:
          type: string
          example: Project 0
          description: The name of the group that contains the service.
        orgName:
          type: string
          example: MongoDB_Org
          description: The name of the organization that contains the service.

    AtlasClusterServiceConstructor:
      $ref: "#/components/schemas/ServiceConstructor"
      properties:
        config:
          $ref: "#/components/schemas/AtlasClusterServiceConfigInstance"

    ServiceConstructor:
      type: object
      properties:
        name:
          type: string
          description: The service name.
        type:
          type: string
          description: The type of service.
    ServiceConfig:
      $ref: "#/components/schemas/ServiceConstructor"
      properties:
        version:
          type: number
    ServiceResponse:
      $ref: "#/components/schemas/ServiceConfig"
      properties:
        _id: { type: string }
        name: { type: string }
        type: { type: string }
        version: { type: number }
        last_modified: { type: number }
    LinkingDataSourceConstructor:
      properties:
        name:
          type: string
          example: first-cluster
          description: Create a name to identify each cluster you want to link. 
        type: 
          type: string
          enum: ["mongodb-atlas", "datalake"]
          example: mongodb-atlas
          description: |-
            The type of the data source you want to link. 
        config:
          $ref: "#/components/schemas/LinkingDataSourceConfig"
    LinkingDataSourceConfig:
      type: object
      required:
        - clusterName
      properties:
        clusterName:
          type: string
          example: Cluster0
          description: |-
            The cluster name of the data source within. The name may be at
            most 64 characters long and must only contain ASCII letters, numbers,
            underscores, and hyphens.
    FailedLinkingDataSourceResponse:
      properties:
        failedClusterNames: 
          type: array 
          description: |-
            The names of any data sources that failed to link. This uses the `name` property
            you assigned to the data source. 
          items: 
            type: string
            example: first-cluster
    
    ReadPreferencesTagSet:
      type: string
      enum:
        - server1
        - server2

    AtlasFederatedInstance:
      allOf:
        - required:
            _id
          properties:
            _id:
              type: string
        - $ref: "#/components/schemas/AtlasFederatedInstanceConstructor"
    AtlasFederatedInstanceConstructor:
      type: object
      required:
        - name
        - type
        - config
      properties:
        name:
          type: string
          example: mongodb-datafederation
          enum:
            - mongodb-datafederation
        type:
          type: string
          example: datalake
          enum:
            - datalake
        config:
          type: object
          required:
            - dataLakeName
          properties:
            dataLakeName:
              type: string
              description: |-
                The service name used to refer to the Federated database
                instance within this Atlas app. The name may be at most
                64 characters long and must only contain ASCII letters,
                numbers, underscores, and hyphens.

    DataSourceConstructor:
      oneOf:
        - $ref: "#/components/schemas/AtlasClusterConstructor"
        - $ref: "#/components/schemas/AtlasFederatedInstanceConstructor"

    DataSource:
      required:
        - name
        - type
        - config
      oneOf:
        - $ref: "#/components/schemas/AtlasCluster"
        - $ref: "#/components/schemas/AtlasFederatedInstance"
    ThirdPartyServiceConstructor:
      type: object
      properties:
        name:
          type: string
          description: The service name.
        type:
          type: string
          description: The type of service.
          enum:
            - aws
            - twilio
            - github
            - gcm
            - http
        incoming_webhooks:
          type: array
          items:
            $ref: "#/components/schemas/IncomingWebhook"
        version:
          type: integer
    ThirdPartyService:
      type: object
      description: |-
        **THIRD-PARTY SERVICES ARE DEPRECATED**

        See [Third-Party Services](https://www.mongodb.com/docs/atlas/app-services/reference/services/) for more information.
      properties:
        _id:
          type: string
          description: A unique ID for the third-party service.
        name:
          type: string
          description: The third-party service name.
        type:
          type: string
          description: The type of third party service.
          enum:
            - aws
            - twilio
            - github
            - gcm
        version:
          type: integer
    LogForwarder:
      allOf:
        - type: object
          properties:
            _id: { type: string }
        - $ref: "#/components/schemas/LogForwarderConstructor"
    LogForwarderConstructor:
      type: object
      required:
        - action
        - disabled
        - log_statuses
        - log_types
        - name
        - policy
      properties:
        name:
          type: string
        disabled:
          type: boolean
        log_types:
          type: array
          items:
            $ref: "#/components/schemas/LogType"
        log_statuses:
          type: array
          items:
            $ref: "#/components/schemas/LogStatus"
        policy:
          $ref: "#/components/schemas/LogForwardingPolicy"
        action:
          $ref: "#/components/schemas/LogForwardingAction"
    LogType:
      type: string
      enum:
        - auth
        - endpoint
        - function
        - graphql
        - push
        - schema
        - service
        - sync
        - trigger
        - trigger_error_handler
    LogStatus:
      type: string
      enum:
        - error
        - success
    LogForwardingPolicy:
      type: object
      properties:
        type:
          type: string
          enum:
            - single
            - batch
    LogForwardingAction: # We need oneOf to do this correctly.
      type: object
      properties:
        type:
          type: string
          enum:
            - collection
            - function
        name:
          type: string
        data_source:
          type: string
        database:
          type: string
        collection:
          type: string
    EventSubscription:
      description: |-
        A subscription to a change event stream.
      oneOf:
        - "$ref": "#/components/schemas/Trigger"
        - title: SyncTranslator
          type: object
          properties:
            _id:
              type: string
            name:
              type: string
            type:
              type: string
              const: "SYNCTRANSLATOR"
            function_id:
              type: string
            disabled:
              type: boolean
            config:
              type: "null"
            last_modified:
              type: number
          example:
            {
              "_id": "636c189a93daaf89c4900a81",
              "name": "SyncTranslator",
              "type": "SYNCTRANSLATOR",
              "function_id": "000000000000000000000000",
              "disabled": false,
              "config": null,
              "last_modified": 1668028570,
            }
    Expression:
      description: A [rule expression](https://mongodb.com/docs/atlas/app-services/rules/expressions/).
      oneOf:
        - type: object
        - type: boolean
    DefaultRule:
      allOf:
        - properties:
            _id:
              type: string
              description: The default rule's unique ObjectId identifier.
            roles:
              type: array
              description: An ordered list of default user roles.
              items:
                "$ref": "#/components/schemas/Role"
            filters:
              type: array
              description: A list of default [query filters](https://www.mongodb.com/docs/atlas/app-services/reference/config/data_sources/#filters).
              items:
                "$ref": "#/components/schemas/Filter"
        - $ref: "#/components/schemas/DefaultRuleConstructor"
    DefaultRuleConstructor:
      type: object
      description: A data access rule that define defines fallback user roles and query filters for collection's that don't have more specific permissions defined.
      properties:
        roles:
          type: array
          description: An ordered list of default user roles.
          items:
            "$ref": "#/components/schemas/RoleConstructor"
        filters:
          type: array
          description: A list of default [query filters](https://www.mongodb.com/docs/atlas/app-services/reference/config/data_sources/#filters).
          items:
            "$ref": "#/components/schemas/FilterConstructor"
    Rule:
      allOf:
        - properties:
            _id:
              type: string
              description: The rule's unique ObjectId identifier.
            roles:
              type: array
              description: A list of data access roles.
              items:
                $ref: "#/components/schemas/Role"
            filters:
              type: array
              description: A list of filters for incoming operations.
              items:
                $ref: "#/components/schemas/Filter"
        - $ref: "#/components/schemas/RuleConstructor"
    RuleConstructor:
      type: object
      description: A data access rule that defines user roles and query filters for a collection in a linked data source.
      required:
        - database
        - collection
      properties:
        database:
          type: string
          description: The name of a database in the linked data source.
        collection:
          type: string
          description: The name of a collection in the specified `database`.
        roles:
          type: array
          description: A list of data access roles.
          items:
            $ref: "#/components/schemas/RoleConstructor"
        filters:
          type: array
          description: A list of filters for incoming operations.
          items:
            $ref: "#/components/schemas/FilterConstructor"
    Role:
      allOf:
        - properties:
            _id:
              type: string
              description: The role's unique ObjectId identifier.
        - $ref: "#/components/schemas/RoleConstructor"
    RoleConstructor:
      allOf:
        - $ref: "#/components/schemas/SyncDocumentFiltersPermissions"
        - type: object
          description: A data access role that assigns read and write permissions to a user for each document
          properties:
            name:
              type: string
              description: The role's name.
            apply_when:
              description: A rule expression that evaluates to `true` when this role applies to a user for a specific document.
              $ref: "#/components/schemas/Expression"
            read:
              description: A rule expression that evaluates to `true` if the role has permission to read all fields in the document. If Device Sync is enabled, use `document_filters.read` instead.
              $ref: "#/components/schemas/Expression"
            write:
              description: A rule expression that evaluates to `true` if the role has permission to add, modify, or remove all fields in the document. If Device Sync is enabled, use `document_filters.write` instead.
              $ref: "#/components/schemas/Expression"
            insert:
              description: A rule expression that evaluates to `true` if the role has permission to insert a new document into the collection.
              $ref: "#/components/schemas/Expression"
            delete:
              description: A rule expression that evaluates to `true` if the role has permission to delete a document from the collection.
              $ref: "#/components/schemas/Expression"
            search:
              description: A rule expression that evaluates to `true` if the role has permission to search the collection using [Atlas Search](https://www.mongodb.com/docs/atlas/atlas-search/).
              $ref: "#/components/schemas/Expression"
            fields:
              type: object
              description: Field-level rules for any fields that are not explicitly configured in the role's `properties`.
              $ref: "#/components/schemas/NestableFieldLevelPermissions"
            additional_fields:
              type: object
              description: Field-level rules for any fields that are not explicitly configured in the role's `properties`.
              $ref: "#/components/schemas/FieldLevelPermissions"
    NestableFieldLevelPermissions:
      description: An object that maps document field names to read and write permissions for the field and its children.
      additionalProperties:
        allOf:
          - $ref: "#/components/schemas/FieldLevelPermissions"
          - properties:
              fields:
                $ref: "#/components/schemas/NestableFieldLevelPermissions"
    SyncDocumentFiltersPermissions:
      type: object
      description: Document-level read and write permissions for Device Sync.
      properties:
        document_filters:
          type: object
          required:
            - read
            - write
          properties:
            read:
              description: A rule expression that evaluates to `true` if the role can read the document.
              $ref: "#/components/schemas/Expression"
            write:
              description: A rule expression that evaluates to `true` if the role can write to the document.
              $ref: "#/components/schemas/Expression"
    FieldLevelPermissions:
      type: object
      description: Read and write permissions for a field.
      required:
        - read
        - write
      properties:
        read:
          description: A rule expression that evaluates to `true` if the role can read the field's value.
          $ref: "#/components/schemas/Expression"
        write:
          description: A rule expression that evaluates to `true` if the role can write the field's value.
          $ref: "#/components/schemas/Expression"
    Filter:
      allOf:
        - properties:
            _id:
              type: string
              description: The filter's unique ObjectId identifier.
        - $ref: "#/components/schemas/FilterConstructor"
    FilterConstructor:
      type: object
      description: A filter that conditionally modifies incoming query operations before they run.
      properties:
        name:
          type: string
          description: The filter's name.
        apply_when:
          description: A rule expression that evaluates to `true` if the filter applies to an incoming query.
          $ref: "#/components/schemas/Expression"
        query:
          description: A MongoDB query object that is merged into an incoming query before the operation runs.
          $ref: "#/components/schemas/Query"
        projection:
          description: A MongoDB projection object that is merged into an incoming query before the operation runs.
          $ref: "#/components/schemas/Projection"
    Query:
      type: object
      description: A MongoDB query object.
    Projection:
      type: object
      description: A MongoDB projection object.
      additionalProperties:
        type: number
        enum: [0, 1]
    ThirdPartyServiceRule:
      type: object
      description: "[Deprecated] A rule for a third-party service."
      properties:
        name:
          type: string
        actions:
          items:
            type: string
        when:
          type: object
      required:
        - name
        - when
    IncomingWebhook:
      properties:
        name:
          type: string
        function_source:
          type: string
        respond_result:
          type: boolean
        options:
          type: object
          properties:
            secret:
              type: string
            secretAsQueryParam:
              type: boolean
      required:
        - name
        - function_source
        - respond_result

    BaseAuthProvider:
      required:
        - name
        - type
      properties:
        name:
          type: string
          description: The name of the authentication provider. This value must be the same as the value of `type`.
        type:
          "$ref": "#/components/schemas/ProviderType"
        disabled:
          type: boolean
          description: If `true`, the auth provider is disabled. Users cannot log in through the provider until it is enabled.

    AuthProvider:
      allOf:
        - properties:
            _id:
              type: string
              description: The authentication provider's unique ID.
        - $ref: "#/components/schemas/AuthProviderConstructor"

    AuthProviderConstructor:
      anyOf:
        - $ref: "#/components/schemas/AnonymousAuthProvider"
        - $ref: "#/components/schemas/EmailPasswordAuthProvider"
        - $ref: "#/components/schemas/ApiKeyAuthProvider"
        - $ref: "#/components/schemas/CustomJwtAuthProvider"
        - $ref: "#/components/schemas/CustomFunctionAuthProvider"
        - $ref: "#/components/schemas/AppleAuthProvider"
        - $ref: "#/components/schemas/GoogleAuthProvider"
        - $ref: "#/components/schemas/FacebookAuthProvider"

    AnonymousAuthProvider:
      allOf:
        - $ref: "#/components/schemas/BaseAuthProvider"
        - properties:
            name:
              const: anon-user
              description: The name of the authentication provider. For Anonymous authentication, this value is always `anon-user`.
            type:
              const: anon-user
              description: The name of the authentication provider. For Anonymous authentication, this value is always `anon-user`.

    EmailConfirmationAutomatic:
      type: object
      properties:
        autoConfirm:
          const: true
          description: If `true`, automatically confirm new user accounts without additional verification.

    EmailConfirmationBuiltIn:
      type: object
      properties:
        autoConfirm:
          const: false
          description: |-
            If `true`, automatically confirm new user accounts without
            additional verification. For built-in email account
            confirmation, set this value to `false`.
        emailConfirmationUrl:
          type: string
          description: |-
            The URL included in the email sent to new users as part of
            the built-in confirmation flow. The email also adds a unique
            confirmation `token` and `tokenId` as query parameters.

            This URL should handle user confirmation by passing the
            confirmation token to a Realm SDK's `confirmUser` function
            or to the Admin API [Confirm a Pending Email/Password
            User](#tag/email/operation/adminConfirmPendingUser)
            endpoint.
        confirmEmailSubject:
          type: string
          description: |-
            The subject line of the email sent to new users as
            part of the built-in confirmation flow.

    EmailConfirmationCustomFunction:
      type: object
      properties:
        autoConfirm:
          const: false
          description: |-
            If `true`, automatically confirm new user accounts without
            additional verification. For custom function account
            confirmation, set this value to `false`.
        runConfirmationFunction:
          type: boolean
          description: |-
            If `true`, new email/password user account registrations use
            a custom function that you define to handle the confirmation
            process.
        confirmationFunctionName:
          type: string
          description: |-
            The name of the custom function that handles the
            confirmation process.

    PasswordRefreshBuiltIn:
      type: object
      properties:
        resetPasswordUrl:
          type: string
          description: |-
            The URL included in the email sent to users as part
            of the built-in password reset flow. The email also
            adds a unique password reset `token` and `tokenId` as
            query parameters.

            This URL should handle user confirmation by passing
            the password reset token to a Realm SDK's `resetPassword`
            function.
        resetPasswordSubject:
          type: string
          description: |-
            The subject line of the email sent to users as
            part of the built-in password reset flow.

    PasswordRefreshCustomFunction:
      type: object
      properties:
        runResetFunction:
          type: boolean
          const: true
          description: |-
            If `true`, use a custom function that you define to handle
            the password reset process.
        resetFunctionName:
          type: string
          description: |-
            The name of the custom function that handles the password
            reset process.

    EmailPasswordAuthProvider:
      allOf:
        - $ref: "#/components/schemas/BaseAuthProvider"
        - properties:
            name:
              const: local-userpass
              description: The name of the authentication provider. For Email/Password authentication, this value is always `local-userpass`.
            type:
              const: local-userpass
              description: The name of the authentication provider. For Email/Password authentication, this value is always `local-userpass`.
            config:
              oneOf:
                - allOf:
                    - title: ConfirmationAutomaticRefreshBuiltIn
                    - $ref: "#/components/schemas/EmailConfirmationAutomatic"
                    - $ref: "#/components/schemas/PasswordRefreshBuiltIn"
                - allOf:
                    - title: ConfirmationAutomaticRefreshCustom
                    - $ref: "#/components/schemas/EmailConfirmationAutomatic"
                    - $ref: "#/components/schemas/PasswordRefreshCustomFunction"
                - allOf:
                    - title: ConfirmationBuiltInRefreshBuiltIn
                    - $ref: "#/components/schemas/EmailConfirmationBuiltIn"
                    - $ref: "#/components/schemas/PasswordRefreshBuiltIn"
                - allOf:
                    - title: ConfirmationBuiltInRefreshCustom
                    - $ref: "#/components/schemas/EmailConfirmationBuiltIn"
                    - $ref: "#/components/schemas/PasswordRefreshCustomFunction"
                - allOf:
                    - title: ConfirmationCustomRefreshBuiltIn
                    - $ref: "#/components/schemas/EmailConfirmationCustomFunction"
                    - $ref: "#/components/schemas/PasswordRefreshBuiltIn"
                - allOf:
                    - title: ConfirmationCustomRefreshCustom
                    - $ref: "#/components/schemas/EmailConfirmationCustomFunction"
                    - $ref: "#/components/schemas/PasswordRefreshCustomFunction"

    ApiKeyAuthProvider:
      allOf:
        - $ref: "#/components/schemas/BaseAuthProvider"
        - properties:
            name:
              const: api-key
              description: The name of the authentication provider. For API key authentication, this value is always `api-key`.
            type:
              const: api-key
              description: The name of the authentication provider. For API key authentication, this value is always `api-key`.

    CustomJwtAuthProvider:
      allOf:
        - $ref: "#/components/schemas/BaseAuthProvider"
        - properties:
            name:
              const: custom-token
              description: The name of the authentication provider. For Custom JWT authentication, this value is always `custom-token`.
            type:
              const: custom-token
              description: The name of the authentication provider. For Custom JWT authentication, this value is always `custom-token`.
            config:
              type: object
              title: CustomJwtAuthProviderConfig
              description: A configuration object for the Custom JWT authentication provider.
              properties:
                audience:
                  type: array
                  description: |-
                    Defines the expected values of the `aud` claim in the
                    external JWT. By default, the Custom JWT provider
                    expects `aud` to be your App ID.
                  items:
                    type: string
                    description: |-
                      A specific expected value of the `aud` claim in
                      the external JWT.
                requireAnyAudience:
                  type: string
                  default: false
                  description: |-
                    If `false`, the external JWT must include *all* of
                    the values defined in `audience` in its `aud` claim.

                    If `true`, a JWT is valid if *any* of the values
                    defined in `audience` are in its `aud` claim.
                signingAlgorithm:
                  type: string
                  description: |-
                    The cryptographic method that the external system
                    uses to sign the JWT. Custom JWT authentication supports
                    JWTs signed using any of the following algorithms:

                    - HS256
                    - RS256
                useJWKURI:
                  type: boolean
                  description: |-
                    If `true`, the Custom JWT provider uses a signing
                    algorithm and signing keys defined in a [JSON Web
                    Key](https://www.rfc-editor.org/rfc/rfc7517) (JWK)
                    or JSON Web Key Set (JWKS). The JWK(S) must be
                    accessible at the URL specified in `jwkURI`.
                jwkURI:
                  type: string
                  description: |-
                    A URL that hosts a JWK or JWKS that describes the
                    signing method and signing keys the Custom JWT provider
                    should use. The JWK(S) may specify up to three signing
                    keys and must use the RS256 algorithm.
            secret_config:
              type: object
              title: CustomJwtAuthProviderSecretConfig
              properties:
                signingKeys:
                  type: array
                  items:
                    type: string
                    description: |-
                      A list of the names of up to three
                      [Secrets](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets/)
                      that each contain a signing key used by the
                      external authentication system to sign JWTs. Each
                      signing key Secret must be a string with length
                      between 32 and 512 characters.
            metadata_fields:
              description: |-
                Metadata fields are additional data that describe each
                user. The value of each metadata field comes from some
                field included in the JWT from the external
                authentication system.

                A user's metadata fields refresh whenever they log in.
              type: array
              items:
                type: object
                title: CustomJwtMetadataField
                description: |-
                  A specific metadata field from the external JWT to
                  include the user's data. This maps an external JWT
                  field name (`name`) to the field name in the user's
                  data (`field_name`) that holds the value of that field.
                properties:
                  required:
                    type: boolean
                    description: If `true`, this value must always be present in the external JWT.
                  name:
                    type: string
                    description: |-
                      The name of the field in the external JWT that contains the data.

                      To specify a field in an embedded object, use [dot notation](https://www.mongodb.com/docs/manual/core/document/#dot-notation).
                  field_name:
                    type: string
                    description: |-
                      The name of the field in User object that holds the value.

    CustomFunctionAuthProvider:
      allOf:
        - $ref: "#/components/schemas/BaseAuthProvider"
        - properties:
            name:
              const: custom-function
              description: The name of the authentication provider. For Custom Function authentication, this value is always `custom-function`.
            type:
              const: custom-function
              description: The name of the authentication provider. For Custom Function authentication, this value is always `custom-function`.
            config:
              type: object
              title: CustomFunctionAuthProviderConfig
              description: A configuration object for the Custom Function authentication provider.
              properties:
                authFunctionName:
                  type: string
                  description: |-
                    The name of the [custom authentication
                    function](https://www.mongodb.com/docs/atlas/app-services/authentication/custom-function/#the-authentication-function)
                    that handles user logins.

    AppleAuthProvider:
      allOf:
        - $ref: "#/components/schemas/BaseAuthProvider"
        - title: AppleAuthProvider
          properties:
            name:
              const: oauth2-apple
              description: The name of the authentication provider. For Apple authentication, this value is always `oauth2-apple`.
            type:
              const: oauth2-apple
              description: The name of the authentication provider. For Apple authentication, this value is always `oauth2-apple`.
            config:
              type: object
              title: AppleAuthProviderConfig
              description: A configuration object for the Apple authentication provider.
              properties:
                clientId:
                  type: string
                  description: |-
                    Your Apple Services ID.

                    To learn how to get this, see [Create a Services ID](https://www.mongodb.com/docs/atlas/app-services/authentication/apple/#create-a-services-id).
            secret_config:
              type: object
              title: AppleAuthProviderSecretConfig
              properties:
                clientSecret:
                  type: string
                  description: |-
                    The name of a
                    [Secret](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets/)
                    that holds your client secret JWT.

                    To learn how to create this, see [Create the Client Secret JWT](https://www.mongodb.com/docs/atlas/app-services/authentication/apple/#create-the-client-secret-jwt).
            redirect_uris:
              type: array
              items:
                type: string
                description: A list of URIs that the OAuth flow should allow the user to redirect to.

    GoogleAuthProvider:
      allOf:
        - $ref: "#/components/schemas/BaseAuthProvider"
        - title: GoogleAuthProvider
          properties:
            name:
              const: oauth2-google
              description: The name of the authentication provider. For Google authentication, this value is always `oauth2-google`.
            type:
              const: oauth2-google
              description: The name of the authentication provider. For Google authentication, this value is always `oauth2-google`.
            config:
              type: object
              title: GoogleAuthProviderConfig
              description: A configuration object for the Google authentication provider.
              properties:
                clientId:
                  type: string
                  description: |-
                    An OAuth 2.0 Client ID for your GCP project.

                    To learn how to create one, see [Set Up a Project in
                    the Google API
                    Console](https://www.mongodb.com/docs/atlas/app-services/authentication/google/#std-label-auth-gcp-project-setup).
                openId:
                  type: boolean
                  description: |-
                    An OAuth 2.0
            secret_config:
              type: object
              title: GoogleAuthProviderSecretConfig
              properties:
                clientSecret:
                  type: string
                  description: |-
                    The name of a
                    [Secret](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets/)
                    that holds the OAuth 2.0 Client Secret for the Client ID
                    specified in `config.clientId`.
            redirect_uris:
              type: array
              items:
                type: string
                description: A list of URIs that the OAuth flow should allow the user to redirect to.
            metadata_fields:
              type: array
              items:
                description: |-
                  Metadata fields are additional data that describe each
                  user. The value of each metadata field comes from
                  Google and is included in the authenticated JWT.

                  A user's metadata fields refresh whenever they log in.
                type: array
                items:
                  type: object
                  description: |-
                    A specific metadata field from OAuth 2.0 JWT to
                    include the user's data. This maps a  JWT field name
                    (`name`) to a field name of the same name in the
                    user's data.
                  properties:
                    required:
                      type: boolean
                      description: If `true`, include this metadata value in the OAuth JWT and the user's data.
                    name:
                      type: string
                      description: The name of a user metadata property accessible through OAuth, e.g. `email`.
            domain_restrictions:
              type: array
              items:
                type: string
                description: |-
                  A list of approved domain names for user accounts. If
                  this is defined, a user must have an email address
                  associated with their OAuth profile that has a domain
                  included in this list.

    FacebookAuthProvider:
      allOf:
        - $ref: "#/components/schemas/BaseAuthProvider"
        - title: FacebookAuthProvider
          properties:
            name:
              const: oauth2-facebook
              description: The name of the authentication provider. For Facebook authentication, this value is always `oauth2-facebook`.
            type:
              const: oauth2-facebook
              description: The name of the authentication provider. For Facebook authentication, this value is always `oauth2-facebook`.
            config:
              type: object
              title: FacebookAuthProviderConfig
              description: A configuration object for the Facebook authentication provider.
              properties:
                clientId:
                  type: string
                  description: |-
                    The App ID of your Facebook app.
            secret_config:
              type: object
              title: FacebookAuthProviderSecretConfig
              properties:
                clientSecret:
                  type: string
                  description: |-
                    The name of a
                    [Secret](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets/)
                    that holds your Facebook App Secret.
            redirect_uris:
              type: array
              items:
                type: string
                description: A list of URIs that the OAuth flow should allow the user to redirect to.
            metadata_fields:
              type: array
              items:
                description: |-
                  Metadata fields are additional data that describe each
                  user. The value of each metadata field comes from
                  Facebook and is included in the authenticated JWT.

                  A user's metadata fields refresh whenever they log in.
                type: array
                items:
                  type: object
                  description: |-
                    A specific metadata field from OAuth 2.0 JWT to
                    include the user's data. This maps a  JWT field name
                    (`name`) to a field name of the same name in the
                    user's data.
                  properties:
                    required:
                      type: boolean
                      description: If `true`, include this metadata value in the OAuth JWT and the user's data.
                    name:
                      type: string
                      description: The name of a user metadata property accessible through OAuth, e.g. `email`.
            domain_restrictions:
              type: array
              items:
                type: string
                description: |-
                  A list of approved domain names for user accounts. If
                  this is defined, a user must have an email address
                  associated with their OAuth profile that has a domain
                  included in this list.

    AdminUser:
      properties:
        user_id:
          type: string
        domain_id:
          type: string
        identities:
          type: array
          items:
            "$ref": "#/components/schemas/UserIdentity"
        data:
          type: object
          properties:
            email:
              type: string
            name:
              type: string
        type:
          type: string
          enum:
            - normal
            - server
            - system
            - unknown
        roles:
          type: array
          items:
            type: object
            properties:
              role_name:
                type: string
              group_id:
                type: string

    FunctionSummary:
      properties:
        _id:
          type: string
        name:
          type: string
        last_modified:
          type: number

    FunctionConstructor:
      required:
        - name
        - private
        - source
      properties:
        can_evaluate:
          type: object
          description: |-
            A JSON expression that evaluates to `true` if the Function is allowed to
            run in response to an incoming request.
        name:
          type: string
          description: A unique name for the Function.
        private:
          type: boolean
          description: |-
            If `true`, the function is hidden from client applications. You can
            still call a private function from JSON expressions and other functions,
            including incoming webhooks and triggers.
        source:
          type: string
          description: |-
            The stringified source code for the function. The code must be valid
            ES6.
        run_as_system:
          type: boolean
          description: |-
            If `true`, the function executes with full privileges, bypassing rules
            on all services.
        run_as_user_id:
          type: string
          description: |-
            An application user's account ID. If defined, endpoints will always 
            run as the specified user. Cannot be used with 
            `run_as_user_id_script_source`.
        run_as_user_id_script_source:
          type: string
          description: |-
            The stringified source code for a 
            [function](https://www.mongodb.com/docs/atlas/app-services/functions/#std-label-functions)
            that returns an application user's account ID. If defined, endpoints 
            execute the function on every request and run as the user with the 
            ID returned from the function. Cannot be used with `run_as_user_id`.

    Function:
      allOf:
        - properties:
            _id:
              type: string
        - $ref: "#/components/schemas/FunctionConstructor"

    ValueSummary:
      properties:
        _id:
          type: string
        name:
          type: string
        private:
          type: boolean
    NewValue:
      properties:
        name:
          type: string
        private:
          type: boolean
        value:
          $ref: "#/components/schemas/AnyValue"
      required:
        - name
        - private
        - value
    Value:
      allOf:
        - properties:
            _id:
              type: string
        - $ref: "#/components/schemas/ValueConstructor"
    ValueConstructor:
      required:
        - name
        - private
        - from_secret
        - value
      properties:
        name:
          type: string
        private:
          type: boolean
        from_secret:
          type: boolean
          description: |-
            If `true`, the value is a reference by name to a
            [Secret](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets/).
        value:
          $ref: "#/components/schemas/AnyValue"
    ProviderType:
      type: string
      enum:
        - anon-user
        - local-userpass
        - api-key
        - oauth2-apple
        - oauth2-google
        - oauth2-facebook
        - custom-token
        - custom-function
    MessageState:
      type: string
      enum:
        - sent
        - draft
    NewMessage:
      properties:
        label:
          type: string
        message:
          type: string
        topic:
          type: string
        state:
          "$ref": "#/components/schemas/MessageState"
      required:
        - label
        - message
        - state
        - topic
    Message:
      properties:
        allowed_ips:
          type: string
        appID:
          type: string
        label:
          type: string
        message:
          type: string
        topic:
          type: string
        created:
          type: string
        sent:
          type: string
        state:
          "$ref": "#/components/schemas/MessageState"

    User:
      properties:
        _id:
          type: string
          description: The unique user account ID
        identities:
          type: array
          description: A list of authentication provider identities associated with the user account.
          items:
            "$ref": "#/components/schemas/UserIdentity"
        type:
          type: string
          enum:
            - normal
            - server
          description: |-
            The user type. Most users are `normal` and represent a
            specific human user. Users created through the `api-key`
            provider have the type `server` because they are typically
            used for programmatic access from a server.
        creation_date:
          type: integer
          description: |-
            The date and time that the user account was created.
            Represented by the number of seconds since the UNIX epoch.
        last_authentication_date:
          type: integer
          description: |-
            The date and time that the user account last logged in or
            authenticated a request. Represented by the number of
            seconds since the UNIX epoch.
        disabled:
          type: boolean
          description: If `true`, the user account is inactive and cannot login or interact with App Services.
        data:
          type: object
          description: |-
            Metadata that describes the user. This field combines the
            data for all authentication identities associated with the
            user. The exact field names and values depend on which
            authentication providers the user has authenticated with.

            For example, if a user has linked an email/password account
            with their Google account, this object might contain their
            `email` as well as metadata fields from Google like `name`
            and `picture`.

    UserIdentity:
      type: object
      description: |-
        An authenticated identity from an authentication provider. This
        represents the user account within an individual auth provider
        and maps the account to external authentication systems.
      properties:
        id:
          type: string
        provider_type:
          "$ref": "#/components/schemas/ProviderType"
        provider_id:
          type: string

    Partition:
      properties:
        key:
          type: string
        type:
          type: string
    PbsSyncResponse:
      properties:
        service_id:
          type: string
          description:
            The Service ID for the currently synced cluster, if there is
            one.
        partition_fields:
          type: array
          items:
            "$ref": "#/components/schemas/Partition"
          description: |-
            A list of valid partition keys based on the cluster's collection
            schemas.
    SyncDataResponse:
      properties:
        clusterId:
          type: string
          description: The Service ID for the linked cluster.
        clusterName:
          type: string
          description: The name of the linked cluster
        clusterType:
          type: string
          enum:
            - atlas
            - serverless
          description: The service type of the linked cluster ("atlas" by default)
        flexible_sync:
          $ref: "#/components/schemas/FlexibleSync"
        groupName:
          type: string
          description: The name of the App's Atlas Project.
        orgName:
          type: string
          description: The name of the App's Atlas Organization.
        readPreference:
          type: string
          enum:
            - primary
            - primaryPreferred
            - secondary
            - secondaryPreferred
            - nearest
        wireProtocolEnabled:
          type: boolean
          description: |-
            If true, clients may [connect to the app over the
            MongoDB Wire
            Protocol](https://www.mongodb.com/docs/atlas/app-services/mongodb/wire-protocol/#connect-over-the-wire-protocol).
    FlexibleSync:
      type: object
      required: 
        - state
      properties:
        state:
          type: string
          description: The state of the sync service (`"enabled"`, `"disabled"`, or empty if Sync is not configured).
        database_name:
          type: string
          description: |-
            The name of a database in the synced cluster where App Services stores 
            data in Development Mode. App Services automatically generates a schema 
            for each synced type and maps each object type to a collection within the database.
        queryable_fields_names:
          type: array
          description: |-
            An array of 
            [queryable field](https://www.mongodb.com/docs/atlas/app-services/sync/configure/sync-settings/#queryable-fields) 
            names on **any collection**.
          items:
            type: string
        indexed_queryable_fields_names:
          type: array
          description: |-
            A list of field names to use as the 
            [indexed queryable field](https://www.mongodb.com/docs/atlas/app-services/sync/configure/sync-settings/#queryable-fields). 
            Although this property is an array, Sync currently supports only one indexed 
            queryable field. Therefore, this array may contain at most one element.

            The indexed queryable field must be present in the schema and be the same eligible field type in 
            every collection you sync. The indexed queryable field name must also appear in `queryable_fields_names` 
            since this is a global queryable field.
          items:
            type: string
        collection_queryable_fields_names:
          type: object
          description: |-
            An array of 
            [queryable field](https://www.mongodb.com/docs/atlas/app-services/sync/configure/sync-settings/#queryable-fields) 
            names on the specified collection.
          additionalProperties:
            type: object
            additionalProperties:
              description: The name of the queryable field.
              type: string
        permissions:
          type: object
          description: |-
            **Deprecated**
        last_disabled:
          type: string
          description: The last time Sync was disabled, represented by the number of seconds since the UNIX epoch.
        client_max_offline_days:
          type: integer
          description: |-
            The number of days the client can be offline before a client
            [reset](https://www.mongodb.com/docs/atlas/app-services/sync/error-handling/client-resets/)
            is required.
        is_recovery_mode_disabled:
          type: boolean
          description: |-
            Specifies whether the
            [client reset mode](https://www.mongodb.com/docs/atlas/app-services/sync/error-handling/client-resets/#recover-unsynced-changes)
            is disabled. By default, client reset mode is enabled and this value is `false`.
        asymmetric_tables:
          type: array
          description: |-
            An array of the names of collections that are defined as asymmetric 
            with [Data Ingest](https://www.mongodb.com/docs/atlas/app-services/sync/configure/sync-settings/#data-ingest), 
            where clients can write data but not read.
          items:
            type: string
    Trigger:
      allOf:
        - properties:
            _id:
              type: string
              description: The trigger's unique ID.
        - $ref: "#/components/schemas/TriggerConstructor"
    TriggerConstructor:
      oneOf:
        - $ref: "#/components/schemas/DatabaseTrigger"
        - $ref: "#/components/schemas/AuthenticationTrigger"
        - $ref: "#/components/schemas/ScheduledTrigger"
    BaseTrigger:
      type: object
      required:
        - name
        - type
        - config
        - event_processors
      properties:
        name:
          type: string
          description: The trigger's name.
        type:
          type: string
        disabled:
          type: boolean
          default: false
          description: If `true`, the trigger is disabled and does not listen for events or execute.
        config:
          type: object
          description: An object that defines configuration values for the trigger.
        function_id:
          type: string
          description: |-
            The ID of the function that the trigger calls when it fires.

            This value is the same as `event_processors.FUNCTION.function_id`.
            You can either define the value here or in `event_processors.FUNCTION.function_id`.
            The App Services backend duplicates the value to the configuration location where you did not define it.

            For example, if you define `function_id`, the backend duplicates it to `event_processors.FUNCTION.function_id`.

            If you define `function_id`, `event_processors` is not required. You must provide either `function_id` or
            `event_processors` when updating a trigger.
        function_name:
          type: string
          description: |-
            The name of the function that the trigger calls when it
            fires, i.e. the function described by `function_id`.

            This value is the same as `event_processors.FUNCTION.function_name`.
            You can either define the value here or in `event_processors.FUNCTION.function_name`.
            The App Services backend duplicates the value to the configuration location where you did not define it.

            For example, if you define `function_name`, the backend duplicates it to `event_processors.FUNCTION.function_name`.

            If you define `function_name`, `event_processors` is not required. You must provide either `function_name` or
            `event_processors` when updating a trigger.
        event_processors:
          type: object
          description: |-
            An object where each field name is an event processor ID and
            each value is an object that configures its corresponding
            event processor. For an example configuration object, see
            [Send Trigger Events to AWS
            EventBridge](https://www.mongodb.com/docs/atlas/app-services/triggers/aws-eventbridge#std-label-event_processor_example).
          properties:
            FUNCTION:
              type: object
              properties:
                config:
                  type: object
                  properties:
                    function_id:
                      type: string
                      description: |-
                        The ID of the function that the trigger calls when it fires.

                        This value is the same as the root-level `function_id`.
                        You can either define the value here or in `function_id`.
                        The App Services backend duplicates the value to the configuration location where you did not define it.

                        For example, if you define `event_processors.FUNCTION.function_id`, the backend duplicates it to `function_id`.

                        If you define `function_id`, `event_processors` is not required. You must provide either `function_id` or
                        `event_processors` when updating a trigger.
                    function_name:
                      type: string
                      description: |-
                        The name of the function that the trigger calls when it
                        fires, i.e. the function described by `function_id`.

                        This value is the same as the root-level `function_name`.
                        You can either define the value here or in `function_name`.
                        The App Services backend duplicates the value to the configuration location where you did not define it.

                        For example, if you define `event_processors.FUNCTION.function_name`, the backend duplicates it to `function_name`.

                        If you define `function_name`, `event_processors` is not required. You must provide either `function_name` or
                        `event_processors` when updating a trigger.
            AWS_EVENTBRIDGE:
              type: object
              properties:
                config:
                  type: object
                  properties:
                    account_id:
                      type: string
                      description: An AWS Account ID.
                    region:
                      type: string
                      description: An AWS region.
                    extended_json_enabled:
                      type: boolean
                      default: false
                      description: If `true`, event objects are serialized using EJSON.
    DatabaseTrigger:
      example:
        name: onNewEmployee
        type: DATABASE
        function_id: 5eea9ca4ca0e356e2c2a148a
        config:
          operation_types:
            - INSERT
          database: HR
          collection: employees
          service_id: 5adeb649b8b998486770ae7c
          match: {}
          project: {}
          full_document: true
        event_processors:
          FUNCTION:
            config:
              function_id: "6841b8d3e71dc81bed89dbba"
              function_name: "Atlas_Triggers_DatabaseInsert_1749137618"
      allOf:
        - $ref: "#/components/schemas/BaseTrigger"
        - required:
            - config
            - type
          properties:
            type:
              type: string
              description: The trigger type. For database triggers, this value is always `"DATABASE"`.
              enum: ["DATABASE"]
            config:
              required:
                - service_id
                - operation_types
              properties:
                service_id:
                  type: string
                  description: |
                    The `_id` value of a linked MongoDB data source that
                    contains the watched collection.
                    
                    You can list services with the
                    [Get all services endpoint](#operation/adminListServices).

                    Data sources are services whose `type` is "mongodb-atlas".
                    Use the `_id` value for the data source you want to link to
                    the Trigger.
                database:
                  type: string
                  description: |-
                    The name of a database in the linked data source. If you
                    omit this parameter, the Source Type changes to
                    "Deployment." However, shared tier infrastructure does not
                    support deployment changestreams. If you omit the 'database'
                    parameter, you receive the 'deployment changestreams are
                    not supported on shared tier clusters' error. Supply the
                    database parameter to resolve this error.
                collection:
                  type: string
                  description: |-
                    The name of a collection in the specified database. The
                    trigger listens to events from this collection. If you omit
                    this parameter, the Source Type changes to "Database."
                operation_types:
                  type: array
                  minItems: 1
                  items:
                    type: string
                  description: |-
                    The types of MongoDB change event that the trigger
                    listens for.
                    
                    Valid operation types for all triggers include:
                    
                    - `"INSERT"`
                    - `"UPDATE"`
                    - `"REPLACE"`
                    - `"DELETE"`
                    
                    Additional valid operation types for database and
                    deployment triggers include: 
                    
                    - `"CREATE_COLLECTION"`
                    - `"MODIFY_COLLECTION"`
                    - `"RENAME_COLLECTION"`
                    - `"DROP_COLLECTION"`
                    - `"SHARD_COLLECTION"`
                    - `"RESHARD_COLLECTION"`
                    - `"REFINE_COLLECTION_SHARD_KEY"`

                    Additional valid operation types for deployment triggers
                    include:
                    
                    - `"DROP_DATABASE"`

                    For more information, refer to
                    [Trigger Configuration](https://www.mongodb.com/docs/atlas/app-services/triggers/database-triggers/#configuration).
                match:
                  type: object
                  description: |-
                    A [$match](https://www.mongodb.com/docs/manual/reference/operator/aggregation/match)
                    expression filters change events. The trigger will only
                    fire if the expression evaluates to true for a given
                    change event.
                project:
                  type: object
                  description: |-
                    A [$project](https://www.mongodb.com/docs/manual/reference/operator/aggregation/project/) 
                    expression returns only the specified fields. You can include 
                    or exclude specific fields, or include newly-computed fields.
                full_document:
                  type: boolean
                  default: false
                  description: |-
                    If `true`, indicates that `UPDATE` change events should
                    include the most current
                    [majority-committed](https://www.mongodb.com/docs/manual/reference/read-concern-majority/)
                    version of the modified document in the `fullDocument`
                    field.
                full_document_before_change:
                  type: boolean
                  default: false
                  description: |-
                    If true, indicates that `UPDATE` change events should
                    include a snapshot of the modified document from
                    immediately before the update was applied.

                    You must enable [document
                    preimages](https://www.mongodb.com/docs/atlas/app-services/mongodb/preimages/)
                    for your cluster to include these snapshots.
                skip_catchup_events:
                  type: boolean
                  default: false
                  description: |-
                    If `true`, enabling the Trigger after it was disabled
                    will not invoke events that occurred while the Trigger
                    was disabled.
                tolerate_resume_errors:
                  type: boolean
                  default: false
                  description: |-
                    If `true`, when this Trigger's resume token
                    cannot be found in the cluster's oplog, the Trigger automatically resumes
                    processing events at the next relevant change stream event.
                    All change stream events from when the Trigger was suspended until the Trigger
                    resumes execution do not have the Trigger fire for them.
                maximum_throughput:
                  type: boolean
                  default: false
                  description: |-
                    If `true`, the trigger will use the [maximize 
                    throughput](https://www.mongodb.com/docs/atlas/app-services/triggers/database-triggers/#std-label-triggers-maximum-throughput) 
                    option.
                unordered:
                  type: boolean
                  default: false
                  description: |-
                    If `true`, event ordering is disabled and this Trigger
                    can process events in parallel. If `false`, event
                    ordering is enabled and the Trigger executes events
                    serially.
            error_handler:
              type: object
              description: |-
                An object that defines custom error handling for an AWS 
                EventBridge trigger. Valid only for `"DATABASE"` type triggers 
                with `"AWS_EVENTBRIDGE"` event processors. 
              properties:
                config:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                      description: If 'true', custom error handling is enabled for the AWS EventBridge trigger. 
                    function_id:
                      type: string
                      description: |-
                        The ID of the function invoked when the AWS EventBridge 
                        trigger fails and cannot be successfully retried.
    AuthenticationTrigger:
      example:
        name: onNewApiKey
        type: AUTHENTICATION
        function_id: 5eea9ca4ca0e356e2c2a148a
        config:
          operation_type: CREATE
          providers:
            - api-key
        event_processors:
          FUNCTION:
            config:
              function_id: "6841b8d3e71dc81bed89dbba"
              function_name: "Atlas_Triggers_Auth_Create_1749137618"
      allOf:
        - $ref: "#/components/schemas/BaseTrigger"
        - required:
            - config
            - type
          properties:
            type:
              type: string
              description: The trigger type. For authentication triggers, this value is always `"AUTHENTICATION"`.
              enum: ["AUTHENTICATION"]
            config:
              required:
                - operation_type
                - providers
              properties:
                operation_type:
                  type: string
                  description: The type of authentication event that the trigger listens for.
                  enum:
                    - LOGIN
                    - CREATE
                    - DELETE
                providers:
                  type: string
                  description: The type(s) of authentication provider that the trigger listens to.
                  enum:
                    - anon-user
                    - api-key
                    - custom-token
                    - custom-function
                    - local-userpass
                    - oauth2-apple
                    - oauth2-facebook
                    - oauth2-google
    ScheduledTrigger:
      example:
        name: createDailyReport
        type: SCHEDULED
        function_id: 5eea9ca4ca0e356e2c2a148a
        config:
          schedule: "0 8 * * *"
        event_processors:
          FUNCTION:
            config:
              function_id: "6841b8d3e71dc81bed89dbba"
              function_name: "Atlas_Triggers_Monthly_1749137618"
      allOf:
        - $ref: "#/components/schemas/BaseTrigger"
        - required:
            - config
            - type
          properties:
            type:
              type: string
              description: The trigger type. For scheduled triggers, this value is always `"SCHEDULED"`.
              enum: ["SCHEDULED"]
            config:
              required:
                - schedule
              properties:
                schedule:
                  type: string
                  description: A [cron expression](https://www.mongodb.com/docs/atlas/app-services/triggers/scheduled-triggers/#cron-expressions) that specifies when the trigger executes.
                  example: "0 11 * * *"
                skip_catchup_events:
                  type: boolean
                  description: |-
                    If `true`, enabling the trigger after it was disabled
                    will not invoke events that occurred while the trigger
                    was disabled.
    MetadataAttribute:
      type: object
      properties:
        name:
          type: string
          description: |-
            The [metadata
            attribute](https://www.mongodb.com/docs/atlas/app-services/hosting/file-metadata-attributes)
            name.
        value:
          type: string
          description: |-
            The [metadata
            attribute](https://www.mongodb.com/docs/atlas/app-services/hosting/file-metadata-attributes)
            value.
    AssetMetadata:
      properties:
        path:
          type: string
          description: The resource path of the asset
        size:
          type: integer
          description: The size of the asset in bytes
        attrs:
          type: array
          description: |-
            An array of documents that each describe a [metadata
            attribute](https://www.mongodb.com/docs/atlas/app-services/hosting/file-metadata-attributes)
            that applies to the asset.
          items:
            "$ref": "#/components/schemas/MetadataAttribute"
        hash:
          type: string
          description: The MD5 checksum hash for the asset
    HostingConstructor:
      type: object
      required:
        - enabled
      properties:
        enabled:
          type: boolean
          example: true
        custom_domain:
          type: string
          example: "example.com"
        default_error_path:
          type: string
          example: "/404.html"
        default_error_code:
          type: string
          example: "404"
    HostingConfiguration:
      properties:
        enabled:
          type: boolean
        status:
          type: string
          enum:
            - setup_ok
            - change_in_progress
            - change_failed
            - change_failed_fatal
        default_domain:
          type: object
          properties:
            provider_type:
              type: string
              example: aws
            config:
              type: object
              properties:
                app_default_domain:
                  type: string
                  description: Default domain of hosted Atlas App Services App provided by App Services.
                  example: myapp-qldqx.mongodbstitch.com

    HostedAssetMetadata:
      properties:
        appId:
          type: string
          description: The unique App ID of the Atlas App Services App that is hosting the file.
        last_modified:
          type: integer
          description: |-
            The time at which the hosted asset was last modified in [Unix
            time](https://en.wikipedia.org/wiki/Unix_time) (number of seconds since
            January 1, 1970 at 00:00 UTC).
        url:
          type: string
          description: The full URL of the hosted asset.
        path:
          type: string
          description: The resource path of the hosted asset
        size:
          type: integer
          description: The size of the hosted asset in bytes
        attrs:
          type: array
          description: |-
            An array of documents that each describe a [metadata
            attribute](https://www.mongodb.com/docs/atlas/app-services/hosting/file-metadata-attributes)
            that applies to the asset.
          items:
            "$ref": "#/components/schemas/MetadataAttribute"
        hash:
          type: string
          description: The MD5 checksum hash for the hosted asset
    RefreshTokenExpiration:
      type: object
      properties:
        expiration_time_seconds:
          type: number
          minimum: 1800
          maximum: 15552000
          default: 5184000
          description: |-
            The time in seconds that a user session refresh token is
            valid for after it is issued. After this time, the token is
            expired and the user must re-authenticate.

            The expiration time must be between 30 minutes and 5 years,
            inclusive. The default expiration time is 60 days.
    Relationship:
      type: object
      description: A [relationship](https://www.mongodb.com/docs/atlas/app-services/schemas/relationships/) definition.
      properties:
        ref:
          type: string
          description: A reference string for the foreign collection.
        foreign_key:
          type: string
          description: The name of the field in the foreign collection that the relationship points to.
        is_list:
          type: boolean
          description: |-
            If `true`:

            - the relationship may point to many foreign documents.
            - the local field must be defined as an array in the collection schema.
    SchemaDefinition:
      type: object
      description: A valid [schema](https://www.mongodb.com/docs/atlas/app-services/schemas) for the collection.
      properties:
        bsonType:
          type: string
          description: The [BSON type](https://www.mongodb.com/docs/atlas/app-services/schemas/types/#std-label-schema-types) of the field.
          enum:
            - object
            - array
            - string
            - number
            - int
            - long
            - double
            - decimal
            - date
            - timestamp
            - bool
            - "null"
            - regex
            - objectId
            - binary
            - uuid
            - function
            - javascript
            - symbol
            - minKey
            - maxKey
        title:
          type: string
          description: A human-readable title for the schema.
        required:
          type: array
          items:
            type: string
          description: |-
            For `object` schemas, an array of field names that are
            required in instances of the object.
        properties:
          type: object
          description: |-
            An object where each field name is a property in the schema.
            The corresponding value is a
            [schema](https://www.mongodb.com/docs/atlas/app-services/schemas/types/#std-label-schema-types)
            definition for that field.
          additionalProperties:
            "$ref": "#/components/schemas/SchemaDefinition"
    SchemaMetadata:
      type: object
      description: Metadata that describes which linked collection the schema applies to.
      properties:
        data_source:
          type: string
          description: The data source name.
        database:
          type: string
          description: The database name.
        collection:
          type: string
          description: The collection name.
    SchemaRelationships:
      type: object
      description: Relationships to foreign collections. Each field name is a property in the schema. The corresponding value is a [relationship](https://www.mongodb.com/docs/atlas/app-services/schemas/relationships/) definition for that field.
      additionalProperties:
        "$ref": "#/components/schemas/Relationship"
    SchemaMetadataInstance:
      required:
        - _id
        - metadata
      properties:
        _id:
          type: string
        metadata:
          "$ref": "#/components/schemas/SchemaMetadata"
    FullSchema:
      type: object
      properties:
        metadata:
          "$ref": "#/components/schemas/SchemaMetadata"
        schema:
          $ref: "#/components/schemas/SchemaDefinition"
        relationships:
          $ref: "#/components/schemas/SchemaRelationships"
    FullSchemaInstance:
      allOf:
        - type: object
          properties:
            _id:
              type: string
        - $ref: "#/components/schemas/FullSchema"

    GraphQLConstructor:
      type: object
      required:
        - config
        - validation_settings
        - custom_resolvers
      properties:
        config:
          $ref: "#/components/schemas/GraphQLConfig"
        validation_settings:
          $ref: "#/components/schemas/GraphQLValidationSettings"
        custom_resolvers:
          type: array
          items:
            $ref: "#/components/schemas/CustomResolverConstructor"

    GraphQLConfig:
      type: object
      properties:
        use_natural_pluralization:
          type: boolean
          description: |-
            If `true`, generated schema type names use common English
            pluralization whenever possible.

            If `false`, or if a natural pluralization cannot be
            determined, then plural types use the singular type
            name with an `"s"` appended to the end.

            **You cannot change this value after you create your App.
            This value is `true` for all new Apps.**
        disable_schema_introspection:
          type: boolean
          description: If `true`, the GraphQL API blocks [introspection
            queries](https://graphql.org/learn/introspection/) from
            clients.
    CustomResolver:
      allOf:
        - $ref: "#/components/schemas/BaseCustomResolver"
        - properties:
            _id:
              type: string
              description: The custom resolver's unique ID.
            function_id:
              type: string
              description: The resolver function's unique ID.
    CustomResolverConstructor:
      allOf:
        - $ref: "#/components/schemas/BaseCustomResolver"
        - required:
            - function_name
          properties:
            function_name:
              type: string
              description: The resolver function's name.
    BaseCustomResolver:
      type: object
      required:
        - _id
        - function_id
        - on_type
        - field_name
      properties:
        on_type:
          type: string
          description: |-
            The name of the resolver's parent type. This can be
            `"Query"`, `"Mutation"`, or the name of a generated type if
            this is a computed property.
        field_name:
          type: string
          description: The name of the custom resolver field that appears in the GraphQL schema.
        input_type:
          oneOf:
            - type: string
            - type: object
          description: |-
            The type of the custom resolver's `input` parameter. This
            can be a scalar, the name of an existing generated type, or
            a custom JSON schema object. If undefined, the resolver does
            not accept an input.
        input_type_format:
          type: string
          enum:
            - scalar
            - scalar-list
            - generated
            - generated-list
            - custom
          description: |-
            The kind of input type the custom resolver uses. This value
            must agree with the value of `input_type`:

            - A scalar input type must use `"scalar"` or `"scalar-list"`
            - A generated input type must use `"generated"` or `"generated-list"`
            - A custom input type must use `"custom"`

            If undefined, the resolver does not accept an input.
        payload_type:
          oneOf:
            - type: string
            - type: object
          description: |-
            The type of the value returned by the custom resolver. This
            can be a scalar, the name of an existing generated type, or
            a custom JSON schema object.

            If undefined, the resolver returns a `DefaultPayload`
            object:

            ```graphql
            type DefaultPayload {
              status: String!
            }
            ```
        payload_type_format:
          type: string
          enum:
            - scalar
            - scalar-list
            - generated
            - generated-list
            - custom
          description: |-
            The kind of payload type the custom resolver uses. This value
            must agree with the value of `payload_type`:

            - A scalar payload type must use `"scalar"` or `"scalar-list"`
            - A generated payload type must use `"generated"` or `"generated-list"`
            - A custom payload type must use `"custom"`

            If undefined, the resolver returns a `DefaultPayload` object.
    GraphQLValidationLevel:
      type: string
      enum: ["STRICT", "OFF"]
    GraphQLValidationAction:
      type: string
      enum: ["ERROR", "WARN"]
    GraphQLValidationSettings:
      type: object
      properties:
        read_validation_action:
          $ref: "#/components/schemas/GraphQLValidationAction"
        read_validation_level:
          $ref: "#/components/schemas/GraphQLValidationLevel"
        write_validation_action:
          $ref: "#/components/schemas/GraphQLValidationAction"
        write_validation_level:
          $ref: "#/components/schemas/GraphQLValidationLevel"
    NullTypeSchemaValidationSetting:
      type: object
      properties:
        enabled:
          type: boolean
    ValidationError:
      description: An EJSON schema validation error.
      oneOf:
        - $ref: "#/components/schemas/FalseValidationError"
        - $ref: "#/components/schemas/RequiredValidationError"
        - $ref: "#/components/schemas/InvalidTypeValidationError"
        - $ref: "#/components/schemas/ItemsMustBeUniqueValidationError"
        - $ref: "#/components/schemas/MissingDependencyValidationError"
        - $ref: "#/components/schemas/InternalValidationError"
        - $ref: "#/components/schemas/ConstValidationError"
        - $ref: "#/components/schemas/EnumValidationError"
        - $ref: "#/components/schemas/NumberAnyOfValidationError"
        - $ref: "#/components/schemas/NumberOneOfValidationError"
        - $ref: "#/components/schemas/NumberAllOfValidationError"
        - $ref: "#/components/schemas/NumberNotValidationError"
        - $ref: "#/components/schemas/NumberGTEValidationError"
        - $ref: "#/components/schemas/NumberGTValidationError"
        - $ref: "#/components/schemas/NumberLTEValidationError"
        - $ref: "#/components/schemas/NumberLTValidationError"
        - $ref: "#/components/schemas/MultipleOfValidationError"
        - $ref: "#/components/schemas/ArrayNoAdditionalItemsValidationError"
        - $ref: "#/components/schemas/ArrayMinItemsValidationError"
        - $ref: "#/components/schemas/ArrayMaxItemsValidationError"
        - $ref: "#/components/schemas/ArrayContainsValidationError"
        - $ref: "#/components/schemas/ArrayMinPropertiesValidationError"
        - $ref: "#/components/schemas/ArrayMaxPropertiesValidationError"
        - $ref: "#/components/schemas/AdditionalPropertyNotAllowedValidationError"
        - $ref: "#/components/schemas/InvalidPropertyPatternValidationError"
        - $ref: "#/components/schemas/InvalidPropertyNameValidationError"
        - $ref: "#/components/schemas/StringLengthGTEValidationError"
        - $ref: "#/components/schemas/StringLengthGTValidationError"
        - $ref: "#/components/schemas/StringLengthLTEValidationError"
        - $ref: "#/components/schemas/StringLengthLTValidationError"
        - $ref: "#/components/schemas/DoesNotMatchPatternValidationError"
        - $ref: "#/components/schemas/DoesNotMatchFormatValidationError"
        - $ref: "#/components/schemas/ConditionThenValidationError"
        - $ref: "#/components/schemas/ConditionElseValidationError"
    FalseValidationError:
      type: string
      const: "false"
    RequiredValidationError:
      type: string
      const: "required"
      description: A required field is missing.
    InvalidTypeValidationError:
      type: string
      const: "invalid_type"
      description: A field has an invalid value type.
    MissingDependencyValidationError:
      type: string
      const: "missing_dependency"
    InternalValidationError:
      type: string
      const: "internal"
    ConstValidationError:
      type: string
      const: "const"
      description: A field has an invalid constant value.
    EnumValidationError:
      type: string
      const: "enum"
      description: A field has an invalid enum value.
    NumberAnyOfValidationError:
      type: string
      const: "number_any_of"
      description: A field does not match any schema in [anyOf](https://json-schema.org/understanding-json-schema/reference/combining.html#anyof).
    NumberOneOfValidationError:
      type: string
      const: "number_one_of"
      description: A field does not match exactly one schema in [oneOf](https://json-schema.org/understanding-json-schema/reference/combining.html#oneof).
    NumberAllOfValidationError:
      type: string
      const: "number_all_of"
      description: A field does not match all schemas in [allOf](https://json-schema.org/understanding-json-schema/reference/combining.html#allof).
    NumberNotValidationError:
      type: string
      const: "number_not"
      description: A field matches an exclusive schema in not.
    NumberGTEValidationError:
      type: string
      const: "number_gte"
      description: A field contains a number that is not greater than or equal to the minimum value.
    NumberGTValidationError:
      type: string
      const: "number_gt"
      description: A field contains a number that is not strictly greater than the minimum value.
    NumberLTEValidationError:
      type: string
      const: "number_lte"
      description: A field contains a number that is not less than or equal to the maximum value.
    NumberLTValidationError:
      type: string
      const: "number_lt"
      description: A field contains a number that is not strictly less than the maximum value.
    MultipleOfValidationError:
      type: string
      const: "multiple_of"
      description: A field contains a number that is not a multiple of the specified value.
    ItemsMustBeUniqueValidationError:
      type: string
      const: "unique"
      description: A field contains a unique array with non-unique values.
    ArrayNoAdditionalItemsValidationError:
      type: string
      const: "array_no_additional_items"
      description: A field contains a closed tuple array with invalid additional elements.
    ArrayMinItemsValidationError:
      type: string
      const: "array_min_items"
      description: A field contains an array with too few elements.
    ArrayMaxItemsValidationError:
      type: string
      const: "array_max_items"
      description: A field contains an array with too many elements.
    ArrayContainsValidationError:
      type: string
      const: "contains"
      description: An array does not contain any element of its contained type.
    ArrayMinPropertiesValidationError:
      type: string
      const: "array_min_properties"
      description: An array does not contain enough elements of its contained type.
    ArrayMaxPropertiesValidationError:
      type: string
      const: "array_max_properties"
      description: An array contains too many elements of its contained type.
    AdditionalPropertyNotAllowedValidationError:
      type: string
      const: "additional_property_not_allowed"
      description: A field is present but not defined in a closed schema.
    InvalidPropertyPatternValidationError:
      type: string
      const: "invalid_property_pattern"
      description: A field name that matched a pattern property does not contain a valid value.
    InvalidPropertyNameValidationError:
      type: string
      const: "invalid_property_name"
      description: A field name is invalid.
    StringLengthGTEValidationError:
      type: string
      const: "string_gte"
      description: A field contains a string that is not greater than or equal to the minimum length.
    StringLengthGTValidationError:
      type: string
      const: "string_gt"
      description: A field contains a string that is not strictly greater than the minimum length.
    StringLengthLTValidationError:
      type: string
      const: "string_lt"
      description: A field contains a string that is not strictly less than the maximum length.
    StringLengthLTEValidationError:
      type: string
      const: "string_lte"
      description: A field contains a string that is not less than or equal to the maximum length.
    DoesNotMatchPatternValidationError:
      type: string
      const: "pattern"
      description: A field contains a string that does not match the field's pattern.
    DoesNotMatchFormatValidationError:
      type: string
      const: "format"
      description: A field contains a string with an invalid format.
    ConditionThenValidationError:
      type: string
      const: "condition_then"
      description: A value is not valid when a conditional expression evaluates to `true`.
    ConditionElseValidationError:
      type: string
      const: "condition_else"
      description: A value is not valid when a conditional expression evaluates to `false`.
    AppLog:
      oneOf:
        - $ref: "#/components/schemas/Logs/API"
        - $ref: "#/components/schemas/Logs/APIKey"
        - $ref: "#/components/schemas/Logs/TriggerFailure"
        - $ref: "#/components/schemas/Logs/TriggerErrorHandler"
        - $ref: "#/components/schemas/Logs/DBEventTrigger"
        - $ref: "#/components/schemas/Logs/AuthEventTrigger"
        - $ref: "#/components/schemas/Logs/ScheduledEventTrigger"
        - $ref: "#/components/schemas/Logs/Function"
        - $ref: "#/components/schemas/Logs/ServiceFunction"
        - $ref: "#/components/schemas/Logs/StreamFunction"
        - $ref: "#/components/schemas/Logs/ServiceStreamFunction"
        - $ref: "#/components/schemas/Logs/Auth"
        - $ref: "#/components/schemas/Logs/IncomingWebhook"
        - $ref: "#/components/schemas/Logs/Endpoint"
        - $ref: "#/components/schemas/Logs/Push"
        - $ref: "#/components/schemas/Logs/GraphQL"
        - $ref: "#/components/schemas/Logs/SyncConnectionStart"
        - $ref: "#/components/schemas/Logs/SyncConnectionEnd"
        - $ref: "#/components/schemas/Logs/SyncSessionStart"
        - $ref: "#/components/schemas/Logs/SyncSessionEnd"
        - $ref: "#/components/schemas/Logs/SyncClientWrite"
        - $ref: "#/components/schemas/Logs/SyncError"
        - $ref: "#/components/schemas/Logs/SyncOther"
        - $ref: "#/components/schemas/Logs/SchemaAdditiveChange"
        - $ref: "#/components/schemas/Logs/SchemaGeneration"
        - $ref: "#/components/schemas/Logs/SchemaValidation"
        - $ref: "#/components/schemas/Logs/LogForwarder"
    Logs:
      Parts:
        # Log parts are sets of fields that are re-used between multiple log types.
        Messages:
          properties:
            messages:
              type: array
              description: |
                A list of logs or other messages associated with the operation.
              items:
                type: string
        RuleMetrics:
          properties:
            rule_metrics:
              type: object
              example:
                {
                  "namespaces_metrics":
                    {
                      "chat.messages":
                        {
                          "roles":
                            {
                              "sender":
                                {
                                  "matching_documents": 12,
                                  "evaluated_fields": 4,
                                  "discarded_fields": 0,
                                },
                            },
                          "no_matching_role": 0,
                        },
                    },
                }
              properties:
                namespaces_metrics:
                  type: object
                  additionalProperties:
                    description: Metrics for a specific `database.collection` namespace.
                    type: object
                    properties:
                      roles:
                        type: object
                        additionalProperties:
                          type: object
                          description: Metrics for a specific role.
                          properties:
                            matching_documents:
                              type: number
                            evaluated_fields:
                              type: number
                            discarded_fields:
                              type: number
                      no_matching_role:
                        type: number
        BilledMemory:
          properties:
            mem_time_usage:
              type: number
              description: |
                The total billable memory used by the request.
        SyncSession:
          properties:
            sync_query:
              type: object
              example: { "Item": '(owner_id == "641cb3d99e425c794ef69315")' }
              description: |
                The current subscription queries for this Device Sync
                session. This object maps object type names to the query for
                that type.
            sync_session_metrics:
              type: object
              example:
                {
                  "uploads": 2,
                  "downloads": 6,
                  "downloaded_changesets": 4,
                  "downloaded_changesets_size": 5352,
                  "changesets": 2,
                }
              description: |
                Usage metrics for the current Device Sync session.
        FunctionCall:
          properties:
            function_call_location:
              type: string
              example: "US-VA"
              description: |
                The global region where the function was executed.
            function_call_provider_region:
              type: string
              example: "aws-us-east-1"
              description: |
                The cloud provider deployment region where the function was
                executed.
            function_call:
              type: object
              example: { "name": "data/v1/insertOne", "arguments": null }
            function_id:
              type: string
              example: "63866254a4e9d232454e6334"
            function_name:
              type: string
              example: "myFunction"
        BaseLog:
          type: object
          description: Common fields shared by all log types.
          properties:
            _id:
              type: string
              example: "63922bf071bdce7b19e14e76"
              description: |
                A unique ID for the log entry.
            co_id:
              type: string
              example: "63922bf071bdce7b19e14e75"
              description: |
                A correlation ID for the request that issued the logged
                operation.
            domain_id:
              type: string
              example: "60c8f69884b0a73d14bb634b"
              description: |
                The domain ID.
            app_id:
              type: string
              example: "60c8f69884b0a73d14bb634a"
              description: |
                The App's internal client ID value.
            group_id:
              type: string
              example: "5b2ec426970199272441a214"
              description: |
                The App's Atlas Project ID value.
            request_url:
              type: string
              example: "/api/client/v2.0/app/test-for-now-vbwlr/auth/providers/anon-user/login"
              description: |
                The URL that the incoming request was sent to.
            request_method:
              type: string
              example: "POST"
              description: |
                The HTTP method used by the incoming request.
            started:
              type: string
              example: "2022-12-08T18:24:48.409Z"
              description: |
                An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp for the start of the logged operation.
            completed:
              type: string
              example: "2022-12-08T18:24:48.41Z"
              description: |
                An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp for the completion of the logged operation.
        TriggerLog:
          allOf:
            - $ref: "#/components/schemas/Logs/Parts/BaseLog"
            - $ref: "#/components/schemas/Logs/Parts/BilledMemory"
            - $ref: "#/components/schemas/Logs/Parts/FunctionCall"
            - $ref: "#/components/schemas/Logs/Parts/Messages"
            - properties:
                event_subscription_id:
                  type: string
                  example: "641ca0709e425c794edc7c6d"
                  description: |
                    The trigger's unique objectId hex.
                event_subscription_name:
                  type: string
                  example: "myDatabaseTrigger"
                  description: |
                    The trigger's name.
        ClientLog:
          properties:
            user_id:
              type: string
              example: "63922890d508542b5ae1f7fa"
              description: |
                The user account ID of the user that initiated the logged operation.
            remote_ip_address:
              type: string
              example: "66.232.252.246"
              description: |
                The IP address that the logged operation originated from.
            status:
              type: number
              example: 200
              description: |
                The HTTP status code returned in the operation response.
            error:
              type: string
              example: "invalid API key"
              description: |
                If a runtime error occurred in the logged operation,
                this is a message that describes the issue.
            error_code:
              type: string
              example: "AuthError"
              description: |
                If a runtime error occurred in the logged operation,
                this is the error's short code.
            platform:
              type: string
              example: "chrome"
              description: |
                The name of the platform that the client was running on.
            platform_version:
              example: "111.0.0"
              description: |
                The version of the platform that the client was running on.
            sdk_name:
              example: "Realm Swift"
              description: |
                The name of the Realm SDK used to make the request.
            sdk_version:
              example: "2.0.0"
              description: |
                The version number of the Realm SDK used to make the request.
      API:
        allOf:
          - $ref: "#/components/schemas/Logs/Parts/BaseLog"
          - title: API
            properties:
              type:
                const: "API"
      APIKey:
        allOf:
          - $ref: "#/components/schemas/Logs/Parts/BaseLog"
          - $ref: "#/components/schemas/Logs/Parts/ClientLog"
          - title: API_KEY
            properties:
              type:
                const: "API_KEY"
      TriggerFailure:
        allOf:
          - $ref: "#/components/schemas/Logs/Parts/BaseLog"
          - title: "TRIGGER_FAILURE"
            properties:
              type:
                const: "TRIGGER_FAILURE"
              event_subscription_id:
                example: "641ca0b87649edd250f7536c"
              event_subscription_name:
                example: "myScheduledTrigger"
              error:
                type: string
                description: An error message that describes the failure.
      TriggerErrorHandler:
        allOf:
          - $ref: "#/components/schemas/Logs/Parts/TriggerLog"
          - title: "TRIGGER_ERROR_HANDLER"
            properties:
              type:
                const: "TRIGGER_ERROR_HANDLER"
              parent_co_id: 
                type: string
                example: "641ca0b87649edd250f7536c"
                description: The ID of the original TRIGGER_FAILURE log that invoked the error handler.                
      DBEventTrigger:
        allOf:
          - $ref: "#/components/schemas/Logs/Parts/TriggerLog"
          - title: "DB_TRIGGER"
            properties:
              type:
                const: "DB_TRIGGER"
      AuthEventTrigger:
        allOf:
          - $ref: "#/components/schemas/Logs/Parts/TriggerLog"
          - title: "AUTH_TRIGGER"
            properties:
              type:
                const: "AUTH_TRIGGER"
      ScheduledEventTrigger:
        allOf:
          - $ref: "#/components/schemas/Logs/Parts/TriggerLog"
          - title: "SCHEDULED_TRIGGER"
            properties:
              type:
                const: "SCHEDULED_TRIGGER"
      Function:
        allOf:
          - $ref: "#/components/schemas/Logs/Parts/BaseLog"
          - $ref: "#/components/schemas/Logs/Parts/ClientLog"
          - $ref: "#/components/schemas/Logs/Parts/FunctionCall"
          - $ref: "#/components/schemas/Logs/Parts/BilledMemory"
          - title: "FUNCTION"
            properties:
              type:
                const: "FUNCTION"
      ServiceFunction:
        allOf:
          - $ref: "#/components/schemas/Logs/Parts/BaseLog"
          - $ref: "#/components/schemas/Logs/Parts/ClientLog"
          - $ref: "#/components/schemas/Logs/Parts/FunctionCall"
          - title: "SERVICE_FUNCTION"
            properties:
              type:
                const: "SERVICE_FUNCTION"
      StreamFunction:
        allOf:
          - $ref: "#/components/schemas/Logs/Parts/BaseLog"
          - $ref: "#/components/schemas/Logs/Parts/ClientLog"
          - $ref: "#/components/schemas/Logs/Parts/FunctionCall"
          - title: "STREAM_FUNCTION"
            properties:
              type:
                const: "STREAM_FUNCTION"
      ServiceStreamFunction:
        allOf:
          - $ref: "#/components/schemas/Logs/Parts/BaseLog"
          - $ref: "#/components/schemas/Logs/Parts/ClientLog"
          - $ref: "#/components/schemas/Logs/Parts/FunctionCall"
          - title: "SERVICE_STREAM_FUNCTION"
            properties:
              type:
                const: "SERVICE_STREAM_FUNCTION"
      Auth:
        allOf:
          - $ref: "#/components/schemas/Logs/Parts/BaseLog"
          - $ref: "#/components/schemas/Logs/Parts/ClientLog"
          - title: AUTH
            properties:
              type:
                const: "AUTH"
              auth_event:
                type: object
                example: { "type": "login", "provider": "api-key" }
                properties:
                  type:
                    type: string
                    example: login
                    description: The requested authentication operation.
                  provider:
                    allOf:
                      - $ref: "#/components/schemas/ProviderType"
                      - description: The authentication provider used for the authentication operation.
                        example: api-key
      IncomingWebhook:
        allOf:
          - $ref: "#/components/schemas/Logs/Parts/BaseLog"
          - $ref: "#/components/schemas/Logs/Parts/FunctionCall"
          - $ref: "#/components/schemas/Logs/Parts/BilledMemory"
          - title: "WEBHOOK"
            properties:
              type:
                const: "WEBHOOK"
      Endpoint:
        allOf:
          - $ref: "#/components/schemas/Logs/Parts/BaseLog"
          - $ref: "#/components/schemas/Logs/Parts/ClientLog"
          - $ref: "#/components/schemas/Logs/Parts/FunctionCall"
          - $ref: "#/components/schemas/Logs/Parts/BilledMemory"
          - title: "ENDPOINT"
            properties:
              type:
                const: "ENDPOINT"
              endpoint_id:
                type: string
                example: "63866254a4e9d232454f6485"
                description: |
                  The endpoint's unique objectId hex.
              endpoint_route:
                type: string
                example: "/data/v1/action/insertOne"
                description: |
                  The endpoint route. Append this to your App's Data API base
                  URL to construct the endpoint URL.
              endpoint_args:
                type: string
                description: |
                  The endpoint request's HTTP headers, parameters, and body serialized to EJSON.
                example:
                  {
                    "query": {},
                    "headers":
                      {
                        "Accept": ["application/json"],
                        "Api-key":
                          [
                            "NmYQlv7Eisqe9RjrkqFiBjgSii3wGLXWedDz4drbkQpzGkA93ZZcIMTUEIOqwCNN",
                          ],
                      },
                    "body":
                      {
                        "$binary":
                          {
                            "base64": "eyJjb2xsZWN0aW9uIjoiSXRlbSIsImRhdGFTb3VyY2UiOiJtb25nb2RiLWF0bGFzIiwiZGF0YWJhc2UiOiJ0b2RvIiwiZmlsdGVyIjp7Il9pZCI6eyIkb2lkIjoiNjQxMTQ1OTgzYjAwN2RjYWJjZTkxNWFmIn19fQ==",
                            "subType": "00",
                          },
                      },
                  }
      Push:
        allOf:
          - $ref: "#/components/schemas/Logs/Parts/BaseLog"
          - title: "PUSH"
            properties:
              type:
                const: "PUSH"
      GraphQL:
        allOf:
          - $ref: "#/components/schemas/Logs/Parts/BaseLog"
          - $ref: "#/components/schemas/Logs/Parts/ClientLog"
          - $ref: "#/components/schemas/Logs/Parts/FunctionCall"
          - $ref: "#/components/schemas/Logs/Parts/BilledMemory"
          - $ref: "#/components/schemas/Logs/Parts/RuleMetrics"
          - title: "GRAPHQL"
            properties:
              type:
                const: "GRAPHQL"
              graphql_query:
                type: string
                example: "query FetchAllItems {\n  items {\n    _id\n    owner_id\n    isComplete\n    summary\n    __typename\n  }\n}"
                description: |
                  The raw requested GraphQL query or mutation.
      SyncConnectionStart:
        allOf:
          - $ref: "#/components/schemas/Logs/Parts/BaseLog"
          - $ref: "#/components/schemas/Logs/Parts/ClientLog"
          - $ref: "#/components/schemas/Logs/Parts/FunctionCall"
          - title: "SYNC_CONNECTION_START"
            properties:
              type:
                const: "SYNC_CONNECTION_START"
      SyncConnectionEnd:
        allOf:
          - $ref: "#/components/schemas/Logs/Parts/BaseLog"
          - $ref: "#/components/schemas/Logs/Parts/ClientLog"
          - $ref: "#/components/schemas/Logs/Parts/FunctionCall"
          - $ref: "#/components/schemas/Logs/Parts/Messages"
          - title: "SYNC_CONNECTION_END"
            properties:
              type:
                const: "SYNC_CONNECTION_END"
      SyncSessionStart:
        allOf:
          - $ref: "#/components/schemas/Logs/Parts/BaseLog"
          - $ref: "#/components/schemas/Logs/Parts/ClientLog"
          - $ref: "#/components/schemas/Logs/Parts/FunctionCall"
          - $ref: "#/components/schemas/Logs/Parts/SyncSession"
          - title: "SYNC_SESSION_START"
            properties:
              type:
                const: "SYNC_SESSION_START"
      SyncSessionEnd:
        allOf:
          - $ref: "#/components/schemas/Logs/Parts/BaseLog"
          - $ref: "#/components/schemas/Logs/Parts/ClientLog"
          - $ref: "#/components/schemas/Logs/Parts/FunctionCall"
          - $ref: "#/components/schemas/Logs/Parts/Messages"
          - $ref: "#/components/schemas/Logs/Parts/SyncSession"
          - title: "SYNC_SESSION_END"
            properties:
              type:
                const: "SYNC_SESSION_END"
      SyncClientWrite:
        allOf:
          - $ref: "#/components/schemas/Logs/Parts/BaseLog"
          - $ref: "#/components/schemas/Logs/Parts/ClientLog"
          - $ref: "#/components/schemas/Logs/Parts/FunctionCall"
          - $ref: "#/components/schemas/Logs/Parts/Messages"
          - $ref: "#/components/schemas/Logs/Parts/SyncSession"
          - title: "SYNC_CLIENT_WRITE"
            properties:
              type:
                const: "SYNC_CLIENT_WRITE"
      SyncError:
        allOf:
          - $ref: "#/components/schemas/Logs/Parts/BaseLog"
          - $ref: "#/components/schemas/Logs/Parts/ClientLog"
          - $ref: "#/components/schemas/Logs/Parts/Messages"
          - title: "SYNC_ERROR"
            properties:
              type:
                const: "SYNC_ERROR"
      SyncOther:
        allOf:
          - $ref: "#/components/schemas/Logs/Parts/BaseLog"
          - $ref: "#/components/schemas/Logs/Parts/ClientLog"
          - $ref: "#/components/schemas/Logs/Parts/Messages"
          - $ref: "#/components/schemas/Logs/Parts/SyncSession"
          - title: "SYNC_OTHER"
            properties:
              type:
                const: "SYNC_OTHER"
      SchemaAdditiveChange:
        allOf:
          - $ref: "#/components/schemas/Logs/Parts/BaseLog"
          - $ref: "#/components/schemas/Logs/Parts/ClientLog"
          - $ref: "#/components/schemas/Logs/Parts/FunctionCall"
          - $ref: "#/components/schemas/Logs/Parts/Messages"
          - $ref: "#/components/schemas/Logs/Parts/RuleMetrics"
          - title: "SCHEMA_ADDITIVE_CHANGE"
            properties:
              type:
                const: "SCHEMA_ADDITIVE_CHANGE"
      SchemaGeneration:
        allOf:
          - $ref: "#/components/schemas/Logs/Parts/BaseLog"
          - $ref: "#/components/schemas/Logs/Parts/ClientLog"
          - $ref: "#/components/schemas/Logs/Parts/RuleMetrics"
          - title: "SCHEMA_GENERATION"
            properties:
              type:
                const: "SCHEMA_GENERATION"
              service_id:
                type: string
                example: "63ee5785bbfa4b9457f8509e"
                description: |
                  The ID of the data source that the schema was generated from.
      SchemaValidation:
        allOf:
          - $ref: "#/components/schemas/Logs/Parts/BaseLog"
          - $ref: "#/components/schemas/Logs/Parts/ClientLog"
          - $ref: "#/components/schemas/Logs/Parts/Messages"
          - $ref: "#/components/schemas/Logs/Parts/RuleMetrics"
          - title: "SCHEMA_VALIDATION"
            properties:
              type:
                const: "SCHEMA_VALIDATION"
              service_id:
                type: string
                example: "63ee5785bbfa4b9457f8509e"
                description: |
                  The ID of the data source that was validated against the schema.
      LogForwarder:
        allOf:
          - $ref: "#/components/schemas/Logs/Parts/BaseLog"
          - $ref: "#/components/schemas/Logs/Parts/FunctionCall"
          - $ref: "#/components/schemas/Logs/Parts/Messages"
          - $ref: "#/components/schemas/Logs/Parts/BilledMemory"
          - title: "LOG_FORWARDER"
            properties:
              type:
                const: "LOG_FORWARDER"
              event_subscription_id:
                type: string
                example: "641caa28ce889d60d32b9fe2"
                description: |
                  The underlying log event subscription's unique objectId hex.
              event_subscription_name:
                type: string
                example: "toMongo_event_subscription"
                description: |
                  The underlying log event subscription's name.
              log_forwarder_id:
                type: string
                example: "641caa28ce889d60d32b9fe2"
                description: |
                  The log forwarder's unique objectId hex.
              log_forwarder_name:
                type: string
                example: "toMongo"
                description: |
                  The log forwarder's name.
              failed_to_forward_log_ids:
                type: array
                items:
                  type: string
                description: |
                  An array of log ``_id`` values for any logs that were not successfully forwarded.
              data_source_id:
                type: string
                example: "63ee5785bbfa4b9457f8509e"
                description: |
                  The ID of the forwarded log data source.
              data_source_name:
                type: string
                example: "mongodb-atlas"
                description: |
                  The name of the forwarded log data source.
              data_source_namespace:
                type: string
                example: "myApp.logs"
                description: |
                  The `database.collection` namespace of the forwarded log collection.

    PrivateEndpointCreate:
      type: object
      required:
        - cloud_provider_endpoint_id
        - cloud_provider_region
        - endpoint_type
      properties:
        cloud_provider_region:
          type: string
          example: aws-us-east-1
          description: The cloud provider region that hosts the private endpoint.
        cloud_provider_endpoint_id:
          type: string
          example: vpce-12345678
          description: The private endpoint ID from the cloud provider.
        comment:
          type: string
          description: An optional comment that describes the endpoint.
        endpoint_type:
          type: string
          enum:
            - sync
            - general
          example: "sync"
          description: |-
            The type of endpoint. For more information
            on endpoint types and migrating deprecated endpoints to `"general"` or `"sync"`, 
            see [Use a VPC Private Endpoint](https://www.mongodb.com/docs/atlas/app-services/security/private-endpoints).
    PrivateEndpoint:
      type: object
      properties:
        _id:
          type: string
        cloud_provider_region:
          type: string
          example: aws-us-east-1
          description: The cloud provider region that hosts the private endpoint.
        cloud_provider_endpoint_id:
          type: string
          example: vpce-12345678
          description: The private endpoint ID from the cloud provider.
        comment:
          type: string
          description: An optional comment that describes the endpoint.
        endpoint_type:
          type: string
          enum:
            - sync
            - general
            - legacy
          example: "sync"
          description: |-
            The type of endpoint. For more information
            on migrating deprecated `"legacy"` endpoints, see 
            [Migrate Legacy Endpoints](https://www.mongodb.com/docs/atlas/app-services/security/private-endpoints/#migrate-a-legacy-endpoint).
    PrivateEndpointServiceInfo:
      type: object
      properties:
        cloud_provider_region:
          type: string
          example: "aws-us-east-1"
        service_name:
          type: string
          example: com.amazonaws.vpce.us-east-1.vpce-svc-0f24fc6e6de007e5e
        endpoint_type:
          type: string
          enum:
            - sync
            - general
            - legacy
          example: "sync"
          description: |-
            The type of endpoint. For more information
            on migrating deprecated `"legacy"` endpoints, see 
            [Migrate Legacy Endpoints](https://www.mongodb.com/docs/atlas/app-services/security/private-endpoints/#migrate-a-legacy-endpoint).
    PushPullAppConfig:
      type: object
      required:
        - auth_providers
        - data_sources
        - deployment_model
        - endpoints
        - environments
        - functions
        - graphql
        - hosting
        - https_endpoints
        - log_forwarders
        - name
        - provider_region
        - schemas
        - services
        - sync
        - triggers
        - values
      properties:
        name:
          type: string
          description: The App's name.
        provider_region:
          $ref: "#/components/schemas/CloudProviderRegionId"
        deployment_model:
          $ref: "#/components/schemas/DeploymentModel"
        environment:
          description: The App's environment tag. If not specified, the App has no environment tag.
          $ref: "#/components/schemas/AppEnvironment"
        auth_providers:
          type: array
          items:
            $ref: "#/components/schemas/AuthProviderConstructor"
        custom_user_data:
          oneOf:
            - $ref: "#/components/schemas/CustomUserDataConstructor"
            - type: "null"
        data_api_config:
          oneOf:
            - $ref: "#/components/schemas/DataApiConfig"
            - type: "null"
        data_sources:
          type: array
          items:
            $ref: "#/components/schemas/DataSourceConstructor"
        endpoints:
          type: array
          items:
            $ref: "#/components/schemas/EndpointConstructor"
        environments:
          $ref: "#/components/schemas/AllEnvironmentValues"
        functions:
          type: array
          items:
            $ref: "#/components/schemas/FunctionConstructor"
        graphql:
          $ref: "#/components/schemas/GraphQLConstructor"
        hosting:
          $ref: "#/components/schemas/HostingConstructor"
        https_endpoints:
          description: "[Deprecated] A list of legacy HTTP services. This is for backwards compatibility only."
          type: array
          items:
            $ref: "#/components/schemas/ThirdPartyServiceConstructor"
        log_forwarders:
          type: array
          items:
            $ref: "#/components/schemas/LogForwarderConstructor"
        schemas:
          type: array
          items:
            $ref: "#/components/schemas/FullSchema"
        services:
          description: "[Deprecated] A list of legacy third-party non-HTTP services. This is for backwards compatibility only."
          type: array
          items:
            $ref: "#/components/schemas/ThirdPartyServiceConstructor"
        sync:
          $ref: "#/components/schemas/FlexibleSync"
        triggers:
          type: array
          items:
            $ref: "#/components/schemas/TriggerConstructor"
        values:
          type: array
          items:
            $ref: "#/components/schemas/ValueConstructor"
  securitySchemes:
    tokenAuth:
      type: http
      scheme: bearer
      description: |-
        An `access_token` issued by the App Services Admin API. You can
        get this value either by [authenticating with
        credentials](#get-an-admin-api-session-access-token) or by
        [refreshing an existing access
        token](#refresh-an-admin-api-session-access-token).
    refreshAuth:
      type: http
      scheme: bearer
      description: |-
        A `refresh_token` issued by the App Services Admin API when you
        authenticated. Use this to [refresh an existing access
        token](#refresh-an-admin-api-session-access-token).
  responses:
    BadRequest:
      description: There is an error in the request.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"

    EnvironmentValueNotFound:
      description: Environment value not found
      content:
        application/json:
          schema:
            allOf:
              - $ref: "#/components/schemas/Error"
              - properties:
                  error_code:
                    const: EnvironmentValueNotFound
tags:
  - name: admin
    x-displayName: Administrator
    description: Log in and adminstrate App Services Apps.
  - name: apikeys
    x-displayName: "[Deprecated] API Keys"
    description: View and manage API keys through the [API Key provider](https://www.mongodb.com/docs/atlas/app-services/authentication/api-key/).
  - name: apps
    x-displayName: Applications
    description: View and manage applications in an Atlas project.
  - name: authproviders
    x-displayName: "[Deprecated] Authentication Providers"
    description: View and manage [authentication providers](https://www.mongodb.com/docs/atlas/app-services/authentication/).
  - name: billing
    x-displayName: Billing
    description: View billed usage of your applications.
  - name: custom-user-data
    x-displayName: Custom User Data
    description: Configure [custom user data](https://www.mongodb.com/docs/atlas/app-services/users/enable-custom-user-data/).
  - name: deploy
    x-displayName: Deployment
    description: |
      ## Draft and Deploy a Group of Changes

      You can [deploy](https://www.mongodb.com/docs/atlas/app-services/apps/deploy/) a
      group of application changes together by creating and deploying a draft.
      To create and deploy a set of draft changes:

      ### 1. Create a New Draft

      A draft represents a group of application changes that you can deploy or
      discard as a single unit. To create a draft, send a `POST` request to
      the drafts endpoint:

      ```shell
      curl --request POST \
        --header 'Content-Type: application/json' \
        --header 'Authorization: Bearer <access_token>' \
        'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/drafts'
      ```


      #### One Draft Per User

      Each user can only create a single draft at a time, either through the
      UI or the Admin API. If you already have an existing draft, you can
      discard the changes associated with it by sending a `DELETE` request to
      the draft's endpoint:

      ```shell
      curl --request DELETE \
        --header 'Authorization: Bearer <access_token>' \
        'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/drafts/{draftId}'
      ```

      ### 2. Make Changes to Your Application

      Once you've created a draft, make all of the changes that you want to
      include in the draft. App Services adds any application changes that you make
      to the draft so that you can deploy them together.

      ### 3. Deploy the Draft

      After you've made all the changes that you want to include in the
      deployment, deploy the draft by sending a `POST` request to that draft's
      deployment endpoint:

      ```shell
      curl --request POST \
        --header 'Content-Type: application/json' \
        --header 'Authorization: Bearer <access_token>' \
        'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/drafts/{draftId}/deployment'
      ```

      #### Draft Conflicts

      If you deploy changes through the API but have conflicting changes in a
      draft in the UI, your UI draft will become invalid and you will not be
      able to deploy it. You can download your UI draft by reviewing the draft
      in the `Deployment` page. You can use the download to deploy your
      changes in the `appservices` CLI or as a reference as you reapply changes in
      the UI.
  - name: data-api
    x-displayName: "[Deprecated] Data API"
    description: |-
      Manage your app's generated [Data API endpoints](https://www.mongodb.com/docs/atlas/app-services/data-api/generated-endpoints/).

      ## Construct a Data API Base URL

      Data API requests use a base URL that's specific to your App and
      deployment model.

      For a globally deployed app, the base URL has the following format:

      ```
      https://data.mongodb-api.com/app/{ClientAppID}/endpoint/data/{DataAPIVersion}
      ```

      A locally deployed app uses a similar base URL also includes the
      App's deployment region and cloud provider:

      ```
      https://{Region}.{Cloud}.data.mongodb-api.com/app/{ClientAppID}/endpoint/data/{DataAPIVersion}
      ```

      You can find an App's `Region`, `Cloud`, and `ClientAppId` in the
      [App Configuration](#tag/apps/operation/adminGetApplication):

      ```sh
      curl -X GET https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId} \
        -h 'Authorization: Bearer <AccessToken>'
      ```

      You can see a list of all `DataAPIVersion` values supported by an App in
      the `versions` field of its [Data API
      Configuration](#tag/data-api/operation/adminGetDataApiConfig):

      ```sh
      curl -X GET "https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/data_api/config" \
        -h 'Authorization: Bearer <AccessToken>'
      ```

      For example, consider an App that has the following configuration:

      ```json
      {
        "client_app_id": "myapp-abcde",
        "deployment_model": "LOCAL",
        "provider_region": "aws-us-east-1",
        ...
      }
      ```

      This App would use the following base URL for Data API v1 requests:

      ```text
      https://us-east-1.aws.data.mongodb-api.com/app/myapp-abcde/endpoint/data/v1
      ```
  - name: dependencies
    x-displayName: Dependencies
    description: Manage your application's [external dependencies](https://www.mongodb.com/docs/atlas/app-services/functions/dependencies/).
  - name: endpoints
    x-displayName: Endpoints
    description: |-
      View and manage your app's custom [HTTPS endpoints](https://www.mongodb.com/docs/atlas/app-services/data-api/custom-endpoints/).

      ## Construct a Custom HTTPS Endpoint Base URL

      HTTPS Endpoint requests use a base URL that's specific to your App and
      deployment model.

      For a globally deployed app, the base URL has the following format:

      ```
      https://data.mongodb-api.com/app/{ClientAppID}/endpoint
      ```

      A locally deployed app uses a similar base URL also includes the
      App's deployment region and cloud provider:

      ```
      https://{Region}.{Cloud}.data.mongodb-api.com/app/{ClientAppID}/endpoint
      ```

      You can find an App's `Region`, `Cloud`, and `ClientAppId` by
      calling the [Get an App](#tag/apps/operation/adminGetApplication) endpoint:

      ```sh
      curl -X GET https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId} \
        -h 'Authorization: Bearer <AccessToken>'
      ```

      For example, consider an App that has the following configuration:

      ```json
      {
        "client_app_id": "myapp-abcde",
        "deployment_model": "LOCAL",
        "provider_region": "aws-us-east-1",
        ...
      }
      ```

      This App would use the following base URL for incoming custom HTTPS endpoint requests:

      ```text
      https://us-east-1.aws.data.mongodb-api.com/app/myapp-abcde/endpoint
      ```
  - name: event-subscriptions
    x-displayName: Event Subscriptions
    description: |-
      View your app's active event subscriptions. These monitor
      real-time events, e.g. from a MongoDB change stream, to power
      application services like Triggers and Device Sync.
  - name: environments
    x-displayName: Environments
    description: View and manage your app's [environment](https://www.mongodb.com/docs/atlas/app-services/apps/environment/) and environment values.
  - name: functions
    x-displayName: Functions
    description: View and manage your app's [functions](https://www.mongodb.com/docs/atlas/app-services/functions/).
  - name: graphql
    x-displayName: "[Deprecated] GraphQL API"
    description: Configure and run GraphQL API operations.
  - name: hosting
    x-displayName: Hosting
    description: |
      Manage your application's [hosted files](https://www.mongodb.com/docs/atlas/app-services/hosting/).

      ## Asset Metadata Document Example

      Asset metadata documents describe hosted asset files.

      ```json
      {
        "path": "<Asset Resource Path>",
        "hash": "<Asset MD5 Checksum Hash>",
        "size": <File size in bytes>,
        "attrs": [
            {
              "name": "<Metadata Attribute Name>",
              "value": "<Metadata Attribute Value>",
            }
        ]
      }
      ```
  - name: logs
    x-displayName: Logs
    description: |
      Access your application's [logs](https://www.mongodb.com/docs/atlas/app-services/logs/).

      ## Pagination with the Logging API

      The Logging endpoint returns up to 100 log entries per page. If the
      query matches more than 100 entries, the result will be
      [paginated](https://en.wikipedia.org/wiki/Pagination). Such a result
      will contain two pieces of information that you will need to request the
      next page of entries for the same query: the `nextEndDate` and
      `nextSkip` fields.

      Paginated results always contain the `nextEndDate` field. A paginated
      result will also contain the `nextSkip` field if the timestamp of the
      first entry on the next page is identical to the timestamp of the last
      entry on the current page.

      To request the first page of up to 100 log entries, use the endpoint as
      usual:

      ```sh
      curl --request GET \
        --header 'Authorization: Bearer <access_token>' \
        'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/logs'
      ```

      To request the next page of up to 100 log entries, pass the values of
      `nextEndDate` and `nextSkip` as the `end_date` and `skip` parameters,
      respectively:

      ```sh
      curl --request GET \
        --header 'Authorization: Bearer <access_token>' \
        'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/logs?end_date={nextEndDate of previous response}&skip={nextSkip of previous response}'
      ```

      Repeat this step to get more pages until the response does not have a
      `nextEndDate` field. This signifies that you have reached the last page.

      For more information, see [GET /groups/{groupId}/apps/{appId}/logs](#section/adminGetLogs).
  - name: log_forwarders
    x-displayName: Log Forwarding
    description: View and manage your application's [log forwarders](https://www.mongodb.com/docs/atlas/app-services/logs/forward-logs/).
  - name: metrics
    x-displayName: Metrics
    description: View Atlas App Services metrics.
  - name: rules
    x-displayName: Rules
    description: View and manage your application's [data access rules](https://www.mongodb.com/docs/atlas/app-services/rules/).
  - name: schemas
    x-displayName: "[Deprecated] Schemas"
    description: View and manage your application's [schemas](https://www.mongodb.com/docs/atlas/app-services/schemas/).
  - name: secrets
    x-displayName: Secrets
    description: View and manage your application's [secrets](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets/).
  - name: security
    x-displayName: Security
    description: Configure your application's [security](https://www.mongodb.com/docs/atlas/app-services/security/).
  - name: services
    x-displayName: "Data Sources & [Deprecated] Services"
    description: View and manage your application's [data sources](https://www.mongodb.com/docs/atlas/app-services/mongodb/) and [third-party services [Deprecated]](https://www.mongodb.com/docs/atlas/app-services/reference/services/)
  - name: sync
    x-displayName: "[Deprecated] Sync"
    description: Get information about [sync](https://www.mongodb.com/docs/atlas/app-services/sync/) for your application.
  - name: triggers
    x-displayName: Triggers
    description: View and manage your application's [triggers](https://www.mongodb.com/docs/atlas/app-services/triggers/overview/).
  - name: users
    x-displayName: "[Deprecated] Users"
    description: View and manage your application's [users](https://www.mongodb.com/docs/atlas/app-services/authentication/).
  - name: email
    x-displayName: "[Deprecated] User Confirmation"
    description: Confirm pending users with the built-in email confirmation flow.
  - name: values
    x-displayName: Values
    description: View and manage your application's [values](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets/).
  - name: notifications
    x-displayName: "[Deprecated] Push Notifications"
    description: View and manage your application's [push notifications](https://www.mongodb.com/docs/atlas/app-services/push-notifications/).
  - name: webhooks
    x-displayName: "[Deprecated] Webhooks"
    description: View and manage your application's [webhooks](https://www.mongodb.com/docs/atlas/app-services/services/configure/service-webhooks/).
security:
  - tokenAuth: []
