Updated Design: Version Control (markdown)

Nick O'Leary 2016-10-04 09:38:44 +01:00
parent 7ad42e6079
commit d016296e8f
1 changed files with 5 additions and 5 deletions

@ -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).
### `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:
{
id: "flow-version-id",
rev: "flow-revision",
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:
@ -103,7 +103,7 @@ Updates the current flow configuration. The body can contain an additional `summ
#### Response:
{
id: "flow-version-id"
rev: "flow-revision"
}
### `GET /flows/history`