path パラメータ
-
Atlas Project/Group ID。
-
アプリケーションの ObjectID。App Services API プロジェクトとアプリケーション ID のセクションでは、この値を見つける方法が示されています。
body
必須
新しいエンドポイントの有効な構成オブジェクト。
-
値は、
GET
、POST
、PUT
、PATCH
、DELETE
、または*
です。 -
エンドポイント関数のユニークな ID。
-
値は
NO_VALIDATION
、SECRET_AS_QUERY_PARAM
、またはVERIFY_PAYLOAD
です。 -
validation_method
が"SECRET_AS_QUERY_PARAM"
または"VERIFY_PAYLOAD"
に設定されている場合、これはリクエストを承認するシークレット の_id
です。 -
データAPIとカスタム エンドポイントによってサポートされているデータ形式。
値は
JSON
またはEJSON
です。 -
エンドポイントのユニークな ID。
POST /groups/{groupId}/apps/{appId}/endpoints
curl \
--request POST 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/endpoints' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"route":"string","http_method":"GET","function_id":"string","validation_method":"NO_VALIDATION","secret_id":"string","return_type":"JSON","respond_result":true,"fetch_custom_user_data":true,"create_user_on_auth":true,"disabled":true,"_id":"string"}'
リクエスト例
{
"route": "string",
"http_method": "GET",
"function_id": "string",
"validation_method": "NO_VALIDATION",
"secret_id": "string",
"return_type": "JSON",
"respond_result": true,
"fetch_custom_user_data": true,
"create_user_on_auth": true,
"disabled": true,
"_id": "string"
}
応答の例(201)
{
"route": "string",
"http_method": "GET",
"function_id": "string",
"validation_method": "NO_VALIDATION",
"secret_id": "string",
"return_type": "JSON",
"respond_result": true,
"fetch_custom_user_data": true,
"create_user_on_auth": true,
"disabled": true,
"_id": "string",
"function_name": "string"
}