Get the Data API Configuration

GET /groups/{groupId}/apps/{appId}/data_api/config

Get your app's Data API configuration.

Path parameters

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object | null
    • disabled boolean Required
    • versions array[string] Required

      A supported version of the Data API.

      Value is v1.

    • return_type string Required

      A data format supported by the Data API & custom endpoints.

      Values are JSON or EJSON.

    • create_user_on_auth boolean
    • run_as_user_id string

      An application user's account ID. If defined, endpoints will always run as the specified user.

    • run_as_user_id_script_source string

      Stringified source code for a function that returns an application user's account ID. If defined, endpoints execute the function on every request and run as the user with the ID returned from the function.

    • validation_method string Required

      Values are NO_VALIDATION, SECRET_AS_QUERY_PARAM, or VERIFY_PAYLOAD.

    • secret_name string

      If validation_method is set to "SECRET_AS_QUERY_PARAM" or "VERIFY_PAYLOAD", this is the name of the Secret that authorizes requests.

    • can_evaluate object

      A JSON expression that evaluates to true if an endpoint is allowed to run in response to an incoming request.

GET /groups/{groupId}/apps/{appId}/data_api/config
curl \
 --request GET 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/data_api/config' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "disabled": true,
  "versions": [
    "v1"
  ],
  "return_type": "JSON",
  "create_user_on_auth": true,
  "run_as_user_id": "string",
  "run_as_user_id_script_source": "string",
  "validation_method": "NO_VALIDATION",
  "secret_name": "string",
  "can_evaluate": {}
}