Configure Custom User Data Deprecated

PATCH /groups/{groupId}/apps/{appId}/custom_user_data

Modify the Custom User Data configuration for an Atlas App Services App.

Path parameters

application/json

Body

  • database_name string

    The name of the database that contains custom user data.

  • collection_name string

    The name of the collection that contains custom user data.

  • user_id_field string

    The name of a field that appears in every custom user data document and that contains the user account ID of each document's corresponding user.

  • enabled boolean

    If true, custom user data is enabled.

  • mongo_service_id string

    The _id value of a linked MongoDB data source.

    You can list services with the Get all services endpoint.

    Data sources are services whose type is "mongodb-atlas". Use the _id value for the data source you want to link to the Trigger.

  • on_user_creation_function_id string

    The _id value of a user creation function that runs whenever a new user registers.

Responses

  • 204

    Success

PATCH /groups/{groupId}/apps/{appId}/custom_user_data
curl \ --request PATCH 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/custom_user_data' \ --header "Authorization: Bearer $ACCESS_TOKEN" \ --header "Content-Type: application/json" \ --data '{"database_name":"myapp","collection_name":"users","user_id_field":"user_account_id","enabled":true,"mongo_service_id":"63c060ed32043ef4c93c2a9c","on_user_creation_function_id":"63c055d8019a6ab879f661d6"}'
Request examples
{ "database_name": "myapp", "collection_name": "users", "user_id_field": "user_account_id", "enabled": true, "mongo_service_id": "63c060ed32043ef4c93c2a9c", "on_user_creation_function_id": "63c055d8019a6ab879f661d6" }