Version Management
The versioning system in Dataply is used to manage the different structures of entities, hooks, and translations that are used in the application. The application could migrate from one version to another, and the default version is named active
. When a new version is created, the active
version is copied all over o the new named version. After that, the new version can be modified without affecting the active
version.
That new version would include elements from the active
version, such as:
- Entities
- Datasources
- Translations
- Relationships
- Structure
- Reports
- States
- Hooks
API
To manage versions, the following endpoints are available:
Get all versions
To fetch all versions available use the following endpoint.
GET /api/v1/config/versions
Create a New Version
Creates a new version based on the current active
version.
Endpoint:
POST /api/v1/config/versions
Request Body:
{ "name": "new_version", // Optional. Specifies the version to copy from. "baseVersion": "active", "entities": ["actor", "movie", "show"]}
Modify an Existing Version
Modifies an existing version.
Endpoint:
PUT /api/v1/config/versions/:id
Parameters:
Name | Description |
---|---|
id (string, path) | Version name |
Delete One Version by Its Name
Deletes a version by its name.
Endpoint:
DELETE /api/v1/config/versions/:id
Parameters:
Name | Description |
---|---|
id (string, path) | Version name |
Move Entities from One Version to Another
Moves entities from one version to another.
Endpoint:
POST /api/v1/config/versions/:id/moveEntities
Parameters:
Name | Description |
---|---|
id (string, path) | Version name |
Get One Version Item
Gets a single version item.
Endpoint:
GET /api/v1/config/versions/:version/order
Modify an Existing Version
Modifies an existing version.
Endpoint:
PUT /api/v1/config/versions/:version/order
Parameters:
Name | Description |
---|---|
version (string, path) | Version |
Deploy One Version
Deploys a single version. Defaults to active
.
Endpoint:
POST /api/v1/config/deploy?version=:version
Parameters:
Name | Description |
---|---|
version (string, query) | Version |