---
title: "Push App Configuration Files"
method: PATCH
path: "/groups/{groupId}/apps/{appId}/push"
tags: ["apps"]
---

# Push App Configuration Files

`PATCH /groups/{groupId}/apps/{appId}/push`

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.

## Request body

- PushPullAppConfig
  - `name` string, required — The App's name.
  - `provider_region` union, required
    - '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'
    - 'azure-eastus2' | 'azure-westus' | 'azure-westeurope' | 'azure-eastasia' | 'azure-southeastasia'
    - 'gcp-us-central1' | 'gcp-us-east4' | 'gcp-us-west1' | 'gcp-europe-west1' | 'gcp-asia-south1'
  - `deployment_model` 'GLOBAL' | 'LOCAL', required — An application [deployment model](https://www.mongodb.com/docs/atlas/app-services/apps/deployment-models-and-regions/#deployment-models).
  - `environment` 'development' | 'testing' | 'qa' | 'production' — The application's environment.
  - `auth_providers` AuthProviderConstructor[], required
    - union
      - AnonymousAuthProvider
        - `name` 'anon-user', required — The name of the authentication provider. For Anonymous authentication, this value is always `anon-user`.
        - `type` 'anon-user', required — The name of the authentication provider. For Anonymous authentication, this value is always `anon-user`.
        - `disabled` boolean — If `true`, the auth provider is disabled. Users cannot log in through the provider until it is enabled.
      - EmailPasswordAuthProvider
        - `name` 'local-userpass', required — The name of the authentication provider. For Email/Password authentication, this value is always `local-userpass`.
        - `type` 'local-userpass', required — The name of the authentication provider. For Email/Password authentication, this value is always `local-userpass`.
        - `disabled` boolean — If `true`, the auth provider is disabled. Users cannot log in through the provider until it is enabled.
        - `config` union
          - object
            - `autoConfirm` unknown
            - `resetPasswordUrl` string — 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` string — The subject line of the email sent to users as part of the built-in password reset flow.
          - object
            - `autoConfirm` unknown
            - `runResetFunction` true — If `true`, use a custom function that you define to handle the password reset process.
            - `resetFunctionName` string — The name of the custom function that handles the password reset process.
          - object
            - `autoConfirm` unknown
            - `emailConfirmationUrl` string — 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` string — The subject line of the email sent to new users as part of the built-in confirmation flow.
            - `resetPasswordUrl` string — 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` string — The subject line of the email sent to users as part of the built-in password reset flow.
          - object
            - `autoConfirm` unknown
            - `emailConfirmationUrl` string — 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` string — The subject line of the email sent to new users as part of the built-in confirmation flow.
            - `runResetFunction` true — If `true`, use a custom function that you define to handle the password reset process.
            - `resetFunctionName` string — The name of the custom function that handles the password reset process.
          - object
            - `autoConfirm` unknown
            - `runConfirmationFunction` boolean — If `true`, new email/password user account registrations use a custom function that you define to handle the confirmation process.
            - `confirmationFunctionName` string — The name of the custom function that handles the confirmation process.
            - `resetPasswordUrl` string — 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` string — The subject line of the email sent to users as part of the built-in password reset flow.
          - object
            - `autoConfirm` unknown
            - `runConfirmationFunction` boolean — If `true`, new email/password user account registrations use a custom function that you define to handle the confirmation process.
            - `confirmationFunctionName` string — The name of the custom function that handles the confirmation process.
            - `runResetFunction` true — If `true`, use a custom function that you define to handle the password reset process.
            - `resetFunctionName` string — The name of the custom function that handles the password reset process.
      - ApiKeyAuthProvider
        - `name` 'api-key', required — The name of the authentication provider. For API key authentication, this value is always `api-key`.
        - `type` 'api-key', required — The name of the authentication provider. For API key authentication, this value is always `api-key`.
        - `disabled` boolean — If `true`, the auth provider is disabled. Users cannot log in through the provider until it is enabled.
      - CustomJwtAuthProvider
        - `name` 'custom-token', required — The name of the authentication provider. For Custom JWT authentication, this value is always `custom-token`.
        - `type` 'custom-token', required — The name of the authentication provider. For Custom JWT authentication, this value is always `custom-token`.
        - `disabled` boolean — If `true`, the auth provider is disabled. Users cannot log in through the provider until it is enabled.
        - `config` object — A configuration object for the Custom JWT authentication provider.
          - `audience` string[] — 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.
          - `requireAnyAudience` string — 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` string — 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` boolean — 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` string — 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` object
          - `signingKeys` string[]
        - `metadata_fields` object[] — 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.
          - `required` boolean — If `true`, this value must always be present in the external JWT.
          - `name` string — 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` string — The name of the field in User object that holds the value.
      - CustomFunctionAuthProvider
        - `name` 'custom-function', required — The name of the authentication provider. For Custom Function authentication, this value is always `custom-function`.
        - `type` 'custom-function', required — The name of the authentication provider. For Custom Function authentication, this value is always `custom-function`.
        - `disabled` boolean — If `true`, the auth provider is disabled. Users cannot log in through the provider until it is enabled.
        - `config` object — A configuration object for the Custom Function authentication provider.
          - `authFunctionName` string — 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
        - `name` 'oauth2-apple', required — The name of the authentication provider. For Apple authentication, this value is always `oauth2-apple`.
        - `type` 'oauth2-apple', required — The name of the authentication provider. For Apple authentication, this value is always `oauth2-apple`.
        - `disabled` boolean — If `true`, the auth provider is disabled. Users cannot log in through the provider until it is enabled.
        - `config` object — A configuration object for the Apple authentication provider.
          - `clientId` string — 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` object
          - `clientSecret` string — 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` string[]
      - GoogleAuthProvider
        - `name` 'oauth2-google', required — The name of the authentication provider. For Google authentication, this value is always `oauth2-google`.
        - `type` 'oauth2-google', required — The name of the authentication provider. For Google authentication, this value is always `oauth2-google`.
        - `disabled` boolean — If `true`, the auth provider is disabled. Users cannot log in through the provider until it is enabled.
        - `config` object — A configuration object for the Google authentication provider.
          - `clientId` string — 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` boolean — An OAuth 2.0
        - `secret_config` object
          - `clientSecret` string — 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` string[]
        - `metadata_fields` array[]
          - object[] — 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.
            - `required` boolean — If `true`, include this metadata value in the OAuth JWT and the user's data.
            - `name` string — The name of a user metadata property accessible through OAuth, e.g. `email`.
        - `domain_restrictions` string[]
      - FacebookAuthProvider
        - `name` 'oauth2-facebook', required — The name of the authentication provider. For Facebook authentication, this value is always `oauth2-facebook`.
        - `type` 'oauth2-facebook', required — The name of the authentication provider. For Facebook authentication, this value is always `oauth2-facebook`.
        - `disabled` boolean — If `true`, the auth provider is disabled. Users cannot log in through the provider until it is enabled.
        - `config` object — A configuration object for the Facebook authentication provider.
          - `clientId` string — The App ID of your Facebook app.
        - `secret_config` object
          - `clientSecret` string — The name of a [Secret](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets/) that holds your Facebook App Secret.
        - `redirect_uris` string[]
        - `metadata_fields` array[]
          - object[] — 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.
            - `required` boolean — If `true`, include this metadata value in the OAuth JWT and the user's data.
            - `name` string — The name of a user metadata property accessible through OAuth, e.g. `email`.
        - `domain_restrictions` string[]
  - `custom_user_data` CustomUserDataConstructor
    - `database_name` string — The name of the database that contains custom user data.
    - `collection_name` string — The name of the collection that contains custom user data.
    - `user_id_field` string — 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.
    - `enabled` boolean — If `true`, custom user data is enabled.
    - `mongo_service_name` string, required — The name of the linked MongoDB data source that contains custom user data.
    - `on_user_creation_function_name` string — 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.
  - `data_api_config` DataApiConfig
    - `disabled` boolean, required
    - `versions` DataApiVersion[], required
    - `return_type` 'JSON' | 'EJSON', required — A [data format](https://mongodb.com/docs/atlas/app-services/data-api/#data-formats) supported by the Data API & custom endpoints.
    - `create_user_on_auth` boolean
    - `run_as_user_id` string — An application user's account ID. If defined, endpoints will always run as the specified user.
    - `run_as_user_id_script_source` string — 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` 'NO_VALIDATION' | 'SECRET_AS_QUERY_PARAM' | 'VERIFY_PAYLOAD', required
    - `secret_name` string — 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` object — A JSON expression that evaluates to `true` if an endpoint is allowed to run in response to an incoming request.
  - `data_sources` DataSourceConstructor[], required
    - union
      - AtlasClusterConstructor
        - `name` string — The service name.
        - `type` string — The type of service.
        - `config` AtlasClusterServiceConfig, required
          - `clusterName` string, required — 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` 'primary' | 'primaryPreferred' | 'secondary' | 'secondaryPreferred' | 'nearest', required — The [read preference](https://www.mongodb.com/docs/atlas/app-services/mongodb/read-preference/) mode for read requests to the data source.
          - `readPreferenceTagSets` ReadPreferencesTagSet[] — Target read operations to specific members of a replica set.
          - `wireProtocolEnabled` boolean, required — 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).
        - `default_rule` DefaultRuleConstructor — A data access rule that define defines fallback user roles and query filters for collection's that don't have more specific permissions defined.
          - `roles` RoleConstructor[] — An ordered list of default user roles.
            - `document_filters` object
              - …
            - `name` string — The role's name.
            - `apply_when` union — A [rule expression](https://mongodb.com/docs/atlas/app-services/rules/expressions/).
              - …
            - `read` union — A [rule expression](https://mongodb.com/docs/atlas/app-services/rules/expressions/).
              - …
            - `write` union — A [rule expression](https://mongodb.com/docs/atlas/app-services/rules/expressions/).
              - …
            - `insert` union — A [rule expression](https://mongodb.com/docs/atlas/app-services/rules/expressions/).
              - …
            - `delete` union — A [rule expression](https://mongodb.com/docs/atlas/app-services/rules/expressions/).
              - …
            - `search` union — A [rule expression](https://mongodb.com/docs/atlas/app-services/rules/expressions/).
              - …
            - `fields` unknown
            - `additional_fields` FieldLevelPermissions — Read and write permissions for a field.
              - …
          - `filters` FilterConstructor[] — A list of default [query filters](https://www.mongodb.com/docs/atlas/app-services/reference/config/data_sources/#filters).
            - `name` string — The filter's name.
            - `apply_when` union — A [rule expression](https://mongodb.com/docs/atlas/app-services/rules/expressions/).
              - …
            - `query` Query — A MongoDB query object.
            - `projection` Projection — A MongoDB projection object.
        - `rules` RuleConstructor[], required
          - `database` string, required — The name of a database in the linked data source.
          - `collection` string, required — The name of a collection in the specified `database`.
          - `roles` RoleConstructor[] — A list of data access roles.
            - `document_filters` object
              - …
            - `name` string — The role's name.
            - `apply_when` union — A [rule expression](https://mongodb.com/docs/atlas/app-services/rules/expressions/).
              - …
            - `read` union — A [rule expression](https://mongodb.com/docs/atlas/app-services/rules/expressions/).
              - …
            - `write` union — A [rule expression](https://mongodb.com/docs/atlas/app-services/rules/expressions/).
              - …
            - `insert` union — A [rule expression](https://mongodb.com/docs/atlas/app-services/rules/expressions/).
              - …
            - `delete` union — A [rule expression](https://mongodb.com/docs/atlas/app-services/rules/expressions/).
              - …
            - `search` union — A [rule expression](https://mongodb.com/docs/atlas/app-services/rules/expressions/).
              - …
            - `fields` unknown
            - `additional_fields` FieldLevelPermissions — Read and write permissions for a field.
              - …
          - `filters` FilterConstructor[] — A list of filters for incoming operations.
            - `name` string — The filter's name.
            - `apply_when` union — A [rule expression](https://mongodb.com/docs/atlas/app-services/rules/expressions/).
              - …
            - `query` Query — A MongoDB query object.
            - `projection` Projection — A MongoDB projection object.
      - AtlasFederatedInstanceConstructor
        - `name` 'mongodb-datafederation', required
        - `type` 'datalake', required
        - `config` object, required
          - `dataLakeName` string, required — 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.
  - `endpoints` EndpointConstructor[], required
    - `route` string, required
    - `http_method` 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | '*', required
    - `function_id` string, required
    - `validation_method` 'NO_VALIDATION' | 'SECRET_AS_QUERY_PARAM' | 'VERIFY_PAYLOAD', required
    - `secret_id` string — 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` 'JSON' | 'EJSON', required — A [data format](https://mongodb.com/docs/atlas/app-services/data-api/#data-formats) supported by the Data API & custom endpoints.
    - `respond_result` boolean, required
    - `fetch_custom_user_data` boolean
    - `create_user_on_auth` boolean
    - `disabled` boolean, required
    - `function_name` string, required — The endpoint functions's name.
  - `environments` AllEnvironmentValues, required
    - `values` object — An object that maps each possible environment name to definitions of the environment values available in that environment.
      - `none` SpecificEnvironmentValues
        - `values` object
      - `development` SpecificEnvironmentValues
        - `values` object
      - `testing` SpecificEnvironmentValues
        - `values` object
      - `qa` SpecificEnvironmentValues
        - `values` object
      - `production` SpecificEnvironmentValues
        - `values` object
  - `functions` FunctionConstructor[], required
    - `can_evaluate` object — A JSON expression that evaluates to `true` if the Function is allowed to run in response to an incoming request.
    - `name` string, required — A unique name for the Function.
    - `private` boolean, required — 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` string, required — The stringified source code for the function. The code must be valid ES6.
    - `run_as_system` boolean — If `true`, the function executes with full privileges, bypassing rules on all services.
    - `run_as_user_id` string — 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` string — 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`.
  - `graphql` GraphQLConstructor, required
    - `config` GraphQLConfig, required
      - `use_natural_pluralization` boolean — 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` boolean — If `true`, the GraphQL API blocks [introspection queries](https://graphql.org/learn/introspection/) from clients.
    - `validation_settings` GraphQLValidationSettings, required
      - `read_validation_action` 'ERROR' | 'WARN'
      - `read_validation_level` 'STRICT' | 'OFF'
      - `write_validation_action` 'ERROR' | 'WARN'
      - `write_validation_level` 'STRICT' | 'OFF'
    - `custom_resolvers` CustomResolverConstructor[], required
      - `on_type` string, required — 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` string, required — The name of the custom resolver field that appears in the GraphQL schema.
      - `input_type` union — 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.
        - string
        - object
      - `input_type_format` 'scalar' | 'scalar-list' | 'generated' | 'generated-list' | 'custom' — 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` union — 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! } ```
        - string
        - object
      - `payload_type_format` 'scalar' | 'scalar-list' | 'generated' | 'generated-list' | 'custom' — 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.
      - `function_name` string, required — The resolver function's name.
  - `hosting` HostingConstructor, required
    - `enabled` boolean, required
    - `custom_domain` string
    - `default_error_path` string
    - `default_error_code` string
  - `https_endpoints` ThirdPartyServiceConstructor[], required — [Deprecated] A list of legacy HTTP services. This is for backwards compatibility only.
    - `name` string — The service name.
    - `type` 'aws' | 'twilio' | 'github' | 'gcm' | 'http' — The type of service.
    - `incoming_webhooks` IncomingWebhook[]
      - `name` string, required
      - `function_source` string, required
      - `respond_result` boolean, required
      - `options` object
        - `secret` string
        - `secretAsQueryParam` boolean
    - `version` integer
  - `log_forwarders` LogForwarderConstructor[], required
    - `name` string, required
    - `disabled` boolean, required
    - `log_types` LogType[], required
    - `log_statuses` LogStatus[], required
    - `policy` LogForwardingPolicy, required
      - `type` 'single' | 'batch'
    - `action` LogForwardingAction, required
      - `type` 'collection' | 'function'
      - `name` string
      - `data_source` string
      - `database` string
      - `collection` string
  - `schemas` FullSchema[], required
    - `metadata` SchemaMetadata — Metadata that describes which linked collection the schema applies to.
      - `data_source` string — The data source name.
      - `database` string — The database name.
      - `collection` string — The collection name.
    - `schema` SchemaDefinition — A valid [schema](https://www.mongodb.com/docs/atlas/app-services/schemas) for the collection.
      - `bsonType` 'object' | 'array' | 'string' | 'number' | 'int' | 'long' | 'double' | 'decimal' | 'date' | 'timestamp' | 'bool' | 'null' | 'regex' | 'objectId' | 'binary' | 'uuid' | 'function' | 'javascript' | 'symbol' | 'minKey' | 'maxKey' — The [BSON type](https://www.mongodb.com/docs/atlas/app-services/schemas/types/#std-label-schema-types) of the field.
      - `title` string — A human-readable title for the schema.
      - `required` string[] — For `object` schemas, an array of field names that are required in instances of the object.
      - `properties` object — 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.
    - `relationships` SchemaRelationships — 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.
  - `services` ThirdPartyServiceConstructor[], required — [Deprecated] A list of legacy third-party non-HTTP services. This is for backwards compatibility only.
    - `name` string — The service name.
    - `type` 'aws' | 'twilio' | 'github' | 'gcm' | 'http' — The type of service.
    - `incoming_webhooks` IncomingWebhook[]
      - `name` string, required
      - `function_source` string, required
      - `respond_result` boolean, required
      - `options` object
        - `secret` string
        - `secretAsQueryParam` boolean
    - `version` integer
  - `sync` FlexibleSync, required
    - `state` string, required — The state of the sync service (`"enabled"`, `"disabled"`, or empty if Sync is not configured).
    - `database_name` string — 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` string[] — An array of [queryable field](https://www.mongodb.com/docs/atlas/app-services/sync/configure/sync-settings/#queryable-fields) names on **any collection**.
    - `indexed_queryable_fields_names` string[] — 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.
    - `collection_queryable_fields_names` object — An array of [queryable field](https://www.mongodb.com/docs/atlas/app-services/sync/configure/sync-settings/#queryable-fields) names on the specified collection.
    - `permissions` object — **Deprecated**
    - `last_disabled` string — The last time Sync was disabled, represented by the number of seconds since the UNIX epoch.
    - `client_max_offline_days` integer — 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` boolean — 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` string[] — 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.
  - `triggers` TriggerConstructor[], required
    - union
      - DatabaseTrigger
        - `name` string, required — The trigger's name.
        - `type` 'DATABASE', required — The trigger type. For database triggers, this value is always `"DATABASE"`.
        - `disabled` boolean — If `true`, the trigger is disabled and does not listen for events or execute.
        - `config` object, required — An object that defines configuration values for the trigger.
          - `service_id` string, required — 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` string — 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` string — 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` string[], required — 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` object — 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` object — 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` boolean — 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` boolean — 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` boolean — If `true`, enabling the Trigger after it was disabled will not invoke events that occurred while the Trigger was disabled.
          - `tolerate_resume_errors` boolean — 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` boolean — 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` boolean — 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.
        - `function_id` string — 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` string — 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` object, required — 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).
          - `FUNCTION` object
            - `config` object
              - …
          - `AWS_EVENTBRIDGE` object
            - `config` object
              - …
        - `error_handler` object — An object that defines custom error handling for an AWS EventBridge trigger. Valid only for `"DATABASE"` type triggers with `"AWS_EVENTBRIDGE"` event processors.
          - `config` object
            - `enabled` boolean — If 'true', custom error handling is enabled for the AWS EventBridge trigger.
            - `function_id` string — The ID of the function invoked when the AWS EventBridge trigger fails and cannot be successfully retried.
      - AuthenticationTrigger
        - `name` string, required — The trigger's name.
        - `type` 'AUTHENTICATION', required — The trigger type. For authentication triggers, this value is always `"AUTHENTICATION"`.
        - `disabled` boolean — If `true`, the trigger is disabled and does not listen for events or execute.
        - `config` object, required — An object that defines configuration values for the trigger.
          - `operation_type` 'LOGIN' | 'CREATE' | 'DELETE', required — The type of authentication event that the trigger listens for.
          - `providers` 'anon-user' | 'api-key' | 'custom-token' | 'custom-function' | 'local-userpass' | 'oauth2-apple' | 'oauth2-facebook' | 'oauth2-google', required — The type(s) of authentication provider that the trigger listens to.
        - `function_id` string — 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` string — 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` object, required — 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).
          - `FUNCTION` object
            - `config` object
              - …
          - `AWS_EVENTBRIDGE` object
            - `config` object
              - …
      - ScheduledTrigger
        - `name` string, required — The trigger's name.
        - `type` 'SCHEDULED', required — The trigger type. For scheduled triggers, this value is always `"SCHEDULED"`.
        - `disabled` boolean — If `true`, the trigger is disabled and does not listen for events or execute.
        - `config` object, required — An object that defines configuration values for the trigger.
          - `schedule` string, required — A [cron expression](https://www.mongodb.com/docs/atlas/app-services/triggers/scheduled-triggers/#cron-expressions) that specifies when the trigger executes.
          - `skip_catchup_events` boolean — If `true`, enabling the trigger after it was disabled will not invoke events that occurred while the trigger was disabled.
        - `function_id` string — 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` string — 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` object, required — 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).
          - `FUNCTION` object
            - `config` object
              - …
          - `AWS_EVENTBRIDGE` object
            - `config` object
              - …
  - `values` ValueConstructor[], required
    - `name` string, required
    - `private` boolean, required
    - `from_secret` boolean, required — If `true`, the value is a reference by name to a [Secret](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets/).
    - `value` unknown, required

## Response `204`

Push successful

## Other responses

- `400` — Invalid request
- `500` — Error pulling configuration

---

[API](https://skmtc.net/mongodb/apis/mongodb-atlas-app-services-admin-api.md) · [All operations](https://skmtc.net/mongodb/apis/mongodb-atlas-app-services-admin-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mongodb/mongodb-atlas-app-services-admin-api/revisions/1365ab72bc03/schema)
