Restore an entity to an earlier commit
POST /Platform/entities/{entity_type}/{entity_id}/restore
Restore an entity to an earlier commit.
Loads the entity at commit_id directly from the database (bypassing the branch HEAD) and re-stores it as a new HEAD commit on branch. This creates an auditable restore event rather than rewriting history.
Path parameters
entity_type: str. Entity class name.entity_id: str. Entity id to restore.
Body parameters
commit_id: str. Historical commit to restore the entity to.branch: optional str. Hilus branch the restore is committed on (defaultmain).
Returns
EntityPutResponse
entity_id: optional str or null. Id of the stored entity (the minted slug for slug-backed types).slug: optional str or null. Public slug, for slug-backed types.commit_id: optional str or null. The new commit.canonical_yaml: optional str or null. The YAML as stored, when returned.access: optional EntityAccess or null. Access after the write.ignored_changes: optional List[dict]. Requested fields that were not stored (create): path, reason.
Example request
curl -X POST "https://api.hilus.ai/Platform/entities/{entity_type}/{entity_id}/restore" \
-H "Authorization: Bearer $HILUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'