# State management

DeDi.global uses a compact lifecycle model for namespaces, registries, and records.

## Supported states

| Entity    | States             |
| --------- | ------------------ |
| Namespace | `live`             |
| Registry  | `live`, `inactive` |
| Record    | `draft`, `live`    |

## How the lifecycle works

* A namespace remains `live` until it is deleted.
* A registry can move between `live` and `inactive`.
* A record starts as `draft` and becomes `live` when published.
* Updating a live record creates a new live version.
* Deletion removes the entity from active access surfaces and moves it into the recovery surface.

## Delete and restore

* Use the deletion APIs to remove namespaces, registries, or records.
* Use the deleted-entity listing APIs to discover recoverable items.
* Use the restore APIs to recover deleted data within the retention window.
* The current implementation keeps deleted entities restorable for a configurable retention period with a default of `3` days.

## Related references

* API reference: [State Management APIs](/docs/dedi.global-developers/standard-apis/state-management.md)
* Publish and draft workflows: [Publish APIs](/docs/dedi.global-developers/standard-apis/publish.md)
* Versioned updates: [Update APIs](/docs/dedi.global-developers/standard-apis/update.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dedi-global.gitbook.io/docs/dedi.global-developers/guides/state-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
