Extraia arquivos de configuração do aplicativo
Carregue uma nova configuração completa do aplicativo. Esta operação substitui toda a configuração existente do aplicativo.
Aviso: se a configuração do aplicativo incluir referências a um secret, você deverá criar o secret antes de enviar a configuração.
parâmetros de caminho
-
Uma ID de projeto/grupo do Atlas.
-
O ObjectID do seu aplicativo. A seção de ID de projeto e aplicativo do App Services API mostra como localizar esse valor.
corpo, corpo
-
O nome do aplicativo.
provider_region
string Obrigatório Um dos seguintes: Os valores são
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
ouaws-sa-east-1
.Os valores são
azure-eastus2
,azure-westus
,azure-westeurope
,azure-eastasia
ouazure-southeastasia
.Os valores são
gcp-us-central1
,gcp-us-east4
,gcp-us-west1
,gcp-europe-west1
ougcp-asia-south1
.-
Um modelo de implantação de aplicativos.
Os valores são
GLOBAL
ouLOCAL
. -
O ambiente do aplicativo.
Os valores são
development
,testing
,qa
ouproduction
. -
[Obsoleto] Uma lista de serviços HTTP legados. Apenas para compatibilidade com versões anteriores.
-
[Obsoleto] Uma lista de serviços de terceiros não HTTP legados. Apenas para compatibilidade com versões anteriores.
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","":"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","config":{"match":{},"project":{},"database":"HR","collection":"employees","service_id":"5adeb649b8b998486770ae7c","full_document":true,"operation_types":["INSERT"]},"function_id":"5eea9ca4ca0e356e2c2a148a","event_processors":{"FUNCTION":{"config":{"function_id":"6841b8d3e71dc81bed89dbba","function_name":"Atlas_Triggers_DatabaseInsert_1749137618"}}}}],"values":[{"name":"string","private":true,"from_secret":true}]}'
{
"name": "string",
"": "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",
"config": {
"match": {},
"project": {},
"database": "HR",
"collection": "employees",
"service_id": "5adeb649b8b998486770ae7c",
"full_document": true,
"operation_types": [
"INSERT"
]
},
"function_id": "5eea9ca4ca0e356e2c2a148a",
"event_processors": {
"FUNCTION": {
"config": {
"function_id": "6841b8d3e71dc81bed89dbba",
"function_name": "Atlas_Triggers_DatabaseInsert_1749137618"
}
}
}
}
],
"values": [
{
"name": "string",
"private": true,
"from_secret": true
}
]
}