Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

AttributesTypeRequiredDescription
actionStringYesshould be set to createSnapshot for this API.
descriptionStringNoThe description of the snapshot
snapshotVersionInputsList<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.
projectIdLongYesProject associated with release.
packageNameStringYes*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.
projectVersionIdLongNoThe version id of the project. If project version is not supplied new build will be performed.
buildEnvironmentIdLongYes**The build environment associated with the project. If not supplied and only one environment found for build instance then it will be defaulted.
forceBuildBooleanNoWhether or not the project should be force built. This will be overridden to true for partial deployment project.

...

Code Block
themeEclipse
titlePOST 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
themeEclipse
titlePOST 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
themeEclipse
titleCurrent 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:

...