新しいアプリを作成する

POST /groups/{groupId}/apps

path パラメータ

クエリ パラメータ

  • defaults ブール値

    デフォルトのアプリケーションを作成するかどうか。

  • product string

    アプリの製品の種類。アプリはデフォルトで standard 製品の種類を使用します。ほとんどのアプリでは、product を指定する必要はありません。または、standard を指定する必要があります。

    atlasdata-api、および device-sync 製品の種類は、Atlas UI からアクセスできる Atlas TriggersAtlas Data API、および Atlas Device Sync 用の特別なアプリを表します。

    値は、standardatlasdata-api、または device-sync です。

application/ JSON

body 必須

作成する新しいアプリを記述するオブジェクト

  • name string

    アプリケーションの名前。文字で始まる必要があり、ASCII 文字、数字、アンダースコア、ハイフンのみを含めることができます。

  • provider_region string

    次の 1 つ:

    値は、aws-us-east-1aws-us-west-2aws-us-east-2aws-eu-central-1aws-eu-west-1aws-eu-west-2aws-ap-southeast-1aws-ap-southeast-2aws-ap-south-1、または aws-sa-east-1 です。

    値は、azure-eastus2azure-westusazure-westeuropeazure-eastasia、または azure-southeastasia です。

    値は、gcp-us-central1gcp-us-east4gcp-us-west1gcp-europe-west1、または gcp-asia-south1 です。

  • ロケーション string

    アプリをホストするクラウドプロバイダーに関係なく、アプリサーバーが物理的に配置されるロケーションの識別子です。

    値は、US-VAUS-ORDE-FFIEAUIN-MBSG、または BR-SP です。

  • deployment_model string

    アプリケーションの配置モデル

    値は GLOBAL または LOCAL です。

  • environment string

    アプリケーションの環境。

    値は、developmenttestingqa、または production です。

  • template_id string
  • data_source オブジェクト

    次の 1 つ:

応答

  • 201 application/ JSON

    アプリケーションが正常に作成されました。

    応答属性の非表示 応答属性の表示 オブジェクト

    特定の既存のアプリケーション。

    • name string

      アプリケーションの名前。文字で始まる必要があり、ASCII 文字、数字、アンダースコア、ハイフンのみを含めることができます。

    • provider_region string

      次の 1 つ:

      値は、aws-us-east-1aws-us-west-2aws-us-east-2aws-eu-central-1aws-eu-west-1aws-eu-west-2aws-ap-southeast-1aws-ap-southeast-2aws-ap-south-1、または aws-sa-east-1 です。

      値は、azure-eastus2azure-westusazure-westeuropeazure-eastasia、または azure-southeastasia です。

      値は、gcp-us-central1gcp-us-east4gcp-us-west1gcp-europe-west1、または gcp-asia-south1 です。

    • ロケーション string

      アプリをホストするクラウドプロバイダーに関係なく、アプリサーバーが物理的に配置されるロケーションの識別子です。

      値は、US-VAUS-ORDE-FFIEAUIN-MBSG、または BR-SP です。

    • deployment_model string

      アプリケーションの配置モデル

      値は GLOBAL または LOCAL です。

    • environment string

      アプリケーションの環境。

      値は、developmenttestingqa、または production です。

    • _id string

      アプリケーションの一意の内部ID。

    • client_app_id string

      アプリケーションの公開 App ID。

    • domain_id string

      アプリケーションに関連付けられた ドメインID。

    • group_id string

      アプリケーションの Atlas Project/Group ID

    • last_used integer

      このアプリが最後に使用された時刻(UNIX 時間)(つまり 1 月 1、1970 からの秒数)。

    • last_modified integer

      このアプリがUNIX 時間で最後に変更された時刻(つまり 1 月 1、1970 からの秒数)。

    • product string

      このアプリはの製品です。

      値は、standardatlasdata-api、または device-sync です。

  • 400 application/ JSON

    リクエストにエラーがあります。

    応答属性の非表示 応答属性の表示 オブジェクト
    • エラー string

      エラーを説明するメッセージ。

    • error_code string

      エラーの種類。

POST /groups/{groupId}/apps
curl \
 --request POST 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"name":"MyApp","provider_region":"aws-us-east-1","location":"US-VA","deployment_model":"GLOBAL","environment":"production","template_id":"string","data_source":{"_id":"string","name":"string","type":"string"}}'
リクエスト例
{
  "name": "MyApp",
  "provider_region": "aws-us-east-1",
  "location": "US-VA",
  "deployment_model": "GLOBAL",
  "environment": "production",
  "template_id": "string",
  "data_source": {
    "_id": "string",
    "name": "string",
    "type": "string"
  }
}
応答の例(201)
{
  "name": "MyApp",
  "provider_region": "aws-us-east-1",
  "location": "US-VA",
  "deployment_model": "GLOBAL",
  "environment": "production",
  "_id": "633209ffd3bd3478005d1bac",
  "client_app_id": "myapp-abcde",
  "domain_id": "63320a2b5f9de9a6e0a213e8",
  "group_id": "5b2ec991973129243223a114",
  "last_used": 1664224746,
  "last_modified": 1656440824,
  "product": "standard"
}
応答の例(400)
{
  "error": "string",
  "error_code": "string"
}