...
Attributes | Type | Required | Description |
---|
action | String | Yes | should be set to createSnapshot for this API. |
description | String | No | The description of the snapshot |
snapshotVersionInputs | List<SnapshotVersionInputPojo> | No | - A list of snapshot versions to be built or associated with new snapshot.
- If you do not provide projectVersionId, build will be initiated.
- If you do not supply specific project that is configured in release, it will be added for build. projectId and packageName is used to identify if project is configured in Release or not.
- If you supply projectId and packageName combination that is not part of release, exception will be thrown.
|
Parameters for each element of snapshotVersionInputs. If not supplied all projects configured in Release will be included. |
projectId | Long | Yes | Project associated with release. |
packageName | String | Yes* | The name of the package (used for partial deployment projects only) associated with release. If Partial deployment project and packageName is not supplied it will be considered all files type version. |
projectVersionId | Long | No | The version id of the project. If project version is not supplied new build will be performed. |
buildEnvironmentId | Long | Yes** | The build environment associated with the project. If not supplied and only one environment found for build instance then it will be defaulted. |
forceBuild | Boolean | No | Whether or not the project should be force built. This will be overridden to true for partial deployment project. |
...
Code Block |
---|
theme | Eclipse |
---|
title | POST JSON |
---|
|
{
"action" : "createSnapshot"
"description": "example snapshot creation",
"snapshotVersionInputs": [
{
"projectId": 10000,
"packageName": "package1",
"projectVersionId": 10001
},
{
"projectId": 10000,
"packageName": "package2",
"forceBuild": true
},
{
"projectId": 10002,
"buildEnvironmentId": 10003
} ]
} |
...
Code Block |
---|
theme | Eclipse |
---|
title | POST JSON |
---|
|
{
"snapshotId": 10005,
"snapshotName": "07-09-2018 12:12:03",
"description": "example snapshot creation",
"snapshotStatus": "PENDING",
"snapshotVersions": [
{
"projectId": 10000,
"packageName": "package1",
"projectVersionId": 10001,
"requestAllFiles": false,
"snapshotVersionStatus": "PENDINGEXISTING"
},
{
"projectId": 10000,
"packageName": "package2",
"projectVersionId": null,
"requestAllFiles": false,
"snapshotVersionStatus": "PENDING"
},
{
"projectId": 10002,
"packageName": null,
"projectVersionId": null,
"requestAllFiles": false,
"snapshotVersionStatus": "PENDING"
}]
} |
...
Code Block |
---|
theme | Eclipse |
---|
title | Current JSON |
---|
|
{
"snapshotId": 10005,
"snapshotName": "07-09-2018 12:12:03",
"description": "",
"snapshotStatus": "INITIATED",
"snapshotVersions": [
{
"projectId": 10000,
"packageName": "package1",
"projectVersionId": 10001,
"requestAllFiles": false,
"snapshotVersionStatus": "EXISTING"
},
{
"projectId": 10000,
"packageName": "package2",
"projectVersionId": null,
"requestAllFiles": false,
"snapshotVersionStatus": "EXISTINGCOMPLETED"
},
{
"projectId": 10002,
"packageName": null,
"projectVersionId": null,
"requestAllFiles": false,
"snapshotVersionStatus": "EXISTINGCOMPLETED"
}]
} |
And a POST request was sent to http://host:port/flexdeploy/rest/project/promote/10000/11001 with the following JSON object input:
...