Restore project to a previous version
Restores the project configuration to the state of a previously saved version. This is a destructive operation that replaces the current project state.
What happens:
- The current project configuration is replaced with the selected version
- All current components, products, and manual positions are removed
- The project state is restored to exactly match the saved version
- The restored version becomes the current active version
Warning: This operation cannot be undone. All unsaved changes will be lost. Make sure to create a new version of the current state before restoring if you want to preserve it.
Use cases:
- Rollback to a previous version after unwanted changes
- Restore a project variant for comparison
- Revert to a stable configuration
Required permissions: Projects.manageSnapshots permission is required to restore versions.
POST
/projects/{id}/versions/{versionId}/restoreAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
idstringrequiredversionIdstringrequiredResponses
200Version restored successfully
successboolean401Unauthorized - Invalid or missing authentication token
403Insufficient permissions
404Version or project not found
Request
curl -X POST "https://leadtime.app/api/public/projects/string/versions/string/restore" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"const response = await fetch("https://leadtime.app/api/public/projects/string/versions/string/restore", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});import requests
response = requests.post(
"https://leadtime.app/api/public/projects/string/versions/string/restore",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
)Response
{
"success": true
}Unauthorized - Invalid or missing authentication token
Insufficient permissions
Version or project not found