mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Updated Design: Version Control (markdown)
parent
7ad42e6079
commit
d016296e8f
@ -77,21 +77,21 @@ Returns a promise that resolves to an array of history entries. Each entry consi
|
|||||||
|
|
||||||
All of the following API calls should include the `Node-RED-API-Version` HTTP Header to be set to `v2`. If that header is not provided, it will assume to be a request to the `v1` level of the API (ie, what we had before we added this functionality).
|
All of the following API calls should include the `Node-RED-API-Version` HTTP Header to be set to `v2`. If that header is not provided, it will assume to be a request to the `v1` level of the API (ie, what we had before we added this functionality).
|
||||||
|
|
||||||
### `GET /flows/:id`
|
### `GET /flows/:rev`
|
||||||
|
|
||||||
Returns a flow configuration. If `:id` is not provided, it returns the active flow configuration. If `:id` is provided, it can be used to return a previous version of the flow configuration.
|
Returns a flow configuration. If `:rev` is not provided, it returns the active flow configuration. If `:rev` is provided, it can be used to return a previous version of the flow configuration.
|
||||||
|
|
||||||
#### Response:
|
#### Response:
|
||||||
|
|
||||||
{
|
{
|
||||||
id: "flow-version-id",
|
rev: "flow-revision",
|
||||||
flows: [ {}, {}, {} ]
|
flows: [ {}, {}, {} ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
### `POST /flows`
|
### `POST /flows`
|
||||||
|
|
||||||
Updates the current flow configuration. The body can contain an additional `summary` property to associate with the flow version. The runtime will generate an `id` value and return it in the response. The version will also be associated with the user authenticated to make the request.
|
Updates the current flow configuration. The body can contain an additional `summary` property to associate with the flow version. The runtime will generate a `rev` value and return it in the response. The version will also be associated with the user authenticated to make the request.
|
||||||
|
|
||||||
#### Body:
|
#### Body:
|
||||||
|
|
||||||
@ -103,7 +103,7 @@ Updates the current flow configuration. The body can contain an additional `summ
|
|||||||
#### Response:
|
#### Response:
|
||||||
|
|
||||||
{
|
{
|
||||||
id: "flow-version-id"
|
rev: "flow-revision"
|
||||||
}
|
}
|
||||||
|
|
||||||
### `GET /flows/history`
|
### `GET /flows/history`
|
||||||
|
Loading…
Reference in New Issue
Block a user