...
This POST service will create a new snapshot with the same attributes as the given JSON object.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/releases/{releaseId}/snapshot |
Request
POST will receive a snapshot input JSON object and return a snapshot JSON object. Snapshot input JSON objects can have the following attributes:
Attributes | Type | Required | Description |
---|---|---|---|
releaseId | URL | Yes | Path parameter for the release Id where the snapshot will be added |
action | String | Yes | should be set to createSnapshot for this API. |
description | String | No | The description of the snapshot |
snapshotVersionInputs | List<SnapshotVersionInputPojo> | No |
|
...
Attributes | Type | Description |
---|---|---|
snapshotId | Long | The id of the snapshot |
snapshotName | String | The name of the snapshot, which is the time when the snapshot was created |
snapshotStatus | String | The status of the snapshot. Possible values are:
|
description | String | The description of the snapshot |
snapshotVersions | List<SnapshotVersionPojo> | The version information about the projects associated with the snapshot |
...
Attributes | Type | Description |
---|---|---|
projectId | Long | The id of the project |
projectStreamId | Long | Stream included in release for the project. |
projectVersionId | Long | The version id of the project |
packageName | String | The name of the package (used for partial deployment projects only) |
requestAllFiles | Boolean | Whether or not the project was told to request all files |
snapshotVersionStatus | String | The current status of the individual project version within the snapshot. Possible values are:
|
Example
If the POST request sent to http://host:port/flexdeploy/rest/v1/releases/12345/snapshot receives the following JSON environment object,
...
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/releases/{releaseId}/snapshot |
Request
POST will receive a snapshot input JSON object and return a snapshot JSON object. Snapshot input JSON objects can have the following attributes:
Attributes | Type | Required | Description |
---|---|---|---|
releaseId | URL | Yes | Path parameter for the release Id where the snapshot will be added |
action | String | Yes | should be set to promoteToRelease for this API. |
description | String | No | The description of the snapshot |
snapshotVersionInputs | List<SnapshotVersionInputPojo> | Yes | One and only one element is required for promote to release action. |
...
Attributes | Type | Description |
---|---|---|
snapshotId | Long | The id of the snapshot |
snapshotName | String | The name of the snapshot, which is the time when the snapshot was created |
snapshotStatus | String | The status of the snapshot. Possible values are:
|
description | String | The description of the snapshot |
snapshotVersions | List<SnapshotVersionPojo> | The version information about the projects associated with the snapshot |
...
Attributes | Type | Description |
---|---|---|
projectId | Long | The id of the project |
projectStreamId | Long | Stream included in release for the project. |
projectVersionId | Long | The version id of the project |
packageName | String | The name of the package (used for partial deployment projects only) |
requestAllFiles | Boolean | Whether or not the project was told to request all files |
snapshotVersionStatus | String | The current status of the individual project version within the snapshot. Possible values are:
|
Example
If the previous snapshot had the following attributes:
...
And a POST request was sent to http://host:port/flexdeploy/rest/v1/releases/{releaseId}/snapshot with the following JSON object input:
...
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/releases/{releaseId}/snapshot/{snapshotId} |
Request
Parameter | Type | Required | Description |
---|
snapshotId | URL | Yes | Path parameter for the snapshot Id which is used to return a snapshot |
releaseId | URL | Yes | Path parameter for the release Id which contains the snapshot that will be returned |
Response
Snapshot JSON objects can having the following attributes:
Attributes | Type | Description |
---|---|---|
snapshotId | Long | The id of the snapshot |
snapshotName | String | The name of the snapshot, which is the time when the snapshot was created |
snapshotStatus | String | The status of the snapshot. Possible values are:
|
description | String | The description of the snapshot |
snapshotVersions | List<SnapshotVersionPojo> | The version information about the projects associated with the snapshot |
Elements of snapshotVersions has following attributes:
Attributes | Type | Description |
---|---|---|
projectId | Long | The id of the project |
projectStreamId | Long | Stream included in release for the project. |
projectVersionId | Long | The version id of the project |
packageName | String | The name of the package (used for partial deployment projects only) |
requestAllFiles | Boolean | Whether or not the project was told to request all files |
snapshotVersionStatus | String | The current status of the individual project version within the snapshot. Possible values are:
|
Response Codes
HTTP Code | Description |
---|---|
200 | Snapshot was found and returned |
400 | Bad request (Not found or snapshot wasn't in given releaseId) |
401 | Unauthorized (User may not be signed in or user may not have read access to releases) |
500 | Unexpected internal server error |
Example
If a snapshot in our database had an id of 10005 and releaseId of 14321 and a GET request was sent to http://host:port/flexdeploy/rest/v1/releases/14321/snapshot/10005
A Snapshot JSON object will be returned with snapshot information:
Code Block | ||||
---|---|---|---|---|
| ||||
{ "snapshotId": 10005, "snapshotName": "07-09-2018 12:15:03", "description": "", "snapshotStatus": "INITIATED", "snapshotVersions": [ { "projectId": 10000, "packageName": "package1", "projectVersionId": 10025, "requestAllFiles": false, "snapshotVersionStatus": "EXISTING" }, { "projectId": 10000, "packageName": "package2", "projectVersionId": 10040, "requestAllFiles": false, "snapshotVersionStatus": "EXISTING" }, { "projectId": 10002, "packageName": null, "projectVersionId": 10065, "requestAllFiles": false, "snapshotVersionStatus": "EXISTING" }] } |