# Versioning

## Form definition versioning support

Since Orbeon Forms 4.5, Form Runner and Form Builder support versioning of *form definitions*.

For details, see [Versioning](/form-runner/features/versioning.md).

## Legacy support

Even prior to Orbeon Forms 4.5, when retrieving `form.xhtml`, Form Runner passes a URL parameter:

```
.../form.xhtml?document=6E6FC50F4BB945235EB5B573F2C7E695
```

This parameter is passed when:

* editing form data
* viewing form data
* producing a PDF

This parameter is NOT passed when no document information is available, e.g. when:

* creating new form data
* listing form data on the Summary page

The value of the parameter is the id of the form data (document) being edited. This allows the persistence layer to retrieve the form definition associated with that document, in case the persistence layer handles versioning itself.

## Auditing trail

In addition to explicit versioning of form definitions, the relational database implementations support an [auditing trail](/form-runner/persistence/auditing.md), keeping older versions of form definitions and form data. However this is not visible at the level of the REST API.

## See also

* [Versioning](/form-runner/features/versioning.md)
* [Auditing](/form-runner/persistence/auditing.md)
* Blog post: [Form versioning](https://blog.orbeon.com/2014/02/form-versioning.html)
* [CRUD](/form-runner/api/persistence/crud.md)
* [Reindexing](/form-runner/api/persistence/reindexing.md)
* [Search](/form-runner/api/persistence/search.md)
* [List form data attachments](/form-runner/api/persistence/list-form-data-attachments.md)
* [Form metadata](/form-runner/api/persistence/forms-metadata.md)
* [Caching](/form-runner/api/persistence/caching.md)
* [Custom persistence providers](/form-runner/api/persistence/custom-persistence-providers.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://doc.orbeon.com/form-runner/api/persistence/versioning.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.
