Draft and Deploy a Group of Changes
You can deploy a group of application changes together by creating and deploying a draft. To create and deploy a set of draft changes:
1. Create a New Draft
Un borrador representa un grupo de cambios en la aplicación que puedes implementar o descartar como una única unidad. Para crear un borrador, envía una solicitud POST al endpoint de borradores:
curl --request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <access_token>' \
'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/drafts'
Un borrador por usuario
Each user can only create a single draft at a time, either through the UI or the Admin API. If you already have an existing draft, you can discard the changes associated with it by sending a DELETE request to the draft's endpoint:
curl --request DELETE \
--header 'Authorization: Bearer <access_token>' \
'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/drafts/{draftId}'
2. Realiza cambios en tu aplicación
Once you've created a draft, make all of the changes that you want to include in the draft. App Services adds any application changes that you make to the draft so that you can deploy them together.
3. Implementa el borrador
After you've made all the changes that you want to include in the deployment, deploy the draft by sending a POST request to that draft's deployment endpoint:
curl --request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <access_token>' \
'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/drafts/{draftId}/deployment'
Draft Conflicts
Si realizas cambios a través de la API pero tienes cambios conflictivos en un borrador en la Interfaz de Usuario, tu borrador de Interfaz de Usuario se volverá inválido y no podrás implementarlo. Puedes descargar tu borrador de Interfaz de Usuario revisando el borrador en la página Deployment. Puedes usar la descarga para implementar los cambios en la CLI de appservices o como referencia al volver a aplicar los cambios en la Interfaz de Usuario.