Download OpenAPI specification:Download
The App Services Admin API lets you programmatically perform administrative tasks over HTTPS. This includes defining & configuring things like:
The Admin API is for application development, configuration, and deployment. To actually use the features you configure with the Admin API, client applications connect with an Atlas Device SDK or over an HTTPS API specific to your App.
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:
You can find your Project ID from the MongoDB Atlas dashboard or with the MongoDB Atlas CLI.
To find an Application ID, make a request to the List
Apps 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.
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
.
[
{
"_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": ""
}
]
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 for MongoDB Atlas to get a token.
Once you have an API key pair, call the authentication endpoint:
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:
{
"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
Authorization
header.
Authorization: Bearer <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:
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:
{
"access_token": "<access_token>"
}
Authenticate as an App Services administrator using an Atlas programmatic API key pair. To learn more, see Get An Admin API Session Access Token.
username required | string |
apiKey required | string |
{- "username": "string",
- "apiKey": "string"
}
{- "access_token": "string",
- "refresh_token": "string",
- "user_id": "string",
- "device_id": "string"
}
{- "user_id": "string",
- "domain_id": "string",
- "identities": [
- {
- "id": "string",
- "provider_type": "anon-user",
- "provider_id": "string"
}
], - "data": {
- "email": "string",
- "name": "string"
}, - "type": "normal",
- "roles": [
- {
- "role_name": "string",
- "group_id": "string"
}
]
}
View and manage API keys through the API Key provider.
List API keys associated with a Atlas App Services App.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
[- {
- "_id": "string",
- "name": "string",
- "disabled": true
}
]
Create a new API key.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
The API key to create.
name required | string |
{- "name": "string"
}
{- "_id": "string",
- "key": "string",
- "name": "string",
- "disabled": "string"
}
Retrieve information about an API key.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
apiKeyId required | string The unique |
{- "_id": "string",
- "name": "string",
- "disabled": "string"
}
Delete an API key.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
apiKeyId required | string The unique |
Enable an API key.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
apiKeyId required | string The unique |
Disable an API key.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
apiKeyId required | string The unique |
List all App Services Apps within an Atlas project/group.
groupId required | string An Atlas Project/Group ID. |
product | string Enum: "standard" "atlas" "data-api" "device-sync" 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 You can specify multiple product types as a comma-separated list:
|
[- {
- "name": "MyApp",
- "provider_region": "aws-us-east-1",
- "location": "US-VA",
- "deployment_model": "GLOBAL",
- "environment": "production",
- "_id": "633209ffd3bd3478005d1bac",
- "client_app_id": "myapp-abcde",
- "domain_id": "63320a2b5f9de9a6e0a213e8",
- "group_id": "5b2ec991973129243223a114",
- "last_used": 1664224746,
- "last_modified": 1656440824,
- "product": "standard"
}
]
groupId required | string An Atlas Project/Group ID. |
defaults | boolean Whether or not to create a default application. |
product | string Enum: "standard" "atlas" "data-api" "device-sync" The App's product type. Apps use the The |
The application to create.
name | string The name of the application. Must begin with a letter and may only contain ASCII letters, numbers, underscores, and hyphens. |
AwsDeploymentRegion (string) or AzureDeploymentRegion (string) or GcpDeploymentRegion (string) (CloudProviderRegionId) | |
location | string (DeploymentLocation) Enum: "US-VA" "US-OR" "DE-FF" "IE" "AU" "IN-MB" "SG" "BR-SP" The application's physical deployment location. This should
agree with the more specific |
deployment_model | |
environment | string (NullableAppEnvironment) Enum: "development" "testing" "qa" "production" "" The application's environment. An empty string indicates that the app does not have a specified environment. |
template_id | string The id of an App Services template app to use as a base for the new app. |
AtlasCluster (object) or AtlasFederatedInstance (object) (DataSource) |
{- "name": "MyApp",
- "provider_region": "aws-us-east-1",
- "location": "US-VA",
- "deployment_model": "GLOBAL",
- "environment": "production",
- "template_id": "string",
- "data_source": {
- "name": "string",
- "type": "string"
}
}
{- "name": "MyApp",
- "provider_region": "aws-us-east-1",
- "location": "US-VA",
- "deployment_model": "GLOBAL",
- "environment": "production",
- "_id": "633209ffd3bd3478005d1bac",
- "client_app_id": "myapp-abcde",
- "domain_id": "63320a2b5f9de9a6e0a213e8",
- "group_id": "5b2ec991973129243223a114",
- "last_used": 1664224746,
- "last_modified": 1656440824,
- "product": "standard"
}
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
{- "name": "MyApp",
- "provider_region": "aws-us-east-1",
- "location": "US-VA",
- "deployment_model": "GLOBAL",
- "environment": "production",
- "_id": "633209ffd3bd3478005d1bac",
- "client_app_id": "myapp-abcde",
- "domain_id": "63320a2b5f9de9a6e0a213e8",
- "group_id": "5b2ec991973129243223a114",
- "last_used": 1664224746,
- "last_modified": 1656440824,
- "product": "standard"
}
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
The Export Endpoint is deprecated. Instead, call the Pull App
Configuration Files
endpoint with an Accept: application/zip
header.
Export an application as a zip file.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
deployment | string Example: deployment=6373362f01a569d5cd571c68 The |
source_control | boolean Default: false If Cannot be used with the |
template | boolean Default: false If Cannot be used with the |
version | string Example: version=20210101 The configuration file schema version to export. This value
corresponds to |
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.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
{- "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": {
- "read": { },
- "write": { }
}, - "name": "string",
- "apply_when": { },
- "read": { },
- "write": { },
- "insert": { },
- "delete": { },
- "search": { },
- "fields": {
- "property1": {
- "read": { },
- "write": { },
- "fields": { }
}, - "property2": {
- "read": { },
- "write": { },
- "fields": { }
}
}, - "additional_fields": {
- "read": { },
- "write": { }
}
}
], - "filters": [
- {
- "name": "string",
- "apply_when": { },
- "query": { },
- "projection": {
- "property1": 0,
- "property2": 0
}
}
]
}, - "rules": [
- {
- "database": "string",
- "collection": "string",
- "roles": [
- {
- "document_filters": {
- "read": { },
- "write": { }
}, - "name": "string",
- "apply_when": { },
- "read": { },
- "write": { },
- "insert": { },
- "delete": { },
- "search": { },
- "fields": {
- "property1": {
- "read": { },
- "write": { },
- "fields": { }
}, - "property2": {
- "read": { },
- "write": { },
- "fields": { }
}
}, - "additional_fields": {
- "read": { },
- "write": { }
}
}
], - "filters": [
- {
- "name": "string",
- "apply_when": { },
- "query": { },
- "projection": {
- "property1": 0,
- "property2": 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": {
- "property1": null,
- "property2": null
}
}, - "development": {
- "values": {
- "property1": null,
- "property2": null
}
}, - "testing": {
- "values": {
- "property1": null,
- "property2": null
}
}, - "qa": {
- "values": {
- "property1": null,
- "property2": null
}
}, - "production": {
- "values": {
- "property1": null,
- "property2": null
}
}
}
}, - "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": 0
}
], - "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": {
- "property1": { },
- "property2": { }
}
}, - "relationships": {
- "property1": {
- "ref": "string",
- "foreign_key": "string",
- "is_list": true
}, - "property2": {
- "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": 0
}
], - "sync": {
- "state": "string",
- "database_name": "string",
- "queryable_fields_names": [
- "string"
], - "indexed_queryable_fields_names": [
- "string"
], - "collection_queryable_fields_names": {
- "property1": {
- "property1": "string",
- "property2": "string"
}, - "property2": {
- "property1": "string",
- "property2": "string"
}
}, - "permissions": { },
- "last_disabled": "string",
- "client_max_offline_days": 0,
- "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
}
}
], - "values": [
- {
- "name": "string",
- "private": true,
- "from_secret": true,
- "value": null
}
]
}
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 before you push the configuration.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
name required | string The App's name. |
required | AwsDeploymentRegion (string) or AzureDeploymentRegion (string) or GcpDeploymentRegion (string) (CloudProviderRegionId) |
deployment_model required | |
environment | string (AppEnvironment) Enum: "development" "testing" "qa" "production" The App's environment tag. If not specified, the App has no environment tag. |
required | Array of AnonymousAuthProvider (object) or EmailPasswordAuthProvider (object) or ApiKeyAuthProvider (object) or CustomJwtAuthProvider (object) or CustomFunctionAuthProvider (object) or AppleAuthProvider (object) or GoogleAuthProvider (object) or FacebookAuthProvider (object) (AuthProviderConstructor) |
CustomUserDataConstructor (object) or null | |
DataApiConfig (object) or null | |
required | Array of AtlasClusterConstructor (object) or AtlasFederatedInstanceConstructor (object) (DataSourceConstructor) |
required | Array of objects (EndpointConstructor) |
required | object (AllEnvironmentValues) |
required | Array of objects (FunctionConstructor) |
required | object (GraphQLConstructor) |
required | object (HostingConstructor) |
required | Array of objects (ThirdPartyServiceConstructor) [Deprecated] A list of legacy HTTP services. This is for backwards compatibility only. |
required | Array of objects (LogForwarderConstructor) |
required | Array of objects (FullSchema) |
required | Array of objects (ThirdPartyServiceConstructor) [Deprecated] A list of legacy third-party non-HTTP services. This is for backwards compatibility only. |
required | object (FlexibleSync) |
required | Array of DatabaseTrigger (object) or AuthenticationTrigger (object) or ScheduledTrigger (object) (TriggerConstructor) |
required | Array of objects (ValueConstructor) |
{- "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": {
- "read": { },
- "write": { }
}, - "name": "string",
- "apply_when": { },
- "read": { },
- "write": { },
- "insert": { },
- "delete": { },
- "search": { },
- "fields": {
- "property1": {
- "read": { },
- "write": { },
- "fields": { }
}, - "property2": {
- "read": { },
- "write": { },
- "fields": { }
}
}, - "additional_fields": {
- "read": { },
- "write": { }
}
}
], - "filters": [
- {
- "name": "string",
- "apply_when": { },
- "query": { },
- "projection": {
- "property1": 0,
- "property2": 0
}
}
]
}, - "rules": [
- {
- "database": "string",
- "collection": "string",
- "roles": [
- {
- "document_filters": {
- "read": { },
- "write": { }
}, - "name": "string",
- "apply_when": { },
- "read": { },
- "write": { },
- "insert": { },
- "delete": { },
- "search": { },
- "fields": {
- "property1": {
- "read": { },
- "write": { },
- "fields": { }
}, - "property2": {
- "read": { },
- "write": { },
- "fields": { }
}
}, - "additional_fields": {
- "read": { },
- "write": { }
}
}
], - "filters": [
- {
- "name": "string",
- "apply_when": { },
- "query": { },
- "projection": {
- "property1": 0,
- "property2": 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": {
- "property1": null,
- "property2": null
}
}, - "development": {
- "values": {
- "property1": null,
- "property2": null
}
}, - "testing": {
- "values": {
- "property1": null,
- "property2": null
}
}, - "qa": {
- "values": {
- "property1": null,
- "property2": null
}
}, - "production": {
- "values": {
- "property1": null,
- "property2": null
}
}
}
}, - "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": 0
}
], - "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": {
- "property1": { },
- "property2": { }
}
}, - "relationships": {
- "property1": {
- "ref": "string",
- "foreign_key": "string",
- "is_list": true
}, - "property2": {
- "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": 0
}
], - "sync": {
- "state": "string",
- "database_name": "string",
- "queryable_fields_names": [
- "string"
], - "indexed_queryable_fields_names": [
- "string"
], - "collection_queryable_fields_names": {
- "property1": {
- "property1": "string",
- "property2": "string"
}, - "property2": {
- "property1": "string",
- "property2": "string"
}
}, - "permissions": { },
- "last_disabled": "string",
- "client_max_offline_days": 0,
- "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
}
}
], - "values": [
- {
- "name": "string",
- "private": true,
- "from_secret": true,
- "value": null
}
]
}
View and manage authentication providers.
List authentication providers within a Atlas App Services App.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
[- {
- "name": "string",
- "type": "anon-user",
- "disabled": true
}
]
Create an authentication provider.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
name required | string The name of the authentication provider. This value must be the same as the value of Value: "anon-user" |
type required | string Enum: "anon-user" "local-userpass" "api-key" "oauth2-apple" "oauth2-google" "oauth2-facebook" "custom-token" "custom-function" The name of the authentication provider. For Anonymous authentication, this value is always Value: "anon-user" |
disabled | boolean If |
{- "name": "anon-user",
- "type": "anon-user",
- "disabled": true
}
{- "name": "anon-user",
- "type": "anon-user",
- "disabled": true,
- "_id": "string"
}
Retrieve information about one of an application's authentication providers.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
providerId required | string The unique |
{- "name": "anon-user",
- "type": "anon-user",
- "disabled": true,
- "_id": "string"
}
Delete an authentication provider.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
providerId required | string The unique |
Update an authentication provider.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
providerId required | string The unique |
name required | string The name of the authentication provider. This value must be the same as the value of Value: "anon-user" |
type required | string Enum: "anon-user" "local-userpass" "api-key" "oauth2-apple" "oauth2-google" "oauth2-facebook" "custom-token" "custom-function" The name of the authentication provider. For Anonymous authentication, this value is always Value: "anon-user" |
disabled | boolean If |
{- "name": "anon-user",
- "type": "anon-user",
- "disabled": true
}
Disable an authentication provider.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
providerId required | string The unique |
Enable an authentication provider.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
providerId required | string The unique |
List the request, compute, sync, and data transfer usage in a given period for billing purposes.
groupId required | string An Atlas Project/Group ID. |
start | string 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. |
end | string 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. |
granularity | string Enum: "P31D" "PT1H" Specifies the granularity of the query period, either P31D (31 day) or PT1H (1 hour). Default is P31D. |
{- "start": "string",
- "end": "string",
- "granularity": "string",
- "group_id": "string",
- "measurements": [
- {
- "name": "request_count",
- "units": "<empty string>",
- "data_points": [
- {
- "timestamp": "string",
- "value": 0
}
]
}
]
}
List the request, compute, sync, data transfer, and memory usage of a specific app in a given period for billing purposes.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
start | string 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. |
end | string 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. |
granularity | string Enum: "P31D" "PT1H" Specifies the granularity of the query period, either P31D (31 day) or PT1H (1 hour). Default is P31D. |
{- "start": "string",
- "end": "string",
- "granularity": "string",
- "group_id": "string",
- "appId": "string",
- "appName": "string",
- "measurements": [
- {
- "name": "request_count",
- "units": "<empty string>",
- "data_points": [
- {
- "timestamp": "string",
- "value": 0
}
]
}
]
}
Configure custom user data.
Get the Custom User Data configuration for an Atlas App Services App.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
{- "database_name": "myapp",
- "collection_name": "users",
- "user_id_field": "user_account_id",
- "enabled": true,
- "mongo_service_id": "63c060ed32043ef4c93c2a9c",
- "on_user_creation_function_id": "63c055d8019a6ab879f661d6"
}
Modify the Custom User Data configuration for an Atlas App Services App.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
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 |
mongo_service_id | string The _id value of a linked MongoDB data source. You can list services with the Get all services endpoint. Data sources are services whose |
on_user_creation_function_id | string The |
{- "database_name": "myapp",
- "collection_name": "users",
- "user_id_field": "user_account_id",
- "enabled": true,
- "mongo_service_id": "63c060ed32043ef4c93c2a9c",
- "on_user_creation_function_id": "63c055d8019a6ab879f661d6"
}
You can deploy a group of application changes together by creating and deploying a draft. To create and deploy a set of draft changes:
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:
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'
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:
curl --request DELETE \
--header 'Authorization: Bearer <access_token>' \
'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/drafts/{draftId}'
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.
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:
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'
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.
Return a list of all supported cloud regions in which you can deploy an Atlas App.
[- {
- "id": "aws-us-east-1",
- "name": "Virginia (us-east-1)",
- "cloud_provider": "aws",
- "country": "usa",
- "deployment_models": [
- "GLOBAL",
- "LOCAL"
]
}
]
See information about how your App deploys changes.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
{- "ui_drafts_disabled": true,
- "automatic_deployment": {
- "enabled": true,
- "provider": "github",
- "installation_ids": [
- "string"
]
}, - "last_modified": 0
}
Modify an App's deployment configuration to customize how the App deploys changes.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
ui_drafts_disabled required | boolean If |
required | object Configuration for automatic deployment methods |
last_modified | number The time this configuration was last modified represented by the number of seconds since the UNIX epoch. |
{- "ui_drafts_disabled": true,
- "automatic_deployment": {
- "enabled": true,
- "provider": "github",
- "installation_ids": [
- "string"
]
}, - "last_modified": 0
}
Return the 25 most recent application deployments.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
[- {
- "_id": "string",
- "name": "string",
- "app_id": "string",
- "draft_id": "string",
- "user_id": "string",
- "deployed_at": 0,
- "origin": "string",
- "commit": "string",
- "status": "string",
- "status_error_message": "string",
- "diff_url": "string",
- "remote_location": "US-VA"
}
]
Get information about a recent deployment of the application.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
deploymentId required | string The |
{- "_id": "string",
- "name": "string",
- "app_id": "string",
- "draft_id": "string",
- "user_id": "string",
- "deployed_at": 0,
- "origin": "string",
- "commit": "string",
- "status": "string",
- "status_error_message": "string",
- "diff_url": "string",
- "remote_location": "US-VA"
}
Redeploy a previously-deployed version of an App.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
deploymentId required | string The |
{- "error": "deployment not found",
- "error_code": "DeploymentNotFound"
}
Return the current application deployment draft, if applicable.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
{- "_id": "string",
- "user_id": "string",
- "app": {
- "name": "MyApp",
- "provider_region": "aws-us-east-1",
- "location": "US-VA",
- "deployment_model": "GLOBAL",
- "environment": "production",
- "_id": "633209ffd3bd3478005d1bac",
- "client_app_id": "myapp-abcde",
- "domain_id": "63320a2b5f9de9a6e0a213e8",
- "group_id": "5b2ec991973129243223a114",
- "last_used": 1664224746,
- "last_modified": 1656440824,
- "product": "standard"
}
}
Create a new application deployment draft, if none exists.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
{- "_id": "string",
- "user_id": "string",
- "app": {
- "name": "MyApp",
- "provider_region": "aws-us-east-1",
- "location": "US-VA",
- "deployment_model": "GLOBAL",
- "environment": "production",
- "_id": "633209ffd3bd3478005d1bac",
- "client_app_id": "myapp-abcde",
- "domain_id": "63320a2b5f9de9a6e0a213e8",
- "group_id": "5b2ec991973129243223a114",
- "last_used": 1664224746,
- "last_modified": 1656440824,
- "product": "standard"
}
}
Discard the specified application deployment draft.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
draftId required | string The unique |
Deploy the specified application deployment draft.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
draftId required | string The unique |
name required | string The name of the deployment. To deploy a draft without a name, use an empty string. |
{- "name": "string"
}
{- "_id": "string",
- "name": "string",
- "app_id": "string",
- "draft_id": "string",
- "user_id": "string",
- "deployed_at": 0,
- "origin": "string",
- "commit": "string",
- "status": "string",
- "status_error_message": "string",
- "diff_url": "string",
- "remote_location": "US-VA"
}
Return a diff between the currently deployed application and the specified draft.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
draftId required | string The unique |
{- "diffs": [
- "string"
], - "hosting_files_diff": {
- "added": [
- "string"
], - "deleted": [
- "string"
], - "modified": [
- "string"
]
}
}
Get metadata and status for the current deployment migration, if one exists.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
{- "status": "started",
- "message": "string",
- "updated_at": "string",
- "from": {
- "deployment_model": "GLOBAL",
- "provider_region": "aws-us-east-1"
}, - "to": {
- "deployment_model": "GLOBAL",
- "provider_region": "aws-us-east-1"
}
}
Start a new deployment migration.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
The deployment model and cloud provider region that the App should migrate to.
deployment_model | |
AwsDeploymentRegion (string) or AzureDeploymentRegion (string) or GcpDeploymentRegion (string) (CloudProviderRegionId) |
{- "deployment_model": "LOCAL",
- "provider_region": "aws-us-east-1"
}
Manage your app's generated Data API endpoints.
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:
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:
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:
{
"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:
https://us-east-1.aws.data.mongodb-api.com/app/myapp-abcde/endpoint/data/v1
Get your app's Data API configuration.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
{- "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": { }
}
Create your app's Data API configuration.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
A valid configuration object for the endpoint.
disabled required | boolean |
versions required | Array of strings (DataApiVersion) Items Value: "v1" |
return_type required | string (EndpointDataFormat) Enum: "JSON" "EJSON" The default data format returned by Data API 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 required | string Enum: "NO_VALIDATION" "SECRET_AS_QUERY_PARAM" "VERIFY_PAYLOAD" |
secret_name | string If |
can_evaluate | object A JSON expression that evaluates to |
{- "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": { }
}
{- "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": { }
}
Update your app's Data API configuration.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
A valid configuration object for the endpoint.
disabled required | boolean |
versions required | Array of strings (DataApiVersion) Items Value: "v1" |
return_type required | string (EndpointDataFormat) Enum: "JSON" "EJSON" The default data format returned by Data API 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 required | string Enum: "NO_VALIDATION" "SECRET_AS_QUERY_PARAM" "VERIFY_PAYLOAD" |
secret_name | string If |
can_evaluate | object A JSON expression that evaluates to |
{- "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": { }
}
List all possible Data API versions.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
[- "v1"
]
Manage your application's external dependencies.
List external dependencies uploaded to the Atlas App Services App.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
{- "_id": "string",
- "location": "string",
- "user_id": "string",
- "last_modified": 0,
- "dependencies_list": [
- {
- "name": "string",
- "version": "string"
}
]
}
View and manage Edge Server instances.
List all Edge Server instances for the given App.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
{- "edge_servers": [
- {
- "id": "6622b8f5118368b943d228a9",
- "created": "2024-04-19T08:51:00Z",
- "name": "Edge-Store-42",
- "user_id": "6622b8f5118368b943d2288a",
- "status": "active",
- "hostname": "ec2-13-58-70-88.us-east-2.compute.amazonaws.com",
- "last_connection": "2024-04-19T09:51:00Z"
}
]
}
Create a new Edge Server instance. The response returns a registration token that you use to configure the Edge Server instance on the host.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
name required | string A human-readable name for the Edge Server instance. This value must be unique within the Edge Server or Device Sync Service. |
{- "name": "Edge-Store-42"
}
{- "id": "6622b8f5118368b943d228a9",
- "user_id": "6622b8f5118368b943d2288a",
- "registration_key": "Qi4GgpvVduwwt4k1w77ZzaQ1n4SdTWC8rLBD9vyTib1w9G3CX2ta8WrJvt3giEK7"
}
Get information about a specific Edge Server instance.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
edgeServerId required | string The |
{- "id": "6622b8f5118368b943d228a9",
- "created": "2024-04-19T08:51:00Z",
- "name": "Edge-Store-42",
- "user_id": "6622b8f5118368b943d2288a",
- "status": "active",
- "hostname": "ec2-13-58-70-88.us-east-2.compute.amazonaws.com",
- "last_connection": "2024-04-19T09:51:00Z",
- "query": {
- "Item": "(store_id == \"641cb3d99e425c794ef69315\")"
}, - "package_version": "v0.21.2",
- "latest_package_version": "v0.22.2",
- "metrics": [
- {
- "key": "edge_host_memory_percent",
- "name": "Memory Usage",
- "category": "host",
- "detail": "Percentage of memory used by the edge container",
- "value": 15,
- "unit": "%"
}, - {
- "key": "edge_host_cpu_percent",
- "name": "CPU Usage",
- "category": "host",
- "detail": "Percentage of CPU used by the edge container",
- "value": 2,
- "unit": "%"
}, - {
- "key": "overall_request_success",
- "name": "Successful Requests",
- "category": "overall",
- "detail": "Total number of successful requests",
- "value": 19,
- "unit": ""
}, - {
- "key": "overall_request_fail",
- "name": "Failed Requests",
- "category": "overall",
- "detail": "Total number of failed requests",
- "value": 1,
- "unit": ""
}, - {
- "key": "wire_protocol_request_success",
- "name": "Successful Wire Protocol Requests",
- "category": "wire_protocol",
- "detail": "Total number of successful wire protocol requests",
- "value": 14,
- "unit": ""
}, - {
- "key": "wire_protocol_request_fail",
- "name": "Failed Wire Protocol Requests",
- "category": "wire_protocol",
- "detail": "Total number of failed wire protocol requests",
- "value": 1,
- "unit": ""
}, - {
- "key": "wire_protocol_egress_bytes",
- "name": "Wire Protocol Data Transfer",
- "category": "wire_protocol",
- "detail": "Total number of bytes returned by wire protocol server",
- "value": 3965,
- "unit": "bytes"
}, - {
- "key": "edge_wire_protocol_connection_count",
- "name": "Wire Protocol Connection Count",
- "category": "wire_protocol",
- "detail": "Total number of clients currently connected",
- "value": 2,
- "unit": ""
}, - {
- "key": "sync_requests_success",
- "name": "Successful Sync Requests",
- "category": "sync",
- "detail": "Total number of successful sync requests",
- "value": 5,
- "unit": ""
}
]
}
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
edgeServerId required | string The |
Regenerate the Edge Server instance registration token.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
edgeServerId required | string The |
{- "id": "6622b8f5118368b943d228a9",
- "user_id": "6622b8f5118368b943d2288a",
- "registration_key": "Qi4GgpvVduwwt4k1w77ZzaQ1n4SdTWC8rLBD9vyTib1w9G3CX2ta8WrJvt3giEK7"
}
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
edgeServerId required | string The |
name required | string A human-readable name for the Edge Server instance. |
{- "name": "Edge-Store-41"
}
View and manage your app's custom HTTPS endpoints.
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 endpoint:
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:
{
"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:
https://us-east-1.aws.data.mongodb-api.com/app/myapp-abcde/endpoint
Get all endpoint configurations.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
[- {
- "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,
- "_id": "string",
- "function_name": "string"
}
]
Create a new endpoint.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
A valid configuration object for the new endpoint.
route required | string |
http_method required | string Enum: "GET" "POST" "PUT" "PATCH" "DELETE" "*" |
function_id required | string The endpoint function's unique ID. |
validation_method required | string Enum: "NO_VALIDATION" "SECRET_AS_QUERY_PARAM" "VERIFY_PAYLOAD" |
secret_id | string If |
return_type required | string (EndpointDataFormat) Enum: "JSON" "EJSON" The default data format returned by custom HTTPS endpoints. |
respond_result required | boolean |
fetch_custom_user_data | boolean |
create_user_on_auth | boolean |
disabled required | boolean |
_id | string The endpoint's unique ID. |
{- "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,
- "_id": "string"
}
{- "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,
- "_id": "string",
- "function_name": "string"
}
Get a specific endpoint's configuration.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
endpointId required | string The unique |
{- "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,
- "_id": "string",
- "function_name": "string"
}
Modify an existing endpoint configuration.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
endpointId required | string The unique |
A valid, updated configuration object for the endpoint.
route required | string |
http_method required | string Enum: "GET" "POST" "PUT" "PATCH" "DELETE" "*" |
function_id required | string The endpoint function's unique ID. |
validation_method required | string Enum: "NO_VALIDATION" "SECRET_AS_QUERY_PARAM" "VERIFY_PAYLOAD" |
secret_id | string If |
return_type required | string (EndpointDataFormat) Enum: "JSON" "EJSON" The default data format returned by custom HTTPS endpoints. |
respond_result required | boolean |
fetch_custom_user_data | boolean |
create_user_on_auth | boolean |
disabled required | boolean |
_id | string The endpoint's unique ID. |
{- "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,
- "_id": "string"
}
{- "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,
- "_id": "string",
- "function_name": "string"
}
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
endpointId required | string The unique |
{ }
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.
Get all event subscriptions.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
type | string Enum: "DATABASE" "AUTHENTICATION" "SCHEDULED" "SYNCTRANSLATOR" The type of event subscription to return.
|
[- {
- "name": "onNewEmployee",
- "type": "DATABASE",
- "function_id": "5eea9ca4ca0e356e2c2a148a",
- "config": {
- "operation_types": [
- "INSERT"
], - "database": "HR",
- "collection": "employees",
- "service_id": "5adeb649b8b998486770ae7c",
- "match": { },
- "project": { },
- "full_document": true
}
}
]
Return information about an event subscription.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
eventSubscriptionId required | string The unique |
{- "_id": "string",
- "name": "onNewEmployee",
- "type": "DATABASE",
- "function_id": "5eea9ca4ca0e356e2c2a148a",
- "config": {
- "operation_types": [
- "INSERT"
], - "database": "HR",
- "collection": "employees",
- "service_id": "5adeb649b8b998486770ae7c",
- "match": { },
- "project": { },
- "full_document": true
}
}
Return information about the most recent execution of an event subscription.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
eventSubscriptionId required | string The unique |
{- "data": { },
- "resource_id": { },
- "completed_at": { },
- "cluster_time": { }
}
View and manage your app's environment and environment values.
Set the App's active environment
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
environment | string (NullableAppEnvironment) Enum: "development" "testing" "qa" "production" "" The application's environment. An empty string indicates that the app does not have a specified environment. |
{- "environment": "production"
}
{- "name": "MyApp",
- "provider_region": "aws-us-east-1",
- "location": "US-VA",
- "deployment_model": "GLOBAL",
- "environment": "production",
- "_id": "633209ffd3bd3478005d1bac",
- "client_app_id": "myapp-abcde",
- "domain_id": "63320a2b5f9de9a6e0a213e8",
- "group_id": "5b2ec991973129243223a114",
- "last_used": 1664224746,
- "last_modified": 1656440824,
- "product": "standard"
}
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.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
[- {
- "_id": "string",
- "name": "string",
- "last_modified": 0
}
]
Define a new environment value.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
_id | string The environment value's internal ID |
name | string The environment value name |
last_modified | number The time this configuration was last modified represented by the number of seconds since the UNIX epoch. |
object 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 |
{- "_id": "string",
- "name": "string",
- "last_modified": 0,
- "values": {
- "none": null,
- "development": null,
- "testing": null,
- "qa": null,
- "production": null
}
}
{- "_id": "string",
- "name": "string",
- "last_modified": 0
}
Get details about a specific environment value
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
environmentValueId required | string The |
{- "_id": "string",
- "name": "string",
- "last_modified": 0,
- "values": {
- "none": null,
- "development": null,
- "testing": null,
- "qa": null,
- "production": null
}
}
Modify an existing environment value
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
environmentValueId required | string The |
_id | string The environment value's internal ID |
name | string The environment value name |
last_modified | number The time this configuration was last modified represented by the number of seconds since the UNIX epoch. |
object 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 |
{- "_id": "string",
- "name": "string",
- "last_modified": 0,
- "values": {
- "none": null,
- "development": null,
- "testing": null,
- "qa": null,
- "production": null
}
}
{- "_id": "string",
- "name": "string",
- "last_modified": 0
}
Delete an existing environment value
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
environmentValueId required | string The |
{- "error": "string",
- "error_code": "EnvironmentValueNotFound"
}
View and manage your app's functions.
Execute a function for testing.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
user_id required | string The user as which to execute the function. Either |
run_as_system required | boolean Determine whether or not to run as system user. Either |
The function to execute.
service | string The service to use when calling this function. |
name required | string The name of the function you want to run. |
arguments | Array of strings Any arguments that your function needs. |
{- "service": "string",
- "name": "string",
- "arguments": [
- "string"
]
}
{- "error": { },
- "logs": null,
- "result": { },
- "stats": {
- "execution_time": "string"
}
}
Execute a function's source code for testing.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
user_id required | string The user as which to execute the function. Either |
run_as_system required | boolean Determine whether or not to run as system user. Either |
The source to execute.
eval_source | string This JSON expression must evaluate to |
source required | string |
{- "eval_source": "string",
- "source": "string"
}
{- "error": { },
- "logs": null,
- "result": { },
- "stats": {
- "execution_time": "string"
}
}
List Functions.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
[- {
- "_id": "string",
- "name": "string",
- "last_modified": 0
}
]
Create a new Function.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
The function to create
can_evaluate | object A JSON expression that evaluates to |
name required | string A unique name for the Function. |
private required | boolean If |
source required | string The stringified source code for the function. The code must be valid ES6. |
run_as_system | boolean If |
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 | string The 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. Cannot be used with |
{- "can_evaluate": { },
- "name": "string",
- "private": true,
- "source": "string",
- "run_as_system": true,
- "run_as_user_id": "string",
- "run_as_user_id_script_source": "string"
}
{- "_id": "string",
- "name": "string"
}
Retrieve a Function.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
functionId required | string The unique |
{- "can_evaluate": { },
- "name": "string",
- "private": true,
- "source": "string",
- "run_as_system": true,
- "run_as_user_id": "string",
- "run_as_user_id_script_source": "string"
}
Delete a Function.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
functionId required | string The unique |
Update a Function.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
functionId required | string The unique |
{- "can_evaluate": { },
- "name": "string",
- "private": true,
- "source": "string",
- "run_as_system": true,
- "run_as_user_id": "string",
- "run_as_user_id_script_source": "string"
}
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 query.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
query required | string A stringified |
variables | string A stringified JSON object where each field name maps a value to a variable in the specified operation. |
operationName | string The name of the GraphQL operation specified in
|
{- "query": "query AllTasks { tasks(query: { status: $status }) { _id owner } }",
- "variables": "{ \"status\": \"complete\" }",
- "operationName": "AllTasks"
}
{- "data": { },
- "errors": [
- {
- "message": "string",
- "locations": [
- {
- "line": 0,
- "column": 0
}
]
}
]
}
Get your app's GraphQL API configuration.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
{- "use_natural_pluralization": true,
- "disable_schema_introspection": true
}
Update your app's GraphQL API configuration.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
A valid GraphQL API configuration object.
use_natural_pluralization | boolean If If You cannot change this value after you create your App.
This value is |
disable_schema_introspection | boolean If |
{- "use_natural_pluralization": true,
- "disable_schema_introspection": true
}
Get all custom resolver configurations from your app's GraphQL API.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
[- {
- "on_type": "string",
- "field_name": "string",
- "input_type": "string",
- "input_type_format": "scalar",
- "payload_type": "string",
- "payload_type_format": "scalar",
- "_id": "string",
- "function_id": "string"
}
]
Create a new custom resolver.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
A valid custom resolver configuration object.
on_type required | string The name of the resolver's parent type. This can be
|
field_name required | string The name of the custom resolver field that appears in the GraphQL schema. |
string or object The type of the custom resolver's | |
input_type_format | string Enum: "scalar" "scalar-list" "generated" "generated-list" "custom" The kind of input type the custom resolver uses. This value
must agree with the value of
If undefined, the resolver does not accept an input. |
string or object 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
| |
payload_type_format | string Enum: "scalar" "scalar-list" "generated" "generated-list" "custom" The kind of payload type the custom resolver uses. This value
must agree with the value of
If undefined, the resolver returns a |
_id required | string The custom resolver's unique ID. |
function_id required | string The resolver function's unique ID. |
{- "on_type": "string",
- "field_name": "string",
- "input_type": "string",
- "input_type_format": "scalar",
- "payload_type": "string",
- "payload_type_format": "scalar",
- "_id": "string",
- "function_id": "string"
}
{- "on_type": "string",
- "field_name": "string",
- "input_type": "string",
- "input_type_format": "scalar",
- "payload_type": "string",
- "payload_type_format": "scalar",
- "_id": "string",
- "function_id": "string"
}
Get a specific custom resolver configuration.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
customResolverId required | string The unique |
{- "on_type": "string",
- "field_name": "string",
- "input_type": "string",
- "input_type_format": "scalar",
- "payload_type": "string",
- "payload_type_format": "scalar",
- "_id": "string",
- "function_id": "string"
}
Modify an existing custom resolver configuration.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
customResolverId required | string The unique |
A valid, updated custom resolver configuration object.
on_type required | string The name of the resolver's parent type. This can be
|
field_name required | string The name of the custom resolver field that appears in the GraphQL schema. |
string or object The type of the custom resolver's | |
input_type_format | string Enum: "scalar" "scalar-list" "generated" "generated-list" "custom" The kind of input type the custom resolver uses. This value
must agree with the value of
If undefined, the resolver does not accept an input. |
string or object 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
| |
payload_type_format | string Enum: "scalar" "scalar-list" "generated" "generated-list" "custom" The kind of payload type the custom resolver uses. This value
must agree with the value of
If undefined, the resolver returns a |
_id required | string The custom resolver's unique ID. |
function_id required | string The resolver function's unique ID. |
{- "on_type": "string",
- "field_name": "string",
- "input_type": "string",
- "input_type_format": "scalar",
- "payload_type": "string",
- "payload_type_format": "scalar",
- "_id": "string",
- "function_id": "string"
}
Delete an existing custom resolver configuration.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
customResolverId required | string The unique |
Get the current validation level and action for reads and writes.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
{- "read_validation_action": "ERROR",
- "read_validation_level": "STRICT",
- "write_validation_action": "ERROR",
- "write_validation_level": "STRICT"
}
Set the validation level and action for reads and writes.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
The updated validation levels and actions.
read_validation_action | string (GraphQLValidationAction) Enum: "ERROR" "WARN" |
read_validation_level | string (GraphQLValidationLevel) Enum: "STRICT" "OFF" |
write_validation_action | string (GraphQLValidationAction) Enum: "ERROR" "WARN" |
write_validation_level | string (GraphQLValidationLevel) Enum: "STRICT" "OFF" |
{- "read_validation_action": "ERROR",
- "read_validation_level": "STRICT",
- "write_validation_action": "ERROR",
- "write_validation_level": "STRICT"
}
Manage your application's hosted files.
Asset metadata documents describe hosted asset files.
{
"path": "<Asset Resource Path>",
"hash": "<Asset MD5 Checksum Hash>",
"size": <File size in bytes>,
"attrs": [
{
"name": "<Metadata Attribute Name>",
"value": "<Metadata Attribute Value>",
}
]
}
Returns the current hosting configuration. Hosting is active
if the response includes status: "setup_ok"
.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
{- "enabled": true,
- "status": "setup_ok",
- "default_domain": {
- "provider_type": "aws",
- "config": {
- "app_default_domain": "myapp-qldqx.mongodbstitch.com"
}
}
}
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 endpoint.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
enabled | boolean Set to |
{- "enabled": true
}
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
[- {
- "appId": "string",
- "last_modified": 0,
- "url": "string",
- "path": "string",
- "size": 0,
- "attrs": [
- {
- "name": "string",
- "value": "string"
}
], - "hash": "string"
}
]
Move or copy a hosted asset to a new resource path.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
The hosted asset file and its metadata. (Must use
Content-Type: multipart/mixed
)
move_from | string The current resource path of the asset to move. Must be used with
|
move_to | string The resource path to which the asset will move. Must be used with
|
copy_from | string The current resource path of the asset to copy. Must be used with
|
copy_to | string The resource path to which the asset will be copied. Must be used with
|
{- "move_from": "string",
- "move_to": "string",
- "copy_from": "string",
- "copy_to": "string"
}
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
path required | string The resource path of a hosted asset. |
prefix | string Return only those assets where the resource path begins with the specified prefix. |
{- "appId": "string",
- "last_modified": 0,
- "url": "string",
- "path": "string",
- "size": 0,
- "attrs": [
- {
- "name": "string",
- "value": "string"
}
], - "hash": "string"
}
Upload or replace a hosted asset at a specific resource path.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
path required | string The resource path of a hosted asset. |
The hosted asset file and its metadata. (Must use
Content-Type: multipart/mixed
)
object (AssetMetadata) An asset metadata document (encoded as JSON). | |
file | string <binary> The asset file to upload (encoded as binary). |
{- "meta": {
- "path": "string",
- "size": 0,
- "attrs": [
- {
- "name": "string",
- "value": "string"
}
], - "hash": "string"
}, - "file": "string"
}
{- "error": "string",
- "error_code": "string"
}
Update the metadata attributes of a hosted asset at a specific resource path.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
path required | string The resource path of a hosted asset. |
The new metadata attributes for the hosted asset. These attributes replace all existing attributes for the file.
Array of objects (MetadataAttribute) |
{- "attributes": [
- {
- "name": "string",
- "value": "string"
}
]
}
{- "error": "string",
- "error_code": "string"
}
Access your application's logs.
The Logging endpoint returns up to 100 log entries per page. If the
query matches more than 100 entries, the result will be
paginated. 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:
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:
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.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
co_id | string Return only log messages associated with the given request Correlation ID. |
errors_only | boolean 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 |
user_id | string Return only log messages associated with the given |
start_date | string The date and time in ISO 8601 at which to begin returning results, exclusive. |
end_date | string The date and time in ISO 8601 at which to cease returning results, inclusive. |
skip | integer The offset number of matching log entries to skip before including them in the response. |
limit | integer [ 1 .. 100 ] 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. |
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" The kind of log you would like to retrieve. |
{- "logs": [
- {
- "_id": "63922bf071bdce7b19e14e76",
- "co_id": "63922bf071bdce7b19e14e75",
- "domain_id": "60c8f69884b0a73d14bb634b",
- "app_id": "60c8f69884b0a73d14bb634a",
- "group_id": "5b2ec426970199272441a214",
- "request_url": "/api/client/v2.0/app/test-for-now-vbwlr/auth/providers/anon-user/login",
- "request_method": "POST",
- "started": "2022-12-08T18:24:48.409Z",
- "completed": "2022-12-08T18:24:48.41Z",
- "type": "API"
}
], - "nextEndDate": "string",
- "nextSkip": 0
}
View and manage your application's log forwarders.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
[- {
- "_id": "string",
- "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"
}
}
]
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
A log forwarder configuration
name required | string |
disabled required | boolean |
log_types required | Array of strings (LogType) Items Enum: "auth" "endpoint" "function" "graphql" "push" "schema" "service" "sync" "trigger" "trigger_error_handler" |
log_statuses required | Array of strings (LogStatus) Items Enum: "error" "success" |
required | object (LogForwardingPolicy) |
required | object (LogForwardingAction) |
{- "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"
}
}
{- "_id": "string",
- "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"
}
}
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
forwarderId required | string The _id ObjectID of a log forwarder. |
{- "_id": "string",
- "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"
}
}
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
forwarderId required | string The _id ObjectID of a log forwarder. |
A log forwarder configuration
name required | string |
disabled required | boolean |
log_types required | Array of strings (LogType) Items Enum: "auth" "endpoint" "function" "graphql" "push" "schema" "service" "sync" "trigger" "trigger_error_handler" |
log_statuses required | Array of strings (LogStatus) Items Enum: "error" "success" |
required | object (LogForwardingPolicy) |
required | object (LogForwardingAction) |
{- "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"
}
}
{- "_id": "string",
- "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"
}
}
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
forwarderId required | string The _id ObjectID of a log forwarder. |
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
forwarderId required | string The _id ObjectID of a log forwarder. |
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
forwarderId required | string The _id ObjectID of a log forwarder. |
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.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
start required | string The ISO-8601 date and time of the start of the query period (e.g. "2022-10-27T14:01:01Z"). |
end required | string The ISO-8601 date and time of the end of the query period (e.g. "2022-12-27T14:01:01Z"). |
granularity required | string Specifies the granularity of the query period as an ISO-8601 duration value. Examples include "P31D" (31 day), "PT1H" (1 hour), and "PT5M" (5 minutes). |
metrics | 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" The name of the metric to filter by. For detailed information on the available metrics and their units, see App Services Metrics Reference. |
{- "measurements": [
- {
- "data_points": [
- {
- "timestamp": "string",
- "value": 0
}
], - "name": "string",
- "units": "string"
}
], - "app_id": "string",
- "app_name": "string",
- "group_id": "string",
- "start": "2022-10-27T14:01:01Z",
- "end": "2022-12-27T14:01:01Z",
- "granularity": "string"
}
View and manage your application's data access rules.
List all data access rules.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
serviceId required | string The unique |
[- {
- "database": "string",
- "collection": "string",
- "roles": [
- {
- "document_filters": {
- "read": { },
- "write": { }
}, - "name": "string",
- "apply_when": { },
- "read": { },
- "write": { },
- "insert": { },
- "delete": { },
- "search": { },
- "fields": {
- "property1": {
- "read": { },
- "write": { },
- "fields": { }
}, - "property2": {
- "read": { },
- "write": { },
- "fields": { }
}
}, - "additional_fields": {
- "read": { },
- "write": { }
}
}
], - "filters": [
- {
- "name": "string",
- "apply_when": { },
- "query": { },
- "projection": {
- "property1": 0,
- "property2": 0
}
}
]
}
]
Create a data access rule.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
serviceId required | string The unique |
The rule to create.
_id | string The rule's unique ObjectId identifier. |
Array of objects (Role) A list of data access roles. | |
Array of objects (Filter) A list of filters for incoming operations. | |
database required | string The name of a database in the linked data source. |
collection required | string The name of a collection in the specified |
{- "_id": "string",
- "roles": [
- {
- "_id": "string",
- "document_filters": {
- "read": { },
- "write": { }
}, - "name": "string",
- "apply_when": { },
- "read": { },
- "write": { },
- "insert": { },
- "delete": { },
- "search": { },
- "fields": {
- "property1": {
- "read": { },
- "write": { },
- "fields": {
- "property1": {
- "read": { },
- "write": { },
- "fields": null
}, - "property2": {
- "read": { },
- "write": { },
- "fields": null
}
}
}, - "property2": {
- "read": { },
- "write": { },
- "fields": {
- "property1": {
- "read": { },
- "write": { },
- "fields": null
}, - "property2": {
- "read": { },
- "write": { },
- "fields": null
}
}
}
}, - "additional_fields": {
- "read": { },
- "write": { }
}
}
], - "filters": [
- {
- "_id": "string",
- "name": "string",
- "apply_when": { },
- "query": { },
- "projection": {
- "property1": 0,
- "property2": 0
}
}
], - "database": "string",
- "collection": "string"
}
{- "_id": "string",
- "name": "string"
}
Get a specific data access rule.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
serviceId required | string The unique |
ruleId required | string The unique |
{- "_id": "string",
- "roles": [
- {
- "_id": "string",
- "document_filters": {
- "read": { },
- "write": { }
}, - "name": "string",
- "apply_when": { },
- "read": { },
- "write": { },
- "insert": { },
- "delete": { },
- "search": { },
- "fields": {
- "property1": {
- "read": { },
- "write": { },
- "fields": {
- "property1": {
- "read": { },
- "write": { },
- "fields": null
}, - "property2": {
- "read": { },
- "write": { },
- "fields": null
}
}
}, - "property2": {
- "read": { },
- "write": { },
- "fields": {
- "property1": {
- "read": { },
- "write": { },
- "fields": null
}, - "property2": {
- "read": { },
- "write": { },
- "fields": null
}
}
}
}, - "additional_fields": {
- "read": { },
- "write": { }
}
}
], - "filters": [
- {
- "_id": "string",
- "name": "string",
- "apply_when": { },
- "query": { },
- "projection": {
- "property1": 0,
- "property2": 0
}
}
], - "database": "string",
- "collection": "string"
}
Delete a data access rule.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
serviceId required | string The unique |
ruleId required | string The unique |
Update a data access rule.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
serviceId required | string The unique |
ruleId required | string The unique |
The new state of the rule.
_id | string The rule's unique ObjectId identifier. |
Array of objects (Role) A list of data access roles. | |
Array of objects (Filter) A list of filters for incoming operations. | |
database required | string The name of a database in the linked data source. |
collection required | string The name of a collection in the specified |
{- "_id": "string",
- "roles": [
- {
- "_id": "string",
- "document_filters": {
- "read": { },
- "write": { }
}, - "name": "string",
- "apply_when": { },
- "read": { },
- "write": { },
- "insert": { },
- "delete": { },
- "search": { },
- "fields": {
- "property1": {
- "read": { },
- "write": { },
- "fields": {
- "property1": {
- "read": { },
- "write": { },
- "fields": null
}, - "property2": {
- "read": { },
- "write": { },
- "fields": null
}
}
}, - "property2": {
- "read": { },
- "write": { },
- "fields": {
- "property1": {
- "read": { },
- "write": { },
- "fields": null
}, - "property2": {
- "read": { },
- "write": { },
- "fields": null
}
}
}
}, - "additional_fields": {
- "read": { },
- "write": { }
}
}
], - "filters": [
- {
- "_id": "string",
- "name": "string",
- "apply_when": { },
- "query": { },
- "projection": {
- "property1": 0,
- "property2": 0
}
}
], - "database": "string",
- "collection": "string"
}
Get the current default roles and filters.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
serviceId required | string The unique |
{- "roles": [
- {
- "document_filters": {
- "read": { },
- "write": { }
}, - "name": "string",
- "apply_when": { },
- "read": { },
- "write": { },
- "insert": { },
- "delete": { },
- "search": { },
- "fields": {
- "property1": {
- "read": { },
- "write": { },
- "fields": { }
}, - "property2": {
- "read": { },
- "write": { },
- "fields": { }
}
}, - "additional_fields": {
- "read": { },
- "write": { }
}
}
], - "filters": [
- {
- "name": "string",
- "apply_when": { },
- "query": { },
- "projection": {
- "property1": 0,
- "property2": 0
}
}
]
}
Create default roles and filters for a data source.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
serviceId required | string The unique |
A default rule configuration object.
Array of objects (RoleConstructor) An ordered list of default user roles. | |
Array of objects (FilterConstructor) A list of default query filters. |
{- "roles": [
- {
- "document_filters": {
- "read": { },
- "write": { }
}, - "name": "string",
- "apply_when": { },
- "read": { },
- "write": { },
- "insert": { },
- "delete": { },
- "search": { },
- "fields": {
- "property1": {
- "read": { },
- "write": { },
- "fields": { }
}, - "property2": {
- "read": { },
- "write": { },
- "fields": { }
}
}, - "additional_fields": {
- "read": { },
- "write": { }
}
}
], - "filters": [
- {
- "name": "string",
- "apply_when": { },
- "query": { },
- "projection": {
- "property1": 0,
- "property2": 0
}
}
]
}
{- "roles": [
- {
- "document_filters": {
- "read": { },
- "write": { }
}, - "name": "string",
- "apply_when": { },
- "read": { },
- "write": { },
- "insert": { },
- "delete": { },
- "search": { },
- "fields": {
- "property1": {
- "read": { },
- "write": { },
- "fields": { }
}, - "property2": {
- "read": { },
- "write": { },
- "fields": { }
}
}, - "additional_fields": {
- "read": { },
- "write": { }
}
}
], - "filters": [
- {
- "name": "string",
- "apply_when": { },
- "query": { },
- "projection": {
- "property1": 0,
- "property2": 0
}
}
]
}
Modify the default roles and filters of a data source.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
serviceId required | string The unique |
The updated default rule configuration object.
_id required | string The default rule's unique ObjectId identifier. |
Array of objects (Role) An ordered list of default user roles. | |
Array of objects (Filter) A list of default query filters. |
{- "roles": [
- {
- "document_filters": {
- "read": { },
- "write": { }
}, - "name": "string",
- "apply_when": { },
- "read": { },
- "write": { },
- "insert": { },
- "delete": { },
- "search": { },
- "fields": {
- "property1": {
- "read": { },
- "write": { },
- "fields": { }
}, - "property2": {
- "read": { },
- "write": { },
- "fields": { }
}
}, - "additional_fields": {
- "read": { },
- "write": { }
}
}
], - "filters": [
- {
- "name": "string",
- "apply_when": { },
- "query": { },
- "projection": {
- "property1": 0,
- "property2": 0
}
}
]
}
{- "error": "default rule does not exist"
}
Delete the default roles and filters of a data source.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
serviceId required | string The unique |
{- "error": "default rule does not exist for app service"
}
View and manage your application's schemas.
Query a subset of documents in a collection and validate each match against a schema.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
datasourceId required | string The unique |
database_name required | string The name of the database that contains the collection to validate. |
collection_name required | string The name of the collection to validate. |
from_schema required | object The EJSON schema to validate sampled documents against. |
query | object Default: {} A MongoDB query 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 | number Default: 10000 The maximum number of documents to sample. |
sort | object Default: {} A MongoDB sort for the collection. Use this to determine which end of a range query to start sampling from. |
{- "database_name": "string",
- "collection_name": "string",
- "from_schema": { },
- "query": { },
- "limit": 10000,
- "sort": { }
}
{- "errors": [
- {
- "error_code": "false",
- "error_count": 0,
- "field": "(root)._id",
- "failed_ids": [
- "string"
], - "failed_documents_query": { }
}
], - "total_processed_count": 0,
- "total_error_count": 0
}
List all defined schemas.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
[- {
- "_id": "string",
- "metadata": {
- "data_source": "string",
- "database": "string",
- "collection": "string"
}
}
]
Define a new schema 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.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
required | object (SchemaMetadata) Metadata that describes which linked collection the schema applies to. |
object (SchemaDefinition) A valid schema for the collection. | |
object (SchemaRelationships) Relationships to foreign collections. Each field name is a property in the schema. The corresponding value is a relationship definition for that field. |
{- "metadata": {
- "data_source": "string",
- "database": "string",
- "collection": "string"
}, - "schema": {
- "bsonType": "object",
- "title": "string",
- "required": [
- "string"
], - "properties": {
- "property1": { },
- "property2": { }
}
}, - "relationships": {
- "property1": {
- "ref": "string",
- "foreign_key": "string",
- "is_list": true
}, - "property2": {
- "ref": "string",
- "foreign_key": "string",
- "is_list": true
}
}
}
{- "_id": "string",
- "metadata": {
- "data_source": "string",
- "database": "string",
- "collection": "string"
}
}
Get a specific schema by its _id
value.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
schemaId required | string The unique |
{- "metadata": {
- "data_source": "string",
- "database": "string",
- "collection": "string"
}, - "schema": {
- "bsonType": "object",
- "title": "string",
- "required": [
- "string"
], - "properties": {
- "property1": { },
- "property2": { }
}
}, - "relationships": {
- "property1": {
- "ref": "string",
- "foreign_key": "string",
- "is_list": true
}, - "property2": {
- "ref": "string",
- "foreign_key": "string",
- "is_list": true
}
}
}
Replace an existing schema with a new one.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
schemaId required | string The unique |
object (SchemaMetadata) Metadata that describes which linked collection the schema applies to. | |
object (SchemaDefinition) A valid schema for the collection. | |
object (SchemaRelationships) Relationships to foreign collections. Each field name is a property in the schema. The corresponding value is a relationship definition for that field. |
{- "metadata": {
- "data_source": "string",
- "database": "string",
- "collection": "string"
}, - "schema": {
- "bsonType": "object",
- "title": "string",
- "required": [
- "string"
], - "properties": {
- "property1": { },
- "property2": { }
}
}, - "relationships": {
- "property1": {
- "ref": "string",
- "foreign_key": "string",
- "is_list": true
}, - "property2": {
- "ref": "string",
- "foreign_key": "string",
- "is_list": true
}
}
}
Delete a specific schema by its _id
value.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
schemaId required | string The unique |
Check if null type schema validation is enabled.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
{- "enabled": true
}
Enable or disable null type schema validation.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
enabled | boolean |
{- "enabled": true
}
View and manage your application's secrets.
List secrets associated with a Atlas App Services App.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
[- {
- "_id": "string",
- "name": "string"
}
]
Create a new Secret.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
The Secret to create.
name required | string |
value required | string |
{- "name": "string",
- "value": "string"
}
{- "_id": "string",
- "name": "string"
}
Modify a Secret associated with a Atlas App Services App.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
secretId required | string The unique |
The modified value of the Secret.
_id | string |
name required | string |
value required | string |
{- "_id": "string",
- "name": "string",
- "value": "string"
}
Delete a Secret associated with a Atlas App Services App.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
secretId required | string The unique |
Configure your application's security.
List the allowed HTTP origins from which App Services should allow requests.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
[- "string"
]
Set the allowed HTTP origins from which App Services should allow requests.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
A list of HTTP origins.
An HTTP origin. Must be of the form <scheme>://<host>[:port]
.
[- "string"
]
List the allowed entries in the Access List of your Atlas App Services App.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
[- {
- "current_ip": "string",
- "allowed_ips": [
- {
- "_id": "string",
- "address": "string",
- "ip": "string",
- "network": "string",
- "comment": "string"
}
]
}
]
Create an IP address or CIDR block in the Access List for your App Services app.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
The IP Access List entry to create.
address required | string The value of the IP address or CIDR block. |
comment | string An optional comment included in the Access List entry. |
{- "address": "string",
- "comment": "string"
}
{- "_id": "string",
- "address": "string",
- "ip": "string",
- "network": "string",
- "comment": "string"
}
Modify an IP address or CIDR block in the Access List of your App Services app
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
ipId required | string The IP address entry denoted by |
The updated value of the IP Access List entry.
address required | string The modified value of the IP address or CIDR block. |
comment | string An optional comment included in the Access List entry. |
{- "address": "string",
- "comment": "string"
}
{- "_id": "string",
- "address": "string",
- "ip": "string",
- "network": "string",
- "comment": "string"
}
Delete an IP address or CIDR block from the Access List of your App Services app
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
ipId required | string The IP address entry denoted by |
Get a list of all private endpoints configured for the App.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
[- {
- "_id": "string",
- "cloud_provider_region": "aws-us-east-1",
- "cloud_provider_endpoint_id": "vpce-12345678",
- "comment": "string",
- "endpoint_type": "sync"
}
]
Configure a new private endpoint for the App.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
cloud_provider_region required | string The cloud provider region that hosts the private endpoint. |
cloud_provider_endpoint_id required | string The private endpoint ID from the cloud provider. |
comment | string An optional comment that describes the endpoint. |
endpoint_type required | string Enum: "sync" "general" The type of endpoint. For more information
on endpoint types and migrating deprecated endpoints to |
{- "cloud_provider_region": "aws-us-east-1",
- "cloud_provider_endpoint_id": "vpce-12345678",
- "comment": "string",
- "endpoint_type": "sync"
}
{- "_id": "string",
- "cloud_provider_region": "aws-us-east-1",
- "cloud_provider_endpoint_id": "vpce-12345678",
- "comment": "string",
- "endpoint_type": "sync"
}
Get a specific private endpoint configuration.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
privateEndpointId required | string The _id ObjectID of a VPC private endpoint. |
{- "_id": "string",
- "cloud_provider_region": "aws-us-east-1",
- "cloud_provider_endpoint_id": "vpce-12345678",
- "comment": "string",
- "endpoint_type": "sync"
}
Update the configuration of a private endpoint.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
privateEndpointId required | string The _id ObjectID of a VPC private endpoint. |
cloud_provider_region required | string The cloud provider region that hosts the private endpoint. |
cloud_provider_endpoint_id required | string The private endpoint ID from the cloud provider. |
comment | string An optional comment that describes the endpoint. |
endpoint_type required | string Enum: "sync" "general" The type of endpoint. For more information
on endpoint types and migrating deprecated endpoints to |
{- "cloud_provider_region": "aws-us-east-1",
- "cloud_provider_endpoint_id": "vpce-12345678",
- "comment": "string",
- "endpoint_type": "sync"
}
{- "_id": "string",
- "cloud_provider_region": "aws-us-east-1",
- "cloud_provider_endpoint_id": "vpce-12345678",
- "comment": "string",
- "endpoint_type": "sync"
}
Delete a private endpoint.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
privateEndpointId required | string The _id ObjectID of a VPC private endpoint. |
Get a list of all private endpoint services configured for the App.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
[- {
- "cloud_provider_region": "aws-us-east-1",
- "service_name": "com.amazonaws.vpce.us-east-1.vpce-svc-0f24fc6e6de007e5e",
- "endpoint_type": "sync"
}
]
For Apps with Private Endpoints enabled, toggle whether or not the App processes requests that originate from outside of the VPC.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
allow_non_vpc_client_requests | boolean Set to |
{- "allow_non_vpc_client_requests": true
}
Get the current expiration time in seconds for user session refresh tokens.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
{- "expiration_time_seconds": 5184000
}
Set the expiration time in seconds for user session refresh tokens.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
expiration_time_seconds | number [ 1800 .. 15552000 ] Default: 5184000 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. |
{- "expiration_time_seconds": 5184000
}
View and manage your application's data sources and third-party services [Deprecated]
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.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
name | string Create a name to identify each cluster you want to link. |
type | string Enum: "mongodb-atlas" "datalake" The type of the data source you want to link. |
object (LinkingDataSourceConfig) |
[- {
- "name": "first-cluster",
- "type": "mongodb-atlas",
- "config": {
- "clusterName": "Cluster0"
}
}
]
{- "failedClusterNames": [
- "first-cluster"
]
}
List all data sources and third-party services [Deprecated].
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
[- {
- "name": "string",
- "type": "string"
}
]
Create a data source or third-party service [Deprecated].
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
name | string The service name. |
type | string The type of service. |
object (AtlasClusterServiceConfigInstance) |
{- "name": "string",
- "type": "string",
- "config": {
- "clusterName": "Cluster0",
- "readPreference": "primary",
- "readPreferenceTagSets": [
- "server1"
], - "wireProtocolEnabled": true
}
}
{- "_id": "string",
- "name": "string",
- "type": "string",
- "config": {
- "clusterName": "Cluster0",
- "readPreference": "primary",
- "readPreferenceTagSets": [
- "server1"
], - "wireProtocolEnabled": true
}
}
Get a data source or third-party service [Deprecated].
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
serviceId required | string The unique |
{- "_id": "string",
- "name": "string",
- "type": "string",
- "config": {
- "clusterName": "Cluster0",
- "readPreference": "primary",
- "readPreferenceTagSets": [
- "server1"
], - "wireProtocolEnabled": true
}
}
Delete a data source or third-party service [Deprecated].
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
serviceId required | string The unique |
Update a service.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
serviceId required | string The unique |
Run a command associated with a service.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
serviceId required | string The unique |
commandName required | string Command name |
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
serviceId required | string The unique |
{- "version": "string",
- "gitVersion": "string",
- "versionArray": [
- 0
], - "javascriptEngine": "string",
- "bits": "string",
- "debug": true,
- "maxBsonObjectSize": 0
}
Get configuration of data sources and third-party services [Deprecated].
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
serviceId required | string The unique |
[- {
- "name": "string",
- "type": "string"
}
]
Update a Data Source or Third-Party Service [Deprecated] configuration.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
serviceId required | string The unique |
clusterName required | string 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 required | string Enum: "primary" "primaryPreferred" "secondary" "secondaryPreferred" "nearest" The read preference mode for read requests to the data source. |
readPreferenceTagSets | Array of strings (ReadPreferencesTagSet) Items Enum: "server1" "server2" Target read operations to specific members of a replica set. |
wireProtocolEnabled required | boolean If true, clients may connect to the app over the MongoDB Wire Protocol. |
clusterId | number The service ID. |
groupName | string The name of the group that contains the service. |
orgName | string The name of the organization that contains the service. |
{- "clusterName": "Cluster0",
- "readPreference": "primary",
- "readPreferenceTagSets": [
- "server1"
], - "wireProtocolEnabled": true,
- "clusterId": "05e821b3975d271289f372e3a",
- "groupName": "Project 0",
- "orgName": "MongoDB_Org"
}
Sample a subset of documents in a collection to generate a JSON schema.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
serviceId required | string The unique |
database_name required | string The name of the database that contains the collection. |
collection_name required | string The name of the collection to sample and generate a schema for. |
limit required | integer The maximum number of documents to include in the sample. |
{- "database_name": "string",
- "collection_name": "string",
- "limit": 0
}
{- "schema": { }
}
Get information about sync for your application.
Retrieve sync data for a specific Atlas App Services App when using Flexible Sync.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
serviceId required | string The unique |
{- "clusterId": "string",
- "clusterName": "string",
- "clusterType": "atlas",
- "flexible_sync": {
- "state": "string",
- "database_name": "string",
- "queryable_fields_names": [
- "string"
], - "indexed_queryable_fields_names": [
- "string"
], - "collection_queryable_fields_names": {
- "property1": {
- "property1": "string",
- "property2": "string"
}, - "property2": {
- "property1": "string",
- "property2": "string"
}
}, - "permissions": { },
- "last_disabled": "string",
- "client_max_offline_days": 0,
- "is_recovery_mode_disabled": true,
- "asymmetric_tables": [
- "string"
]
}, - "groupName": "string",
- "orgName": "string",
- "readPreference": "primary",
- "wireProtocolEnabled": true
}
Retrieve partition field data when using Partition-Based Sync.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
service_id required | string The Service ID for the linked cluster. |
{- "service_id": "string",
- "partition_fields": [
- {
- "key": "string",
- "type": "string"
}
]
}
View and manage your application's triggers.
Get a list of all triggers in your application.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
[- {
- "name": "onNewEmployee",
- "type": "DATABASE",
- "function_id": "5eea9ca4ca0e356e2c2a148a",
- "config": {
- "operation_types": [
- "INSERT"
], - "database": "HR",
- "collection": "employees",
- "service_id": "5adeb649b8b998486770ae7c",
- "match": { },
- "project": { },
- "full_document": true
}
}
]
Create a new trigger in your application.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
A configuration for a database, scheduled, or authentication trigger.
name required | string The trigger's name. |
type required | string Value: "DATABASE" The trigger type. For database triggers, this value is always |
disabled | boolean Default: false If |
required | object An object that defines configuration values for the trigger. |
function_id | string The ID of the function that the trigger calls when it fires. This value is the same as For example, if you define |
function_name | string The name of the function that the trigger calls when it
fires, i.e. the function described by This value is the same as For example, if you define |
object 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. | |
object An object that defines custom error handling for an AWS
EventBridge trigger. Valid only for |
{- "name": "onNewEmployee",
- "type": "DATABASE",
- "function_id": "5eea9ca4ca0e356e2c2a148a",
- "config": {
- "operation_types": [
- "INSERT"
], - "database": "HR",
- "collection": "employees",
- "service_id": "5adeb649b8b998486770ae7c",
- "match": { },
- "project": { },
- "full_document": true
}
}
{- "name": "onNewEmployee",
- "type": "DATABASE",
- "function_id": "5eea9ca4ca0e356e2c2a148a",
- "config": {
- "operation_types": [
- "INSERT"
], - "database": "HR",
- "collection": "employees",
- "service_id": "5adeb649b8b998486770ae7c",
- "match": { },
- "project": { },
- "full_document": true
}
}
Get the configuration for an existing trigger in your application.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
triggerId required | string The unique |
{- "name": "onNewEmployee",
- "type": "DATABASE",
- "function_id": "5eea9ca4ca0e356e2c2a148a",
- "config": {
- "operation_types": [
- "INSERT"
], - "database": "HR",
- "collection": "employees",
- "service_id": "5adeb649b8b998486770ae7c",
- "match": { },
- "project": { },
- "full_document": true
}
}
Modify an existing trigger in your application.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
triggerId required | string The unique |
The updated trigger configuration.
name required | string The trigger's name. |
type required | string Value: "DATABASE" The trigger type. For database triggers, this value is always |
disabled | boolean Default: false If |
required | object An object that defines configuration values for the trigger. |
function_id | string The ID of the function that the trigger calls when it fires. This value is the same as For example, if you define |
function_name | string The name of the function that the trigger calls when it
fires, i.e. the function described by This value is the same as For example, if you define |
object 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. | |
object An object that defines custom error handling for an AWS
EventBridge trigger. Valid only for | |
_id | string The trigger's unique ID. |
{- "name": "onNewEmployee",
- "type": "DATABASE",
- "function_id": "5eea9ca4ca0e356e2c2a148a",
- "config": {
- "operation_types": [
- "INSERT"
], - "database": "HR",
- "collection": "employees",
- "service_id": "5adeb649b8b998486770ae7c",
- "match": { },
- "project": { },
- "full_document": true
}
}
{- "error": "string",
- "error_code": "string"
}
Remove an existing trigger from your application.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
triggerId required | string The unique |
{ }
Resume a suspended database trigger.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
triggerId required | string The unique |
Configuration options for the resume operation.
disable_token | boolean If |
{- "disable_token": true
}
{- "error": "string"
}
View and manage your application's users.
List confirmed user accounts.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
after | string The |
sort | string The field name to sort results by. The only valid value is the
default: |
desc | boolean If |
[- {
- "_id": "string",
- "identities": [
- {
- "id": "string",
- "provider_type": "anon-user",
- "provider_id": "string"
}
], - "type": "normal",
- "creation_date": 0,
- "last_authentication_date": 0,
- "disabled": true,
- "data": { }
}
]
Create a new email/password user account.
Note: You cannot create user accounts through the Admin API for any authentication provider other than email/password.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
The user to create
email required | string |
password required | string |
{- "email": "string",
- "password": "string"
}
{- "_id": "string",
- "identities": [
- {
- "id": "string",
- "provider_type": "anon-user",
- "provider_id": "string"
}
], - "type": "normal",
- "creation_date": 0,
- "last_authentication_date": 0,
- "disabled": true,
- "data": { }
}
Verify a that a user's client access token is valid.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
The user's client access token. The access token represents a logged in application user. This is not the same as the
access_token
that you use to work with the Admin API.
token required | string |
{- "token": "string"
}
"token expired"
Get a specific user account by ID.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
userId required | string User Account ID |
{- "_id": "string",
- "identities": [
- {
- "id": "string",
- "provider_type": "anon-user",
- "provider_id": "string"
}
], - "type": "normal",
- "creation_date": 0,
- "last_authentication_date": 0,
- "disabled": true,
- "data": { }
}
Delete a specific user account by ID.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
userId required | string User Account ID |
Change the email address for an email/password user by ID.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
userId required | string User Account ID |
The new email address for the user.
email required | string The new email for the user. |
{- "email": "new_email@example.com"
}
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
userId required | string User Account ID |
[- { }
]
Revoke all of a user's sessions.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
userId required | string User Account ID |
Enable a user.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
userId required | string User Account ID |
Disable a user.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
userId required | string User Account ID |
List pending user account registrations. Returns up to 50 pending users in a call.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
after | string The unique |
[- {
- "_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": ""
}
]
Delete a pending user.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
email required | string Email address |
Send a confirmation email.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
email required | string Email address |
Confirm a pending user.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
email required | string Email address |
Reruns a pending user's confirmation workflow.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
email required | string Email address |
View and manage your application's values.
List all values defined in an application.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
[- {
- "_id": "string",
- "name": "string",
- "private": true
}
]
Define a Value in an application.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
The value to create.
name required | string |
private required | boolean |
value required | any (AnyValue) Any valid JSON value |
{- "name": "string",
- "private": true,
- "value": null
}
{- "name": "string",
- "private": true,
- "value": null
}
Retrieve a value definition from an application.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
valueId required | string The unique |
{- "name": "string",
- "private": true,
- "from_secret": true,
- "value": null
}
Delete a value defined in an application.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
valueId required | string The unique |
Update a value definition in an application.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
valueId required | string The unique |
[- {
- "name": "string",
- "private": true,
- "value": null
}
]
View and manage your application's push notifications.
List push notifications.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
state | string (MessageState) Enum: "sent" "draft" Only list notifications with the given state. |
[- {
- "allowed_ips": "string",
- "appID": "string",
- "label": "string",
- "message": "string",
- "topic": "string",
- "created": "string",
- "sent": "string",
- "state": "sent"
}
]
Create a push notification.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
The notification to create.
label required | string |
message required | string |
topic required | string |
state required | string (MessageState) Enum: "sent" "draft" |
{- "label": "string",
- "message": "string",
- "topic": "string",
- "state": "sent"
}
Retrieve a push notification message.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
messageId required | string Message ID |
{- "allowed_ips": "string",
- "appID": "string",
- "label": "string",
- "message": "string",
- "topic": "string",
- "created": "string",
- "sent": "string",
- "state": "sent"
}
Delete a push notification message.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
messageId required | string Message ID |
Update a push notification message.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
messageId required | string Message ID |
{- "allowed_ips": "string",
- "appID": "string",
- "label": "string",
- "message": "string",
- "topic": "string",
- "created": "string",
- "sent": "string",
- "state": "sent"
}
Set a push notification's type.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
messageId required | string Message ID |
Send a push notification.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
messageId required | string Message ID |
View and manage your application's webhooks.
List webhooks.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
serviceId required | string The unique |
{- "name": "string",
- "function_source": "string",
- "respond_result": true,
- "options": {
- "secret": "string",
- "secretAsQueryParam": true
}
}
Create a webhook.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
serviceId required | string The unique |
The webhook to create.
name required | string |
function_source required | string |
respond_result required | boolean |
object |
{- "name": "string",
- "function_source": "string",
- "respond_result": true,
- "options": {
- "secret": "string",
- "secretAsQueryParam": true
}
}
Retrieve a webhook.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
serviceId required | string The unique |
incomingWebhookId required | string The unique |
Delete a webhook.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
serviceId required | string The unique |
incomingWebhookId required | string The unique |
Update a webhook.
groupId required | string An Atlas Project/Group ID. |
appId required | string The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value. |
serviceId required | string The unique |
incomingWebhookId required | string The unique |
The updated state of the webhook.
name required | string |
function_source required | string |
respond_result required | boolean |
object |
{- "name": "string",
- "function_source": "string",
- "respond_result": true,
- "options": {
- "secret": "string",
- "secretAsQueryParam": true
}
}