新しく完全なアプリ構成をアップロードします。この操作により、既存のアプリ構成全体が上書きされます。
注: アプリ構成にシークレットへの参照が含まれている場合は、シークレットを作成した後に構成をプッシュする必要があります。
path パラメータ
-
Atlas Project/Group ID。
-
アプリケーションの ObjectID。App Services API プロジェクトとアプリケーション ID のセクションでは、この値を見つける方法が示されています。
body
-
アプリ名。
provider_region
string 必須 次の 1 つ: 値は、
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です。-
アプリケーションの配置モデル。
値は
GLOBALまたはLOCALです。 -
アプリの環境タグ。指定されていない場合、アプリに環境タグはありません。
値は、
development、testing、qa、またはproductionです。 -
[非推奨] レガシー HTTP サービス一覧。下位互換性の確保のみを目的としたリストです。
-
[非推奨] レガシー サードパーティー製非 HTTP サービス一覧。下位互換性の確保のみを目的としたリストです。
curl \
--request PATCH 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/push' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"name": "string",
"provider_region": "aws-us-east-1",
"deployment_model": "GLOBAL",
"environment": "production",
"auth_providers": [
{
"name": "anon-user",
"type": "anon-user",
"disabled": true
}
],
"custom_user_data": {
"database_name": "myapp",
"collection_name": "users",
"user_id_field": "user_account_id",
"enabled": true,
"mongo_service_name": "mongodb-atlas",
"on_user_creation_function_name": "myFunction"
},
"data_api_config": {
"disabled": true,
"versions": [
"v1"
],
"return_type": "JSON",
"create_user_on_auth": true,
"run_as_user_id": "string",
"run_as_user_id_script_source": "string",
"validation_method": "NO_VALIDATION",
"secret_name": "string",
"can_evaluate": {}
},
"data_sources": [
{
"name": "string",
"type": "string",
"config": {
"clusterName": "Cluster0",
"readPreference": "primary",
"readPreferenceTagSets": [
"server1"
],
"wireProtocolEnabled": true
},
"default_rule": {
"roles": [
{
"document_filters": {},
"name": "string",
"fields": {},
"additional_fields": {}
}
],
"filters": [
{
"name": "string",
"query": {},
"projection": {
"additionalProperty1": 0,
"additionalProperty2": 0
}
}
]
},
"rules": [
{
"database": "string",
"collection": "string",
"roles": [
{
"document_filters": {},
"name": "string",
"fields": {},
"additional_fields": {}
}
],
"filters": [
{
"name": "string",
"query": {},
"projection": {
"additionalProperty1": 0,
"additionalProperty2": 0
}
}
]
}
]
}
],
"endpoints": [
{
"route": "string",
"http_method": "GET",
"function_id": "string",
"validation_method": "NO_VALIDATION",
"secret_id": "string",
"return_type": "JSON",
"respond_result": true,
"fetch_custom_user_data": true,
"create_user_on_auth": true,
"disabled": true,
"function_name": "string"
}
],
"environments": {
"values": {
"none": {
"values": {}
},
"development": {
"values": {}
},
"testing": {
"values": {}
},
"qa": {
"values": {}
},
"production": {
"values": {}
}
}
},
"functions": [
{
"can_evaluate": {},
"name": "string",
"private": true,
"source": "string",
"run_as_system": true,
"run_as_user_id": "string",
"run_as_user_id_script_source": "string"
}
],
"graphql": {
"config": {
"use_natural_pluralization": true,
"disable_schema_introspection": true
},
"validation_settings": {
"read_validation_action": "ERROR",
"read_validation_level": "STRICT",
"write_validation_action": "ERROR",
"write_validation_level": "STRICT"
},
"custom_resolvers": [
{
"on_type": "string",
"field_name": "string",
"input_type": "string",
"input_type_format": "scalar",
"payload_type": "string",
"payload_type_format": "scalar",
"function_name": "string"
}
]
},
"hosting": {
"enabled": true,
"custom_domain": "example.com",
"default_error_path": "/404.html",
"default_error_code": "404"
},
"https_endpoints": [
{
"name": "string",
"type": "aws",
"incoming_webhooks": [
{
"name": "string",
"function_source": "string",
"respond_result": true,
"options": {
"secret": "string",
"secretAsQueryParam": true
}
}
],
"version": 42
}
],
"log_forwarders": [
{
"name": "string",
"disabled": true,
"log_types": [
"auth"
],
"log_statuses": [
"error"
],
"policy": {
"type": "single"
},
"action": {
"type": "collection",
"name": "string",
"data_source": "string",
"database": "string",
"collection": "string"
}
}
],
"schemas": [
{
"metadata": {
"data_source": "string",
"database": "string",
"collection": "string"
},
"schema": {
"bsonType": "object",
"title": "string",
"required": [
"string"
],
"properties": {
"*": {}
}
},
"relationships": {
"additionalProperty1": {
"ref": "string",
"foreign_key": "string",
"is_list": true
},
"additionalProperty2": {
"ref": "string",
"foreign_key": "string",
"is_list": true
}
}
}
],
"services": [
{
"name": "string",
"type": "aws",
"incoming_webhooks": [
{
"name": "string",
"function_source": "string",
"respond_result": true,
"options": {
"secret": "string",
"secretAsQueryParam": true
}
}
],
"version": 42
}
],
"sync": {
"state": "string",
"database_name": "string",
"queryable_fields_names": [
"string"
],
"indexed_queryable_fields_names": [
"string"
],
"collection_queryable_fields_names": {
"additionalProperty1": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"additionalProperty2": {
"additionalProperty1": "string",
"additionalProperty2": "string"
}
},
"permissions": {},
"last_disabled": "string",
"client_max_offline_days": 42,
"is_recovery_mode_disabled": true,
"asymmetric_tables": [
"string"
]
},
"triggers": [
{
"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"
}
}
}
}
],
"values": [
{
"name": "string",
"private": true,
"from_secret": true
}
]
}'
{
"name": "string",
"provider_region": "aws-us-east-1",
"deployment_model": "GLOBAL",
"environment": "production",
"auth_providers": [
{
"name": "anon-user",
"type": "anon-user",
"disabled": true
}
],
"custom_user_data": {
"database_name": "myapp",
"collection_name": "users",
"user_id_field": "user_account_id",
"enabled": true,
"mongo_service_name": "mongodb-atlas",
"on_user_creation_function_name": "myFunction"
},
"data_api_config": {
"disabled": true,
"versions": [
"v1"
],
"return_type": "JSON",
"create_user_on_auth": true,
"run_as_user_id": "string",
"run_as_user_id_script_source": "string",
"validation_method": "NO_VALIDATION",
"secret_name": "string",
"can_evaluate": {}
},
"data_sources": [
{
"name": "string",
"type": "string",
"config": {
"clusterName": "Cluster0",
"readPreference": "primary",
"readPreferenceTagSets": [
"server1"
],
"wireProtocolEnabled": true
},
"default_rule": {
"roles": [
{
"document_filters": {},
"name": "string",
"fields": {},
"additional_fields": {}
}
],
"filters": [
{
"name": "string",
"query": {},
"projection": {
"additionalProperty1": 0,
"additionalProperty2": 0
}
}
]
},
"rules": [
{
"database": "string",
"collection": "string",
"roles": [
{
"document_filters": {},
"name": "string",
"fields": {},
"additional_fields": {}
}
],
"filters": [
{
"name": "string",
"query": {},
"projection": {
"additionalProperty1": 0,
"additionalProperty2": 0
}
}
]
}
]
}
],
"endpoints": [
{
"route": "string",
"http_method": "GET",
"function_id": "string",
"validation_method": "NO_VALIDATION",
"secret_id": "string",
"return_type": "JSON",
"respond_result": true,
"fetch_custom_user_data": true,
"create_user_on_auth": true,
"disabled": true,
"function_name": "string"
}
],
"environments": {
"values": {
"none": {
"values": {}
},
"development": {
"values": {}
},
"testing": {
"values": {}
},
"qa": {
"values": {}
},
"production": {
"values": {}
}
}
},
"functions": [
{
"can_evaluate": {},
"name": "string",
"private": true,
"source": "string",
"run_as_system": true,
"run_as_user_id": "string",
"run_as_user_id_script_source": "string"
}
],
"graphql": {
"config": {
"use_natural_pluralization": true,
"disable_schema_introspection": true
},
"validation_settings": {
"read_validation_action": "ERROR",
"read_validation_level": "STRICT",
"write_validation_action": "ERROR",
"write_validation_level": "STRICT"
},
"custom_resolvers": [
{
"on_type": "string",
"field_name": "string",
"input_type": "string",
"input_type_format": "scalar",
"payload_type": "string",
"payload_type_format": "scalar",
"function_name": "string"
}
]
},
"hosting": {
"enabled": true,
"custom_domain": "example.com",
"default_error_path": "/404.html",
"default_error_code": "404"
},
"https_endpoints": [
{
"name": "string",
"type": "aws",
"incoming_webhooks": [
{
"name": "string",
"function_source": "string",
"respond_result": true,
"options": {
"secret": "string",
"secretAsQueryParam": true
}
}
],
"version": 42
}
],
"log_forwarders": [
{
"name": "string",
"disabled": true,
"log_types": [
"auth"
],
"log_statuses": [
"error"
],
"policy": {
"type": "single"
},
"action": {
"type": "collection",
"name": "string",
"data_source": "string",
"database": "string",
"collection": "string"
}
}
],
"schemas": [
{
"metadata": {
"data_source": "string",
"database": "string",
"collection": "string"
},
"schema": {
"bsonType": "object",
"title": "string",
"required": [
"string"
],
"properties": {
"*": {}
}
},
"relationships": {
"additionalProperty1": {
"ref": "string",
"foreign_key": "string",
"is_list": true
},
"additionalProperty2": {
"ref": "string",
"foreign_key": "string",
"is_list": true
}
}
}
],
"services": [
{
"name": "string",
"type": "aws",
"incoming_webhooks": [
{
"name": "string",
"function_source": "string",
"respond_result": true,
"options": {
"secret": "string",
"secretAsQueryParam": true
}
}
],
"version": 42
}
],
"sync": {
"state": "string",
"database_name": "string",
"queryable_fields_names": [
"string"
],
"indexed_queryable_fields_names": [
"string"
],
"collection_queryable_fields_names": {
"additionalProperty1": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"additionalProperty2": {
"additionalProperty1": "string",
"additionalProperty2": "string"
}
},
"permissions": {},
"last_disabled": "string",
"client_max_offline_days": 42,
"is_recovery_mode_disabled": true,
"asymmetric_tables": [
"string"
]
},
"triggers": [
{
"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"
}
}
}
}
],
"values": [
{
"name": "string",
"private": true,
"from_secret": true
}
]
}