Generate a JSON schema from sample
Sample a subset of documents in a collection to generate a JSON schema.
Path parameters
-
An Atlas Project/Group ID.
-
The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value.
-
The unique
_id
value of a service.
POST
/groups/{groupId}/apps/{appId}/services/{serviceId}/commands/generate_schema
curl \
--request POST 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/services/{serviceId}/commands/generate_schema' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"database_name":"string","collection_name":"string","limit":42}'
Request examples
{
"database_name": "string",
"collection_name": "string",
"limit": 42
}
Response examples (200)
{
"schema": {}
}