Skip to content

Instantly share code, notes, and snippets.

@Shaddix
Last active December 3, 2023 18:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shaddix/10741a609b5c849e6c0c3675045025ae to your computer and use it in GitHub Desktop.
Save Shaddix/10741a609b5c849e6c0c3675045025ae to your computer and use it in GitHub Desktop.
Atlas openapi
{
"openapi": "3.0.0",
"info": {
"description": "The App Services Admin API lets you programmatically perform\nadministrative tasks over HTTPS. This includes defining &\nconfiguring things like:\n\n- App Deployment & Security\n- APIs & Endpoints\n- Authentication & User Management\n- Data Sources\n- Device Sync\n- Environments\n- Functions\n- Logs\n- Rules\n- Schemas\n- Static Hosting\n- Triggers\n- Usage & Billing Metrics\n- Values & Secrets\n\nThe Admin API is for application development, configuration, and\ndeployment. To actually use the features you configure with the\nAdmin API, client applications connect with a [Realm\nSDK](https://mongodb.com/docs/realm/) or over an HTTPS API specific\nto your App.\n\n## Project & Application IDs\n\n**Note**: The terms _Project ID_ and _Group ID_ are interchangeable.\n\nAtlas App Services Admin API endpoints frequently require you to include two parameters in the URL:\n\n- Your Atlas _Project ID_ (also sometimes called a _Group ID_)\n- Your App Services _Application ID_\n\n### Project ID\n\nYou can find your Project ID from the MongoDB Atlas dashboard or with the MongoDB Atlas CLI.\n\n### Application ID\n\nTo find an Application ID, make a request to the [List\nApps](#operation/adminListApplications) endpoint for your project.\nYou'll need an `access_token` to make this request. To learn how to\nget one, see [Get an Admin API Session Access\nToken](#get-an-admin-api-session-access-token).\n\n```sh\ncurl --request GET \\\n --header 'Authorization: Bearer <access_token>' \\\n https://realm.mongodb.com/api/admin/v3.0/groups/{groupId}/apps\n```\n\nThis will return a list of objects describing each App Services App\nin the provided project/group. For Admin API requests, your\nApplication ID is the ObjectId value in the `_id` field, _not_ the\n`client_app_id`.\n\n```json\n[\n {\n \"_id\": \"5997529e46224c6e42gb6dd9\",\n \"group_id\": \"57879f6cc4b32dbe440bb8c5\",\n \"domain_id\": \"5886619e46124e4c42fb5dd8\",\n \"client_app_id\": \"myapp-abcde\",\n \"name\": \"myapp\",\n \"location\": \"US-VA\",\n \"deployment_model\": \"GLOBAL\",\n \"last_used\": 1615153544,\n \"last_modified\": 0,\n \"product\": \"standard\",\n \"environment\": \"\"\n }\n]\n```\n\n## Get an Admin API Session Access Token\n\nEvery request to the App Services Admin API must include a valid,\nunexpired access token issued by the MongoDB Cloud API. You include\nthis token in the `Authorization` header of each request using the\nbearer auth scheme.\n\nYou need a valid [MongoDB Atlas programmatic API\nkey](https://docs.atlas.mongodb.com/configure-api-access) for\nMongoDB Atlas to get a token.\n\nOnce you have an API key pair, call the authentication endpoint:\n\n```shell\ncurl --request POST \\\n --header 'Content-Type: application/json' \\\n --header 'Accept: application/json' \\\n --data '{\"username\": \"<Public API Key>\", \"apiKey\": \"<Private API Key>\"}' \\\n https://realm.mongodb.com/api/admin/v3.0/auth/providers/mongodb-cloud/login\n```\n\nIf authentication succeeds, App Services returns an access token as\npart of the JSON response document:\n\n```json\n{\n \"access_token\": \"<access_token>\",\n \"refresh_token\": \"<refresh_token>\",\n \"user_id\": \"<user_id>\",\n \"device_id\": \"<device_id>\"\n}\n```\n\nThe `access_token` represents a limited-time authorization to interact\nwith the Admin API. To authenticate a request, include the token in a\n[Bearer token](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication)\n`Authorization` header.\n\n```http\nAuthorization: Bearer <access_token>\n```\n\n## Refresh an Admin API Session Access Token\n\nSession access tokens expire 30 minutes after they are issued. When\nyou login, the response also includes a `refresh_token` that you can\nuse to get a new access token. This is useful because you only need\nto log in with credentials one time. After that you can use the\nrefresh token to re-authenticate for as long as its valid.\n\nRefresh tokens expire 60 days after being issued.\n\nTo refresh your authentication and get a new `access_token`, call\nthe auth session endpoint with your `refresh_token` in the\n`Authorization` header:\n\n```shell\ncurl --request POST \\\n --header 'Authorization: Bearer <refresh_token>' \\\n https://realm.mongodb.com/api/admin/v3.0/auth/session\n```\n\nIf the refresh token is valid, the response body includes a new\n`access_token` that's valid for the next 30 minutes:\n\n```json\n{\n \"access_token\": \"<access_token>\"\n}\n```",
"version": "3.0",
"title": "MongoDB Atlas App Services Admin API"
},
"servers": [
{
"url": "https://realm.mongodb.com/api/admin/v3.0",
"description": "The root API resource and starting point for the App Services API."
}
],
"paths": {
"/auth/providers": {
"get": {
"tags": [
"admin"
],
"operationId": "getAdminAuthProviders",
"summary": "List App Services Admin Auth Providers",
"responses": {
"200": {
"description": "Successfully enumerated available authentication providers.",
"content": {
"application/json": {
"schema": {
"type": "array",
"description": "An array of authentication providers.",
"items": {
"$ref": "#/components/schemas/BaseAuthProvider"
}
}
}
}
}
},
"security": []
}
},
"/auth/providers/{provider}/login": {
"post": {
"tags": [
"admin"
],
"operationId": "adminLogin",
"summary": "Authenticate as an App Services administrator",
"description": "Authenticate as an App Services administrator using an Atlas\nprogrammatic API key pair. To learn more, see [Get An Admin API\nSession Access Token](#get-an-admin-api-session-access-token).\n",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"username": {
"type": "string"
},
"apiKey": {
"type": "string"
}
},
"required": [
"username",
"apiKey"
]
}
}
}
},
"responses": {
"200": {
"description": "Authentication was successful.",
"content": {
"application/json": {
"schema": {
"properties": {
"access_token": {
"type": "string",
"description": "An access token you may provide in the `Authorization` header of API\nrequests. [The App Services API Authentication section](#section/Get-Authentication-Tokens) demonstrates how to use this token."
},
"refresh_token": {
"type": "string",
"description": "A refresh token you may provide in the `Authorization` header of\n[POST auth/session](#section/adminCreateSession)\nto obtain a new `access_token` for the current user session.\n"
},
"user_id": {
"type": "string",
"description": "The unique `_id` value of the MongoDB Cloud user."
},
"device_id": {
"type": "string"
}
}
}
}
}
}
},
"security": []
},
"parameters": [
{
"name": "provider",
"description": "The authentication provider to use.",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/schemas/ProviderType"
}
}
]
},
"/auth/profile": {
"get": {
"tags": [
"admin"
],
"operationId": "getAdminProfile",
"summary": "Get information about the currently logged in user",
"responses": {
"200": {
"description": "The profile was successfully retrieved.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AdminUser"
}
}
}
}
}
}
},
"/auth/session": {
"post": {
"tags": [
"admin"
],
"operationId": "adminCreateSession",
"summary": "Obtain a session access token",
"responses": {
"201": {
"description": "Successfully created.",
"content": {
"application/json": {
"schema": {
"properties": {
"access_token": {
"type": "string"
}
}
}
}
}
},
"401": {
"description": "Invalid token",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"allOf": [
{
"$ref": "#/components/schemas/Error"
},
{
"properties": {
"error": {
"const": "invalid refresh token: incorrect token type"
}
},
"description": "The request did not use bearer token\nauthentication with a valid refresh token. Make\nsure the Authorization header contains the\n`refresh_token`, not the `access_token`."
}
]
}
]
}
}
}
}
},
"security": [
{
"refreshAuth": []
}
]
},
"delete": {
"tags": [
"admin"
],
"operationId": "adminDeleteSession",
"summary": "Delete a session access token",
"responses": {
"204": {
"description": "Deleted"
},
"401": {
"description": "Invalid token or session",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"allOf": [
{
"$ref": "#/components/schemas/Error"
},
{
"properties": {
"error": {
"const": "invalid refresh token: incorrect token type"
}
},
"description": "The request did not use bearer token\nauthentication with a valid refresh token. Make\nsure the Authorization header contains the\n`refresh_token`, not the `access_token`."
}
]
},
{
"allOf": [
{
"$ref": "#/components/schemas/Error"
},
{
"properties": {
"error": {
"const": "invalid session: failed to find refresh token"
},
"error_code": {
"const": "InvalidSession"
}
},
"description": "The provided refresh token does not match any\ncurrent sessions."
}
]
}
]
}
}
}
}
}
}
},
"/provider_regions": {
"get": {
"tags": [
"deploy"
],
"operationId": "adminListAppRegions",
"summary": "List all available Atlas App cloud regions",
"description": "Return a list of all supported cloud regions in which you can\ndeploy an Atlas App.",
"responses": {
"200": {
"description": "A list of all available Atlas App cloud region names.",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CloudProviderRegion"
}
}
}
}
}
}
}
},
"/groups/{groupId}/apps": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
}
],
"get": {
"tags": [
"apps"
],
"operationId": "adminListApplications",
"summary": "List all App Services Apps in an Atlas project/group",
"description": "List all App Services Apps within an Atlas\n[project/group](https://docs.atlas.mongodb.com/tutorial/manage-projects/).",
"parameters": [
{
"in": "query",
"name": "product",
"required": false,
"schema": {
"type": "string",
"enum": [
"standard",
"atlas",
"data-api"
]
},
"style": "simple",
"explode": false,
"description": "One or more specific App Services product types. If specified,\nthis endpoint only returns Apps of the specified product type(s).\n\nMost apps use the `standard` product type, which this\nendpoint returns by default. The `atlas` and `data-api`\nproduct types represent special apps for\n[Atlas Triggers](https://docs.mongodb.com/atlas/triggers) and\n[Atlas Data API](https://docs.mongodb.com/atlas/api/data-api/)\nthat you can access through the Atlas UI.\n\nYou can specify multiple product types as a comma-separated list:\n\n```\n/groups/{groupId}/apps?product=atlas,data-api\n```"
}
],
"responses": {
"200": {
"description": "Successfully listed.",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AppInstance"
}
}
}
}
}
}
},
"post": {
"tags": [
"apps"
],
"operationId": "adminCreateApplication",
"summary": "Create a new app",
"parameters": [
{
"name": "defaults",
"in": "query",
"required": false,
"schema": {
"type": "boolean"
},
"description": "Whether or not to create a default application."
},
{
"name": "product",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"standard",
"atlas",
"data-api"
]
},
"description": "The App's product type. Apps use the `standard` product type\nby default. For most apps, you do not need to specify a\n`product` at all, or should specify `standard`.\n\nThe `atlas` and `data-api` product types represent special,\napps for [Atlas Triggers](https://docs.mongodb.com/atlas/triggers)\nand [Atlas Data API](https://docs.mongodb.com/atlas/api/data-api/) that you\ncan access through the Atlas UI."
}
],
"requestBody": {
"description": "The application to create.",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AppConstructor"
}
}
}
},
"responses": {
"201": {
"description": "The application was successfully created.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AppInstance"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
}
}
}
},
"/groups/{groupId}/apps/{appId}": {
"get": {
"tags": [
"apps"
],
"operationId": "adminGetApplication",
"summary": "Get an app",
"responses": {
"200": {
"description": "The application was successfully retrieved.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AppInstance"
}
}
}
}
}
},
"delete": {
"tags": [
"apps"
],
"operationId": "adminDeleteApplication",
"summary": "Delete an app",
"responses": {
"204": {
"description": "The application was successfully deleted."
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
]
},
"/groups/{groupId}/apps/{appId}/export": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"in": "query",
"name": "deployment",
"required": false,
"description": "The `_id` of a specific deployment to export. If not specified, export the latest deployment.",
"example": "6373362f01a569d5cd571c68",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "source_control",
"required": false,
"default": false,
"description": "If `true`, the exported directory is suitable for automatic\ndeployment from GitHub or other source control.\n\nCannot be used with the `template` query parameter.",
"schema": {
"type": "boolean"
}
},
{
"in": "query",
"name": "template",
"required": false,
"default": false,
"description": "If `true`, the exported directory does not include any\nidentifiers or other data that would tie the app to a specific\ndeployment instance.\n\nCannot be used with the `source_control` query parameter.",
"schema": {
"type": "boolean"
}
},
{
"in": "query",
"name": "version",
"required": false,
"description": "The configuration file schema version to export. This value\ncorresponds to `config_version` in `realm_config.json`.",
"example": 20210101,
"schema": {
"type": "string"
}
}
],
"get": {
"tags": [
"apps"
],
"operationId": "adminExportApplication",
"summary": "Export an app as a zip file",
"description": "[Export](https://www.mongodb.com/docs/atlas/app-services/apps/export/)\nan application as a zip file.",
"responses": {
"200": {
"description": "The application was successfully exported."
}
}
}
},
"/groups/{groupId}/apps/{appId}/event_subscriptions": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"name": "type",
"description": "The type of event subscription to return.\n\n- `DATABASE`: Return Database Triggers\n- `AUTHENTICATION`: Return Authentication Triggers\n- `SCHEDULED`: Return Scheduled Triggers\n- `SYNCTRANSLATOR`: Return Device Sync translators",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"DATABASE",
"AUTHENTICATION",
"SCHEDULED",
"SYNCTRANSLATOR"
],
"x-enumDescriptions": {
"DATABASE": "Return Database Triggers",
"AUTHENTICATION": "Return Authentication Triggers",
"SCHEDULED": "Return Scheduled Triggers",
"SYNCTRANSLATOR": "Return Device Sync translators"
}
}
}
],
"get": {
"tags": [
"event-subscriptions"
],
"operationId": "adminListEventSubscriptions",
"summary": "List Event Subscriptions",
"description": "Get all event subscriptions.",
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json": {
"schema": {
"type": "array",
"description": "A list of all event subscriptions for the app. To see\nDevice Sync translator subscriptions, call this\nendpoint with the query parameter\n`?type=SYNCTRANSLATOR`.",
"items": {
"$ref": "#/components/schemas/EventSubscription"
}
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/event_subscriptions/{eventSubscriptionId}": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/EventSubscriptionId"
}
],
"get": {
"tags": [
"event-subscriptions"
],
"operationId": "adminGetEventSubscription",
"summary": "Get an Event Subscription",
"description": "Return information about an event subscription.",
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EventSubscription"
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/event_subscriptions/{eventSubscriptionId}/execution": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/EventSubscriptionId"
}
],
"get": {
"tags": [
"event-subscriptions"
],
"operationId": "adminGetLatestEventSubscriptionExecution",
"summary": "Get the Latest Event Subscription Execution",
"description": "Return information about the most recent execution of an event subscription.",
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "object"
},
"resource_id": {
"type": "object"
},
"completed_at": {
"type": "object",
"description": "The last time a batch was processed from the event stream.\n\nThe value of `completed_at` should be relatively\nclose to the current time. If `completed_at` is\nnot updating over time, it might mean that the\nevent processor (e.g. Device Sync) is down or\nstuck."
},
"cluster_time": {
"type": "object",
"description": "The time of the latest event in the most recently processed batch.\n\nIf the value of `cluster_time` is significantly\nearlier than the `completed_at` time, the event\nprocessor (e.g. Device Sync) is lagging behind the event ."
}
}
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/triggers": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
],
"get": {
"tags": [
"triggers"
],
"operationId": "adminListTriggers",
"summary": "Get all triggers",
"description": "Get a list of all [triggers](https://www.mongodb.com/docs/atlas/app-services/triggers/overview/) in your application.",
"responses": {
"200": {
"description": "Successfully listed triggers.",
"content": {
"application/json": {
"schema": {
"type": "array",
"description": "A list of all database, authentication, and scheduled triggers defined for the app.",
"items": {
"$ref": "#/components/schemas/AnyTrigger"
}
}
}
}
}
}
},
"post": {
"tags": [
"triggers"
],
"operationId": "adminCreateTrigger",
"summary": "Create a trigger",
"description": "Create a new [trigger](https://www.mongodb.com/docs/atlas/app-services/triggers/overview/) in your application.",
"requestBody": {
"description": "A configuration for a database, scheduled, or authentication trigger.",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Trigger"
}
}
}
},
"responses": {
"201": {
"description": "Successfully created.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Trigger"
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/triggers/{triggerId}": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/TriggerId"
}
],
"get": {
"tags": [
"triggers"
],
"operationId": "adminGetTrigger",
"summary": "Get a trigger",
"description": "Get the configuration for an existing [trigger](https://www.mongodb.com/docs/atlas/app-services/triggers/overview/) in your application.",
"responses": {
"200": {
"description": "Successfully retrieved trigger.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Trigger"
}
}
}
}
}
},
"put": {
"tags": [
"triggers"
],
"operationId": "adminUpdateTrigger",
"summary": "Update a trigger",
"description": "Modify an existing [trigger](https://www.mongodb.com/docs/atlas/app-services/triggers/overview/) in your application.",
"requestBody": {
"description": "The updated trigger configuration.",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Trigger"
}
}
}
},
"responses": {
"204": {
"description": "Successfully updated the trigger."
},
"409": {
"description": "Encountered an error while updating the trigger.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"delete": {
"tags": [
"triggers"
],
"operationId": "adminDeleteTrigger",
"summary": "Delete a trigger",
"description": "Remove an existing [trigger](https://www.mongodb.com/docs/atlas/app-services/triggers/overview/) from your application.",
"responses": {
"200": {
"description": "Successfully deleted the trigger.",
"content": {
"application/json": {
"schema": {
"properties": {}
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/triggers/{triggerId}/resume": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/TriggerId"
}
],
"put": {
"tags": [
"triggers"
],
"operationId": "adminResumeTrigger",
"summary": "Resume a suspended trigger",
"description": "Resume a [suspended](https://www.mongodb.com/docs/atlas/app-services/triggers/database-triggers/#suspended-triggers) database trigger.",
"requestBody": {
"description": "Configuration options for the resume operation.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"disable_token": {
"type": "boolean",
"description": "If `true`, resumes the trigger without\nprocessing missed events. Otherwise, attempts to resume the \ntrigger from the first change event after it failed by using \na resume token."
}
}
}
}
}
},
"responses": {
"204": {
"description": "Successfully resumed the trigger."
},
"404": {
"description": "Trigger not found.",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"type": "string",
"description": "A description of the error that App Services encountered."
}
}
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/values": {
"get": {
"tags": [
"values"
],
"operationId": "adminListValues",
"description": "List all [values](https://www.mongodb.com/docs/realm/values-and-secrets)\ndefined in an application.",
"summary": "List all values defined in an application.",
"responses": {
"200": {
"description": "[values](https://www.mongodb.com/docs/realm/values-and-secrets) were\nsuccessfully enumerated.",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/ValueSummary"
}
}
}
}
}
}
},
"post": {
"tags": [
"values"
],
"operationId": "adminCreateValue",
"summary": "Define a Value in an application",
"description": "Define a [Value](https://www.mongodb.com/docs/realm/values-and-secrets) in\nan application.",
"requestBody": {
"description": "The value to create.",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NewValue"
}
}
}
},
"responses": {
"201": {
"description": "The [value](https://www.mongodb.com/docs/realm/values-and-secrets) was\nsuccessfully defined.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NewValue"
}
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
]
},
"/groups/{groupId}/apps/{appId}/values/{valueId}": {
"get": {
"tags": [
"values"
],
"operationId": "adminGetValue",
"summary": "Retrieve a value definition from an application",
"description": "Retrieve a [value](https://www.mongodb.com/docs/realm/values-and-secrets)\ndefinition from an application.",
"responses": {
"200": {
"description": "Successfully retrieved the value.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Value"
}
}
}
}
}
},
"delete": {
"tags": [
"values"
],
"operationId": "adminDeleteValue",
"summary": "Delete a value defined in an application.",
"description": "Delete a [value](https://www.mongodb.com/docs/realm/values-and-secrets)\ndefined in an application.",
"responses": {
"204": {
"description": "Successfully deleted the value."
}
}
},
"put": {
"tags": [
"values"
],
"operationId": "adminUpdateValue",
"summary": "Update a value definition in an application",
"description": "Update a [value](https://www.mongodb.com/docs/realm/values-and-secrets)\ndefinition in an application.",
"responses": {
"200": {
"description": "Successfully updated the value.",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/NewValue"
}
}
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/ValueId"
}
]
},
"/groups/{groupId}/apps/{appId}/services": {
"get": {
"tags": [
"services"
],
"operationId": "adminListServices",
"summary": "List all data sources and third-party services",
"description": "List all [data sources](https://www.mongodb.com/docs/atlas/app-services/mongodb/) and [third-party\nservices [Deprecated]](https://www.mongodb.com/docs/atlas/app-services/reference/services/).",
"responses": {
"200": {
"description": "Successfully listed services.",
"content": {
"application/json": {
"schema": {
"items": [
{
"$ref": "#/components/schemas/ServiceResponse"
}
]
}
}
}
}
}
},
"post": {
"tags": [
"services"
],
"operationId": "adminCreateService",
"summary": "Create a data source or third-party service",
"description": "Create a [data source](https://www.mongodb.com/docs/atlas/app-services/mongodb/) or [third-party\nservice [Deprecated]](https://www.mongodb.com/docs/atlas/app-services/reference/services/).",
"requestBody": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/AtlasCluster"
},
{
"$ref": "#/components/schemas/AtlasFederatedInstance"
},
{
"$ref": "#/components/schemas/ThirdPartyService"
}
]
}
}
}
},
"responses": {
"201": {
"description": "Successfully created.",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/AtlasCluster"
},
{
"$ref": "#/components/schemas/AtlasFederatedInstance"
},
{
"$ref": "#/components/schemas/ThirdPartyService"
}
]
}
}
}
},
"409": {
"description": "There is already a service with the given `name`."
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
]
},
"/groups/{groupId}/apps/{appId}/services/config": {
"get": {
"tags": [
"services"
],
"operationId": "adminGetServiceConfig",
"summary": "Get configuration of sources and third-party services",
"description": "Get configuration of [data sources](https://www.mongodb.com/docs/atlas/app-services/mongodb/) and [third-party services [Deprecated]](https://www.mongodb.com/docs/atlas/app-services/reference/services/).",
"responses": {
"200": {
"description": "Successfully returned service configuration.",
"content": {
"application/json": {
"schema": {
"items": {
"anyOf": [
{
"$ref": "#/components/schemas/AtlasCluster"
},
{
"$ref": "#/components/schemas/AtlasFederatedInstance"
},
{
"$ref": "#/components/schemas/ThirdPartyService"
}
]
}
}
}
}
}
}
},
"patch": {
"tags": [
"services"
],
"operationId": "adminUpdateServiceConfig",
"summary": "Update configuration settings of sources and third-party services",
"description": "Update the [data source](https://www.mongodb.com/docs/atlas/app-services/mongodb/) or [third-party service [Deprecated]](https://www.mongodb.com/docs/atlas/app-services/reference/services/) configuration.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/CreateDataSource"
},
{
"$ref": "#/components/schemas/AtlasFederatedInstance"
},
{
"$ref": "#/components/schemas/ThirdPartyService"
}
]
}
}
}
},
"responses": {
"204": {
"description": "Successfully updated."
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
]
},
"/groups/{groupId}/apps/{appId}/services/{serviceId}": {
"get": {
"tags": [
"services"
],
"operationId": "adminGetService",
"summary": "Get a data source or third-party service",
"description": "Get a [data source](https://www.mongodb.com/docs/atlas/app-services/mongodb/) or [third-party service [Deprecated]](https://www.mongodb.com/docs/atlas/app-services/reference/services/).",
"responses": {
"200": {
"description": "Successfully retrieved.",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/AtlasCluster"
},
{
"$ref": "#/components/schemas/AtlasFederatedInstance"
},
{
"$ref": "#/components/schemas/ThirdPartyService"
}
]
}
}
}
}
}
},
"delete": {
"tags": [
"services"
],
"operationId": "adminDeleteService",
"summary": "Delete a data source or third-party service",
"description": "Delete a [data source](https://www.mongodb.com/docs/atlas/app-services/mongodb/)\nor [third-party service [Deprecated]](https://www.mongodb.com/docs/atlas/app-services/reference/services/).",
"responses": {
"204": {
"description": "Successfully deleted."
}
}
},
"patch": {
"tags": [
"services"
],
"operationId": "adminUpdateService",
"summary": "Update a service",
"description": "Update a [service](https://www.mongodb.com/docs/realm/services#std-label-services).",
"responses": {
"200": {
"description": "Successfully updated."
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/ServiceId"
}
]
},
"/groups/{groupId}/apps/{appId}/services/{datasourceId}/commands/validate_documents": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/DatasourceId"
}
],
"post": {
"tags": [
"schemas"
],
"operationId": "adminValidateDocuments",
"summary": "Sample & Validate Documents",
"description": "Query a subset of documents in a collection and validate each match against a schema.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"database_name",
"collection_name",
"from_schema"
],
"properties": {
"database_name": {
"type": "string",
"description": "The name of the database that contains the collection to validate."
},
"collection_name": {
"type": "string",
"description": "The name of the collection to validate."
},
"from_schema": {
"type": "object",
"description": "The EJSON schema to validate sampled documents against."
},
"query": {
"type": "object",
"default": {},
"description": "A [MongoDB query](https://www.mongodb.com/docs/manual/tutorial/query-documents/)\nthat matches documents in the collection. The result of running this query is the\nsample population. Use this to narrow the sample to a subset of documents in the\ncollection."
},
"limit": {
"type": "number",
"default": 10000,
"description": "The maximum number of documents to sample."
},
"sort": {
"type": "object",
"default": {},
"description": "A [MongoDB sort](https://www.mongodb.com/docs/manual/reference/method/cursor.sort/) for the collection.\nUse this to determine which end of a range query to start sampling from."
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"error_code": {
"$ref": "#/components/schemas/ValidationError",
"description": "The type of the schema validation error."
},
"error_count": {
"type": "number",
"description": "The number of sampled documents that failed this validation."
},
"field": {
"type": "string",
"description": "The path of the field that failed this validation.",
"examples": [
"(root)._id",
"(root).name"
]
},
"failed_ids": {
"type": "array",
"description": "A list of the `_id` values for sampled documents that failed this validation.",
"items": {
"type": "string"
}
},
"failed_documents_query": {
"type": "object",
"description": "A MongoDB query filter that matches sampled documents that failed this validation."
}
}
}
},
"total_processed_count": {
"type": "number",
"description": "The total number of documents that were sampled."
},
"total_error_count": {
"type": "number",
"description": "The total number of documents that failed any validation."
}
}
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/services/{serviceId}/commands/{commandName}": {
"post": {
"tags": [
"services"
],
"operationId": "adminRunCommand",
"summary": "Run a command associated with a service",
"description": "Run a command associated with a\n[service](https://www.mongodb.com/docs/realm/services#std-label-services).",
"responses": {
"200": {
"description": "Successfully executed."
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/ServiceId"
},
{
"$ref": "#/components/parameters/CommandName"
}
]
},
"/groups/{groupId}/apps/{appId}/services/{serviceId}/commands/build_info": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/ServiceId"
}
],
"get": {
"tags": [
"services"
],
"operationId": "getBuildInfo",
"summary": "Get information about the underlying Atlas mongod",
"responses": {
"200": {
"description": "The build information was successfully retrieved.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BuildInfo"
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/services/{serviceId}/config": {
"get": {
"tags": [
"services"
],
"operationId": "adminGetServiceConfig",
"summary": "Retrieve a service's configuration",
"description": "Retrieve a [service's](https://www.mongodb.com/docs/realm/services#std-label-services)\nconfiguration.",
"responses": {
"200": {
"description": "Successfully retrieved."
}
}
},
"patch": {
"tags": [
"services"
],
"operationId": "adminUpdateServiceConfig",
"summary": "Update a service's configuration",
"description": "Update a [service's](https://www.mongodb.com/docs/realm/services#std-label-services) configuration.",
"responses": {
"200": {
"description": "Successfully updated."
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/ServiceId"
}
]
},
"/groups/{groupId}/apps/{appId}/services/{serviceId}/rules": {
"get": {
"tags": [
"rules"
],
"operationId": "adminListRules",
"summary": "Get all rules",
"description": "List all [data access rules](https://www.mongodb.com/docs/atlas/app-services/rules).",
"responses": {
"200": {
"description": "Successfully listed.",
"content": {
"application/json": {
"schema": {
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/Rule"
},
{
"$ref": "#/components/schemas/ThirdPartyServiceRule"
}
]
}
}
}
}
}
}
},
"post": {
"tags": [
"rules"
],
"operationId": "adminCreateRule",
"summary": "Create a rule",
"description": "Create a [data access rule](https://www.mongodb.com/docs/atlas/app-services/rules).",
"requestBody": {
"required": true,
"description": "The rule to create.",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/Rule"
},
{
"$ref": "#/components/schemas/ThirdPartyServiceRule"
}
]
}
}
}
},
"responses": {
"201": {
"description": "Successfully created.",
"content": {
"application/json": {
"schema": {
"properties": {
"_id": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}
}
},
"409": {
"description": "There is already a rule with the given `name`."
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/ServiceId"
}
]
},
"/groups/{groupId}/apps/{appId}/services/{serviceId}/rules/{ruleId}": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/ServiceId"
},
{
"$ref": "#/components/parameters/RuleId"
}
],
"get": {
"tags": [
"rules"
],
"operationId": "adminGetRule",
"summary": "Get a rule",
"description": "Get a specific [data access rule](https://www.mongodb.com/docs/atlas/app-services/rules).",
"responses": {
"200": {
"description": "Successfully retrieved.",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/Rule"
},
{
"$ref": "#/components/schemas/ThirdPartyServiceRule"
}
]
}
}
}
}
}
},
"delete": {
"tags": [
"rules"
],
"operationId": "adminDeleteRule",
"summary": "Delete a rule",
"description": "Delete a [data access rule](https://www.mongodb.com/docs/atlas/app-services/rules).",
"responses": {
"204": {
"description": "Successfully deleted."
}
}
},
"put": {
"tags": [
"rules"
],
"operationId": "adminUpdateRule",
"summary": "Update a rule",
"description": "Update a [data access rule](https://www.mongodb.com/docs/atlas/app-services/rules).",
"requestBody": {
"required": true,
"description": "The new state of the rule.",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/Rule"
},
{
"$ref": "#/components/schemas/ThirdPartyServiceRule"
}
]
}
}
}
},
"responses": {
"200": {
"description": "Successfully updated."
}
}
}
},
"/groups/{groupId}/apps/{appId}/services/{serviceId}/default_rule": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/ServiceId"
}
],
"get": {
"tags": [
"rules"
],
"operationId": "adminGetDefaultRule",
"summary": "Get default roles and filters",
"description": "Get the current [default roles and filters](https://www.mongodb.com/docs/atlas/app-services/rules/#default-rules).",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DefaultRule"
}
}
}
},
"404": {
"description": "No default rule is defined.",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/BasicError"
},
{
"properties": {
"error": {
"enum": [
"default rule does not exist on service"
]
}
}
}
]
}
}
}
}
}
},
"post": {
"tags": [
"rules"
],
"operationId": "adminCreateDefaultRule",
"summary": "Create default roles and filters",
"description": "Create [default roles and filters](https://www.mongodb.com/docs/atlas/app-services/rules/#default-rules) for a data source.",
"requestBody": {
"required": true,
"description": "A default rule configuration object.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DefaultRule"
}
}
}
},
"responses": {
"201": {
"description": "Created default rule.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DefaultRule"
}
}
}
},
"400": {
"description": "Default rule already exists.",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/BasicError"
},
{
"properties": {
"error": {
"enum": [
"default rule already exists"
]
}
}
}
]
}
}
}
}
}
},
"put": {
"tags": [
"rules"
],
"operationId": "adminUpdateDefaultRule",
"summary": "Update default roles and filters",
"description": "Modify the [default roles and filters](https://www.mongodb.com/docs/atlas/app-services/rules/#default-rules) of a data source.",
"requestBody": {
"required": true,
"description": "The updated default rule configuration object.",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/DefaultRule"
},
{
"required": [
"_id"
]
}
]
}
}
}
},
"responses": {
"204": {
"description": "Successfully modified the default rule."
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/BasicError"
},
{
"properties": {
"error": {
"enum": [
"default rule does not exist",
"service default rule id mismatch"
]
}
}
}
]
}
}
}
}
}
},
"delete": {
"tags": [
"rules"
],
"operationId": "adminDeleteDefaultRule",
"summary": "Delete default roles and filters",
"description": "Delete the [default roles and filters](https://www.mongodb.com/docs/atlas/app-services/rules/#default-rules) of a data source.",
"responses": {
"204": {
"description": "Deleted the default rule."
},
"404": {
"description": "Default rule does not exist.",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/BasicError"
},
{
"properties": {
"error": {
"enum": [
"default rule does not exist for app service"
]
}
}
}
]
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/services/{serviceId}/commands/generate_schema": {
"post": {
"tags": [
"services"
],
"operationId": "adminGenerateSchema",
"summary": "Generate a JSON schema from sample",
"description": "Sample a subset of documents in a collection to generate a JSON schema.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"database_name",
"collection_name",
"limit"
],
"properties": {
"database_name": {
"type": "string",
"description": "The name of the database that contains the collection."
},
"collection_name": {
"type": "string",
"description": "The name of the collection to sample and generate a schema for."
},
"limit": {
"type": "integer",
"description": "The maximum number of documents to include in the sample."
}
}
}
}
}
},
"responses": {
"200": {
"description": "Successfully generated schema",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"schema": {
"type": "object",
"description": "The generated JSON schema"
}
}
}
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/ServiceId"
}
]
},
"/groups/{groupId}/apps/{appId}/services/{serviceId}/incoming_webhooks": {
"get": {
"tags": [
"webhooks"
],
"operationId": "adminListWebhooks",
"summary": "List webhooks",
"description": "List [webhooks](https://www.mongodb.com/docs/realm/services#std-label-service-webhooks).",
"responses": {
"200": {
"description": "Successfully listed incoming webhooks.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/IncomingWebhook"
}
}
}
}
}
},
"post": {
"tags": [
"webhooks"
],
"operationId": "adminCreateWebhook",
"summary": "Create a webhook",
"description": "Create a [webhook](https://www.mongodb.com/docs/realm/services#std-label-service-webhooks).",
"requestBody": {
"description": "The webhook to create.",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/IncomingWebhook"
}
}
}
},
"responses": {
"201": {
"description": "Successfully created."
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/ServiceId"
}
]
},
"/groups/{groupId}/apps/{appId}/services/{serviceId}/incoming_webhooks/{incomingWebhookId}": {
"get": {
"tags": [
"webhooks"
],
"operationId": "adminGetWebhook",
"summary": "Retrieve a webhook",
"description": "Retrieve a [webhook](https://www.mongodb.com/docs/realm/services#std-label-service-webhooks).",
"responses": {
"200": {
"description": "Successfully retrieved."
}
}
},
"delete": {
"tags": [
"webhooks"
],
"operationId": "adminDeleteWebhook",
"summary": "Delete a webhook",
"description": "Delete a [webhook](https://www.mongodb.com/docs/realm/services#std-label-service-webhooks).",
"responses": {
"204": {
"description": "Successfully deleted."
}
}
},
"put": {
"tags": [
"webhooks"
],
"operationId": "adminUpdateWebhook",
"summary": "Update a webhook",
"description": "Update a [webhook](https://www.mongodb.com/docs/realm/services#std-label-service-webhooks).",
"requestBody": {
"required": true,
"description": "The updated state of the webhook.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/IncomingWebhook"
}
}
}
},
"responses": {
"200": {
"description": "Successfully updated."
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/ServiceId"
},
{
"$ref": "#/components/parameters/IncomingWebhookId"
}
]
},
"/groups/{groupId}/apps/{appId}/service/{serviceId}/config": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/ServiceId"
}
],
"get": {
"tags": [
"sync"
],
"operationId": "adminGetFlexSync",
"summary": "Get Flexible Sync information",
"description": "Retrieve sync data for a specific Atlas App Services App when using \n[Flexible Sync](https://www.mongodb.com/docs/atlas/app-services/sync/get-started/).",
"responses": {
"200": {
"description": "Successfully retrieved.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SyncDataResponse"
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/sync/data": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
],
"get": {
"tags": [
"sync"
],
"operationId": "adminGetSync",
"summary": "Get Partition-Based Sync information",
"description": "Retrieve partition field data when using \n[Partition-Based Sync](https://www.mongodb.com/docs/realm/reference/partition-based-sync/).",
"responses": {
"200": {
"description": "Successfully retrieved.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PbsSyncResponse"
}
}
}
}
},
"parameters": [
{
"in": "query",
"name": "service_id",
"required": true,
"schema": {
"type": "string"
},
"description": "The Service ID for the linked cluster."
}
]
}
},
"/groups/{groupId}/apps/{appId}/push/notifications": {
"get": {
"tags": [
"notifications"
],
"operationId": "adminListNotifications",
"summary": "List push notifications",
"description": "List [push notifications](https://www.mongodb.com/docs/realm/push-notifications#std-label-push-notifications).",
"parameters": [
{
"name": "state",
"in": "query",
"description": "Only list notifications with the given state.",
"required": false,
"schema": {
"$ref": "#/components/schemas/MessageState"
}
}
],
"responses": {
"200": {
"description": "Successfully listed.",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/Message"
}
}
}
}
}
}
},
"post": {
"tags": [
"notifications"
],
"operationId": "adminCreateNotification",
"summary": "Create a push notification",
"description": "Create a [push\nnotification](https://www.mongodb.com/docs/realm/push-notifications#std-label-push-notifications).",
"requestBody": {
"required": true,
"description": "The notification to create.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NewMessage"
}
}
}
},
"responses": {
"201": {
"description": "Successfully created."
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
]
},
"/groups/{groupId}/apps/{appId}/push/notifications/{messageId}": {
"get": {
"tags": [
"notifications"
],
"operationId": "adminGetMessage",
"summary": "Retrieve a push notification message",
"description": "Retrieve a [push\nnotification](https://www.mongodb.com/docs/realm/push-notifications#std-label-push-notifications)\nmessage.",
"responses": {
"200": {
"description": "Successfully retrieved.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Message"
}
}
}
}
}
},
"delete": {
"tags": [
"notifications"
],
"operationId": "adminDeleteMessage",
"summary": "Delete a push notification message",
"description": "Delete a [push\nnotification](https://www.mongodb.com/docs/realm/push-notifications#std-label-push-notifications)\nmessage.",
"responses": {
"204": {
"description": "Successfully deleted."
}
}
},
"put": {
"tags": [
"notifications"
],
"operationId": "adminUpdateMessage",
"summary": "Update a push notification",
"description": "Update a [push\nnotification](https://www.mongodb.com/docs/realm/push-notifications#std-label-push-notifications)\nmessage.",
"responses": {
"200": {
"description": "Successfully updated.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Message"
}
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/MessageId"
}
]
},
"/groups/{groupId}/apps/{appId}/push/notifications/{messageId}/type": {
"put": {
"tags": [
"notifications"
],
"operationId": "adminSetMessageType",
"summary": "Set a push notification's type",
"description": "Set a [push\nnotification's](https://www.mongodb.com/docs/realm/push-notifications#std-label-push-notifications)\ntype.",
"responses": {
"200": {
"description": "Successfully set."
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/MessageId"
}
]
},
"/groups/{groupId}/apps/{appId}/push/notifications/{messageId}/send": {
"post": {
"tags": [
"notifications"
],
"operationId": "adminSendMessage",
"summary": "Send a push notification",
"description": "Send a [push\nnotification](https://www.mongodb.com/docs/realm/push-notifications#std-label-push-notifications).",
"responses": {
"200": {
"description": "Successfully sent."
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/MessageId"
}
]
},
"/groups/{groupId}/apps/{appId}/users": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
],
"get": {
"tags": [
"users"
],
"operationId": "adminListUsers",
"summary": "List users",
"description": "List confirmed [user accounts](https://www.mongodb.com/docs/atlas/app-services/authentication#std-label-user-accounts).",
"parameters": [
{
"$ref": "#/components/parameters/UsersAfter"
},
{
"$ref": "#/components/parameters/UsersSort"
},
{
"$ref": "#/components/parameters/UsersDesc"
}
],
"responses": {
"200": {
"description": "Successfully listed.",
"content": {
"application/json": {
"schema": {
"type": "array",
"maxItems": 50,
"description": "At most 50 results per request.",
"items": {
"$ref": "#/components/schemas/User"
}
}
}
}
}
}
},
"post": {
"tags": [
"users"
],
"operationId": "adminCreateUser",
"summary": "Create a user",
"description": "Create a new\n[email/password](https://www.mongodb.com/docs/atlas/app-services/authentication/email-password/)\nuser account.\n\n*Note:* You cannot create user accounts through the Admin API\nfor any authentication provider other than email/password.",
"requestBody": {
"required": true,
"description": "The user to create",
"content": {
"application/json": {
"schema": {
"properties": {
"email": {
"type": "string"
},
"password": {
"type": "string"
}
},
"required": [
"email",
"password"
]
}
}
}
},
"responses": {
"201": {
"description": "Successfully created.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/users/verify_token": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
],
"post": {
"tags": [
"users"
],
"operationId": "adminVerifyUserAccessToken",
"summary": "Verify & decode an access token",
"description": "Verify a that a user's client access token is valid.",
"requestBody": {
"required": true,
"description": "The user's client access token. The access token represents a logged in application user. This is not the same as the\n[``access_token``](https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#section/Get-Authentication-Tokens)\nthat you use to work with the Admin API.",
"content": {
"application/json": {
"schema": {
"properties": {
"token": {
"type": "string"
}
},
"required": [
"token"
]
}
}
}
},
"responses": {
"200": {
"description": "Token is valid or expired.",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "string",
"const": "token expired",
"description": "The token is valid but has expired."
},
{
"type": "object",
"description": "The token is valid and is not expired.",
"properties": {
"sub": {
"type": "string",
"description": "User ID."
},
"aud": {
"type": "string",
"description": "Specifies which Resource Servers the JWT is valid for. Omitted\nif empty."
},
"exp": {
"type": "integer",
"description": "The Unix timestamp when the JWT expires."
},
"iat": {
"type": "integer",
"description": "The Unix timestamp when the JWT was issued."
},
"iss": {
"type": "string",
"description": "The issuer of the JWT."
},
"custom_user_data": {
"type": "object",
"description": "Contains [custom user\ndata](https://www.mongodb.com/docs/realm/users/enable-custom-user-data#std-label-custom-user-data)\nif it exists for the user. Only present if the access token is created\nafter custom user data is enabled and configured. Omitted if empty."
},
"domain_id": {
"type": "string"
},
"data": {
"type": "string",
"description": "Optional: any metadata stored with the token. Omitted if empty."
},
"device_id": {
"type": "string"
}
}
}
]
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Invalid Session",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Error"
},
{
"properties": {
"error": {
"const": "invalid session"
},
"error_code": {
"const": "InvalidSession"
}
}
}
]
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/users/{userId}": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/UserId"
}
],
"get": {
"tags": [
"users"
],
"operationId": "adminGetUser",
"summary": "Get a User",
"description": "Get a specific [user account](https://www.mongodb.com/docs/realm/authentication#std-label-user-accounts) by ID.",
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
}
}
}
},
"delete": {
"tags": [
"users"
],
"operationId": "adminDeleteUser",
"summary": "Delete a user",
"description": "Delete a specific [user account](https://www.mongodb.com/docs/realm/authentication#std-label-user-accounts) by ID.",
"responses": {
"204": {
"description": "Deleted"
}
}
}
},
"/groups/{groupId}/apps/{appId}/users/{userId}/reset_email": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/UserId"
}
],
"patch": {
"tags": [
"users"
],
"operationId": "adminResetUserEmail",
"summary": "Change a user's email",
"description": "Change the email address for an [email/password user](https://www.mongodb.com/docs/atlas/app-services/authentication/email-password/) by ID.",
"requestBody": {
"required": true,
"description": "The new email address for the user.",
"content": {
"application/json": {
"schema": {
"properties": {
"email": {
"type": "string",
"description": "The new email for the user."
}
},
"required": [
"email"
]
},
"example": {
"email": "new_email@example.com"
}
}
}
},
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "- Payload is formatted incorrectly.\n- The email in the payload is not a string.\n- The email in payload has 0 or greater than 128 characters.\n- The user does not have a local-userpass identity."
},
"404": {
"description": "The appId, groupId, or userId is invalid."
}
}
}
},
"/groups/{groupId}/apps/{appId}/users/{userId}/devices": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/UserId"
}
],
"get": {
"tags": [
"users"
],
"operationId": "adminListDevices",
"summary": "List a user's devices",
"responses": {
"200": {
"description": "Successfully listed.",
"content": {
"application/json": {
"schema": {
"items": {
"type": "object"
}
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/users/{userId}/logout": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/UserId"
}
],
"put": {
"tags": [
"users"
],
"operationId": "adminUserLogout",
"summary": "Revoke user sessions",
"description": "Revoke all of a [user](https://www.mongodb.com/docs/realm/authentication#std-label-user-accounts)'s\nsessions.",
"responses": {
"204": {
"description": "Successfully revoked."
}
}
}
},
"/groups/{groupId}/apps/{appId}/users/{userId}/enable": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/UserId"
}
],
"put": {
"tags": [
"users"
],
"operationId": "adminEnableUser",
"summary": "Enable a user",
"description": "Enable a [user](https://www.mongodb.com/docs/realm/authentication#std-label-user-accounts).",
"responses": {
"204": {
"description": "Successfully enabled."
}
}
}
},
"/groups/{groupId}/apps/{appId}/users/{userId}/disable": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/UserId"
}
],
"put": {
"tags": [
"users"
],
"operationId": "adminDisableUser",
"summary": "Disable a user",
"description": "Disable a [user](https://www.mongodb.com/docs/realm/authentication#std-label-user-accounts).",
"responses": {
"204": {
"description": "Successfully disabled."
}
}
}
},
"/groups/{groupId}/apps/{appId}/user_registrations/pending_users": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"in": "query",
"name": "after",
"required": false,
"schema": {
"type": "string"
},
"description": "The unique ``_id`` for a pending user. ``List pending users`` can return 50\npending users at a time. To view additional results, find the ``_id`` of the\nlast pending user listed in the previous call to ``list pending users``. Call\n``list pending users`` again, passing the ``_id`` to the after parameter."
}
],
"get": {
"tags": [
"users"
],
"operationId": "adminListPendingUsers",
"summary": "List pending users",
"description": "List pending user account registrations. Returns up to 50 pending users in a call.",
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"required": [
"_id",
"domain_id",
"login_ids"
],
"properties": {
"_id": {
"type": "string",
"description": "The unique pending user account ID"
},
"user_id": {
"type": "string"
},
"domain_id": {
"type": "string"
},
"login_ids": {
"type": "array",
"description": "A list of identities associated with the pending user",
"items": {
"required": [
"id_type",
"id"
],
"properties": {
"id_type": {
"type": "string",
"enum": [
"email"
]
},
"id": {
"type": "string",
"description": "The pending user's username. For example, this is an email/password user's email address."
}
}
}
}
}
},
"example": [
{
"_id": "63754f968a605a78ea6939e7",
"domain_id": "60c8f69864c0a72d14bb534c",
"login_ids": [
{
"id_type": "email",
"id": "someone@example.com"
}
],
"user_id": ""
},
{
"_id": "63754fd83c001970b1e5ea66",
"domain_id": "60c8f69864c0a73e3e11c22b",
"login_ids": [
{
"id_type": "email",
"id": "joe@example.com"
}
],
"user_id": ""
}
]
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/user_registrations/by_email/{email}": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/Email"
}
],
"delete": {
"tags": [
"users"
],
"operationId": "adminDeletePendingEmailPasswordUser",
"summary": "Delete a pending email/password authentication user",
"description": "Delete a pending [user](https://www.mongodb.com/docs/realm/authentication#std-label-user-accounts).",
"responses": {
"204": {
"description": "Successfully deleted."
}
}
}
},
"/groups/{groupId}/apps/{appId}/user_registrations/by_email/{email}/send_confirm": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/Email"
}
],
"post": {
"tags": [
"email"
],
"operationId": "adminSendConfirmationEmail",
"summary": "Send a confirmation email",
"description": "Send a [confirmation\nemail](https://www.mongodb.com/docs/realm/authentication/email-password/).",
"responses": {
"200": {
"description": "Successfully sent."
}
}
}
},
"/groups/{groupId}/apps/{appId}/user_registrations/by_email/{email}/confirm": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/Email"
}
],
"post": {
"tags": [
"email"
],
"operationId": "adminConfirmPendingUser",
"summary": "Confirm a pending user",
"description": "Confirm a pending [user](https://www.mongodb.com/docs/realm/authentication#std-label-user-accounts).",
"responses": {
"204": {
"description": "Successfully confirmed."
}
}
}
},
"/groups/{groupId}/apps/{appId}/user_registrations/by_email/{email}/run_confirm": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/Email"
}
],
"post": {
"tags": [
"email"
],
"operationId": "adminRerunPendingUserConfirmation",
"summary": "Rerun a user confirmation workflow",
"description": "Reruns a pending user's [confirmation workflow](https://www.mongodb.com/docs/realm/authentication#std-label-user-accounts).",
"responses": {
"202": {
"description": "Successfully re-ran confirmation workflow."
},
"400": {
"description": "User is already confirmed or Email/Password authentication is not\nenabled."
},
"404": {
"description": "User does not exist."
}
}
}
},
"/groups/{groupId}/apps/{appId}/debug/execute_function": {
"post": {
"tags": [
"functions"
],
"operationId": "adminExecuteFunction",
"summary": "Execute a function",
"description": "Execute a [function](https://www.mongodb.com/docs/realm/functions#std-label-functions) for testing.",
"parameters": [
{
"name": "user_id",
"in": "query",
"description": "The user as which to execute the function. Either `user_id` or\n`run_as_system` is required. You cannot specify both.",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "run_as_system",
"in": "query",
"description": "Determine whether or not to run as system user. Either `run_as_system`\nor `user_id` is required. You cannot specify both.",
"schema": {
"type": "boolean"
},
"required": true
}
],
"requestBody": {
"required": true,
"description": "The function to execute.",
"content": {
"application/json": {
"schema": {
"properties": {
"service": {
"type": "string",
"description": "The service to use when calling this function."
},
"name": {
"type": "string",
"description": "The name of the function you want to run."
},
"arguments": {
"type": "array",
"description": "Any arguments that your function needs.",
"items": {
"type": "string"
}
}
},
"required": [
"name"
]
}
}
}
},
"responses": {
"200": {
"description": "Successfully executed.",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"type": "object"
},
"logs": {},
"result": {
"type": "object"
},
"stats": {
"properties": {
"execution_time": {
"type": "string"
}
}
}
}
}
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
]
},
"/groups/{groupId}/apps/{appId}/debug/execute_function_source": {
"post": {
"tags": [
"functions"
],
"operationId": "adminExecuteFunctionSource",
"summary": "Execute a function's source code for testing",
"description": "Execute a [function](https://www.mongodb.com/docs/realm/functions#std-label-functions)'s source code\nfor testing.",
"parameters": [
{
"name": "user_id",
"in": "query",
"description": "The user as which to execute the function. Either `user_id` or\n`run_as_system` is required. You cannot specify both.",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "run_as_system",
"in": "query",
"description": "Determine whether or not to run as system user. Either `run_as_system`\nor `user_id` is required. You cannot specify both.",
"schema": {
"type": "boolean"
},
"required": true
}
],
"requestBody": {
"required": true,
"description": "The source to execute.",
"content": {
"application/json": {
"schema": {
"properties": {
"eval_source": {
"type": "string",
"description": "This JSON expression must evaluate to `true` before the function may\nrun. If this field is blank, it will evaluate to `true`."
},
"source": {
"type": "string"
}
},
"required": [
"source"
]
}
}
}
},
"responses": {
"200": {
"description": "Successfully executed.",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"type": "object"
},
"logs": {},
"result": {
"type": "object"
},
"stats": {
"properties": {
"execution_time": {
"type": "string"
}
}
}
}
}
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
]
},
"/groups/{groupId}/apps/{appId}/auth_providers": {
"get": {
"tags": [
"authproviders"
],
"operationId": "adminListAuthProviders",
"summary": "List authentication providers in a Atlas App Services App",
"description": "List [authentication providers](https://www.mongodb.com/docs/realm/authentication/)\nwithin a Atlas App Services App.",
"responses": {
"200": {
"description": "Successfully listed.",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/BaseAuthProvider"
}
}
}
}
}
}
},
"post": {
"tags": [
"authproviders"
],
"operationId": "adminCreateAuthProvider",
"summary": "Create an authentication provider",
"description": "Create an [authentication provider](https://www.mongodb.com/docs/realm/authentication/).",
"requestBody": {
"required": true,
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AuthProvider"
}
}
}
},
"responses": {
"201": {
"description": "Successfully created.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AuthProvider"
}
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
]
},
"/groups/{groupId}/apps/{appId}/auth_providers/{providerId}": {
"get": {
"tags": [
"authproviders"
],
"operationId": "adminGetAuthProvider",
"summary": "Retrieve information about authentication provider",
"description": "Retrieve information about one of an application's [authentication\nproviders](https://www.mongodb.com/docs/realm/authentication/).",
"responses": {
"200": {
"description": "Successfully retrieved.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AuthProvider"
}
}
}
}
}
},
"delete": {
"tags": [
"authproviders"
],
"operationId": "adminDeleteAuthProvider",
"summary": "Delete an authentication provider",
"description": "Delete an [authentication provider](https://www.mongodb.com/docs/realm/authentication/).",
"responses": {
"204": {
"description": "Successfully deleted."
}
}
},
"patch": {
"tags": [
"authproviders"
],
"operationId": "adminUpdateAuthProvider",
"summary": "Update an authentication provider",
"description": "Update an [authentication provider](https://www.mongodb.com/docs/realm/authentication/).",
"requestBody": {
"required": true,
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AuthProvider"
}
}
}
},
"responses": {
"204": {
"description": "Successfully updated."
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/ProviderId"
}
]
},
"/groups/{groupId}/apps/{appId}/auth_providers/{providerId}/disable": {
"put": {
"tags": [
"authproviders"
],
"operationId": "adminDisableAuthProvider",
"summary": "Disable an authentication provider",
"description": "Disable an [authentication provider](https://www.mongodb.com/docs/realm/authentication/).",
"responses": {
"204": {
"description": "Successfully disabled."
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/ProviderId"
}
]
},
"/groups/{groupId}/apps/{appId}/auth_providers/{providerId}/enable": {
"put": {
"tags": [
"authproviders"
],
"operationId": "adminEnableAuthProvider",
"summary": "Enable an authentication provider",
"description": "Enable an [authentication provider](https://www.mongodb.com/docs/realm/authentication/).",
"responses": {
"204": {
"description": "Successfully enabled."
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/ProviderId"
}
]
},
"/groups/{groupId}/apps/{appId}/security/allowed_request_origins": {
"get": {
"tags": [
"security"
],
"operationId": "adminListAllowedRequestOrigins",
"summary": "List allowed HTTP origins",
"description": "List the allowed [HTTP\norigins](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin)\nfrom which App Services should allow requests.",
"responses": {
"200": {
"description": "Successfully listed.",
"content": {
"application/json": {
"schema": {
"items": {
"type": "string"
}
}
}
}
}
}
},
"post": {
"tags": [
"security"
],
"operationId": "adminSetAllowedRequestOrigins",
"summary": "Set allowed HTTP origins",
"description": "Set the allowed [HTTP\norigins](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin)\nfrom which App Services should allow requests.",
"requestBody": {
"required": true,
"description": "A list of HTTP origins.",
"content": {
"application/json": {
"schema": {
"items": {
"description": "An HTTP origin. Must be of the form `<scheme>://<host>[:port]`.",
"type": "string"
}
}
}
}
},
"responses": {
"204": {
"description": "The allowed HTTP origins were successfully set."
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
]
},
"/groups/{groupId}/apps/{appId}/security/access_list": {
"get": {
"tags": [
"security"
],
"operationId": "allowedIPAccessListGet",
"summary": "List the allowed entries in the Access List",
"description": "List the allowed entries in the Access List of your Atlas App Services App.",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"items": {
"properties": {
"current_ip": {
"type": "string"
},
"allowed_ips": {
"type": "array",
"items": {
"type": "object",
"properties": {
"_id": {
"type": "string",
"format": "ObjectID",
"description": "ObjectID"
},
"address": {
"type": "string"
},
"ip": {
"type": "string",
"format": "net.IP",
"description": "net.IP"
},
"network": {
"type": "string",
"format": "net.IPNet",
"description": "net.IPNet"
},
"comment": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
],
"post": {
"tags": [
"security"
],
"operationId": "allowedIPAccessListCreate",
"summary": "Create an IP address or CIDR block in the Access List",
"description": "Create an IP address or CIDR block in the Access List for your App Services\napp.",
"requestBody": {
"description": "The IP Access List entry to create.",
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"address": {
"type": "string",
"description": "The value of the IP address or CIDR block."
},
"comment": {
"type": "string",
"description": "An optional comment included in the Access List entry."
}
},
"required": [
"address"
]
}
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"_id": {
"type": "string",
"format": "ObjectID",
"description": "ObjectID"
},
"address": {
"type": "string"
},
"ip": {
"type": "string",
"format": "net.IP",
"description": "net.IP"
},
"network": {
"type": "string",
"format": "net.IPNet",
"description": "net.IPNet"
},
"comment": {
"type": "string"
}
}
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/security/access_list/{ipId}": {
"patch": {
"tags": [
"security"
],
"operationId": "allowedIPAccessListUpdate",
"summary": "Modify an IP address or CIDR block in the Access List",
"description": "Modify an IP address or CIDR block in the Access List of your App Services\napp",
"requestBody": {
"description": "The updated value of the IP Access List entry.",
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"address": {
"type": "string",
"description": "The modified value of the IP address or CIDR block."
},
"comment": {
"type": "string",
"description": "An optional comment included in the Access List entry."
}
},
"required": [
"address"
]
}
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"_id": {
"type": "string",
"format": "ObjectID",
"description": "ObjectID"
},
"address": {
"type": "string"
},
"ip": {
"type": "string",
"format": "net.IP",
"description": "net.IP"
},
"network": {
"type": "string",
"format": "net.IPNet",
"description": "net.IPNet"
},
"comment": {
"type": "string"
}
}
}
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"name": "ipId",
"in": "path",
"description": "The IP address entry denoted by `ip_id` with the information given in\nthe request body",
"schema": {
"type": "string"
},
"required": true
}
],
"delete": {
"tags": [
"security"
],
"operationId": "allowedIPAccessListDelete",
"summary": "Delete an IP address or CIDR block from the Access List",
"description": "Delete an IP address or CIDR block from the Access List of your App Services\napp",
"responses": {
"204": {
"description": "Deleted"
},
"404": {
"description": "No IP addresses or CIDR blocks to delete"
}
}
}
},
"/groups/{groupId}/apps/{appId}/security/private_endpoints": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
],
"get": {
"operationId": "adminGetPrivateEndpoints",
"tags": [
"security"
],
"summary": "List VPC Private Endpoints",
"description": "Get a list of all private endpoints configured for the App.\n",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PrivateEndpoint"
}
}
}
}
},
"404": {
"description": "Not Found"
}
}
},
"post": {
"operationId": "adminCreatePrivateEndpoint",
"tags": [
"security"
],
"summary": "Create a VPC Private Endpoint",
"description": "Configure a new private endpoint for the App.\n",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PrivateEndpoint"
}
}
}
},
"responses": {
"201": {
"description": "Created"
},
"400": {
"description": "Bad Request"
}
}
}
},
"/groups/{groupId}/apps/{appId}/security/private_endpoints/{privateEndpointId}": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/PrivateEndpointId"
}
],
"get": {
"operationId": "adminGetPrivateEndpoint",
"tags": [
"security"
],
"summary": "Get a VPC Private Endpoint",
"description": "Get a specific private endpoint configuration.\n",
"responses": {
"200": {
"description": "Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PrivateEndpoint"
}
}
}
},
"404": {
"description": "Not Found"
}
}
},
"put": {
"operationId": "adminUpdatePrivateEndpoint",
"tags": [
"security"
],
"summary": "Modify a VPC Private Endpoint",
"description": "Update the configuration of a private endpoint.\n",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PrivateEndpoint"
}
}
}
},
"responses": {
"200": {
"description": "Updated",
"$ref": "#/components/schemas/PrivateEndpoint"
},
"404": {
"description": "Not Found"
}
}
},
"delete": {
"operationId": "adminDeletePrivateEndpoint",
"tags": [
"security"
],
"summary": "Delete a VPC Private Endpoint",
"description": "Delete a private endpoint.\n",
"responses": {
"204": {
"description": "Deleted"
},
"404": {
"description": "Not Found"
}
}
}
},
"/groups/{groupId}/apps/{appId}/security/private_endpoint_service_infos": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
],
"get": {
"operationId": "adminListPrivateEndpointServices",
"tags": [
"security"
],
"summary": "List VPC Private Endpoint Services",
"description": "Get a list of all private endpoint services configured for the App.\n",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PrivateEndpointServiceInfo"
}
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/security/allow_non_vpc_client_requests": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
],
"post": {
"operationId": "allowNonVpcClientRequests",
"tags": [
"security"
],
"summary": "Toggle Non-VPC Requests",
"description": "For Apps with Private Endpoints enabled, toggle whether or not the App processes requests that originate from outside of the VPC.\n",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"allow_non_vpc_client_requests": {
"type": "boolean",
"description": "Set to `true` to allow non-VPC requests.\nSet to `false` to restrict non-VPC requests.\n"
}
}
}
}
}
},
"responses": {
"204": {
"description": "Successfully enabled/disabled non-VPC access.\n"
}
}
}
},
"/groups/{groupId}/apps/{appId}/security/refresh_token_expiration": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
],
"get": {
"tags": [
"security"
],
"operationId": "adminGetRefreshTokenExpiration",
"summary": "Get User Refresh Token Expiration Time",
"description": "Get the current expiration time in seconds for user session refresh tokens.",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RefreshTokenExpiration"
}
}
}
},
"404": {
"description": "Group or App Not Found"
}
}
},
"put": {
"tags": [
"security"
],
"operationId": "adminSetRefreshTokenExpiration",
"summary": "Set User Refresh Token Expiration Time",
"description": "Set the expiration time in seconds for user session refresh tokens.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RefreshTokenExpiration"
}
}
}
},
"responses": {
"204": {
"description": "Expiration time updated"
},
"400": {
"description": "Invalid expiration time"
},
"404": {
"description": "Group or App Not Found"
}
}
}
},
"/groups/{groupId}/apps/{appId}/metrics": {
"get": {
"tags": [
"metrics"
],
"operationId": "adminGetMetrics",
"summary": "Retrieve App Services metrics",
"description": "Retrieves a variety of metrics, including: Compute Time, Data Transfer,\nSync Minutes, Requests Succeeded, Requests Failed. For a complete list\nof available metrics, see [App\nServices Metrics Reference](https://mongodb.com/docs/atlas/app-services/reference/metrics).",
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"name": "start",
"in": "query",
"description": "The ISO-8601 date and time of the start of the query period (e.g. \"2022-10-27T14:01:01Z\").",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "end",
"in": "query",
"description": "The ISO-8601 date and time of the end of the query period (e.g. \"2022-12-27T14:01:01Z\").",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "granularity",
"in": "query",
"description": "Specifies the granularity of the query period as an\n[ISO-8601 duration value](https://en.wikipedia.org/wiki/ISO_8601#Durations). Examples\ninclude \"P31D\" (31 day), \"PT1H\" (1 hour), and \"PT5M\" (5 minutes).",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successfully retrieved.",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"app_id",
"app_name",
"end",
"granularity",
"group_id",
"start",
"measurements"
],
"properties": {
"measurements": {
"type": "array",
"description": "The list of metrics.",
"items": {
"type": "object",
"properties": {
"data_points": {
"type": "array",
"description": "A set of data points for the given metric.",
"items": {
"type": "object",
"properties": {
"timestamp": {
"type": "string",
"description": "The ISO-8601 date and time of the measurement."
},
"value": {
"type": "number",
"description": "The value of the measurement in the unit\nspecified by the metric's `unit` property."
}
}
}
},
"name": {
"type": "string",
"description": "The name of the metric. For a complete list of\navailable metrics and their units, see [App Services\nMetrics\nReference](https://mongodb.com/docs/atlas/app-services/reference/metrics)."
},
"units": {
"type": "string",
"description": "The unit of each data point's `value` property."
}
}
}
},
"app_id": {
"type": "string",
"description": "The app ID sent in the request."
},
"app_name": {
"type": "string",
"description": "The app's human-readable name."
},
"group_id": {
"type": "string",
"description": "The group ID sent in the request."
},
"start": {
"type": "string",
"example": "2022-10-27T14:01:01Z",
"description": "The date and time (ISO-8601 format) of the earliest requested measurement."
},
"end": {
"type": "string",
"example": "2022-12-27T14:01:01Z",
"description": "The date and time (ISO-8601 format) of the latest requested measurement."
},
"granularity": {
"type": "string",
"description": "The requested granularity of the metrics in [ISO-8601 duration format](https://en.wikipedia.org/wiki/ISO_8601#Durations)."
}
}
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/logs": {
"get": {
"tags": [
"logs"
],
"operationId": "adminGetLogs",
"summary": "Retrieve App Services logs",
"parameters": [
{
"name": "co_id",
"in": "query",
"description": "Return only log messages associated with the given request Correlation ID.",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "errors_only",
"in": "query",
"description": "The value of this field does not matter. If included in the request,\nthis endpoint only returns error logs (even if the value is set to `false`).\nIf this field is excluded from the request, this endpoint only returns non-error logs.",
"schema": {
"type": "boolean"
},
"required": false
},
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string"
},
"description": "Return only log messages associated with the given `user_id`.",
"required": false
},
{
"name": "start_date",
"in": "query",
"schema": {
"type": "string"
},
"description": "The date and time in ISO 8601 at which to begin returning results,\nexclusive.",
"required": false
},
{
"name": "end_date",
"in": "query",
"schema": {
"type": "string"
},
"description": "The date and time in ISO 8601 at which to cease returning results,\ninclusive.",
"required": false
},
{
"name": "skip",
"in": "query",
"schema": {
"type": "integer"
},
"description": "The offset number of matching log entries to skip before including them\nin the response.",
"required": false
},
{
"name": "limit",
"in": "query",
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 100
},
"description": "The maximum number of log entries to include in the response. If the\nquery matches more than this many logs, it returns documents in\nascending order by date until the limit is reached.",
"required": false
},
{
"name": "type",
"in": "query",
"schema": {
"type": "string",
"enum": [
"TRIGGER_FAILURE",
"DB_TRIGGER",
"AUTH_TRIGGER",
"SCHEDULED_TRIGGER",
"FUNCTION",
"SERVICE_FUNCTION",
"STREAM_FUNCTION",
"SERVICE_STREAM_FUNCTION",
"AUTH",
"WEBHOOK",
"ENDPOINT",
"PUSH",
"API",
"API_KEY",
"GRAPHQL",
"SYNC_CONNECTION_START",
"SYNC_CONNECTION_END",
"SYNC_SESSION_START",
"SYNC_SESSION_END",
"SYNC_CLIENT_WRITE",
"SYNC_ERROR",
"SYNC_OTHER",
"SCHEMA_ADDITIVE_CHANGE",
"SCHEMA_GENERATION",
"SCHEMA_VALIDATION",
"LOG_FORWARDER"
]
},
"description": "The kind of log you would like to retrieve.",
"required": false
}
],
"responses": {
"200": {
"description": "Successfully retrieved.",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"nextEndDate",
"nextSkip"
],
"properties": {
"logs": {
"type": "array",
"maxItems": 100,
"description": "At most 100 results per request.",
"items": {
"$ref": "#/components/schemas/AppLog"
}
},
"nextEndDate": {
"type": "string",
"description": "The end date and time of the next page of log entries in ISO 8601\nformat. App Services paginates the result sets of queries that match\nmore than 100 log entries and includes this field in paginated\nresponses. To get the next page of up to 100 entries, pass this value as\nthe `end_date` parameter in a subsequent request."
},
"nextSkip": {
"type": "integer",
"description": "The offset into the next page of log entries in ISO 8601 format. MongoDB\nApp Services paginates the result sets of queries that match more than 100 log\nentries and includes this field in paginated responses where the first\nentry on the next page has the same timestamp as the last entry on this\npage. To get the next page of up to 100 entries, pass this value, if it\nis present, as the `skip` parameter in a subsequent request."
}
}
}
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
]
},
"/groups/{groupId}/apps/{appId}/log_forwarders": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
],
"get": {
"tags": [
"log_forwarders"
],
"operationId": "listLogForwarders",
"summary": "List log forwarders.",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/LogForwarder"
}
}
}
}
}
}
},
"post": {
"tags": [
"log_forwarders"
],
"operationId": "createLogForwarder",
"summary": "Create a log forwarder.",
"requestBody": {
"required": true,
"description": "A log forwarder configuration",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateLogForwarderRequest"
}
}
}
},
"responses": {
"201": {
"description": "Created",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LogForwarder"
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/log_forwarders/{forwarderId}": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/ForwarderId"
}
],
"get": {
"tags": [
"log_forwarders"
],
"operationId": "getLogForwarder",
"summary": "Get a specific log forwarder.",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LogForwarder"
}
}
}
}
}
},
"patch": {
"tags": [
"log_forwarders"
],
"operationId": "updateLogForwarder",
"summary": "Update a log forwarder.",
"requestBody": {
"required": true,
"description": "A log forwarder configuration",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateLogForwarderRequest"
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LogForwarder"
}
}
}
}
}
},
"delete": {
"tags": [
"log_forwarders"
],
"operationId": "deleteGwarder",
"summary": "Delete a log forwarder.",
"responses": {
"204": {
"description": "No Content"
}
}
}
},
"/groups/{groupId}/apps/{appId}/log_forwarders/{forwarderId}/enable": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/ForwarderId"
}
],
"put": {
"tags": [
"log_forwarders"
],
"operationId": "enableLogForwarder",
"summary": "Enable a log forwarder.",
"responses": {
"204": {
"description": "No Content"
}
}
}
},
"/groups/{groupId}/apps/{appId}/log_forwarders/{forwarderId}/disable": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/ForwarderId"
}
],
"put": {
"tags": [
"log_forwarders"
],
"operationId": "disableLogForwarder",
"summary": "Disable a log forwarder.",
"responses": {
"204": {
"description": "No Content"
}
}
}
},
"/groups/{groupId}/apps/{appId}/api_keys": {
"get": {
"tags": [
"apikeys"
],
"operationId": "adminListApiKeys",
"summary": "List API keys",
"description": "List [API keys](https://www.mongodb.com/docs/realm/authentication/api-key/)\nassociated with a Atlas App Services App.",
"responses": {
"200": {
"description": "The API keys were successfully listed.",
"content": {
"application/json": {
"schema": {
"items": {
"properties": {
"_id": {
"type": "string"
},
"name": {
"type": "string"
},
"disabled": {
"type": "boolean"
}
}
}
}
}
}
}
}
},
"post": {
"tags": [
"apikeys"
],
"operationId": "adminCreateApiKey",
"summary": "Create a new API key",
"description": "Create a new [API key](https://www.mongodb.com/docs/realm/authentication/api-key/).",
"requestBody": {
"description": "The API key to create.",
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
]
}
}
}
},
"responses": {
"201": {
"description": "The API key was successfully created.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiKey"
}
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
]
},
"/groups/{groupId}/apps/{appId}/api_keys/{apiKeyId}": {
"get": {
"tags": [
"apikeys"
],
"operationId": "adminGetApiKey",
"summary": "Retrieve information about an API key",
"description": "Retrieve information about an [API key](https://www.mongodb.com/docs/realm/authentication/api-key/).",
"responses": {
"200": {
"description": "The API key was successfully retrieved.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiKeyResponse"
}
}
}
}
}
},
"delete": {
"tags": [
"apikeys"
],
"operationId": "adminDeleteApiKey",
"summary": "Delete an API key",
"description": "Delete an [API key](https://www.mongodb.com/docs/realm/authentication/api-key/).",
"responses": {
"204": {
"description": "The API key was successfully deleted."
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/ApiKeyId"
}
]
},
"/groups/{groupId}/apps/{appId}/api_keys/{apiKeyId}/enable": {
"put": {
"tags": [
"apikeys"
],
"operationId": "adminEnableApiKey",
"summary": "Enable an API key",
"description": "Enable an [API key](https://www.mongodb.com/docs/realm/authentication/api-key/).",
"responses": {
"204": {
"description": "The API key was successfully enabled."
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/ApiKeyId"
}
]
},
"/groups/{groupId}/apps/{appId}/api_keys/{apiKeyId}/disable": {
"put": {
"tags": [
"apikeys"
],
"operationId": "adminDisableApiKey",
"summary": "Disable an API key",
"description": "Disable an [API key](https://www.mongodb.com/docs/realm/authentication/api-key/).",
"responses": {
"204": {
"description": "The API key was successfully disabled."
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/ApiKeyId"
}
]
},
"/groups/{groupId}/apps/{appId}/custom_user_data": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
],
"get": {
"tags": [
"custom-user-data"
],
"operationId": "adminGetCustomUserDataConfig",
"summary": "Get the Custom User Data Configuration",
"description": "Get the [Custom User\nData](https://www.mongodb.com/docs/atlas/app-services/users/enable-custom-user-data/)\nconfiguration for an Atlas App Services App.",
"responses": {
"200": {
"description": "Ok",
"content": {
"application/json": {
"schema": {
"description": "The current custom user data configuration",
"$ref": "#/components/schemas/CustomUserDataConfig"
}
}
}
}
}
},
"patch": {
"tags": [
"custom-user-data"
],
"operationId": "adminSetCustomUserDataConfig",
"summary": "Configure Custom User Data",
"description": "Modify the [Custom User\nData](https://www.mongodb.com/docs/atlas/app-services/users/enable-custom-user-data/)\nconfiguration for an Atlas App Services App.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"description": "An updated custom user data configuration",
"$ref": "#/components/schemas/CustomUserDataConfig"
}
}
}
},
"responses": {
"204": {
"description": "Success"
}
}
}
},
"/groups/{groupId}/apps/{appId}/secrets": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
],
"get": {
"tags": [
"secrets"
],
"operationId": "adminGetAllSecrets",
"summary": "List secrets",
"description": "List [secrets](https://www.mongodb.com/docs/realm/values-and-secrets/define-and-manage-secrets#std-label-define-secret)\nassociated with a Atlas App Services App.",
"responses": {
"200": {
"description": "The Secrets were successfully listed.",
"content": {
"application/json": {
"schema": {
"items": {
"properties": {
"_id": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}
}
}
}
}
},
"post": {
"tags": [
"secrets"
],
"operationId": "adminCreateASecret",
"summary": "Create a new Secret",
"description": "Create a new\n[Secret](https://www.mongodb.com/docs/realm/values-and-secrets/define-and-manage-secrets).",
"requestBody": {
"description": "The Secret to create.",
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"name",
"value"
]
}
}
}
},
"responses": {
"201": {
"description": "The Secret was successfully created.",
"content": {
"application/json": {
"schema": {
"properties": {
"_id": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/secrets/{secretId}": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/SecretId"
}
],
"put": {
"tags": [
"secrets"
],
"operationId": "adminModifyASecret",
"summary": "Modify a Secret",
"description": "Modify a\n[Secret](https://www.mongodb.com/docs/realm/values-and-secrets/define-and-manage-secrets)\nassociated with a Atlas App Services App.",
"requestBody": {
"description": "The modified value of the Secret.",
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"_id": {
"type": "string"
},
"name": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"name",
"value"
]
}
}
}
},
"responses": {
"204": {
"description": "No body returned for response"
}
}
},
"delete": {
"tags": [
"secrets"
],
"operationId": "adminDeleteSecret",
"summary": "Delete a Secret",
"description": "Delete a\n[Secret](https://www.mongodb.com/docs/realm/values-and-secrets/define-and-manage-secrets)\nassociated with a Atlas App Services App.",
"responses": {
"204": {
"description": "The Secret was successfully deleted."
}
}
}
},
"/groups/{groupId}/apps/{appId}/functions": {
"get": {
"tags": [
"functions"
],
"operationId": "adminListFunctions",
"summary": "List Functions",
"description": "List [Functions](https://www.mongodb.com/docs/realm/functions#std-label-functions).",
"responses": {
"200": {
"description": "Successfully listed.",
"content": {
"application/json": {
"schema": {
"items": {
"properties": {
"_id": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}
}
}
}
}
},
"post": {
"tags": [
"functions"
],
"operationId": "adminCreateFunction",
"summary": "Create a new Function",
"description": "Create a new [Function](https://www.mongodb.com/docs/realm/functions#std-label-functions).",
"requestBody": {
"description": "The function to create",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NewFunction"
}
}
}
},
"responses": {
"201": {
"description": "The function was successfully created.",
"content": {
"application/json": {
"schema": {
"properties": {
"_id": {
"type": "string",
"description": "Unique identifier for the function."
},
"name": {
"type": "string",
"description": "Name for the function specified in the `name` field of the request."
}
}
}
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
]
},
"/groups/{groupId}/apps/{appId}/functions/{functionId}": {
"get": {
"tags": [
"functions"
],
"operationId": "adminGetFunction",
"summary": "Retrieve a Function",
"description": "Retrieve a [Function](https://www.mongodb.com/docs/realm/functions#std-label-functions).",
"responses": {
"200": {
"description": "The function was successfully retrieved.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Function"
}
}
}
}
}
},
"delete": {
"tags": [
"functions"
],
"operationId": "adminDeleteFunction",
"summary": "Delete a Function",
"description": "Delete a [Function](https://www.mongodb.com/docs/realm/functions#std-label-functions).",
"responses": {
"204": {
"description": "The function was successfully deleted."
}
}
},
"put": {
"tags": [
"functions"
],
"operationId": "adminUpdateFunction",
"summary": "Update a Function",
"description": "Update a [Function](https://www.mongodb.com/docs/realm/functions#std-label-functions).",
"responses": {
"200": {
"description": "The function was successfully updated.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NewFunction"
}
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/FunctionId"
}
]
},
"/groups/{groupId}/apps/{appId}/dependencies": {
"get": {
"tags": [
"dependencies"
],
"operationId": "adminGetAllDependencies",
"summary": "List external dependencies",
"description": "List [external\ndependencies](https://www.mongodb.com/docs/realm/functions/dependencies/) uploaded\nto the Atlas App Services App.",
"responses": {
"200": {
"description": "The function was successfully retrieved.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DependenciesSummary"
}
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
]
},
"/groups/{groupId}/apps/{appId}/deploy/config": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
],
"get": {
"tags": [
"deploy"
],
"operationId": "adminGetDeploymentConfig",
"summary": "Get the Deployment Configuration",
"description": "See information about how your App deploys changes.",
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeploymentConfig"
}
}
}
}
}
},
"patch": {
"tags": [
"deploy"
],
"operationId": "adminConfigureDeployment",
"summary": "Configure Deployment",
"description": "Modify an App's deployment configuration to customize how the App deploys changes.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"description": "An updated deployment configuration",
"$ref": "#/components/schemas/DeploymentConfig"
}
}
}
},
"responses": {
"204": {
"description": "Success"
}
}
}
},
"/groups/{groupId}/apps/{appId}/deployments": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
],
"get": {
"tags": [
"deploy"
],
"operationId": "adminListDeployments",
"summary": "List recent deployments",
"description": "Return the 25 most recent application deployments.",
"responses": {
"200": {
"description": "Successfully listed.",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Deployment"
}
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/deployments/{deploymentId}": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/DeploymentId"
}
],
"get": {
"tags": [
"deploy"
],
"operationId": "adminGetDeployment",
"summary": "Get a deployment",
"description": "Get information about a recent deployment of the application.",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Deployment"
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/deployments/{deploymentId}/redeploy": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/DeploymentId"
}
],
"get": {
"tags": [
"deploy"
],
"operationId": "adminRedeployDeployment",
"summary": "Redeploy a Deployment",
"description": "Redeploy a previously-deployed version of an App.",
"responses": {
"204": {
"description": "Successfully redeployed"
},
"404": {
"description": "Deployment not found",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Error"
},
{
"properties": {
"error": {
"const": "deployment not found"
},
"error_code": {
"const": "DeploymentNotFound"
}
}
}
]
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/drafts": {
"get": {
"tags": [
"deploy"
],
"operationId": "adminListDeploymentDrafts",
"summary": "Get Current Deployment Draft",
"description": "Return the current application deployment draft, if applicable.",
"responses": {
"200": {
"description": "Successfully listed.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeploymentDraft"
}
}
}
}
}
},
"post": {
"tags": [
"deploy"
],
"operationId": "adminCreateDeploymentDraft",
"summary": "Create a Deployment Draft",
"description": "Create a new application deployment draft, if none exists.",
"responses": {
"200": {
"description": "Successfully created draft.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeploymentDraft"
}
}
}
},
"409": {
"description": "Draft already exists",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
]
},
"/groups/{groupId}/apps/{appId}/drafts/{draftId}": {
"delete": {
"tags": [
"deploy"
],
"operationId": "adminDiscardDraft",
"summary": "Discard the specified deployment draft",
"description": "Discard the specified application deployment draft.",
"responses": {
"204": {
"description": "The draft was successfully discarded."
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/DraftId"
}
]
},
"/groups/{groupId}/apps/{appId}/drafts/{draftId}/deployment": {
"post": {
"tags": [
"deploy"
],
"operationId": "adminDeployDraft",
"summary": "Deploy a deployment draft",
"description": "Deploy the specified application deployment draft.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "The name of the deployment. To deploy a draft\nwithout a name, use an empty string.\n"
}
}
}
}
}
},
"responses": {
"201": {
"description": "The draft was successfully deployed.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Deployment"
}
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/DraftId"
}
]
},
"/groups/{groupId}/apps/{appId}/drafts/{draftId}/diff": {
"get": {
"tags": [
"deploy"
],
"operationId": "adminDeployDraftDiff",
"summary": "Diff a draft with the current deployment",
"description": "Return a diff between the currently deployed application and the\nspecified draft.",
"responses": {
"200": {
"description": "Successfully diffed draft.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Diff"
}
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/DraftId"
}
]
},
"/groups/{groupId}/apps/{appId}/environment": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
],
"put": {
"operationId": "adminSetEnvironment",
"summary": "Set the App Environment",
"description": "Set the App's active environment",
"tags": [
"environments"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"environment": {
"$ref": "#/components/schemas/AppEnvironment"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AppInstance"
}
}
}
},
"400": {
"description": "Invalid environment",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/environment_values": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
],
"get": {
"operationId": "adminListEnvironmentValues",
"summary": "List All Environment Values",
"description": "Get basic information about all environment values in the App.\nResults do not include the environment-specific `values`. For\ndetails on a specific environment, call [Get an Environment\nValue](#tag/environments/operation/adminGetEnvironmentValue).",
"tags": [
"environments"
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/EnvironmentValueDescription"
}
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
}
}
},
"post": {
"operationId": "adminCreateEnvironmentValue",
"summary": "Create an Environment Value",
"description": "Define a new environment value.",
"tags": [
"environments"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EnvironmentValue"
}
}
}
},
"responses": {
"201": {
"description": "Created",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EnvironmentValueDescription"
}
}
}
},
"409": {
"description": "Environment value name already exists",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/environment_values/{environmentValueId}": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/EnvironmentValueId"
}
],
"get": {
"operationId": "adminGetEnvironmentValue",
"summary": "Get an Environment Value",
"description": "Get details about a specific environment value",
"tags": [
"environments"
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EnvironmentValue"
}
}
}
},
"404": {
"$ref": "#/components/responses/EnvironmentValueNotFound"
}
}
},
"put": {
"operationId": "adminModifyEnvironmentValue",
"summary": "Modify an Environment Value",
"description": "Modify an existing environment value",
"tags": [
"environments"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EnvironmentValue"
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EnvironmentValueDescription"
}
}
}
},
"404": {
"$ref": "#/components/responses/EnvironmentValueNotFound"
}
}
},
"delete": {
"operationId": "adminDeleteEnvironmentValue",
"summary": "Delete an Environment Value",
"description": "Delete an existing environment value",
"tags": [
"environments"
],
"responses": {
"204": {
"description": "Deleted"
},
"404": {
"$ref": "#/components/responses/EnvironmentValueNotFound"
}
}
}
},
"/groups/{groupId}/apps/{appId}/hosting/config": {
"get": {
"tags": [
"hosting"
],
"operationId": "adminGetHostingConfig",
"summary": "Get Hosting Configuration",
"description": "Returns the current hosting configuration. Hosting is active\nif the response includes `status: \"setup_ok\"`.\n",
"responses": {
"200": {
"description": "Successfully get hosting configuration",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HostingConfiguration"
}
}
}
}
}
},
"patch": {
"tags": [
"hosting"
],
"operationId": "adminEnableDisableHosting",
"summary": "Enable/Disable Hosting",
"description": "Enable or disable App Services Hosting for your app.\nChanges to hosting can take up to 15 minutes to take effect.\nThis endpoint does not notify you when the changes have taken effect,\nonly that the change operation was successfully received by the server.\n\nYou can see if the hosting enablement/disablement is complete\nby calling the [Get Hosting Configuration](#operation/adminGetHostingConfig) endpoint.\n",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "Set to `true` to enable App Services Hosting.\nSet to `false` to disable App Services Hosting.\n"
}
}
}
}
}
},
"responses": {
"204": {
"description": "Successfully enabled/disabled App Services Hosting.\n"
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
]
},
"/groups/{groupId}/apps/{appId}/hosting/assets": {
"get": {
"tags": [
"hosting"
],
"operationId": "adminGetAllHostedAssets",
"summary": "List all hosted assets",
"responses": {
"200": {
"description": "Successfully listed hosted files.",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/HostedAssetMetadata"
}
}
}
}
}
}
},
"post": {
"tags": [
"hosting"
],
"operationId": "adminMoveCopyHostedAsset",
"summary": "Move or copy a hosted asset",
"description": "Move or copy a hosted asset to a new resource path.",
"requestBody": {
"description": "The hosted asset file and its metadata. (Must use\n`Content-Type: multipart/mixed`)",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"move_from": {
"type": "string",
"description": "The current resource path of the asset to move. Must be used with\n`move_to`."
},
"move_to": {
"type": "string",
"description": "The resource path to which the asset will move. Must be used with\n`move_from`."
},
"copy_from": {
"type": "string",
"description": "The current resource path of the asset to copy. Must be used with\n`copy_to`."
},
"copy_to": {
"type": "string",
"description": "The resource path to which the asset will be copied. Must be used with\n`copy_from`."
}
}
}
}
}
},
"responses": {
"204": {
"description": "Successfully moved/copied the hosted asset."
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
]
},
"/groups/{groupId}/apps/{appId}/hosting/assets/asset": {
"get": {
"tags": [
"hosting"
],
"operationId": "adminGetHostedAsset",
"summary": "Retrieve metadata for a specific hosted asset",
"parameters": [
{
"$ref": "#/components/parameters/AssetResourcePath"
},
{
"$ref": "#/components/parameters/AssetResourcePathPrefix"
}
],
"responses": {
"200": {
"description": "Successfully retrieved metadata for the hosted file.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HostedAssetMetadata"
}
}
}
},
"404": {
"description": "Asset not found.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string"
}
}
}
}
}
}
}
},
"put": {
"tags": [
"hosting"
],
"operationId": "adminUploadHostedAsset",
"summary": "Upload or replace a hosted asset",
"description": "Upload or replace a hosted asset at a specific resource path.",
"parameters": [
{
"$ref": "#/components/parameters/AssetResourcePath"
}
],
"requestBody": {
"description": "The hosted asset file and its metadata. (Must use\n`Content-Type: multipart/mixed`)",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"meta": {
"type": "object",
"$ref": "#/components/schemas/AssetMetadata",
"required": [
"meta",
"file"
],
"description": "An [asset metadata\ndocument](https://www.mongodb.com/docs/realm/admin/api/v3#std-label-asset-metadata-document)\n(encoded as JSON)."
},
"file": {
"type": "string",
"format": "binary",
"description": "The asset file to upload (encoded as binary)."
}
}
}
}
}
},
"responses": {
"204": {
"description": "Successfully added/replaced the hosted asset."
},
"400": {
"$ref": "#/components/responses/BadRequest"
}
}
},
"patch": {
"tags": [
"hosting"
],
"operationId": "adminUpdateHostedAsset",
"summary": "Update the metadata attributes of a hosted asset",
"description": "Update the metadata attributes of a hosted asset at a specific resource\npath.",
"parameters": [
{
"$ref": "#/components/parameters/AssetResourcePath"
}
],
"responses": {
"204": {
"description": "Successfully updated the hosted asset."
},
"400": {
"$ref": "#/components/responses/BadRequest"
}
},
"requestBody": {
"description": "The new metadata attributes for the hosted asset. These attributes\nreplace all existing attributes for the file.",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"attributes": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MetadataAttribute"
}
}
}
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
]
},
"/groups/{groupId}/measurements": {
"get": {
"tags": [
"billing"
],
"operationId": "adminMeasurements",
"summary": "List group billing usage in a given period",
"description": "List the request, compute, sync, and data transfer usage in a given\nperiod for [billing](https://www.mongodb.com/docs/realm/billing) purposes.",
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"name": "start",
"in": "query",
"description": "The ISO 8601 date and time of the start of the query period. Default is\n00:00:00 UTC on the first day of the current month.",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "end",
"in": "query",
"description": "The ISO 8601 date and time of the end of the query period. Default is\n23:59:59 UTC on the the last day of the current month.",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "granularity",
"in": "query",
"description": "Specifies the granularity of the query period, either P31D (31 day) or\nPT1H (1 hour). Default is P31D.",
"schema": {
"type": "string",
"enum": [
"P31D",
"PT1H"
]
},
"required": false
}
],
"responses": {
"200": {
"description": "The measurements were successfully returned.",
"content": {
"application/json": {
"schema": {
"properties": {
"start": {
"type": "string",
"description": "The [RFC 3339](https://tools.ietf.org/html/3339) date and time of the\nstart of the query period, which can be specified with the `start` query\nparameter."
},
"end": {
"type": "string",
"description": "The [RFC 3339](https://tools.ietf.org/html/3339) date and time of the\nend of the query period, which can be specified with the `end` query\nparameter."
},
"granularity": {
"type": "string",
"description": "The granularity, which can be specified with the `granularity` query\nparameter."
},
"group_id": {
"type": "string",
"description": "The Atlas [Group\nID](https://docs.atlas.mongodb.com/tutorial/manage-projects/)."
},
"measurements": {
"type": "array",
"description": "The array of measurements.",
"items": {
"properties": {
"name": {
"type": "string",
"enum": [
"request_count",
"compute_time",
"data_out",
"sync_time"
],
"description": "The usage metric represented by each data point. See\n[billing](https://www.mongodb.com/docs/realm/billing)."
},
"units": {
"type": "string",
"enum": [
"<empty string>",
"HOURS",
"GIGABYTES"
],
"description": "The unit of the `value` of each data point."
},
"data_points": {
"type": "array",
"description": "The array of data points for this measurement. A finer `granularity`\nresults in more data points.",
"items": {
"properties": {
"timestamp": {
"type": "string",
"description": "The ISO 8601 date and time of the data point."
},
"value": {
"type": "number",
"description": "The value at the time in the `unit` of the measurement."
}
}
}
}
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
}
}
}
},
"/groups/{groupId}/apps/{appId}/measurements": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
],
"get": {
"tags": [
"billing"
],
"operationId": "adminAppMeasurements",
"summary": "List app billing usage",
"description": "List the request, compute, sync, data transfer, and memory usage of a\nspecific app in a given period for\n[billing](https://www.mongodb.com/docs/realm/billing) purposes.",
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"name": "start",
"in": "query",
"description": "The ISO 8601 date and time of the start of the query period. Default is\n00:00:00 UTC on the first day of the current month.",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "end",
"in": "query",
"description": "The ISO 8601 date and time of the end of the query period. Default is\n23:59:59 UTC on the the last day of the current month.",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "granularity",
"in": "query",
"description": "Specifies the granularity of the query period, either P31D (31 day) or\nPT1H (1 hour). Default is P31D.",
"schema": {
"type": "string",
"enum": [
"P31D",
"PT1H"
]
},
"required": false
}
],
"responses": {
"200": {
"description": "The measurements were successfully returned.",
"content": {
"application/json": {
"schema": {
"properties": {
"start": {
"type": "string",
"description": "The RFC 3339 date and time of the start of the query period, which can\nbe specified with the `start` query parameter."
},
"end": {
"type": "string",
"description": "The RFC 3339 date and time of the end of the query period, which can be\nspecified with the `end` query parameter."
},
"granularity": {
"type": "string",
"description": "The granularity, which can be specified with the `granularity` query\nparameter."
},
"group_id": {
"type": "string",
"description": "The Atlas [Group\nID](https://docs.atlas.mongodb.com/tutorial/manage-projects/)."
},
"appId": {
"type": "string",
"description": "The Atlas App Services App ID specified by the `appId` path parameter."
},
"appName": {
"type": "string",
"description": "The name of the Atlas App Services App specified by the `appId` path parameter."
},
"measurements": {
"type": "array",
"description": "The array of measurements.",
"items": {
"properties": {
"name": {
"type": "string",
"enum": [
"request_count",
"compute_time",
"data_out",
"sync_time",
"mem_usage"
],
"description": "The usage metric represented by each data point. See\n[billing](https://www.mongodb.com/docs/realm/billing)."
},
"units": {
"type": "string",
"enum": [
"<empty string>",
"HOURS",
"GIGABYTES",
"GIGABYTE_SECONDS"
],
"description": "The unit of the `value` of each data point."
},
"data_points": {
"type": "array",
"description": "The array of data points for this measurement. A finer `granularity`\nresults in more data points.",
"items": {
"properties": {
"timestamp": {
"type": "string",
"description": "The ISO 8601 date and time of the data point."
},
"value": {
"type": "number",
"description": "The value at the time in the `unit` of the measurement."
}
}
}
}
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
}
}
}
},
"/groups/{groupId}/apps/{appId}/schemas": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
],
"get": {
"tags": [
"schemas"
],
"operationId": "adminListSchemas",
"summary": "List schemas",
"description": "List all defined [schemas](https://www.mongodb.com/docs/realm/schemas).",
"responses": {
"200": {
"description": "Ok",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"_id": {
"type": "string"
},
"schema": {
"type": "object"
},
"metadata": {
"$ref": "#/components/schemas/SchemaMetadata"
}
}
}
}
}
}
}
}
},
"post": {
"tags": [
"schemas"
],
"operationId": "adminCreateSchema",
"summary": "Create a schema",
"description": "Define a new [schema](https://www.mongodb.com/docs/realm/schemas) for a linked collection.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"schema",
"metadata"
],
"properties": {
"_id": {
"type": "string"
},
"schema": {
"type": "object",
"description": "A valid [schema](https://www.mongodb.com/docs/realm/schemas) for the collection."
},
"metadata": {
"$ref": "#/components/schemas/SchemaMetadata"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Ok",
"content": {
"application/json": {
"schema": {
"properties": {
"_id": {
"type": "string"
},
"metadata": {
"$ref": "#/components/schemas/SchemaMetadata"
}
}
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/schemas/{schemaId}": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/SchemaId"
}
],
"get": {
"tags": [
"schemas"
],
"operationId": "adminGetSchema",
"summary": "Get a schema",
"description": "Get a specific [schema](https://www.mongodb.com/docs/realm/schemas) by its `_id` value.",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"_id": {
"type": "string"
},
"schema": {
"type": "object"
}
}
}
}
}
}
}
},
"put": {
"tags": [
"schemas"
],
"operationId": "adminUpdateSchema",
"summary": "Update a schema",
"description": "Replace an existing [schema](https://www.mongodb.com/docs/realm/schemas) with a new one.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"schema"
],
"properties": {
"_id": {
"type": "string"
},
"schema": {
"type": "object",
"description": "A valid [schema](https://www.mongodb.com/docs/realm/schemas) for the collection."
},
"relationships": {
"type": "object",
"description": "Relationships to foreign collections. Each field name is a property in the schema. The corresponding value is a [relationship](https://www.mongodb.com/docs/realm/schemas/relationships/) definition for that field.",
"additionalProperties": {
"$ref": "#/components/schemas/Relationship"
}
},
"metadata": {
"$ref": "#/components/schemas/SchemaMetadata"
}
}
}
}
}
},
"responses": {
"204": {
"description": "No Content"
}
}
},
"delete": {
"tags": [
"schemas"
],
"operationId": "adminDeleteSchema",
"summary": "Delete a schema",
"description": "Delete a specific [schema](https://www.mongodb.com/docs/realm/schemas) by its `_id` value.",
"responses": {
"204": {
"description": "No Content"
}
}
}
},
"/groups/{groupId}/apps/{appId}/endpoints": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
],
"get": {
"tags": [
"endpoints"
],
"operationId": "adminGetAllEndpoints",
"summary": "Get all endpoints",
"description": "Get all [endpoint](https://www.mongodb.com/docs/realm/endpoints/) configurations.",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/Endpoint"
},
{
"properties": {
"function_name": {
"type": "string"
}
}
}
]
}
}
}
}
}
}
},
"post": {
"tags": [
"endpoints"
],
"operationId": "adminCreateEndpoint",
"summary": "Create an endpoint",
"description": "Create a new [endpoint](https://www.mongodb.com/docs/realm/endpoints/).",
"requestBody": {
"description": "A valid [configuration object](https://www.mongodb.com/docs/atlas/app-services/reference/config/http_endpoints/) for the new endpoint.",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Endpoint"
}
}
}
},
"responses": {
"201": {
"description": "Created",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Endpoint"
},
{
"properties": {
"function_name": {
"type": "string"
}
}
}
]
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/endpoints/{endpointId}": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/EndpointId"
}
],
"get": {
"tags": [
"endpoints"
],
"operationId": "adminGetEndpoint",
"summary": "Get an endpoint",
"description": "Get a specific [endpoint](https://www.mongodb.com/docs/realm/endpoints/)'s configuration.",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Endpoint"
},
{
"properties": {
"function_name": {
"type": "string"
}
}
}
]
}
}
}
}
}
},
"put": {
"tags": [
"endpoints"
],
"operationId": "adminModifyEndpoint",
"summary": "Modify an endpoint",
"description": "Modify an existing [endpoint](https://www.mongodb.com/docs/realm/endpoints/) configuration.",
"requestBody": {
"description": "A valid, updated [configuration object](https://www.mongodb.com/docs/atlas/app-services/reference/config/http_endpoints/) for the endpoint.",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Endpoint"
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Endpoint"
},
{
"properties": {
"function_name": {
"type": "string"
}
}
}
]
}
}
}
}
}
},
"delete": {
"tags": [
"endpoints"
],
"operationId": "adminDeleteEndpoint",
"summary": "Delete an endpoint",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {}
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/data_api/config": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
],
"get": {
"tags": [
"data-api"
],
"operationId": "adminGetDataApiConfig",
"summary": "Get the Data API Configuration",
"description": "Get your app's [Data API](https://www.mongodb.com/docs/atlas/app-services/data-api/generated-endpoints/) configuration.",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DataApiConfig"
}
}
}
}
}
},
"post": {
"tags": [
"data-api"
],
"operationId": "adminCreateDataApiConfig",
"summary": "Enable the Data API",
"description": "Create your app's [Data API](https://www.mongodb.com/docs/atlas/app-services/data-api/generated-endpoints/) configuration.",
"requestBody": {
"description": "A valid [configuration object](https://www.mongodb.com/docs/atlas/app-services/reference/config/http_endpoints#std-label-appconfig-data-api-endpoints) for the endpoint.",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DataApiConfig"
}
}
}
},
"responses": {
"201": {
"description": "Created",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DataApiConfig"
}
}
}
}
}
},
"patch": {
"tags": [
"data-api"
],
"operationId": "adminModifyDataApiConfig",
"summary": "Modify the Data API",
"description": "Update your app's [Data API](https://www.mongodb.com/docs/atlas/app-services/data-api/generated-endpoints/) configuration.",
"requestBody": {
"description": "A valid [configuration object](https://www.mongodb.com/docs/atlas/app-services/reference/config/http_endpoints#std-label-appconfig-data-api-endpoints) for the endpoint.",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DataApiConfig"
}
}
}
},
"responses": {
"204": {
"description": "No content"
}
}
}
},
"/groups/{groupId}/apps/{appId}/data_api/versions": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
],
"get": {
"tags": [
"data-api"
],
"operationId": "adminGetDataApiVersions",
"summary": "List Data API versions",
"description": "List all possible Data API versions.",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DataApiVersion"
}
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/graphql": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
],
"post": {
"tags": [
"graphql"
],
"operationId": "adminRunGraphQLOperation",
"summary": "Run a query or mutation",
"description": "Run a query or mutation as a system user that bypasses\nauthentication and data access rules. You can access metadata\nabout your API, including its schema, with an\n[introspection](https://graphql.org/learn/introspection/) query.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"query"
],
"properties": {
"query": {
"type": "string",
"description": "A stringified `.graphql` file that contains one or\nmore valid GraphQL operations for your API. If more\nthan one operation is defined, you must specify\nwhich operation to run in `operationName`.",
"example": "query AllTasks { tasks(query: { status: $status }) { _id owner } }"
},
"variables": {
"type": "string",
"description": "A stringified JSON object where each field name maps\na value to a variable in the specified operation.",
"example": "{ \"status\": \"complete\" }"
},
"operationName": {
"type": "string",
"description": "The name of the GraphQL operation specified in\n`query` to run.",
"example": "AllTasks"
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "The result of the specified operation.",
"required": [
"data"
],
"properties": {
"data": {
"type": [
"object",
"null"
],
"description": "The result of a successful operation. If `null`, the operation had errors."
},
"errors": {
"type": "array",
"description": "A list of errors encountered while running an operation.",
"minItems": 1,
"items": {
"type": "object",
"description": "An error encountered while running an operation.",
"required": [
"message",
"locations"
],
"properties": {
"message": {
"type": "string",
"description": "A message that describes the error."
},
"locations": {
"type": "array",
"description": "A list of one or more locations in the operation that caused the error.",
"items": {
"type": "object",
"required": [
"line",
"column"
],
"minItems": 1,
"description": "The operation line and column numbers that caused an error.",
"properties": {
"line": {
"type": "integer"
},
"column": {
"type": "integer"
}
}
}
}
}
}
}
}
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/graphql/config": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
],
"get": {
"tags": [
"graphql"
],
"operationId": "adminGetGraphQLConfig",
"summary": "Get GraphQL API Configuration",
"description": "Get your app's [GraphQL API](https://www.mongodb.com/docs/atlas/app-services/graphql/) configuration.",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GraphQLConfig"
}
}
}
}
}
},
"put": {
"tags": [
"graphql"
],
"operationId": "adminUpdateGraphQLConfig",
"summary": "Update GraphQL API Configuration",
"description": "Update your app's [GraphQL API](https://www.mongodb.com/docs/atlas/app-services/graphql/) configuration.",
"requestBody": {
"description": "A valid [GraphQL API configuration object](https://www.mongodb.com/docs/atlas/app-services/reference/config/graphql#std-label-appconfig-graphql).",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GraphQLConfig"
}
}
}
},
"responses": {
"204": {
"description": "Updated"
},
"400": {
"description": "Cannot Set `use_natural_pluralization` to `false`"
}
}
}
},
"/groups/{groupId}/apps/{appId}/graphql/custom_resolvers": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
],
"get": {
"tags": [
"graphql"
],
"operationId": "adminGetAllCustomResolvers",
"summary": "Get all custom resolvers",
"description": "Get all [custom resolver](https://www.mongodb.com/docs/realm/graphql/custom-resolvers/) configurations from your app's GraphQL API.",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CustomResolver"
}
}
}
}
}
}
},
"post": {
"tags": [
"graphql"
],
"operationId": "adminCreateCustomResolver",
"summary": "Create a custom resolver",
"description": "Create a new [custom resolver](https://www.mongodb.com/docs/realm/graphql/custom-resolvers/).",
"requestBody": {
"description": "A valid [custom resolver configuration](https://www.mongodb.com/docs/atlas/app-services/reference/config/graphql#std-label-appconfig-custom-resolver) object.",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CustomResolver"
}
}
}
},
"responses": {
"201": {
"description": "Created",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CustomResolver"
}
}
}
}
}
}
},
"/groups/{groupId}/apps/{appId}/graphql/custom_resolvers/{customResolverId}": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
},
{
"$ref": "#/components/parameters/CustomResolverId"
}
],
"get": {
"tags": [
"graphql"
],
"operationId": "adminGetCustomResolver",
"summary": "Get a custom resolver",
"description": "Get a specific [custom resolver](https://www.mongodb.com/docs/realm/graphql/custom-resolvers/) configuration.",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CustomResolver"
}
}
}
}
}
},
"put": {
"tags": [
"graphql"
],
"operationId": "adminModifyCustomResolver",
"summary": "Modify a custom resolver",
"description": "Modify an existing [custom resolver](https://www.mongodb.com/docs/realm/graphql/custom-resolvers/) configuration.",
"requestBody": {
"description": "A valid, updated [custom resolver configuration](https://www.mongodb.com/docs/atlas/app-services/reference/config/graphql#std-label-appconfig-custom-resolver) object.",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CustomResolver"
}
}
}
},
"responses": {
"204": {
"description": "Updated"
}
}
},
"delete": {
"tags": [
"graphql"
],
"operationId": "adminDeleteCustomResolver",
"summary": "Delete a custom resolver",
"description": "Delete an existing [custom resolver](https://www.mongodb.com/docs/realm/graphql/custom-resolvers/) configuration.",
"responses": {
"204": {
"description": "Deleted"
}
}
}
},
"/groups/{groupId}/apps/{appId}/validation_settings/graphql": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
],
"get": {
"tags": [
"graphql"
],
"operationId": "adminGetGraphQLValidationSettings",
"summary": "Get validation settings",
"description": "Get the current validation level and action for reads and writes.",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GraphQLValidationSettings"
}
}
}
}
}
},
"put": {
"tags": [
"graphql"
],
"operationId": "adminSetGraphQLValidationSettings",
"summary": "Modify validation settings",
"description": "Set the validation level and action for reads and writes.",
"requestBody": {
"description": "The updated validation levels and actions.",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GraphQLValidationSettings"
}
}
}
},
"responses": {
"204": {
"description": "Updated"
}
}
}
},
"/groups/{groupId}/apps/{appId}/validation_settings/null_type_schema_validation": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
],
"get": {
"tags": [
"schemas"
],
"operationId": "adminGetNullTypeSchemaValidationSetting",
"summary": "Get Null Type Schema Validation Setting",
"description": "Check if [null type schema validation](https://www.mongodb.com/docs/atlas/app-services/schemas/enforce-a-schema/#validate-null-types) is enabled.",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NullTypeSchemaValidationSetting"
}
}
}
}
}
},
"put": {
"tags": [
"schemas"
],
"operationId": "adminSetNullTypeSchemaValidationSetting",
"summary": "Set Null Type Schema Validation Setting",
"description": "Enable or disable [null type schema validation](https://www.mongodb.com/docs/atlas/app-services/schemas/enforce-a-schema/#validate-null-types).",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NullTypeSchemaValidationSetting"
}
}
}
},
"responses": {
"204": {
"description": "Updated"
}
}
}
},
"/groups/{groupId}/apps/{appId}/deployment_migration": {
"parameters": [
{
"$ref": "#/components/parameters/GroupId"
},
{
"$ref": "#/components/parameters/AppId"
}
],
"get": {
"tags": [
"deploy"
],
"operationId": "adminGetDeploymentMigration",
"summary": "Get a Deployment Migration",
"description": "Get metadata and status for the current deployment migration, if one exists.",
"responses": {
"200": {
"description": "Ok",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeploymentMigration"
}
}
}
},
"404": {
"description": "App not found"
}
}
},
"put": {
"tags": [
"deploy"
],
"operationId": "adminCreateDeploymentMigration",
"summary": "Create a Deployment Migration",
"description": "Start a new deployment migration.",
"requestBody": {
"description": "The deployment model and cloud provider region that the App should migrate to.",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AppDeploymentSettings"
},
"example": {
"deployment_model": "LOCAL",
"provider_region": "aws-us-east-1"
}
}
}
},
"responses": {
"204": {
"description": "Migration started"
},
"400": {
"description": "Request is invalid, incomplete, or a no-op"
},
"404": {
"description": "App not found"
}
}
}
}
},
"components": {
"parameters": {
"AssetResourcePath": {
"name": "path",
"in": "query",
"description": "The resource path of a hosted asset.",
"required": true,
"schema": {
"type": "string"
}
},
"AssetResourcePathPrefix": {
"name": "prefix",
"in": "query",
"description": "Return only those assets where the resource path begins with the\nspecified prefix.",
"required": false,
"schema": {
"type": "string"
}
},
"GroupId": {
"name": "groupId",
"description": "An Atlas [Project/Group\nID](https://docs.atlas.mongodb.com/tutorial/manage-projects/).",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
"AppId": {
"name": "appId",
"description": "The ObjectID of your application.\n[The App Services API Project and Application IDs section](#section/Project-and-Application-IDs) demonstrates how to find this\nvalue.",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
"DeploymentId": {
"name": "deploymentId",
"description": "The `_id` value of an application deployment.",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
"EnvironmentValueId": {
"name": "environmentValueId",
"description": "The `_id` value of an environment value.",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
"ForwarderId": {
"name": "forwarderId",
"description": "The _id ObjectID of a log forwarder.",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
"PrivateEndpointId": {
"name": "privateEndpointId",
"description": "The _id ObjectID of a VPC private endpoint.",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
"UsersAfter": {
"name": "after",
"required": false,
"description": "The `id` of the last user returned by a previous paginated request.",
"in": "query",
"schema": {
"type": "string"
}
},
"UsersSort": {
"name": "sort",
"required": false,
"description": "The field name to sort results by. The only valid value is the\ndefault: `_id`.",
"in": "query",
"schema": {
"type": "string"
}
},
"UsersDesc": {
"name": "desc",
"required": false,
"description": "If `true`, returns sorted results in descending order. If not specified\nor set to `false`, results return in ascending order.",
"in": "query",
"schema": {
"type": "boolean"
}
},
"FunctionId": {
"name": "functionId",
"description": "The unique `_id` value of a function.",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
"DatasourceId": {
"name": "datasourceId",
"description": "The unique `_id` value of a MongoDB data source.",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
"EventSubscriptionId": {
"name": "eventSubscriptionId",
"description": "The unique `_id` value of an event subscription.",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
"ServiceId": {
"name": "serviceId",
"description": "The unique `_id` value of a service.",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
"SecretId": {
"name": "secretId",
"description": "The unique `_id` value of a secret.",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
"CommandName": {
"name": "commandName",
"description": "Command name",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
"ValueId": {
"name": "valueId",
"description": "The unique `_id` value of a value.",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
"DraftId": {
"name": "draftId",
"description": "The unique `_id` value of a draft.",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
"RuleId": {
"name": "ruleId",
"description": "The unique `_id` value of a rule.",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
"IncomingWebhookId": {
"name": "incomingWebhookId",
"description": "The unique `_id` value of an incoming webhook",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
"Email": {
"name": "email",
"description": "Email address",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
"MessageId": {
"name": "messageId",
"description": "Message ID",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
"UserId": {
"name": "userId",
"description": "User Account ID",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
"ProviderId": {
"name": "providerId",
"description": "The unique `_id` value of an authentication provider",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
"ApiKeyId": {
"name": "apiKeyId",
"description": "The unique `_id` value of an API key",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
"TriggerId": {
"name": "triggerId",
"description": "The unique `_id` value of a trigger.",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
"SchemaId": {
"name": "schemaId",
"description": "The unique `_id` value of a schema.",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
"EndpointId": {
"name": "endpointId",
"description": "The unique `_id` value of an endpoint",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
"CustomResolverId": {
"name": "customResolverId",
"description": "The unique `_id` value of a custom resolver.",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
},
"schemas": {
"ApiKey": {
"properties": {
"_id": {
"type": "string"
},
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"disabled": {
"type": "string"
}
}
},
"ApiKeyResponse": {
"properties": {
"_id": {
"type": "string"
},
"name": {
"type": "string"
},
"disabled": {
"type": "string"
}
}
},
"DeploymentMigration": {
"properties": {
"status": {
"title": "DeploymentMigrationStatus",
"type": "string",
"enum": [
"started",
"downtime",
"enabling_event_subscriptions",
"cleanup",
"successful",
"failed"
]
},
"message": {
"type": "string",
"description": "A description of the current migration status."
},
"updated_at": {
"type": "string",
"description": "A timestamp of the most recent update to the deployment migration."
},
"from": {
"description": "The App's deployment model and cloud provider region at the start of the migration",
"$ref": "#/components/schemas/AppDeploymentSettings"
},
"to": {
"description": "The migration's target deployment model and cloud provider\nregion. At the end of a successful migration, the App uses\nthese deployment settings instead of the settings described\nby `from`.",
"$ref": "#/components/schemas/AppDeploymentSettings"
}
}
},
"AppDeploymentSettings": {
"properties": {
"deployment_model": {
"$ref": "#/components/schemas/DeploymentModel"
},
"provider_region": {
"$ref": "#/components/schemas/CloudProviderRegionId"
}
}
},
"DeploymentLocation": {
"type": "string",
"description": "An identifier of the location where an app server is physically\ndeployed to, regardless of the cloud provider that hosts the\napp.",
"enum": [
"US-VA",
"US-OR",
"DE-FF",
"IE",
"AU",
"IN-MB",
"SG",
"BR-SP"
]
},
"App": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the application. Must begin with a letter and\nmay only contain ASCII letters, numbers, underscores, and\nhyphens.",
"example": "MyApp"
},
"provider_region": {
"description": "The short identifier of a cloud provider-specific deployment region.\nSome regions are available for global deployment while others are\nonly available for local apps. See [Cloud Deployment\nRegions](https://www.mongodb.com/docs/atlas/app-services/apps/deployment-models-and-regions/).",
"$ref": "#/components/schemas/CloudProviderRegionId"
},
"location": {
"$ref": "#/components/schemas/DeploymentLocation",
"description": "The application's physical deployment location. This should\nagree with the more specific `provider_region` value. For\nexample, an App with a `provider_region` of `aws-us-west-2`\nmaps to a `location` of `US-OR`."
},
"deployment_model": {
"$ref": "#/components/schemas/DeploymentModel"
},
"environment": {
"$ref": "#/components/schemas/AppEnvironment"
}
}
},
"AppConstructor": {
"description": "An object that describes a new app to create",
"allOf": [
{
"$ref": "#/components/schemas/App"
},
{
"type": "object",
"properties": {
"template_id": {
"type": "string",
"description": "The id of an [App Services template\napp](https://www.mongodb.com/docs/atlas/app-services/reference/template-apps)\nto use as a base for the new app."
},
"data_source": {
"$ref": "#/components/schemas/DataSource"
}
}
}
]
},
"AppInstance": {
"description": "A specific, existing application.",
"allOf": [
{
"$ref": "#/components/schemas/App"
},
{
"type": "object",
"properties": {
"_id": {
"type": "string",
"description": "The application's unique internal ID.",
"example": "633209ffd3bd3478005d1bac"
},
"client_app_id": {
"type": "string",
"description": "The application's public App ID.",
"example": "myapp-abcde"
},
"domain_id": {
"type": "string",
"description": "The application's associated domain ID.",
"example": "63320a2b5f9de9a6e0a213e8"
},
"group_id": {
"type": "string",
"description": "The application's [Atlas Project/Group ID](https://docs.atlas.mongodb.com/tutorial/manage-projects/).",
"example": "5b2ec991973129243223a114"
},
"last_used": {
"type": "integer",
"description": "The time this app was last used in [UNIX time](https://en.wikipedia.org/wiki/Unix_time) (i.e. the number of seconds since Jan 1, 1970).",
"example": 1664224746
},
"last_modified": {
"type": "integer",
"description": "The time this app was last modified in [UNIX time](https://en.wikipedia.org/wiki/Unix_time) (i.e. the number of seconds since Jan 1, 1970).",
"example": 1656440824
},
"product": {
"type": "string",
"description": "The product this app is for.",
"enum": [
"standard",
"atlas",
"data-api"
]
}
}
}
]
},
"AppEnvironment": {
"type": "string",
"description": "The application's environment. An empty string indicates that the app does not have a specified environment.",
"example": "production",
"enum": [
"",
"development",
"testing",
"qa",
"production"
]
},
"DeploymentModel": {
"type": "string",
"description": "An application [deployment model](https://www.mongodb.com/docs/atlas/app-services/apps/deployment-models-and-regions/#deployment-models).",
"enum": [
"GLOBAL",
"LOCAL"
]
},
"CloudProviderRegionId": {
"oneOf": [
{
"$ref": "#/components/schemas/AwsDeploymentRegion"
},
{
"$ref": "#/components/schemas/AzureDeploymentRegion"
},
{
"$ref": "#/components/schemas/GcpDeploymentRegion"
}
]
},
"AwsDeploymentRegion": {
"type": "string",
"enum": [
"aws-us-east-1",
"aws-us-west-2",
"aws-us-east-2",
"aws-eu-central-1",
"aws-eu-west-1",
"aws-eu-west-2",
"aws-ap-southeast-1",
"aws-ap-southeast-2",
"aws-ap-south-1",
"aws-sa-east-1"
]
},
"AzureDeploymentRegion": {
"type": "string",
"enum": [
"azure-eastus2",
"azure-westus",
"azure-westeurope",
"azure-eastasia",
"azure-southeastasia"
]
},
"GcpDeploymentRegion": {
"type": "string",
"enum": [
"gcp-us-central1",
"gcp-us-east4",
"gcp-us-west1",
"gcp-europe-west1",
"gcp-asia-south1"
]
},
"CloudProviderRegion": {
"type": "object",
"properties": {
"id": {
"$ref": "#/components/schemas/CloudProviderRegionId",
"description": "The short identifier of a cloud provider-specific deployment region.\nSome regions are available for global deployment while others are\nonly available for local apps. See [Cloud Deployment\nRegions](https://www.mongodb.com/docs/atlas/app-services/apps/deployment-models-and-regions/#cloud-deployment-regions).",
"example": "aws-us-east-1"
},
"name": {
"type": "string",
"description": "A descriptive name for the region.",
"example": "Virginia (us-east-1)"
},
"cloud_provider": {
"type": "string",
"description": "The cloud provider that hosts the region.",
"example": "aws"
},
"country": {
"type": "string",
"description": "The country where the region is physically hosted.",
"example": "usa"
},
"deployment_models": {
"type": "array",
"description": "The [deployment\nmodels](https://www.mongodb.com/docs/atlas/app-services/apps/deployment-models-and-regions/#deployment-models)\nthat this region supports.",
"items": {
"$ref": "#/components/schemas/DeploymentModel"
},
"example": [
"GLOBAL",
"LOCAL"
]
}
}
},
"CustomUserDataConfig": {
"type": "object",
"properties": {
"mongo_service_id": {
"type": "string",
"description": "The `_id` value of the linked MongoDB data source that contains\ncustom user data.\n\nSee [Get a Data Source](#operation/adminGetService).",
"example": "63c060ed32043ef4c93c2a9c"
},
"database_name": {
"type": "string",
"description": "The name of the database that contains custom user data.",
"example": "myapp"
},
"collection_name": {
"type": "string",
"description": "The name of the collection that contains custom user data.",
"example": "users"
},
"user_id_field": {
"type": "string",
"description": "The name of a field that appears in every custom user data\ndocument and that contains the user account ID of each\ndocument's corresponding user.",
"example": "user_account_id"
},
"on_user_creation_function_id": {
"type": "string",
"description": "The `_id` value of a [user creation\nfunction](https://www.mongodb.com/docs/atlas/app-services/users/enable-custom-user-data/#std-label-user-creation-function)\nthat runs whenever a new user registers.",
"example": "63c055d8019a6ab879f661d6"
},
"enabled": {
"type": "boolean",
"description": "If `true`, custom user data is enabled."
}
}
},
"BasicError": {
"type": "object",
"properties": {
"error": {
"type": "string"
}
}
},
"BuildInfo": {
"type": "object",
"properties": {
"version": {
"type": "string",
"description": "Human-readable version information about the mongod instance. This\nstring will take the format `<major>.<minor>.<patch>`."
},
"gitVersion": {
"type": "string",
"description": "The commit identifier that identifies the state of the code use to build\nthe mongod."
},
"versionArray": {
"type": "array",
"description": "An array that conveys version information about the mongod instance. See\nversion for a more readable version of this string.",
"items": {
"type": "integer"
}
},
"javascriptEngine": {
"type": "string",
"description": "A string that reports the JavaScript engine used in the mongod instance.\nBy default, this is `mozjs` after version `3.2`, and previously `V8`."
},
"bits": {
"type": "string",
"description": "A number that reflects the target processor architecture of the mongod\nbinary."
},
"debug": {
"type": "boolean",
"description": "A boolean that reflects whether or not the `mongod` instance was built\nwith debugging options."
},
"maxBsonObjectSize": {
"type": "integer",
"description": "A number that reports the [Maximum BSON Document\nSize](https://www.mongodb.com/docs/manual/reference/limits#std-label-limit-bson-document-size)"
}
}
},
"DependenciesSummary": {
"type": "object",
"properties": {
"_id": {
"type": "string",
"description": "The dependency collection's unique internal ID."
},
"location": {
"type": "string",
"description": "The application's deployment region."
},
"user_id": {
"type": "string",
"description": "The unique `_id` value of the MongoDB Cloud user that uploaded the\ndependency collection."
},
"last_modified": {
"type": "integer",
"description": "The time at which the dependencies were uploaded in [Unix\ntime](https://en.wikipedia.org/wiki/Unix_time) (number of seconds since\nJanuary 1, 1970 at 00:00 UTC)."
},
"dependencies_list": {
"type": "array",
"description": "An array of documents that each describe a dependency uploaded to the\napplication.",
"items": {
"$ref": "#/components/schemas/Dependency"
}
}
}
},
"Dependency": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the uploaded dependency."
},
"version": {
"type": "string",
"description": "The version of the uploaded dependency."
}
}
},
"DeploymentDraft": {
"type": "object",
"properties": {
"_id": {
"type": "string",
"description": "The unique ID of the draft."
},
"user_id": {
"type": "string",
"description": "The unique `_id` value of the MongoDB Cloud user that created the draft."
},
"app": {
"$ref": "#/components/schemas/AppInstance"
}
}
},
"Deployment": {
"type": "object",
"properties": {
"_id": {
"type": "string",
"description": "The unique ID of the deployment."
},
"name": {
"type": "string",
"description": "The name of the deployment. By default, this is the same\nvalue as ``_id``."
},
"app_id": {
"type": "string",
"description": "The unique `_id` value of the Atlas App Services App."
},
"draft_id": {
"type": "string",
"description": "The unique `_id` value of the deployment draft associated with the\ndeployment, if applicable."
},
"user_id": {
"type": "string",
"description": "The unique `_id` value of the MongoDB Cloud user that deployed the draft."
},
"deployed_at": {
"type": "integer",
"description": "The time at which the deployment was made. Represented as the number of\nseconds since January 1, 1970."
},
"origin": {
"type": "string",
"description": "The deployment method used to create the deployment."
},
"commit": {
"type": "string",
"description": "The commit hash of the deployment (Automatic GitHub Deployment)"
},
"status": {
"type": "string",
"description": "A message that indicates whether or not the deployment was\nsuccessful."
},
"status_error_message": {
"type": "string",
"description": "The error message of the error that caused the deployment to fail, if\napplicable."
},
"diff_url": {
"type": "string",
"description": "A link to the diff of changes in the deployment"
},
"remote_location": {
"$ref": "#/components/schemas/DeploymentLocation"
}
}
},
"DeploymentConfig": {
"type": "object",
"description": "A configuration file that controls your app's deployment behavior.",
"required": [
"ui_drafts_disabled",
"automatic_deployment"
],
"properties": {
"ui_drafts_disabled": {
"type": "boolean",
"description": "If `true`, every change made in the Admin UI deploys\nautomatically on save. If `false`, changes are grouped into\na deployment draft that you deploy separately."
},
"automatic_deployment": {
"type": "object",
"description": "Configuration for automatic deployment methods",
"properties": {
"enabled": {
"type": "boolean",
"description": "If `true`, the app automatically deploys using the method defined for `provider`."
},
"provider": {
"type": "string",
"description": "The type of automatic deployment.",
"enum": [
"github"
]
},
"installation_ids": {
"type": "array",
"description": "The unique ID values of automatic deployment provider\ninstallations. For example, the `id` value of a [GitHub app\ninstallation](https://docs.github.com/en/rest/apps/installations).",
"items": {
"type": "string"
}
}
}
},
"last_modified": {
"type": "number",
"description": "The time this configuration was last modified represented by the number of seconds since the UNIX epoch."
}
}
},
"Diff": {
"type": "object",
"properties": {
"diffs": {
"type": "array",
"description": "A list where each item is the line-by-line diff for a specific\nconfiguration file.",
"items": {
"type": "string"
}
},
"hosting_files_diff": {
"type": "object",
"description": "The filenames of hosted files that have been added, removed, or\nmodified.",
"properties": {
"added": {
"type": "array",
"items": {
"type": "string",
"description": "A list where each element is the name of a file that was added in the\ndraft."
}
},
"deleted": {
"type": "array",
"items": {
"type": "string",
"description": "A list where each element is the name of a file that was deleted in the\ndraft."
}
},
"modified": {
"type": "array",
"items": {
"type": "string",
"description": "A list where each element is the name of a file that was changed in the\ndraft."
}
}
}
}
}
},
"Endpoint": {
"type": "object",
"required": [
"function_id"
],
"properties": {
"route": {
"type": "string"
},
"http_method": {
"type": "string",
"enum": [
"GET",
"POST",
"PUT",
"PATCH",
"DELETE",
"*"
]
},
"function_id": {
"type": "string"
},
"validation_method": {
"type": "string",
"enum": [
"NO_VALIDATION",
"SECRET_AS_QUERY_PARAM",
"VERIFY_PAYLOAD"
]
},
"secret_id": {
"type": "string",
"description": "If `validation_method` is set to `\"SECRET_AS_QUERY_PARAM\"`\nor `\"VERIFY_PAYLOAD\"`, this is the `_id` of the\n[Secret](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets/)\nthat authorizes requests."
},
"return_type": {
"$ref": "#/components/schemas/EndpointDataFormat",
"description": "The default [data format](https://mongodb.com/docs/atlas/app-services/data-api/#data-formats) returned by custom HTTPS endpoints."
},
"respond_result": {
"type": "boolean"
},
"fetch_custom_user_data": {
"type": "boolean"
},
"create_user_on_auth": {
"type": "boolean"
},
"disabled": {
"type": "boolean"
}
}
},
"EndpointDataFormat": {
"type": "string",
"description": "A [data format](https://mongodb.com/docs/atlas/app-services/data-api/#data-formats) supported by the Data API & custom endpoints.",
"enum": [
"JSON",
"EJSON"
]
},
"EnvironmentValueDescription": {
"properties": {
"_id": {
"type": "string",
"description": "The environment value's internal ID"
},
"name": {
"type": "string",
"description": "The environment value name"
},
"last_modified": {
"type": "number",
"description": "The time this configuration was last modified represented by the number of seconds since the UNIX epoch."
}
}
},
"EnvironmentValue": {
"allOf": [
{
"$ref": "#/components/schemas/EnvironmentValueDescription"
},
{
"properties": {
"values": {
"type": "object",
"description": "An object that maps environment names to values. The\nenvironment value resolves to the current active\nenvironment's mapped value.\n\nIf no value is mapped to the current active environment,\nthe environment value resolves to `undefined`.",
"properties": {
"none": {
"$ref": "#/components/schemas/AnyValue"
},
"development": {
"$ref": "#/components/schemas/AnyValue"
},
"testing": {
"$ref": "#/components/schemas/AnyValue"
},
"qa": {
"$ref": "#/components/schemas/AnyValue"
},
"production": {
"$ref": "#/components/schemas/AnyValue"
}
}
}
}
}
]
},
"AnyValue": {
"description": "Any valid JSON value"
},
"DataApiVersion": {
"type": "string",
"description": "A supported version of the Data API.",
"enum": [
"v1"
]
},
"DataApiConfig": {
"type": "object",
"properties": {
"disabled": {
"type": "boolean"
},
"versions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DataApiVersion"
}
},
"return_type": {
"$ref": "#/components/schemas/EndpointDataFormat",
"description": "The default [data format](https://mongodb.com/docs/atlas/app-services/data-api/#data-formats) returned by Data API endpoints."
},
"create_user_on_auth": {
"type": "boolean"
},
"run_as_user_id": {
"type": "string",
"description": "An application user's account ID. If defined, endpoints will always run as the specified user."
},
"run_as_user_id_script_source": {
"type": "string",
"description": "Stringified source code for a function that returns an\napplication user's account ID. If defined, endpoints execute\nthe function on every request and run as the user with the\nID returned from the function."
},
"validation_method": {
"type": "string",
"enum": [
"NO_VALIDATION",
"SECRET_AS_QUERY_PARAM",
"VERIFY_PAYLOAD"
]
},
"secret_name": {
"type": "string",
"description": "If `validation_method` is set to `\"SECRET_AS_QUERY_PARAM\"`\nor `\"VERIFY_PAYLOAD\"`, this is the `name` of the\n[Secret](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets/)\nthat authorizes requests."
},
"can_evaluate": {
"type": "object",
"description": "A JSON expression that evaluates to `true` if an endpoint is\nallowed to run in response to an incoming request."
}
}
},
"Error": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "A message that describes the error."
},
"error_code": {
"type": "string",
"description": "The error type."
}
}
},
"AtlasCluster": {
"type": "object",
"properties": {
"config": {
"type": "object",
"properties": {
"clusterId": {
"type": "number",
"example": "05e821b3975d271289f372e3a",
"description": "The service ID."
},
"clusterName": {
"type": "string",
"example": "Cluster0",
"description": "The cluster name of the data source within. The name may be at \nmost 64 characters long and must only contain ASCII letters, numbers,\nunderscores, and hyphens."
},
"clusterType": {
"type": "string",
"enum": [
"atlas",
"serverless"
],
"example": "atlas",
"description": "The type of service."
},
"flexible_sync": {
"$ref": "#/components/schemas/FlexibleSync"
},
"groupName": {
"type": "string",
"example": "Project 0",
"description": "The name of the group that contains the service."
},
"orgName": {
"type": "string",
"example": "MongoDB_Org",
"description": "The name of the organization that contains the service."
},
"readPreference": {
"type": "string",
"enum": [
"primary",
"primaryPreferred",
"secondary",
"secondaryPreferred",
"nearest"
],
"description": "The [read preference](https://www.mongodb.com/docs/atlas/app-services/mongodb/read-preference/) mode for read requests to the data source."
},
"wireProtocolEnabled": {
"type": "boolean",
"description": "If true, clients may [connect to the app over the MongoDB Wire Protocol](https://www.mongodb.com/docs/atlas/app-services/mongodb/wire-protocol/#connect-over-the-wire-protocol)."
}
}
},
"secret_config": {
"type": "object",
"description": "[Deprecated] The configuration for a third-party service."
}
}
},
"ServiceResponse": {
"type": "object",
"properties": {
"_id": {
"type": "string",
},
"name": {
"type": "string",
},
"type": {
"type": "string",
},
"version": {
"type": "number",
},
"last_modified": {
"type": "number",
},
}
},
"ReadPreferencesTagSet": {
"type": "string",
"enum": [
"server1",
"server2"
]
},
"CreateDataSource": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "mongodb-atlas",
"enum": [
"mongodb-atlas"
]
},
"type": {
"type": "string",
"example": "mongodb-atlas",
"enum": [
"mongodb-atlas"
]
},
"config": {
"type": "object",
"properties": {
"clusterName": {
"type": "string",
"example": "Cluster0",
"description": "The name of the service to create. The name may be at most 64 \ncharacters long and must only contain ASCII letters, numbers,\nunderscores, and hyphens."
},
"clusterType": {
"type": "string",
"example": "atlas",
"description": "The type of service."
},
"flexible_sync": {
"$ref": "#/components/schemas/FlexibleSync"
},
"groupName": {
"type": "string",
"example": "Project 0",
"description": "The name of the group that contains the service."
},
"orgName": {
"type": "string",
"example": "MongoDB_Org",
"description": "The name of the organization that contains the service."
},
"readPreference": {
"type": "string",
"enum": [
"secondary",
"secondaryPreferred",
"nearest"
],
"description": "The [read preference](https://www.mongodb.com/docs/atlas/app-services/mongodb/read-preference/) mode for read requests to the data source."
},
"readPreferenceTagSets": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ReadPreferencesTagSet"
},
"description": "Target read operations to specific members of a replica set."
},
"wireProtocolEnabled": {
"type": "boolean",
"description": "If true, clients may [connect to the app over the MongoDB Wire Protocol](https://www.mongodb.com/docs/atlas/app-services/mongodb/wire-protocol/#connect-over-the-wire-protocol)."
}
}
}
}
},
"AtlasFederatedInstance": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "mongodb-datafederation",
"enum": [
"mongodb-datafederation"
]
},
"type": {
"type": "string",
"example": "datalake",
"enum": [
"datalake"
]
},
"config": {
"type": "object",
"required": [
"dataLakeName"
],
"properties": {
"dataLakeName": {
"type": "string",
"description": "The service name used to refer to the Federated database\ninstance within this Atlas app. The name may be at most\n64 characters long and must only contain ASCII letters,\nnumbers, underscores, and hyphens."
}
}
}
}
},
"DataSource": {
"required": [
"name",
"type",
"config"
],
"oneOf": [
{
"$ref": "#/components/schemas/AtlasCluster"
},
{
"$ref": "#/components/schemas/AtlasFederatedInstance"
}
]
},
"ThirdPartyService": {
"type": "object",
"description": "**THIRD-PARTY SERVICES ARE DEPRECATED**\n\nSee [Third-Party Services](https://www.mongodb.com/docs/atlas/app-services/reference/services/) for more information.",
"properties": {
"_id": {
"type": "string",
"description": "A unique ID for the third-party service."
},
"name": {
"type": "string",
"description": "The third-party service name."
},
"type": {
"type": "string",
"description": "The type of third party service.",
"enum": [
"aws",
"twilio",
"github",
"gcm"
]
},
"version": {
"type": "integer"
}
}
},
"CreateLogForwarderRequest": {
"$ref": "#/components/schemas/LogForwarder"
},
"UpdateLogForwarderRequest": {
"$ref": "#/components/schemas/LogForwarder"
},
"LogForwarder": {
"type": "object",
"properties": {
"_id": {
"type": "string"
},
"name": {
"type": "string"
},
"disabled": {
"type": "boolean"
},
"log_types": {
"type": "array",
"items": {
"$ref": "#/components/schemas/LogType"
}
},
"log_statuses": {
"type": "array",
"items": {
"$ref": "#/components/schemas/LogStatus"
}
},
"policy": {
"$ref": "#/components/schemas/LogForwardingPolicy"
},
"action": {
"$ref": "#/components/schemas/LogForwardingAction"
}
}
},
"LogType": {
"type": "string",
"enum": [
"auth",
"function",
"graphql",
"push",
"schema",
"service",
"sync",
"trigger"
]
},
"LogStatus": {
"type": "string",
"enum": [
"error",
"success"
]
},
"LogForwardingPolicy": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"single",
"batch"
]
}
}
},
"LogForwardingAction": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"collection",
"function"
]
},
"name": {
"type": "string"
},
"data_source": {
"type": "string"
},
"database": {
"type": "string"
},
"collection": {
"type": "string"
}
}
},
"EventSubscription": {
"description": "A subscription to a change event stream.",
"oneOf": [
{
"$ref": "#/components/schemas/AnyTrigger"
},
{
"title": "SyncTranslator",
"type": "object",
"properties": {
"_id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string",
"const": "SYNCTRANSLATOR"
},
"function_id": {
"type": "string"
},
"disabled": {
"type": "boolean"
},
"config": {
"type": "null"
},
"last_modified": {
"type": "number"
}
},
"example": {
"_id": "636c189a93daaf89c4900a81",
"name": "SyncTranslator",
"type": "SYNCTRANSLATOR",
"function_id": "000000000000000000000000",
"disabled": false,
"config": null,
"last_modified": 1668028570
}
}
]
},
"Expression": {
"description": "A [rule expression](https://mongodb.com/docs/atlas/app-services/rules/expressions/).",
"oneOf": [
{
"type": "object"
},
{
"type": "boolean"
}
]
},
"DefaultRule": {
"type": "object",
"description": "A data access rule that define defines fallback user roles and query filters for collection's that don't have more specific permissions defined.",
"properties": {
"_id": {
"type": "string",
"description": "The default rule's unique ObjectId identifier."
},
"roles": {
"type": "array",
"description": "An ordered list of default user roles.",
"items": {
"$ref": "#/components/schemas/Role"
}
},
"filters": {
"type": "array",
"description": "A list of default [query filters](https://www.mongodb.com/docs/atlas/app-services/reference/config/data_sources/#filters).",
"items": {
"$ref": "#/components/schemas/Filter"
}
}
}
},
"Rule": {
"type": "object",
"description": "A data access rule that defines user roles and query filters for a collection in a linked data source.",
"required": [
"database",
"collection"
],
"properties": {
"_id": {
"type": "string",
"description": "The rule's unique ObjectId identifier."
},
"database": {
"type": "string",
"description": "The name of a database in the linked data source."
},
"collection": {
"type": "string",
"description": "The name of a collection in the specified `database`."
},
"roles": {
"type": "array",
"description": "A list of data access roles.",
"items": {
"$ref": "#/components/schemas/Role"
}
},
"filters": {
"type": "array",
"description": "A list of filters for incoming operations.",
"items": {
"$ref": "#/components/schemas/Filter"
}
}
}
},
"Role": {
"type": "object",
"description": "A data access role that assigns read and write permissions to a user for each document",
"properties": {
"_id": {
"type": "string",
"description": "The role's unique ObjectId identifier."
},
"name": {
"type": "string",
"description": "The role's name."
},
"apply_when": {
"description": "A rule expression that evaluates to `true` when this role applies to a user for a specific document.",
"$ref": "#/components/schemas/Expression"
},
"write": {
"description": "A rule expression that evaluates to `true` if the role has permission to add, modify, or remove all fields in the document.",
"$ref": "#/components/schemas/Expression"
},
"insert": {
"description": "A rule expression that evaluates to `true` if the role has permission to insert a new document into the collection.",
"$ref": "#/components/schemas/Expression"
},
"delete": {
"description": "A rule expression that evaluates to `true` if the role has permission to delete a document from the collection.",
"$ref": "#/components/schemas/Expression"
},
"search": {
"description": "A rule expression that evaluates to `true` if the role has permission to search the collection using [Atlas Search](https://www.mongodb.com/docs/atlas/atlas-search/).",
"$ref": "#/components/schemas/Expression"
},
"fields": {
"type": "object",
"description": "Field-level rules for any fields that are not explicitly configured in the role's `properties`.",
"$ref": "#/components/schemas/NestableFieldLevelPermissions"
},
"additional_fields": {
"type": "object",
"description": "Field-level rules for any fields that are not explicitly configured in the role's `properties`.",
"$ref": "#/components/schemas/FieldLevelPermissions"
}
}
},
"NestableFieldLevelPermissions": {
"description": "An object that maps document field names to read and write permissions for the field and its children.",
"additionalProperties": {
"allOf": [
{
"$ref": "#/components/schemas/FieldLevelPermissions"
},
{
"properties": {
"fields": {
"$ref": "#/components/schemas/NestableFieldLevelPermissions"
}
}
}
]
}
},
"FieldLevelPermissions": {
"type": "object",
"description": "Read and write permissions for a field.",
"required": [
"read",
"write"
],
"properties": {
"read": {
"description": "A rule expression that evaluates to `true` if the role can read the field's value.",
"$ref": "#/components/schemas/Expression"
},
"write": {
"description": "A rule expression that evaluates to `true` if the role can write the field's value.",
"$ref": "#/components/schemas/Expression"
}
}
},
"Filter": {
"type": "object",
"description": "A filter that conditionally modifies incoming query operations before they run.",
"properties": {
"_id": {
"type": "string",
"description": "The filter's unique ObjectId identifier."
},
"name": {
"type": "string",
"description": "The filter's name."
},
"apply_when": {
"description": "A rule expression that evaluates to `true` if the filter applies to an incoming query.",
"$ref": "#/components/schemas/Expression"
},
"query": {
"description": "A MongoDB query object that is merged into an incoming query before the operation runs.",
"$ref": "#/components/schemas/Query"
},
"projection": {
"description": "A MongoDB projection object that is merged into an incoming query before the operation runs.",
"$ref": "#/components/schemas/Projection"
}
}
},
"Query": {
"type": "object",
"description": "A MongoDB query object."
},
"Projection": {
"type": "object",
"description": "A MongoDB projection object.",
"additionalProperties": {
"type": "number",
"enum": [
0,
1
]
}
},
"ThirdPartyServiceRule": {
"type": "object",
"description": "[Deprecated] A rule for a third-party service.",
"properties": {
"name": {
"type": "string"
},
"actions": {
"items": {
"type": "string"
}
},
"when": {
"type": "object"
}
},
"required": [
"name",
"when"
]
},
"IncomingWebhook": {
"properties": {
"name": {
"type": "string"
},
"function_source": {
"type": "string"
},
"respond_result": {
"type": "boolean"
},
"options": {
"type": "object",
"properties": {
"secret": {
"type": "string"
},
"secretAsQueryParam": {
"type": "boolean"
}
}
}
},
"required": [
"name",
"function_source",
"respond_result"
]
},
"BaseAuthProvider": {
"required": [
"name",
"type"
],
"properties": {
"_id": {
"type": "string",
"description": "The authentication provider's unique ID."
},
"name": {
"type": "string",
"description": "The name of the authentication provider. This value must be the same as the value of `type`."
},
"type": {
"$ref": "#/components/schemas/ProviderType"
},
"disabled": {
"type": "boolean",
"description": "If `true`, the auth provider is disabled. Users cannot log in through the provider until it is enabled."
}
}
},
"AuthProvider": {
"anyOf": [
{
"$ref": "#/components/schemas/AnonymousAuthProvider"
},
{
"$ref": "#/components/schemas/EmailPasswordAuthProvider"
},
{
"$ref": "#/components/schemas/ApiKeyAuthProvider"
},
{
"$ref": "#/components/schemas/CustomJwtAuthProvider"
},
{
"$ref": "#/components/schemas/CustomFunctionAuthProvider"
},
{
"$ref": "#/components/schemas/AppleAuthProvider"
},
{
"$ref": "#/components/schemas/GoogleAuthProvider"
},
{
"$ref": "#/components/schemas/FacebookAuthProvider"
}
]
},
"AnonymousAuthProvider": {
"allOf": [
{
"$ref": "#/components/schemas/BaseAuthProvider"
},
{
"properties": {
"name": {
"const": "anonymous",
"description": "The name of the authentication provider. For Anonymous authentication, this value is always `anonymous`."
},
"type": {
"const": "anonymous",
"description": "The name of the authentication provider. For Anonymous authentication, this value is always `anonymous`."
}
}
}
]
},
"EmailConfirmationAutomatic": {
"type": "object",
"properties": {
"autoConfirm": {
"const": true,
"description": "If `true`, automatically confirm new user accounts without additional verification."
}
}
},
"EmailConfirmationBuiltIn": {
"type": "object",
"properties": {
"autoConfirm": {
"const": false,
"description": "If `true`, automatically confirm new user accounts without\nadditional verification. For built-in email account\nconfirmation, set this value to `false`."
},
"emailConfirmationUrl": {
"type": "string",
"description": "The URL included in the email sent to new users as part of\nthe built-in confirmation flow. The email also adds a unique\nconfirmation `token` and `tokenId` as query parameters.\n\nThis URL should handle user confirmation by passing the\nconfirmation token to a Realm SDK's `confirmUser` function\nor to the Admin API [Confirm a Pending Email/Password\nUser](#tag/email/operation/adminConfirmPendingUser)\nendpoint."
},
"confirmEmailSubject": {
"type": "string",
"description": "The subject line of the email sent to new users as\npart of the built-in confirmation flow."
}
}
},
"EmailConfirmationCustomFunction": {
"type": "object",
"properties": {
"autoConfirm": {
"const": false,
"description": "If `true`, automatically confirm new user accounts without\nadditional verification. For custom function account\nconfirmation, set this value to `false`."
},
"runConfirmationFunction": {
"type": "boolean",
"description": "If `true`, new email/password user account registrations use\na custom function that you define to handle the confirmation\nprocess."
},
"confirmationFunctionName": {
"type": "string",
"description": "The name of the custom function that handles the\nconfirmation process."
}
}
},
"PasswordRefreshBuiltIn": {
"type": "object",
"properties": {
"resetPasswordUrl": {
"type": "string",
"description": "The URL included in the email sent to users as part\nof the built-in password reset flow. The email also\nadds a unique password reset `token` and `tokenId` as\nquery parameters.\n\nThis URL should handle user confirmation by passing\nthe password reset token to a Realm SDK's `resetPassword`\nfunction."
},
"resetPasswordSubject": {
"type": "string",
"description": "The subject line of the email sent to users as\npart of the built-in password reset flow."
}
}
},
"PasswordRefreshCustomFunction": {
"type": "object",
"properties": {
"runResetFunction": {
"type": "boolean",
"const": true,
"description": "If `true`, use a custom function that you define to handle\nthe password reset process."
},
"resetFunctionName": {
"type": "string",
"description": "The name of the custom function that handles the password\nreset process."
}
}
},
"EmailPasswordAuthProvider": {
"allOf": [
{
"$ref": "#/components/schemas/BaseAuthProvider"
},
{
"properties": {
"name": {
"const": "local-userpass",
"description": "The name of the authentication provider. For Email/Password authentication, this value is always `local-userpass`."
},
"type": {
"const": "local-userpass",
"description": "The name of the authentication provider. For Email/Password authentication, this value is always `local-userpass`."
},
"config": {
"oneOf": [
{
"allOf": [
{
"title": "ConfirmationAutomaticRefreshBuiltIn"
},
{
"$ref": "#/components/schemas/EmailConfirmationAutomatic"
},
{
"$ref": "#/components/schemas/PasswordRefreshBuiltIn"
}
]
},
{
"allOf": [
{
"title": "ConfirmationAutomaticRefreshCustom"
},
{
"$ref": "#/components/schemas/EmailConfirmationAutomatic"
},
{
"$ref": "#/components/schemas/PasswordRefreshCustomFunction"
}
]
},
{
"allOf": [
{
"title": "ConfirmationBuiltInRefreshBuiltIn"
},
{
"$ref": "#/components/schemas/EmailConfirmationBuiltIn"
},
{
"$ref": "#/components/schemas/PasswordRefreshBuiltIn"
}
]
},
{
"allOf": [
{
"title": "ConfirmationBuiltInRefreshCustom"
},
{
"$ref": "#/components/schemas/EmailConfirmationBuiltIn"
},
{
"$ref": "#/components/schemas/PasswordRefreshCustomFunction"
}
]
},
{
"allOf": [
{
"title": "ConfirmationCustomRefreshBuiltIn"
},
{
"$ref": "#/components/schemas/EmailConfirmationCustomFunction"
},
{
"$ref": "#/components/schemas/PasswordRefreshBuiltIn"
}
]
},
{
"allOf": [
{
"title": "ConfirmationCustomRefreshCustom"
},
{
"$ref": "#/components/schemas/EmailConfirmationCustomFunction"
},
{
"$ref": "#/components/schemas/PasswordRefreshCustomFunction"
}
]
}
]
}
}
}
]
},
"ApiKeyAuthProvider": {
"allOf": [
{
"$ref": "#/components/schemas/BaseAuthProvider"
},
{
"properties": {
"name": {
"const": "api-key",
"description": "The name of the authentication provider. For API key authentication, this value is always `api-key`."
},
"type": {
"const": "api-key",
"description": "The name of the authentication provider. For API key authentication, this value is always `api-key`."
}
}
}
]
},
"CustomJwtAuthProvider": {
"allOf": [
{
"$ref": "#/components/schemas/BaseAuthProvider"
},
{
"properties": {
"name": {
"const": "custom-token",
"description": "The name of the authentication provider. For Custom JWT authentication, this value is always `custom-token`."
},
"type": {
"const": "custom-token",
"description": "The name of the authentication provider. For Custom JWT authentication, this value is always `custom-token`."
},
"config": {
"type": "object",
"title": "CustomJwtAuthProviderConfig",
"description": "A configuration object for the Custom JWT authentication provider.",
"properties": {
"audience": {
"type": "array",
"description": "Defines the expected values of the `aud` claim in the\nexternal JWT. By default, the Custom JWT provider\nexpects `aud` to be your App ID.",
"items": {
"type": "string",
"description": "A specific expected value of the `aud` claim in\nthe external JWT."
}
},
"requireAnyAudience": {
"type": "string",
"default": false,
"description": "If `false`, the external JWT must include *all* of\nthe values defined in `audience` in its `aud` claim.\n\nIf `true`, a JWT is valid if *any* of the values\ndefined in `audience` are in its `aud` claim."
},
"signingAlgorithm": {
"type": "string",
"description": "The cryptographic method that the external system\nuses to sign the JWT. Custom JWT authentication supports\nJWTs signed using any of the following algorithms:\n\n- HS256\n- RS256"
},
"useJWKURI": {
"type": "boolean",
"description": "If `true`, the Custom JWT provider uses a signing\nalgorithm and signing keys defined in a [JSON Web\nKey](https://www.rfc-editor.org/rfc/rfc7517) (JWK)\nor JSON Web Key Set (JWKS). The JWK(S) must be\naccessible at the URL specified in `jwkURI`."
},
"jwkURI": {
"type": "string",
"description": "A URL that hosts a JWK or JWKS that describes the\nsigning method and signing keys the Custom JWT provider\nshould use. The JWK(S) may specify up to three signing\nkeys and must use the RS256 algorithm."
}
}
},
"secret_config": {
"type": "object",
"title": "CustomJwtAuthProviderSecretConfig",
"properties": {
"signingKeys": {
"type": "array",
"items": {
"type": "string",
"description": "A list of the names of up to three\n[Secrets](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets/)\nthat each contain a signing key used by the\nexternal authentication system to sign JWTs. Each\nsigning key Secret must be a string with length\nbetween 32 and 512 characters."
}
}
}
},
"metadata_fields": {
"description": "Metadata fields are additional data that describe each\nuser. The value of each metadata field comes from some\nfield included in the JWT from the external\nauthentication system.\n\nA user's metadata fields refresh whenever they log in.",
"type": "array",
"items": {
"type": "object",
"title": "CustomJwtMetadataField",
"description": "A specific metadata field from the external JWT to\ninclude the user's data. This maps an external JWT\nfield name (`name`) to the field name in the user's\ndata (`field_name`) that holds the value of that field.",
"properties": {
"required": {
"type": "boolean",
"description": "If `true`, this value must always be present in the external JWT."
},
"name": {
"type": "string",
"description": "The name of the field in the external JWT that contains the data.\n\nTo specify a field in an embedded object, use [dot notation](https://www.mongodb.com/docs/manual/core/document/#dot-notation)."
},
"field_name": {
"type": "string",
"description": "The name of the field in User object that holds the value."
}
}
}
}
}
}
]
},
"CustomFunctionAuthProvider": {
"allOf": [
{
"$ref": "#/components/schemas/BaseAuthProvider"
},
{
"properties": {
"name": {
"const": "custom-function",
"description": "The name of the authentication provider. For Custom Function authentication, this value is always `custom-function`."
},
"type": {
"const": "custom-function",
"description": "The name of the authentication provider. For Custom Function authentication, this value is always `custom-function`."
},
"config": {
"type": "object",
"title": "CustomFunctionAuthProviderConfig",
"description": "A configuration object for the Custom Function authentication provider.",
"properties": {
"authFunctionName": {
"type": "string",
"description": "The name of the [custom authentication\nfunction](https://www.mongodb.com/docs/atlas/app-services/authentication/custom-function/#the-authentication-function)\nthat handles user logins."
}
}
}
}
}
]
},
"AppleAuthProvider": {
"allOf": [
{
"$ref": "#/components/schemas/BaseAuthProvider"
},
{
"title": "AppleAuthProvider",
"properties": {
"name": {
"const": "oauth2-apple",
"description": "The name of the authentication provider. For Apple authentication, this value is always `oauth2-apple`."
},
"type": {
"const": "oauth2-apple",
"description": "The name of the authentication provider. For Apple authentication, this value is always `oauth2-apple`."
},
"config": {
"type": "object",
"title": "AppleAuthProviderConfig",
"description": "A configuration object for the Apple authentication provider.",
"properties": {
"clientId": {
"type": "string",
"description": "Your Apple Services ID.\n\nTo learn how to get this, see [Create a Services ID](https://www.mongodb.com/docs/atlas/app-services/authentication/apple/#create-a-services-id)."
}
}
},
"secret_config": {
"type": "object",
"title": "AppleAuthProviderSecretConfig",
"properties": {
"clientSecret": {
"type": "string",
"description": "The name of a\n[Secret](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets/)\nthat holds your client secret JWT.\n\nTo learn how to create this, see [Create the Client Secret JWT](https://www.mongodb.com/docs/atlas/app-services/authentication/apple/#create-the-client-secret-jwt)."
}
}
},
"redirect_uris": {
"type": "array",
"items": {
"type": "string",
"description": "A list of URIs that the OAuth flow should allow the user to redirect to."
}
}
}
}
]
},
"GoogleAuthProvider": {
"allOf": [
{
"$ref": "#/components/schemas/BaseAuthProvider"
},
{
"title": "GoogleAuthProvider",
"properties": {
"name": {
"const": "oauth2-google",
"description": "The name of the authentication provider. For Google authentication, this value is always `oauth2-google`."
},
"type": {
"const": "oauth2-google",
"description": "The name of the authentication provider. For Google authentication, this value is always `oauth2-google`."
},
"config": {
"type": "object",
"title": "GoogleAuthProviderConfig",
"description": "A configuration object for the Google authentication provider.",
"properties": {
"clientId": {
"type": "string",
"description": "An OAuth 2.0 Client ID for your GCP project.\n\nTo learn how to create one, see [Set Up a Project in\nthe Google API\nConsole](https://www.mongodb.com/docs/atlas/app-services/authentication/google/#std-label-auth-gcp-project-setup)."
},
"openId": {
"type": "boolean",
"description": "An OAuth 2.0"
}
}
},
"secret_config": {
"type": "object",
"title": "GoogleAuthProviderSecretConfig",
"properties": {
"clientSecret": {
"type": "string",
"description": "The name of a\n[Secret](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets/)\nthat holds the OAuth 2.0 Client Secret for the Client ID\nspecified in `config.clientId`."
}
}
},
"redirect_uris": {
"type": "array",
"items": {
"type": "string",
"description": "A list of URIs that the OAuth flow should allow the user to redirect to."
}
},
"metadata_fields": {
"type": "array",
"items": {
"description": "Metadata fields are additional data that describe each\nuser. The value of each metadata field comes from\nGoogle and is included in the authenticated JWT.\n\nA user's metadata fields refresh whenever they log in.",
"type": "array",
"items": {
"type": "object",
"description": "A specific metadata field from OAuth 2.0 JWT to\ninclude the user's data. This maps a JWT field name\n(`name`) to a field name of the same name in the\nuser's data.",
"properties": {
"required": {
"type": "boolean",
"description": "If `true`, include this metadata value in the OAuth JWT and the user's data."
},
"name": {
"type": "string",
"description": "The name of a user metadata property accessible through OAuth, e.g. `email`."
}
}
}
}
},
"domain_restrictions": {
"type": "array",
"items": {
"type": "string",
"description": "A list of approved domain names for user accounts. If\nthis is defined, a user must have an email address\nassociated with their OAuth profile that has a domain\nincluded in this list."
}
}
}
}
]
},
"FacebookAuthProvider": {
"allOf": [
{
"$ref": "#/components/schemas/BaseAuthProvider"
},
{
"title": "FacebookAuthProvider",
"properties": {
"name": {
"const": "oauth2-facebook",
"description": "The name of the authentication provider. For Facebook authentication, this value is always `oauth2-facebook`."
},
"type": {
"const": "oauth2-facebook",
"description": "The name of the authentication provider. For Facebook authentication, this value is always `oauth2-facebook`."
},
"config": {
"type": "object",
"title": "FacebookAuthProviderConfig",
"description": "A configuration object for the Facebook authentication provider.",
"properties": {
"clientId": {
"type": "string",
"description": "The App ID of your Facebook app."
}
}
},
"secret_config": {
"type": "object",
"title": "FacebookAuthProviderSecretConfig",
"properties": {
"clientSecret": {
"type": "string",
"description": "The name of a\n[Secret](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets/)\nthat holds your Facebook App Secret."
}
}
},
"redirect_uris": {
"type": "array",
"items": {
"type": "string",
"description": "A list of URIs that the OAuth flow should allow the user to redirect to."
}
},
"metadata_fields": {
"type": "array",
"items": {
"description": "Metadata fields are additional data that describe each\nuser. The value of each metadata field comes from\nFacebook and is included in the authenticated JWT.\n\nA user's metadata fields refresh whenever they log in.",
"type": "array",
"items": {
"type": "object",
"description": "A specific metadata field from OAuth 2.0 JWT to\ninclude the user's data. This maps a JWT field name\n(`name`) to a field name of the same name in the\nuser's data.",
"properties": {
"required": {
"type": "boolean",
"description": "If `true`, include this metadata value in the OAuth JWT and the user's data."
},
"name": {
"type": "string",
"description": "The name of a user metadata property accessible through OAuth, e.g. `email`."
}
}
}
}
},
"domain_restrictions": {
"type": "array",
"items": {
"type": "string",
"description": "A list of approved domain names for user accounts. If\nthis is defined, a user must have an email address\nassociated with their OAuth profile that has a domain\nincluded in this list."
}
}
}
}
]
},
"AdminUser": {
"properties": {
"user_id": {
"type": "string"
},
"domain_id": {
"type": "string"
},
"identities": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UserIdentity"
}
},
"data": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"type": {
"type": "string",
"enum": [
"normal",
"server",
"system",
"unknown"
]
},
"roles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"role_name": {
"type": "string"
},
"group_id": {
"type": "string"
}
}
}
}
}
},
"NewFunction": {
"properties": {
"can_evaluate": {
"type": "object",
"description": "A JSON expression that evaluates to `true` if the Function is allowed to\nrun in response to an incoming request."
},
"name": {
"type": "string",
"description": "A unique name for the Function."
},
"private": {
"type": "boolean",
"description": "If `true`, the function is hidden from client applications. You can\nstill call a private function from JSON expressions and other functions,\nincluding incoming webhooks and triggers."
},
"source": {
"type": "string",
"description": "The stringified source code for the function. The code must be valid\nES6."
},
"run_as_system": {
"type": "boolean",
"description": "If `true`, the function executes with full privileges, bypassing rules\non all services."
},
"run_as_user_id": {
"type": "string",
"description": "An application user's account ID. If defined, endpoints will always \nrun as the specified user. Cannot be used with \n`run_as_user_id_script_source`."
},
"run_as_user_id_script_source": {
"type": "string",
"description": "The stringified source code for a \n[function](https://www.mongodb.com/docs/atlas/app-services/functions/#std-label-functions)\nthat returns an application user's account ID. If defined, endpoints \nexecute the function on every request and run as the user with the \nID returned from the function. Cannot be used with `run_as_user_id`."
}
},
"required": [
"name",
"private",
"source",
"run_as_system"
]
},
"Function": {
"properties": {
"_id": {
"type": "string"
},
"can_evaluate": {
"type": "object",
"description": "A JSON expression that evaluates to `true` if the Function is allowed to\nrun in response to an incoming request."
},
"name": {
"type": "string",
"description": "A unique name for the Function."
},
"private": {
"type": "boolean",
"description": "If `true`, the function is hidden from client applications. You can\nstill call a private function from JSON expressions and other functions,\nincluding incoming webhooks and triggers."
},
"source": {
"type": "string",
"description": "The stringified source code for the function. The code must be valid\nES6."
}
}
},
"ValueSummary": {
"properties": {
"_id": {
"type": "string"
},
"name": {
"type": "string"
},
"private": {
"type": "boolean"
}
}
},
"NewValue": {
"properties": {
"name": {
"type": "string"
},
"private": {
"type": "boolean"
},
"value": {}
},
"required": [
"name",
"private",
"value"
]
},
"Value": {
"properties": {
"_id": {
"type": "string"
},
"name": {
"type": "string"
},
"private": {
"type": "boolean"
},
"value": {}
}
},
"ProviderType": {
"type": "string",
"enum": [
"anon-user",
"local-userpass",
"api-key",
"oauth2-apple",
"oauth2-google",
"oauth2-facebook",
"custom-token",
"custom-function"
]
},
"MessageState": {
"type": "string",
"enum": [
"sent",
"draft"
]
},
"NewMessage": {
"properties": {
"label": {
"type": "string"
},
"message": {
"type": "string"
},
"topic": {
"type": "string"
},
"state": {
"$ref": "#/components/schemas/MessageState"
}
},
"required": [
"label",
"message",
"state",
"topic"
]
},
"Message": {
"properties": {
"allowed_ips": {
"type": "string"
},
"appID": {
"type": "string"
},
"label": {
"type": "string"
},
"message": {
"type": "string"
},
"topic": {
"type": "string"
},
"created": {
"type": "string"
},
"sent": {
"type": "string"
},
"state": {
"$ref": "#/components/schemas/MessageState"
}
}
},
"User": {
"properties": {
"_id": {
"type": "string",
"description": "The unique user account ID"
},
"identities": {
"type": "array",
"description": "A list of authentication provider identities associated with the user account.",
"items": {
"$ref": "#/components/schemas/UserIdentity"
}
},
"type": {
"type": "string",
"enum": [
"normal",
"server"
],
"description": "The user type. Most users are `normal` and represent a\nspecific human user. Users created through the `api-key`\nprovider have the type `server` because they are typically\nused for programmatic access from a server."
},
"creation_date": {
"type": "integer",
"description": "The date and time that the user account was created.\nRepresented by the number of seconds since the UNIX epoch."
},
"last_authentication_date": {
"type": "integer",
"description": "The date and time that the user account last logged in or\nauthenticated a request. Represented by the number of\nseconds since the UNIX epoch."
},
"disabled": {
"type": "boolean",
"description": "If `true`, the user account is inactive and cannot login or interact with App Services."
},
"data": {
"type": "object",
"description": "Metadata that describes the user. This field combines the\ndata for all authentication identities associated with the\nuser. The exact field names and values depend on which\nauthentication providers the user has authenticated with.\n\nFor example, if a user has linked an email/password account\nwith their Google account, this object might contain their\n`email` as well as metadata fields from Google like `name`\nand `picture`."
}
}
},
"UserIdentity": {
"type": "object",
"description": "An authenticated identity from an authentication provider. This\nrepresents the user account within an individual auth provider\nand maps the account to external authentication systems.",
"properties": {
"id": {
"type": "string"
},
"provider_type": {
"$ref": "#/components/schemas/ProviderType"
},
"provider_id": {
"type": "string"
}
}
},
"Partition": {
"properties": {
"key": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"PbsSyncResponse": {
"properties": {
"service_id": {
"type": "string",
"description": "The Service ID for the currently synced cluster, if there is one."
},
"partition_fields": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Partition"
},
"description": "A list of valid partition keys based on the cluster's collection\nschemas."
}
}
},
"SyncDataResponse": {
"properties": {
"clusterId": {
"type": "string",
"description": "The Service ID for the linked cluster."
},
"clusterName": {
"type": "string",
"description": "The name of the linked cluster"
},
"clusterType": {
"type": "string",
"description": "The service type of the linked cluster (\"atlas\" by default)"
},
"flexible_sync": {
"$ref": "#/components/schemas/FlexibleSync"
},
"groupName": {
"type": "string",
"description": "The name of the App's Atlas Project."
},
"orgName": {
"type": "string",
"description": "The name of the App's Atlas Organization."
},
"readPreference": {
"type": "string",
"enum": [
"primary",
"primaryPreferred",
"secondary",
"secondaryPreferred",
"nearest"
]
},
"wireProtocolEnabled": {
"type": "boolean",
"description": "If true, clients may [connect to the app over the\nMongoDB Wire\nProtocol](https://www.mongodb.com/docs/atlas/app-services/mongodb/wire-protocol/#connect-over-the-wire-protocol)."
}
}
},
"FlexibleSync": {
"type": "object",
"properties": {
"state": {
"type": "string",
"description": "The state of the sync service (\"enabled\", \"disabled\", or empty if Sync is not configured)."
},
"queryable_fields_names": {
"type": "array",
"description": "An array of \n[queryable field](https://www.mongodb.com/docs/atlas/app-services/sync/configure/sync-settings/#queryable-fields) \nnames on **any collection**.",
"items": {
"type": "string"
}
},
"collection_queryable_fields_names": {
"type": "object",
"description": "An array of \n[queryable field](https://www.mongodb.com/docs/atlas/app-services/sync/configure/sync-settings/#queryable-fields) \nnames on the specified collection.",
"additionalProperties": {
"type": "object",
"additionalProperties": {
"description": "The name of the queryable field.",
"type": "string"
}
}
},
"queryable_fields_version": {
"type": "string",
"description": "The version of the queryable field."
},
"permissions": {
"type": "object",
"description": "**Deprecated**"
},
"last_disabled": {
"type": "string",
"description": "The last time Sync was disabled, represented by the number of seconds since the UNIX epoch."
},
"client_max_offline_days": {
"type": "integer",
"description": "The number of days the client can be offline before a client \n[reset](https://www.mongodb.com/docs/atlas/app-services/sync/error-handling/client-resets/) \nis required."
},
"is_recovery_mode_disabled": {
"type": "boolean",
"description": "Specifies whether the \n[client reset mode](https://www.mongodb.com/docs/atlas/app-services/sync/error-handling/client-resets/#recover-unsynced-changes) \nis disabled. By default, client reset mode is enabled and this value is **false**."
}
}
},
"AnyTrigger": {
"oneOf": [
{
"$ref": "#/components/schemas/DatabaseTrigger"
},
{
"$ref": "#/components/schemas/AuthenticationTrigger"
},
{
"$ref": "#/components/schemas/ScheduledTrigger"
}
]
},
"Trigger": {
"oneOf": [
{
"$ref": "#/components/schemas/DatabaseTrigger"
},
{
"$ref": "#/components/schemas/AuthenticationTrigger"
},
{
"$ref": "#/components/schemas/ScheduledTrigger"
}
]
},
"BaseTrigger": {
"type": "object",
"required": [
"name",
"type",
"config"
],
"properties": {
"_id": {
"type": "string",
"description": "The trigger's unique ID."
},
"name": {
"type": "string",
"description": "The trigger's name."
},
"type": {
"type": "string"
},
"disabled": {
"type": "boolean",
"default": false,
"description": "If `true`, the trigger is disabled and does not listen for events or execute."
},
"config": {
"type": "object",
"description": "An object that defines configuration values for the trigger."
},
"function_id": {
"type": "string",
"description": "The ID of the function that the trigger calls when it fires.\n\nThis value is the same as `event_processors.FUNCTION.function_id`.\nYou can either define the value here or in `event_processors.FUNCTION.function_id`.\nThe App Services backend duplicates the value to the configuration location where you did not define it.\n\nFor example, if you define `function_id`, the backend duplicates it to `event_processors.FUNCTION.function_id`."
},
"function_name": {
"type": "string",
"description": "The name of the function that the trigger calls when it\nfires, i.e. the function described by `function_id`.\n\nThis value is the same as `event_processors.FUNCTION.function_name`.\nYou can either define the value here or in `event_processors.FUNCTION.function_name`.\nThe App Services backend duplicates the value to the configuration location where you did not define it.\n\nFor example, if you define `function_name`, the backend duplicates it to `event_processors.FUNCTION.function_name`."
},
"event_processors": {
"type": "object",
"description": "An object where each field name is an event processor ID and\neach value is an object that configures its corresponding\nevent processor. For an example configuration object, see\n[Send Trigger Events to AWS\nEventBridge](https://www.mongodb.com/docs/realm/triggers/examples/send-events-aws-eventbridge#std-label-event_processor_example).",
"properties": {
"FUNCTION": {
"type": "object",
"properties": {
"config": {
"type": "object",
"properties": {
"function_id": {
"type": "string",
"description": "The ID of the function that the trigger calls when it fires.\n\nThis value is the same as the root-level `function_id`.\nYou can either define the value here or in `function_id`.\nThe App Services backend duplicates the value to the configuration location where you did not define it.\n\nFor example, if you define `event_processors.FUNCTION.function_id`, the backend duplicates it to `function_id`."
},
"function_name": {
"type": "string",
"description": "The name of the function that the trigger calls when it\nfires, i.e. the function described by `function_id`.\n\nThis value is the same as the root-level `function_name`.\nYou can either define the value here or in `function_name`.\nThe App Services backend duplicates the value to the configuration location where you did not define it.\n\nFor example, if you define `event_processors.FUNCTION.function_name`, the backend duplicates it to `function_name`."
}
}
}
}
},
"AWS_EVENTBRIDGE": {
"type": "object",
"properties": {
"config": {
"type": "object",
"properties": {
"account_id": {
"type": "string",
"description": "An AWS Account ID."
},
"region": {
"type": "string",
"description": "An AWS region."
},
"extended_json_enabled": {
"type": "boolean",
"default": false,
"description": "If `true`, event objects are serialized using EJSON."
}
}
}
}
}
}
}
}
},
"DatabaseTrigger": {
"example": {
"name": "onNewEmployee",
"type": "DATABASE",
"function_id": "5eea9ca4ca0e356e2c2a148a",
"config": {
"operation_types": [
"INSERT"
],
"database": "HR",
"collection": "employees",
"service_id": "5adeb649b8b998486770ae7c",
"match": {},
"project": {},
"full_document": true
}
},
"allOf": [
{
"$ref": "#/components/schemas/BaseTrigger"
},
{
"properties": {
"type": {
"type": "string",
"description": "The trigger type. For database triggers, this value is always `\"DATABASE\"`.",
"enum": [
"DATABASE"
]
},
"config": {
"required": [
"service_id",
"database",
"collection",
"operation_types",
"full_document",
"full_document_before_change",
"unordered",
"match"
],
"properties": {
"service_id": {
"type": "string",
"description": "The _id value of a linked MongoDB data source.\n\nSee [Get a Data Source](#operation/adminGetService).\n"
},
"database": {
"type": "string",
"description": "The name of a database in the linked data source."
},
"collection": {
"type": "string",
"description": "The name of a collection in the specified database. The\ntrigger listens to events from this collection."
},
"operation_types": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"enum": [
"INSERT",
"UPDATE",
"REPLACE",
"DELETE"
]
},
"description": "The type(s) of MongoDB change event that the trigger listens for."
},
"match": {
"type": "object",
"description": "A [$match](https://www.mongodb.com/docs/manual/reference/operator/aggregation/match)\nexpression filters change events. The trigger will only\nfire if the expression evaluates to true for a given\nchange event."
},
"project": {
"type": "object",
"description": "A [$project](https://www.mongodb.com/docs/manual/reference/operator/aggregation/project/) \nexpression returns only the specified fields. You can include \nor exclude specific fields, or include newly-computed fields."
},
"full_document": {
"type": "boolean",
"default": false,
"description": "If `true`, indicates that `UPDATE` change events should\ninclude the most current\n[majority-committed](https://www.mongodb.com/docs/manual/reference/read-concern-majority/)\nversion of the modified document in the `fullDocument`\nfield."
},
"full_document_before_change": {
"type": "boolean",
"default": false,
"description": "If true, indicates that `UPDATE` change events should\ninclude a snapshot of the modified document from\nimmediately before the update was applied.\n\nYou must enable [document\npreimages](https://www.mongodb.com/docs/atlas/app-services/mongodb/preimages/)\nfor your cluster to include these snapshots."
},
"skip_catchup_events": {
"type": "boolean",
"default": false,
"description": "If `true`, enabling the Trigger after it was disabled\nwill not invoke events that occurred while the Trigger\nwas disabled."
},
"tolerate_resume_errors": {
"type": "boolean",
"default": false,
"description": "If `true`, when this Trigger's resume token\ncannot be found in the cluster's oplog, the Trigger automatically resumes\nprocessing events at the next relevant change stream event.\nAll change stream events from when the Trigger was suspended until the Trigger\nresumes execution do not have the Trigger fire for them."
},
"maximum_throughput": {
"type": "boolean",
"default": false,
"description": "If `true`, the trigger will use the [maximize \nthroughput](https://www.mongodb.com/docs/atlas/app-services/triggers/database-triggers/#std-label-triggers-maximum-throughput) \noption. "
},
"unordered": {
"type": "boolean",
"description": "If `true`, event ordering is disabled and this Trigger\ncan process events in parallel. If `false`, event\nordering is enabled and the Trigger executes events\nserially."
}
}
}
}
}
]
},
"AuthenticationTrigger": {
"example": {
"name": "onNewApiKey",
"type": "AUTHENTICATION",
"function_id": "5eea9ca4ca0e356e2c2a148a",
"config": {
"operation_type": [
"CREATE"
],
"providers": [
"api-key"
]
}
},
"allOf": [
{
"$ref": "#/components/schemas/BaseTrigger"
},
{
"properties": {
"type": {
"type": "string",
"description": "The trigger type. For authentication triggers, this value is always `\"AUTHENTICATION\"`.",
"enum": [
"AUTHENTICATION"
]
},
"config": {
"required": [
"operation_type",
"providers"
],
"properties": {
"operation_type": {
"type": "string",
"description": "The type of authentication event that the trigger listens for.",
"enum": [
"LOGIN",
"CREATE",
"DELETE"
]
},
"providers": {
"type": "string",
"description": "The type(s) of authentication provider that the trigger listens to.",
"enum": [
"anon-user",
"api-key",
"custom-token",
"custom-function",
"local-userpass",
"oauth2-apple",
"oauth2-facebook",
"oauth2-google"
]
}
}
}
}
}
]
},
"ScheduledTrigger": {
"example": {
"name": "createDailyReport",
"type": "SCHEDULED",
"function_id": "5eea9ca4ca0e356e2c2a148a",
"config": {
"schedule": "0 8 * * *"
}
},
"allOf": [
{
"$ref": "#/components/schemas/BaseTrigger"
},
{
"properties": {
"type": {
"type": "string",
"description": "The trigger type. For scheduled triggers, this value is always `\"SCHEDULED\"`.",
"enum": [
"SCHEDULED"
]
},
"config": {
"required": [
"schedule"
],
"properties": {
"schedule": {
"type": "string",
"description": "A [cron expression](https://www.mongodb.com/docs/atlas/app-services/triggers/scheduled-triggers/#cron-expressions) that specifies when the trigger executes.",
"example": "0 11 * * *"
},
"skip_catchup_events": {
"type": "boolean",
"description": "If `true`, enabling the trigger after it was disabled\nwill not invoke events that occurred while the trigger\nwas disabled."
}
}
}
}
}
]
},
"MetadataAttribute": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The [metadata\nattribute](https://www.mongodb.com/docs/realm/hosting/file-metadata-attributes)\nname."
},
"value": {
"type": "string",
"description": "The [metadata\nattribute](https://www.mongodb.com/docs/realm/hosting/file-metadata-attributes)\nvalue."
}
}
},
"AssetMetadata": {
"properties": {
"path": {
"type": "string",
"description": "The resource path of the asset"
},
"size": {
"type": "integer",
"description": "The size of the asset in bytes"
},
"attrs": {
"type": "array",
"description": "An array of documents that each describe a [metadata\nattribute](https://www.mongodb.com/docs/realm/hosting/file-metadata-attributes)\nthat applies to the asset.",
"items": {
"$ref": "#/components/schemas/MetadataAttribute"
}
},
"hash": {
"type": "string",
"description": "The MD5 checksum hash for the asset"
}
}
},
"HostingConfiguration": {
"properties": {
"enabled": {
"type": "boolean"
},
"status": {
"type": "string",
"enum": [
"setup_ok",
"change_in_progress",
"change_failed",
"change_failed_fatal"
]
},
"default_domain": {
"type": "object",
"properties": {
"provider_type": {
"type": "string",
"example": "aws"
},
"config": {
"type": "object",
"properties": {
"app_default_domain": {
"type": "string",
"description": "Default domain of hosted Atlas App Services App provided by App Services.",
"example": "myapp-qldqx.mongodbstitch.com"
}
}
}
}
}
}
},
"HostedAssetMetadata": {
"properties": {
"appId": {
"type": "string",
"description": "The unique App ID of the Atlas App Services App that is hosting the file."
},
"last_modified": {
"type": "integer",
"description": "The time at which the hosted asset was last modified in [Unix\ntime](https://en.wikipedia.org/wiki/Unix_time) (number of seconds since\nJanuary 1, 1970 at 00:00 UTC)."
},
"url": {
"type": "string",
"description": "The full URL of the hosted asset."
},
"path": {
"type": "string",
"description": "The resource path of the hosted asset"
},
"size": {
"type": "integer",
"description": "The size of the hosted asset in bytes"
},
"attrs": {
"type": "array",
"description": "An array of documents that each describe a [metadata\nattribute](https://www.mongodb.com/docs/realm/hosting/file-metadata-attributes)\nthat applies to the asset.",
"items": {
"$ref": "#/components/schemas/MetadataAttribute"
}
},
"hash": {
"type": "string",
"description": "The MD5 checksum hash for the hosted asset"
}
}
},
"RefreshTokenExpiration": {
"type": "object",
"properties": {
"expiration_time_seconds": {
"type": "number",
"minimum": 1800,
"maximum": 15552000,
"default": 5184000,
"description": "The time in seconds that a user session refresh token is\nvalid for after it is issued. After this time, the token is\nexpired and the user must re-authenticate.\n\nThe expiration time must be between 30 minutes and 180 days,\ninclusive. The default expiration time is 60 days."
}
}
},
"Relationship": {
"type": "object",
"description": "A [relationship](https://www.mongodb.com/docs/realm/schemas/relationships/) definition.",
"properties": {
"ref": {
"type": "string",
"description": "A reference string for the foreign collection."
},
"foreign_key": {
"type": "string",
"description": "The name of the field in the foreign collection that the relationship points to."
},
"is_list": {
"type": "boolean",
"description": "If `true`:\n\n- the relationship may point to many foreign documents.\n- the local field must be defined as an array in the collection schema."
}
}
},
"SchemaMetadata": {
"type": "object",
"description": "Metadata the describes which linked collection the schema applies to.",
"properties": {
"data_source": {
"type": "string",
"description": "The data source name."
},
"database": {
"type": "string",
"description": "The database name."
},
"collection": {
"type": "string",
"description": "The collection name."
}
}
},
"GraphQLConfig": {
"type": "object",
"properties": {
"use_natural_pluralization": {
"type": "boolean",
"description": "If `true`, generated schema type names use common English\npluralization whenever possible.\n\nIf `false`, or if a natural pluralization cannot be\ndetermined, then plural types use the singular type\nname with an `\"s\"` appended to the end.\n\n**You cannot change this value after you create your App.\nThis value is `true` for all new Apps.**"
},
"disable_schema_introspection": {
"type": "boolean",
"description": "If `true`, the GraphQL API blocks [introspection queries](https://graphql.org/learn/introspection/) from clients."
}
}
},
"CustomResolver": {
"type": "object",
"required": [
"_id",
"function_id",
"on_type",
"field_name"
],
"properties": {
"_id": {
"type": "string",
"description": "The custom resolver's unique ID."
},
"function_id": {
"type": "string",
"description": "The resolver function's unique ID."
},
"on_type": {
"type": "string",
"description": "The name of the resolver's parent type. This can be\n`\"Query\"`, `\"Mutation\"`, or the name of a generated type if\nthis is a computed property."
},
"field_name": {
"type": "string",
"description": "The name of the custom resolver field that appears in the GraphQL schema."
},
"input_type": {
"oneOf": [
{
"type": "string"
},
{
"type": "object"
}
],
"description": "The type of the custom resolver's `input` parameter. This\ncan be a scalar, the name of an existing generated type, or\na custom JSON schema object. If undefined, the resolver does\nnot accept an input."
},
"input_type_format": {
"type": "string",
"enum": [
"scalar",
"scalar-list",
"generated",
"generated-list",
"custom"
],
"description": "The kind of input type the custom resolver uses. This value\nmust agree with the value of `input_type`:\n\n- A scalar input type must use `\"scalar\"` or `\"scalar-list\"`\n- A generated input type must use `\"generated\"` or `\"generated-list\"`\n- A custom input type must use `\"custom\"`\n\nIf undefined, the resolver does not accept an input."
},
"payload_type": {
"oneOf": [
{
"type": "string"
},
{
"type": "object"
}
],
"description": "The type of the value returned by the custom resolver. This\ncan be a scalar, the name of an existing generated type, or\na custom JSON schema object.\n\nIf undefined, the resolver returns a `DefaultPayload`\nobject:\n\n```graphql\ntype DefaultPayload {\n status: String!\n}\n```"
},
"payload_type_format": {
"type": "string",
"enum": [
"scalar",
"scalar-list",
"generated",
"generated-list",
"custom"
],
"description": "The kind of payload type the custom resolver uses. This value\nmust agree with the value of `payload_type`:\n\n- A scalar payload type must use `\"scalar\"` or `\"scalar-list\"`\n- A generated payload type must use `\"generated\"` or `\"generated-list\"`\n- A custom payload type must use `\"custom\"`\n\nIf undefined, the resolver returns a `DefaultPayload` object."
}
}
},
"GraphQLValidationLevel": {
"type": "string",
"enum": [
"STRICT",
"OFF"
]
},
"GraphQLValidationAction": {
"type": "string",
"enum": [
"ERROR",
"WARN"
]
},
"GraphQLValidationSettings": {
"type": "object",
"properties": {
"read_validation_action": {
"$ref": "#/components/schemas/GraphQLValidationAction"
},
"read_validation_level": {
"$ref": "#/components/schemas/GraphQLValidationLevel"
},
"write_validation_action": {
"$ref": "#/components/schemas/GraphQLValidationAction"
},
"write_validation_level": {
"$ref": "#/components/schemas/GraphQLValidationLevel"
}
}
},
"NullTypeSchemaValidationSetting": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
}
},
"ValidationError": {
"description": "An EJSON schema validation error.",
"oneOf": [
{
"$ref": "#/components/schemas/FalseValidationError"
},
{
"$ref": "#/components/schemas/RequiredValidationError"
},
{
"$ref": "#/components/schemas/InvalidTypeValidationError"
},
{
"$ref": "#/components/schemas/ItemsMustBeUniqueValidationError"
},
{
"$ref": "#/components/schemas/MissingDependencyValidationError"
},
{
"$ref": "#/components/schemas/InternalValidationError"
},
{
"$ref": "#/components/schemas/ConstValidationError"
},
{
"$ref": "#/components/schemas/EnumValidationError"
},
{
"$ref": "#/components/schemas/NumberAnyOfValidationError"
},
{
"$ref": "#/components/schemas/NumberOneOfValidationError"
},
{
"$ref": "#/components/schemas/NumberAllOfValidationError"
},
{
"$ref": "#/components/schemas/NumberNotValidationError"
},
{
"$ref": "#/components/schemas/NumberGTEValidationError"
},
{
"$ref": "#/components/schemas/NumberGTValidationError"
},
{
"$ref": "#/components/schemas/NumberLTEValidationError"
},
{
"$ref": "#/components/schemas/NumberLTValidationError"
},
{
"$ref": "#/components/schemas/MultipleOfValidationError"
},
{
"$ref": "#/components/schemas/ArrayNoAdditionalItemsValidationError"
},
{
"$ref": "#/components/schemas/ArrayMinItemsValidationError"
},
{
"$ref": "#/components/schemas/ArrayMaxItemsValidationError"
},
{
"$ref": "#/components/schemas/ArrayContainsValidationError"
},
{
"$ref": "#/components/schemas/ArrayMinPropertiesValidationError"
},
{
"$ref": "#/components/schemas/ArrayMaxPropertiesValidationError"
},
{
"$ref": "#/components/schemas/AdditionalPropertyNotAllowedValidationError"
},
{
"$ref": "#/components/schemas/InvalidPropertyPatternValidationError"
},
{
"$ref": "#/components/schemas/InvalidPropertyNameValidationError"
},
{
"$ref": "#/components/schemas/StringLengthGTEValidationError"
},
{
"$ref": "#/components/schemas/StringLengthGTValidationError"
},
{
"$ref": "#/components/schemas/StringLengthLTEValidationError"
},
{
"$ref": "#/components/schemas/StringLengthLTValidationError"
},
{
"$ref": "#/components/schemas/DoesNotMatchPatternValidationError"
},
{
"$ref": "#/components/schemas/DoesNotMatchFormatValidationError"
},
{
"$ref": "#/components/schemas/ConditionThenValidationError"
},
{
"$ref": "#/components/schemas/ConditionElseValidationError"
}
]
},
"FalseValidationError": {
"type": "string",
"const": "false"
},
"RequiredValidationError": {
"type": "string",
"const": "required",
"description": "A required field is missing."
},
"InvalidTypeValidationError": {
"type": "string",
"const": "invalid_type",
"description": "A field has an invalid value type."
},
"MissingDependencyValidationError": {
"type": "string",
"const": "missing_dependency"
},
"InternalValidationError": {
"type": "string",
"const": "internal"
},
"ConstValidationError": {
"type": "string",
"const": "const",
"description": "A field has an invalid constant value."
},
"EnumValidationError": {
"type": "string",
"const": "enum",
"description": "A field has an invalid enum value."
},
"NumberAnyOfValidationError": {
"type": "string",
"const": "number_any_of",
"description": "A field does not match any schema in [anyOf](https://json-schema.org/understanding-json-schema/reference/combining.html#anyof)."
},
"NumberOneOfValidationError": {
"type": "string",
"const": "number_one_of",
"description": "A field does not match exactly one schema in [oneOf](https://json-schema.org/understanding-json-schema/reference/combining.html#oneof)."
},
"NumberAllOfValidationError": {
"type": "string",
"const": "number_all_of",
"description": "A field does not match all schemas in [allOf](https://json-schema.org/understanding-json-schema/reference/combining.html#allof)."
},
"NumberNotValidationError": {
"type": "string",
"const": "number_not",
"description": "A field matches an exclusive schema in not."
},
"NumberGTEValidationError": {
"type": "string",
"const": "number_gte",
"description": "A field contains a number that is not greater than or equal to the minimum value."
},
"NumberGTValidationError": {
"type": "string",
"const": "number_gt",
"description": "A field contains a number that is not strictly greater than the minimum value."
},
"NumberLTEValidationError": {
"type": "string",
"const": "number_lte",
"description": "A field contains a number that is not less than or equal to the maximum value."
},
"NumberLTValidationError": {
"type": "string",
"const": "number_lt",
"description": "A field contains a number that is not strictly less than the maximum value."
},
"MultipleOfValidationError": {
"type": "string",
"const": "multiple_of",
"description": "A field contains a number that is not a multiple of the specified value."
},
"ItemsMustBeUniqueValidationError": {
"type": "string",
"const": "unique",
"description": "A field contains a unique array with non-unique values."
},
"ArrayNoAdditionalItemsValidationError": {
"type": "string",
"const": "array_no_additional_items",
"description": "A field contains a closed tuple array with invalid additional elements."
},
"ArrayMinItemsValidationError": {
"type": "string",
"const": "array_min_items",
"description": "A field contains an array with too few elements."
},
"ArrayMaxItemsValidationError": {
"type": "string",
"const": "array_max_items",
"description": "A field contains an array with too many elements."
},
"ArrayContainsValidationError": {
"type": "string",
"const": "contains",
"description": "An array does not contain any element of its contained type."
},
"ArrayMinPropertiesValidationError": {
"type": "string",
"const": "array_min_properties",
"description": "An array does not contain enough elements of its contained type."
},
"ArrayMaxPropertiesValidationError": {
"type": "string",
"const": "array_max_properties",
"description": "An array contains too many elements of its contained type."
},
"AdditionalPropertyNotAllowedValidationError": {
"type": "string",
"const": "additional_property_not_allowed",
"description": "A field is present but not defined in a closed schema."
},
"InvalidPropertyPatternValidationError": {
"type": "string",
"const": "invalid_property_pattern",
"description": "A field name that matched a pattern property does not contain a valid value."
},
"InvalidPropertyNameValidationError": {
"type": "string",
"const": "invalid_property_name",
"description": "A field name is invalid."
},
"StringLengthGTEValidationError": {
"type": "string",
"const": "string_gte",
"description": "A field contains a string that is not greater than or equal to the minimum length."
},
"StringLengthGTValidationError": {
"type": "string",
"const": "string_gt",
"description": "A field contains a string that is not strictly greater than the minimum length."
},
"StringLengthLTValidationError": {
"type": "string",
"const": "string_lt",
"description": "A field contains a string that is not strictly less than the maximum length."
},
"StringLengthLTEValidationError": {
"type": "string",
"const": "string_lte",
"description": "A field contains a string that is not less than or equal to the maximum length."
},
"DoesNotMatchPatternValidationError": {
"type": "string",
"const": "pattern",
"description": "A field contains a string that does not match the field's pattern."
},
"DoesNotMatchFormatValidationError": {
"type": "string",
"const": "format",
"description": "A field contains a string with an invalid format."
},
"ConditionThenValidationError": {
"type": "string",
"const": "condition_then",
"description": "A value is not valid when a conditional expression evaluates to `true`."
},
"ConditionElseValidationError": {
"type": "string",
"const": "condition_else",
"description": "A value is not valid when a conditional expression evaluates to `false`."
},
"AppLog": {
"oneOf": [
{
"$ref": "#/components/schemas/Logs/API"
},
{
"$ref": "#/components/schemas/Logs/APIKey"
},
{
"$ref": "#/components/schemas/Logs/TriggerFailure"
},
{
"$ref": "#/components/schemas/Logs/DBEventTrigger"
},
{
"$ref": "#/components/schemas/Logs/AuthEventTrigger"
},
{
"$ref": "#/components/schemas/Logs/ScheduledEventTrigger"
},
{
"$ref": "#/components/schemas/Logs/Function"
},
{
"$ref": "#/components/schemas/Logs/ServiceFunction"
},
{
"$ref": "#/components/schemas/Logs/StreamFunction"
},
{
"$ref": "#/components/schemas/Logs/ServiceStreamFunction"
},
{
"$ref": "#/components/schemas/Logs/Auth"
},
{
"$ref": "#/components/schemas/Logs/IncomingWebhook"
},
{
"$ref": "#/components/schemas/Logs/Endpoint"
},
{
"$ref": "#/components/schemas/Logs/Push"
},
{
"$ref": "#/components/schemas/Logs/GraphQL"
},
{
"$ref": "#/components/schemas/Logs/SyncConnectionStart"
},
{
"$ref": "#/components/schemas/Logs/SyncConnectionEnd"
},
{
"$ref": "#/components/schemas/Logs/SyncSessionStart"
},
{
"$ref": "#/components/schemas/Logs/SyncSessionEnd"
},
{
"$ref": "#/components/schemas/Logs/SyncClientWrite"
},
{
"$ref": "#/components/schemas/Logs/SyncError"
},
{
"$ref": "#/components/schemas/Logs/SyncOther"
},
{
"$ref": "#/components/schemas/Logs/SchemaAdditiveChange"
},
{
"$ref": "#/components/schemas/Logs/SchemaGeneration"
},
{
"$ref": "#/components/schemas/Logs/SchemaValidation"
},
{
"$ref": "#/components/schemas/Logs/LogForwarder"
}
]
},
"Logs": {
"Parts": {
"Messages": {
"properties": {
"messages": {
"type": "array",
"description": "A list of logs or other messages associated with the operation.\n",
"items": {
"type": "string"
}
}
}
},
"RuleMetrics": {
"properties": {
"rule_metrics": {
"type": "object",
"example": {
"namespaces_metrics": {
"chat.messages": {
"roles": {
"sender": {
"matching_documents": 12,
"evaluated_fields": 4,
"discarded_fields": 0
}
},
"no_matching_role": 0
}
}
},
"properties": {
"namespaces_metrics": {
"type": "object",
"additionalProperties": {
"description": "Metrics for a specific `database.collection` namespace.",
"type": "object",
"properties": {
"roles": {
"type": "object",
"additionalProperties": {
"type": "object",
"description": "Metrics for a specific role.",
"properties": {
"matching_documents": {
"type": "number"
},
"evaluated_fields": {
"type": "number"
},
"discarded_fields": {
"type": "number"
}
}
}
},
"no_matching_role": {
"type": "number"
}
}
}
}
}
}
}
},
"BilledMemory": {
"properties": {
"mem_time_usage": {
"type": "number",
"description": "The total billable memory used by the request.\n"
}
}
},
"SyncSession": {
"properties": {
"sync_query": {
"type": "object",
"example": {
"Item": "(owner_id == \"641cb3d99e425c794ef69315\")"
},
"description": "The current subscription queries for this Device Sync\nsession. This object maps object type names to the query for\nthat type.\n"
},
"sync_session_metrics": {
"type": "object",
"example": {
"uploads": 2,
"downloads": 6,
"downloaded_changesets": 4,
"downloaded_changesets_size": 5352,
"changesets": 2
},
"description": "Usage metrics for the current Device Sync session.\n"
}
}
},
"FunctionCall": {
"properties": {
"function_call_location": {
"type": "string",
"example": "US-VA",
"description": "The global region where the function was executed.\n"
},
"function_call_provider_region": {
"type": "string",
"example": "aws-us-east-1",
"description": "The cloud provider deployment region where the function was\nexecuted.\n"
},
"function_call": {
"type": "object",
"example": {
"name": "data/v1/insertOne",
"arguments": null
}
},
"function_id": {
"type": "string",
"example": "63866254a4e9d232454e6334"
},
"function_name": {
"type": "string",
"example": "myFunction"
}
}
},
"BaseLog": {
"type": "object",
"description": "Common fields shared by all log types.",
"properties": {
"_id": {
"type": "string",
"example": "63922bf071bdce7b19e14e76",
"description": "A unique ID for the log entry.\n"
},
"co_id": {
"type": "string",
"example": "63922bf071bdce7b19e14e75",
"description": "A correlation ID for the request that issued the logged\noperation.\n"
},
"domain_id": {
"type": "string",
"example": "60c8f69884b0a73d14bb634b",
"description": "The domain ID.\n"
},
"app_id": {
"type": "string",
"example": "60c8f69884b0a73d14bb634a",
"description": "The App's internal client ID value.\n"
},
"group_id": {
"type": "string",
"example": "5b2ec426970199272441a214",
"description": "The App's Atlas Project ID value.\n"
},
"request_url": {
"type": "string",
"example": "/api/client/v2.0/app/test-for-now-vbwlr/auth/providers/anon-user/login",
"description": "The URL that the incoming request was sent to.\n"
},
"request_method": {
"type": "string",
"example": "POST",
"description": "The HTTP method used by the incoming request.\n"
},
"started": {
"type": "string",
"example": "2022-12-08T18:24:48.409Z",
"description": "An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp for the start of the logged operation.\n"
},
"completed": {
"type": "string",
"example": "2022-12-08T18:24:48.41Z",
"description": "An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp for the completion of the logged operation.\n"
}
}
},
"TriggerLog": {
"allOf": [
{
"$ref": "#/components/schemas/Logs/Parts/BaseLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/BilledMemory"
},
{
"$ref": "#/components/schemas/Logs/Parts/FunctionCall"
},
{
"$ref": "#/components/schemas/Logs/Parts/Messages"
},
{
"properties": {
"event_subscription_id": {
"type": "string",
"example": "641ca0709e425c794edc7c6d",
"description": "The trigger's unique objectId hex.\n"
},
"event_subscription_name": {
"type": "string",
"example": "myDatabaseTrigger",
"description": "The trigger's name.\n"
}
}
}
]
},
"ClientLog": {
"properties": {
"user_id": {
"type": "string",
"example": "63922890d508542b5ae1f7fa",
"description": "The user account ID of the user that initiated the logged operation.\n"
},
"remote_ip_address": {
"type": "string",
"example": "66.232.252.246",
"description": "The IP address that the logged operation originated from.\n"
},
"status": {
"type": "number",
"example": 200,
"description": "The HTTP status code returned in the operation response.\n"
},
"error": {
"type": "string",
"example": "invalid API key",
"description": "If a runtime error occurred in the logged operation,\nthis is a message that describes the issue.\n"
},
"error_code": {
"type": "string",
"example": "AuthError",
"description": "If a runtime error occurred in the logged operation,\nthis is the error's short code.\n"
},
"platform": {
"type": "string",
"example": "chrome",
"description": "The name of the platform that the client was running on.\n"
},
"platform_version": {
"example": "111.0.0",
"description": "The version of the platform that the client was running on.\n"
},
"sdk_name": {
"example": "Realm Swift",
"description": "The name of the Realm SDK used to make the request.\n"
},
"sdk_version": {
"example": "2.0.0",
"description": "The version number of the Realm SDK used to make the request.\n"
}
}
}
},
"API": {
"allOf": [
{
"$ref": "#/components/schemas/Logs/Parts/BaseLog"
},
{
"title": "API",
"properties": {
"type": {
"const": "API"
}
}
}
]
},
"APIKey": {
"allOf": [
{
"$ref": "#/components/schemas/Logs/Parts/BaseLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/ClientLog"
},
{
"title": "API_KEY",
"properties": {
"type": {
"const": "API_KEY"
}
}
}
]
},
"TriggerFailure": {
"allOf": [
{
"$ref": "#/components/schemas/Logs/Parts/BaseLog"
},
{
"title": "TRIGGER_FAILURE",
"properties": {
"type": {
"const": "TRIGGER_FAILURE"
},
"event_subscription_id": {
"example": "641ca0b87649edd250f7536c"
},
"event_subscription_name": {
"example": "myScheduledTrigger"
},
"error": {
"type": "string",
"description": "An error message that describes the failure."
}
}
}
]
},
"DBEventTrigger": {
"allOf": [
{
"$ref": "#/components/schemas/Logs/Parts/TriggerLog"
},
{
"title": "DB_TRIGGER",
"properties": {
"type": {
"const": "DB_TRIGGER"
}
}
}
]
},
"AuthEventTrigger": {
"allOf": [
{
"$ref": "#/components/schemas/Logs/Parts/TriggerLog"
},
{
"title": "AUTH_TRIGGER",
"properties": {
"type": {
"const": "AUTH_TRIGGER"
}
}
}
]
},
"ScheduledEventTrigger": {
"allOf": [
{
"$ref": "#/components/schemas/Logs/Parts/TriggerLog"
},
{
"title": "SCHEDULED_TRIGGER",
"properties": {
"type": {
"const": "SCHEDULED_TRIGGER"
}
}
}
]
},
"Function": {
"allOf": [
{
"$ref": "#/components/schemas/Logs/Parts/BaseLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/ClientLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/FunctionCall"
},
{
"$ref": "#/components/schemas/Logs/Parts/BilledMemory"
},
{
"title": "FUNCTION",
"properties": {
"type": {
"const": "FUNCTION"
}
}
}
]
},
"ServiceFunction": {
"allOf": [
{
"$ref": "#/components/schemas/Logs/Parts/BaseLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/ClientLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/FunctionCall"
},
{
"title": "SERVICE_FUNCTION",
"properties": {
"type": {
"const": "SERVICE_FUNCTION"
}
}
}
]
},
"StreamFunction": {
"allOf": [
{
"$ref": "#/components/schemas/Logs/Parts/BaseLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/ClientLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/FunctionCall"
},
{
"title": "STREAM_FUNCTION",
"properties": {
"type": {
"const": "STREAM_FUNCTION"
}
}
}
]
},
"ServiceStreamFunction": {
"allOf": [
{
"$ref": "#/components/schemas/Logs/Parts/BaseLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/ClientLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/FunctionCall"
},
{
"title": "SERVICE_STREAM_FUNCTION",
"properties": {
"type": {
"const": "SERVICE_STREAM_FUNCTION"
}
}
}
]
},
"Auth": {
"allOf": [
{
"$ref": "#/components/schemas/Logs/Parts/BaseLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/ClientLog"
},
{
"title": "AUTH",
"properties": {
"type": {
"const": "AUTH"
},
"auth_event": {
"type": "object",
"example": {
"type": "login",
"provider": "api-key"
},
"properties": {
"type": {
"type": "string",
"example": "login",
"description": "The requested authentication operation."
},
"provider": {
"allOf": [
{
"$ref": "#/components/schemas/ProviderType"
},
{
"description": "The authentication provider used for the authentication operation.",
"example": "api-key"
}
]
}
}
}
}
}
]
},
"IncomingWebhook": {
"allOf": [
{
"$ref": "#/components/schemas/Logs/Parts/BaseLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/FunctionCall"
},
{
"$ref": "#/components/schemas/Logs/Parts/BilledMemory"
},
{
"title": "WEBHOOK",
"properties": {
"type": {
"const": "WEBHOOK"
}
}
}
]
},
"Endpoint": {
"allOf": [
{
"$ref": "#/components/schemas/Logs/Parts/BaseLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/ClientLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/FunctionCall"
},
{
"$ref": "#/components/schemas/Logs/Parts/BilledMemory"
},
{
"title": "ENDPOINT",
"properties": {
"type": {
"const": "ENDPOINT"
},
"endpoint_id": {
"type": "string",
"example": "63866254a4e9d232454f6485",
"description": "The endpoint's unique objectId hex.\n"
},
"endpoint_route": {
"type": "string",
"example": "/data/v1/action/insertOne",
"description": "The endpoint route. Append this to your App's Data API base\nURL to construct the endpoint URL.\n"
},
"endpoint_args": {
"type": "string",
"description": "The endpoint request's HTTP headers, parameters, and body serialized to EJSON.\n",
"example": {
"query": {},
"headers": {
"Accept": [
"application/json"
],
"Api-key": [
"NmYQlv7Eisqe9RjrkqFiBjgSii3wGLXWedDz4drbkQpzGkA93ZZcIMTUEIOqwCNN"
]
},
"body": {
"$binary": {
"base64": "eyJjb2xsZWN0aW9uIjoiSXRlbSIsImRhdGFTb3VyY2UiOiJtb25nb2RiLWF0bGFzIiwiZGF0YWJhc2UiOiJ0b2RvIiwiZmlsdGVyIjp7Il9pZCI6eyIkb2lkIjoiNjQxMTQ1OTgzYjAwN2RjYWJjZTkxNWFmIn19fQ==",
"subType": "00"
}
}
}
}
}
}
]
},
"Push": {
"allOf": [
{
"$ref": "#/components/schemas/Logs/Parts/BaseLog"
},
{
"title": "PUSH",
"properties": {
"type": {
"const": "PUSH"
}
}
}
]
},
"GraphQL": {
"allOf": [
{
"$ref": "#/components/schemas/Logs/Parts/BaseLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/ClientLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/FunctionCall"
},
{
"$ref": "#/components/schemas/Logs/Parts/BilledMemory"
},
{
"$ref": "#/components/schemas/Logs/Parts/RuleMetrics"
},
{
"title": "GRAPHQL",
"properties": {
"type": {
"const": "GRAPHQL"
},
"graphql_query": {
"type": "string",
"example": "query FetchAllItems {\n items {\n _id\n owner_id\n isComplete\n summary\n __typename\n }\n}",
"description": "The raw requested GraphQL query or mutation.\n"
}
}
}
]
},
"SyncConnectionStart": {
"allOf": [
{
"$ref": "#/components/schemas/Logs/Parts/BaseLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/ClientLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/FunctionCall"
},
{
"title": "SYNC_CONNECTION_START",
"properties": {
"type": {
"const": "SYNC_CONNECTION_START"
}
}
}
]
},
"SyncConnectionEnd": {
"allOf": [
{
"$ref": "#/components/schemas/Logs/Parts/BaseLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/ClientLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/FunctionCall"
},
{
"$ref": "#/components/schemas/Logs/Parts/Messages"
},
{
"title": "SYNC_CONNECTION_END",
"properties": {
"type": {
"const": "SYNC_CONNECTION_END"
}
}
}
]
},
"SyncSessionStart": {
"allOf": [
{
"$ref": "#/components/schemas/Logs/Parts/BaseLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/ClientLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/FunctionCall"
},
{
"$ref": "#/components/schemas/Logs/Parts/SyncSession"
},
{
"title": "SYNC_SESSION_START",
"properties": {
"type": {
"const": "SYNC_SESSION_START"
}
}
}
]
},
"SyncSessionEnd": {
"allOf": [
{
"$ref": "#/components/schemas/Logs/Parts/BaseLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/ClientLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/FunctionCall"
},
{
"$ref": "#/components/schemas/Logs/Parts/Messages"
},
{
"$ref": "#/components/schemas/Logs/Parts/SyncSession"
},
{
"title": "SYNC_SESSION_END",
"properties": {
"type": {
"const": "SYNC_SESSION_END"
}
}
}
]
},
"SyncClientWrite": {
"allOf": [
{
"$ref": "#/components/schemas/Logs/Parts/BaseLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/ClientLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/FunctionCall"
},
{
"$ref": "#/components/schemas/Logs/Parts/Messages"
},
{
"$ref": "#/components/schemas/Logs/Parts/SyncSession"
},
{
"title": "SYNC_CLIENT_WRITE",
"properties": {
"type": {
"const": "SYNC_CLIENT_WRITE"
}
}
}
]
},
"SyncError": {
"allOf": [
{
"$ref": "#/components/schemas/Logs/Parts/BaseLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/ClientLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/Messages"
},
{
"title": "SYNC_ERROR",
"properties": {
"type": {
"const": "SYNC_ERROR"
}
}
}
]
},
"SyncOther": {
"allOf": [
{
"$ref": "#/components/schemas/Logs/Parts/BaseLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/ClientLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/Messages"
},
{
"$ref": "#/components/schemas/Logs/Parts/SyncSession"
},
{
"title": "SYNC_OTHER",
"properties": {
"type": {
"const": "SYNC_OTHER"
}
}
}
]
},
"SchemaAdditiveChange": {
"allOf": [
{
"$ref": "#/components/schemas/Logs/Parts/BaseLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/ClientLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/FunctionCall"
},
{
"$ref": "#/components/schemas/Logs/Parts/Messages"
},
{
"$ref": "#/components/schemas/Logs/Parts/RuleMetrics"
},
{
"title": "SCHEMA_ADDITIVE_CHANGE",
"properties": {
"type": {
"const": "SCHEMA_ADDITIVE_CHANGE"
}
}
}
]
},
"SchemaGeneration": {
"allOf": [
{
"$ref": "#/components/schemas/Logs/Parts/BaseLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/ClientLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/RuleMetrics"
},
{
"title": "SCHEMA_GENERATION",
"properties": {
"type": {
"const": "SCHEMA_GENERATION"
},
"service_id": {
"type": "string",
"example": "63ee5785bbfa4b9457f8509e",
"description": "The ID of the data source that the schema was generated from.\n"
}
}
}
]
},
"SchemaValidation": {
"allOf": [
{
"$ref": "#/components/schemas/Logs/Parts/BaseLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/ClientLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/Messages"
},
{
"$ref": "#/components/schemas/Logs/Parts/RuleMetrics"
},
{
"title": "SCHEMA_VALIDATION",
"properties": {
"type": {
"const": "SCHEMA_VALIDATION"
},
"service_id": {
"type": "string",
"example": "63ee5785bbfa4b9457f8509e",
"description": "The ID of the data source that was validated against the schema.\n"
}
}
}
]
},
"LogForwarder": {
"allOf": [
{
"$ref": "#/components/schemas/Logs/Parts/BaseLog"
},
{
"$ref": "#/components/schemas/Logs/Parts/FunctionCall"
},
{
"$ref": "#/components/schemas/Logs/Parts/Messages"
},
{
"$ref": "#/components/schemas/Logs/Parts/BilledMemory"
},
{
"title": "LOG_FORWARDER",
"properties": {
"type": {
"const": "LOG_FORWARDER"
},
"event_subscription_id": {
"type": "string",
"example": "641caa28ce889d60d32b9fe2",
"description": "The underlying log event subscription's unique objectId hex.\n"
},
"event_subscription_name": {
"type": "string",
"example": "toMongo_event_subscription",
"description": "The underlying log event subscription's name.\n"
},
"log_forwarder_id": {
"type": "string",
"example": "641caa28ce889d60d32b9fe2",
"description": "The log forwarder's unique objectId hex.\n"
},
"log_forwarder_name": {
"type": "string",
"example": "toMongo",
"description": "The log forwarder's name.\n"
},
"failed_to_forward_log_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "An array of log ``_id`` values for any logs that were not successfully forwarded.\n"
},
"data_source_id": {
"type": "string",
"example": "63ee5785bbfa4b9457f8509e",
"description": "The ID of the forwarded log data source.\n"
},
"data_source_name": {
"type": "string",
"example": "mongodb-atlas",
"description": "The name of the forwarded log data source.\n"
},
"data_source_namespace": {
"type": "string",
"example": "myApp.logs",
"description": "The `database.collection` namespace of the forwarded log collection.\n"
}
}
}
]
}
},
"PrivateEndpoint": {
"type": "object",
"properties": {
"_id": {
"type": "string"
},
"cloud_provider_region": {
"type": "string",
"example": "aws-us-east-1",
"description": "The cloud provider region that hosts the private endpoint."
},
"cloud_provider_endpoint_id": {
"type": "string",
"example": "vpce-12345678",
"description": "The private endpoint ID from the cloud provider."
},
"comment": {
"type": "string",
"description": "An optional comment that describes the endpoint."
}
}
},
"PrivateEndpointServiceInfo": {
"type": "object",
"properties": {
"cloud_provider_region": {
"type": "string",
"example": "aws-us-east-1"
},
"name": {
"type": "string",
"example": "eps_baas-pl-prod_us-east-1_cloud"
},
"dns": {
"type": "string",
"example": "*.aws.realm.mongodb.com"
},
"service_name": {
"type": "string",
"example": "com.amazonaws.vpce.us-east-1.vpce-svc-0f24fc6e6de007e5e"
}
}
}
},
"securitySchemes": {
"tokenAuth": {
"type": "http",
"scheme": "bearer",
"description": "An `access_token` issued by the App Services Admin API. You can\nget this value either by [authenticating with\ncredentials](#get-an-admin-api-session-access-token) or by\n[refreshing an existing access\ntoken](#refresh-an-admin-api-session-access-token)."
},
"refreshAuth": {
"type": "http",
"scheme": "bearer",
"description": "A `refresh_token` issed by the App Services Admin API when you\nauthenticated. Use this to [refresh an existing access\ntoken](#refresh-an-admin-api-session-access-token)."
}
},
"responses": {
"BadRequest": {
"description": "There is an error in the request.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"EnvironmentValueNotFound": {
"description": "Environment value not found",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Error"
},
{
"properties": {
"error_code": {
"const": "EnvironmentValueNotFound"
}
}
}
]
}
}
}
}
}
},
"tags": [
{
"name": "admin",
"x-displayName": "Administrator",
"description": "Log in and adminstrate App Services Apps."
},
{
"name": "apikeys",
"x-displayName": "API Keys",
"description": "View and manage API keys through the [API Key provider](https://www.mongodb.com/docs/atlas/app-services/authentication/api-key/)."
},
{
"name": "apps",
"x-displayName": "Applications",
"description": "View and manage applications in an Atlas project."
},
{
"name": "authproviders",
"x-displayName": "Authentication Providers",
"description": "View and manage [authentication providers](https://www.mongodb.com/docs/atlas/app-services/authentication/)."
},
{
"name": "billing",
"x-displayName": "Billing",
"description": "View billed usage of your applications."
},
{
"name": "custom-user-data",
"x-displayName": "Custom User Data",
"description": "Configure [custom user data](https://www.mongodb.com/docs/atlas/app-services/users/enable-custom-user-data/)."
},
{
"name": "deploy",
"x-displayName": "Deployment",
"description": "## Draft and Deploy a Group of Changes\n\nYou can [deploy](https://www.mongodb.com/docs/atlas/app-services/apps/deploy/) a\ngroup of application changes together by creating and deploying a draft.\nTo create and deploy a set of draft changes:\n\n### 1. Create a New Draft\n\nA draft represents a group of application changes that you can deploy or\ndiscard as a single unit. To create a draft, send a `POST` request to\nthe drafts endpoint:\n\n```shell\ncurl --request POST \\\n --header 'Content-Type: application/json' \\\n --header 'Authorization: Bearer <access_token>' \\\n 'https://realm.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/drafts'\n```\n\n\n#### One Draft Per User\n\nEach user can only create a single draft at a time, either through the\nUI or the Admin API. If you already have an existing draft, you can\ndiscard the changes associated with it by sending a `DELETE` request to\nthe draft's endpoint:\n\n```shell\ncurl --request DELETE \\\n --header 'Authorization: Bearer <access_token>' \\\n 'https://realm.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/drafts/{draftId}'\n```\n\n### 2. Make Changes to Your Application\n\nOnce you've created a draft, make all of the changes that you want to\ninclude in the draft. App Services adds any application changes that you make\nto the draft so that you can deploy them together.\n\n### 3. Deploy the Draft\n\nAfter you've made all the changes that you want to include in the\ndeployment, deploy the draft by sending a `POST` request to that draft's\ndeployment endpoint:\n\n```shell\ncurl --request POST \\\n --header 'Content-Type: application/json' \\\n --header 'Authorization: Bearer <access_token>' \\\n 'https://realm.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/drafts/{draftId}/deployment'\n```\n\n#### Draft Conflicts\n\nIf you deploy changes through the API but have conflicting changes in a\ndraft in the UI, your UI draft will become invalid and you will not be\nable to deploy it. You can download your UI draft by reviewing the draft\nin the `Deployment` page. You can use the download to deploy your\nchanges in the `appservices` CLI or as a reference as you reapply changes in\nthe UI.\n"
},
{
"name": "data-api",
"x-displayName": "Data API",
"description": "Manage your app's generated [Data API endpoints](https://www.mongodb.com/docs/atlas/app-services/data-api/generated-endpoints/).\n\n## Construct a Data API Base URL\n\nData API requests use a base URL that's specific to your App and\ndeployment model.\n\nFor a globally deployed app, the base URL has the following format:\n\n```\nhttps://data.mongodb-api.com/app/{ClientAppID}/endpoint/data/{DataAPIVersion}\n```\n\nA locally deployed app uses a similar base URL also includes the\nApp's deployment region and cloud provider:\n\n```\nhttps://{Region}.{Cloud}.data.mongodb-api.com/app/{ClientAppID}/endpoint/data/{DataAPIVersion}\n```\n\nYou can find an App's `Region`, `Cloud`, and `ClientAppId` in the\n[App Configuration](#tag/apps/operation/adminGetApplication):\n\n```sh\ncurl -X GET https://realm.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId} \\\n -h 'Authorization: Bearer <AccessToken>'\n```\n\nYou can see a list of all `DataAPIVersion` values supported by an App in\nthe `versions` field of its [Data API\nConfiguration](#tag/data-api/operation/adminGetDataApiConfig):\n\n```sh\ncurl -X GET \"https://realm.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/data_api/config\" \\\n -h 'Authorization: Bearer <AccessToken>'\n```\n\nFor example, consider an App that has the following configuration:\n\n```json\n{\n \"client_app_id\": \"myapp-abcde\",\n \"deployment_model\": \"LOCAL\",\n \"provider_region\": \"aws-us-east-1\",\n ...\n}\n```\n\nThis App would use the following base URL for Data API v1 requests:\n\n```text\nhttps://us-east-1.aws.data.mongodb-api.com/app/myapp-abcde/endpoint/data/v1\n```"
},
{
"name": "dependencies",
"x-displayName": "Dependencies",
"description": "Manage your application's [external dependencies](https://www.mongodb.com/docs/atlas/app-services/functions/dependencies/)."
},
{
"name": "endpoints",
"x-displayName": "Endpoints",
"description": "View and manage your app's custom [HTTPS endpoints](https://www.mongodb.com/docs/atlas/app-services/data-api/custom-endpoints/).\n\n## Construct a Custom HTTPS Endpoint Base URL\n\nHTTPS Endpoint requests use a base URL that's specific to your App and\ndeployment model.\n\nFor a globally deployed app, the base URL has the following format:\n\n```\nhttps://data.mongodb-api.com/app/{ClientAppID}/endpoint\n```\n\nA locally deployed app uses a similar base URL also includes the\nApp's deployment region and cloud provider:\n\n```\nhttps://{Region}.{Cloud}.data.mongodb-api.com/app/{ClientAppID}/endpoint\n```\n\nYou can find an App's `Region`, `Cloud`, and `ClientAppId` by\ncalling the [Get an App](#tag/apps/operation/adminGetApplication) endpoint:\n\n```sh\ncurl -X GET https://realm.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId} \\\n -h 'Authorization: Bearer <AccessToken>'\n```\n\nFor example, consider an App that has the following configuration:\n\n```json\n{\n \"client_app_id\": \"myapp-abcde\",\n \"deployment_model\": \"LOCAL\",\n \"provider_region\": \"aws-us-east-1\",\n ...\n}\n```\n\nThis App would use the following base URL for incoming custom HTTPS endpoint requests:\n\n```text\nhttps://us-east-1.aws.data.mongodb-api.com/app/myapp-abcde/endpoint\n```"
},
{
"name": "event-subscriptions",
"x-displayName": "Event Subscriptions",
"description": "View your app's active event subscriptions. These monitor\nreal-time events, e.g. from a MongoDB change stream, to power\napplication services like Triggers and Device Sync."
},
{
"name": "environments",
"x-displayName": "Environments",
"description": "View and manage your app's [environment](https://www.mongodb.com/docs/atlas/app-services/apps/environment/) and environment values."
},
{
"name": "functions",
"x-displayName": "Functions",
"description": "View and manage your app's [functions](https://www.mongodb.com/docs/atlas/app-services/functions/)."
},
{
"name": "graphql",
"x-displayName": "GraphQL API",
"description": "Configure and run GraphQL API operations."
},
{
"name": "hosting",
"x-displayName": "Hosting",
"description": "Manage your application's [hosted files](https://www.mongodb.com/docs/atlas/app-services/hosting/).\n\n## Asset Metadata Document Example\n\nAsset metadata documents describe hosted asset files.\n\n```json\n{\n \"path\": \"<Asset Resource Path>\",\n \"hash\": \"<Asset MD5 Checksum Hash>\",\n \"size\": <File size in bytes>,\n \"attrs\": [\n {\n \"name\": \"<Metadata Attribute Name>\",\n \"value\": \"<Metadata Attribute Value>\",\n }\n ]\n}\n```\n"
},
{
"name": "logs",
"x-displayName": "Logs",
"description": "Access your application's [logs](https://www.mongodb.com/docs/atlas/app-services/logs/).\n\n## Pagination with the Logging API\n\nThe Logging endpoint returns up to 100 log entries per page. If the\nquery matches more than 100 entries, the result will be\n[paginated](https://en.wikipedia.org/wiki/Pagination). Such a result\nwill contain two pieces of information that you will need to request the\nnext page of entries for the same query: the `nextEndDate` and\n`nextSkip` fields.\n\nPaginated results always contain the `nextEndDate` field. A paginated\nresult will also contain the `nextSkip` field if the timestamp of the\nfirst entry on the next page is identical to the timestamp of the last\nentry on the current page.\n\nTo request the first page of up to 100 log entries, use the endpoint as\nusual:\n\n```sh\ncurl --request GET \\\n --header 'Authorization: Bearer <access_token>' \\\n 'https://realm.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/logs'\n```\n\nTo request the next page of up to 100 log entries, pass the values of\n`nextEndDate` and `nextSkip` as the `end_date` and `skip` parameters,\nrespectively:\n\n```sh\ncurl --request GET \\\n --header 'Authorization: Bearer <access_token>' \\\n 'https://realm.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/logs?end_date={nextEndDate of previous response}&skip={nextSkip of previous response}'\n```\n\nRepeat this step to get more pages until the response does not have a\n`nextEndDate` field. This signifies that you have reached the last page.\n\nFor more information, see [GET /groups/{groupId}/apps/{appId}/logs](#section/adminGetLogs).\n"
},
{
"name": "log_forwarders",
"x-displayName": "Log Forwarding",
"description": "View and manage your application's [log forwarders](https://www.mongodb.com/docs/atlas/app-services/logs/forward-logs/)."
},
{
"name": "metrics",
"x-displayName": "Metrics",
"description": "View Atlas App Services metrics."
},
{
"name": "rules",
"x-displayName": "Rules",
"description": "View and manage your application's [data access rules](https://www.mongodb.com/docs/atlas/app-services/rules/)."
},
{
"name": "schemas",
"x-displayName": "Schemas",
"description": "View and manage your application's [schemas](https://www.mongodb.com/docs/realm/schemas/)."
},
{
"name": "secrets",
"x-displayName": "Secrets",
"description": "View and manage your application's [secrets](https://www.mongodb.com/docs/realm/values-and-secrets/)."
},
{
"name": "security",
"x-displayName": "Security",
"description": "Configure your application's [security](https://www.mongodb.com/docs/atlas/app-services/security/)."
},
{
"name": "services",
"x-displayName": "Data Sources & Services",
"description": "View and manage your application's [data sources](https://www.mongodb.com/docs/atlas/app-services/mongodb/) and [third-party services [Deprecated]](https://www.mongodb.com/docs/atlas/app-services/reference/services/)"
},
{
"name": "sync",
"x-displayName": "Sync",
"description": "Get information about [sync](https://www.mongodb.com/docs/realm/sync/) for your application."
},
{
"name": "triggers",
"x-displayName": "Triggers",
"description": "View and manage your application's [triggers](https://www.mongodb.com/docs/atlas/app-services/triggers/overview/)."
},
{
"name": "users",
"x-displayName": "Users",
"description": "View and manage your application's [users](https://www.mongodb.com/docs/realm/authentication/)."
},
{
"name": "email",
"x-displayName": "User Confirmation",
"description": "Confirm pending users with the built-in email confirmation flow."
},
{
"name": "values",
"x-displayName": "Values",
"description": "View and manage your application's [values](https://www.mongodb.com/docs/realm/values-and-secrets/)."
},
{
"name": "notifications",
"x-displayName": "[Deprecated] Push Notifications",
"description": "View and manage your application's [push notifications](https://www.mongodb.com/docs/atlas/app-services/push-notifications/)."
},
{
"name": "webhooks",
"x-displayName": "[Deprecated] Webhooks",
"description": "View and manage your application's [webhooks](https://www.mongodb.com/docs/atlas/app-services/services/configure/service-webhooks/)."
}
],
"security": [
{
"tokenAuth": []
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment