Versions Compared

Key

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

Snapshots can be created through this API using a POST service and snapshot information can be retrieved using a GET service.

Include Page
REST V1 Authentication
REST V1 Authentication

...

Code Block
themeEclipse
titleResponse JSON
{
	"snapshotId": 10025,
	"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"
	}]
}


GET (retrieve snapshot)

This GET service will return the JSON/POJO representation of a snapshot given a snapshot Id.

Info
titleAPI URL

http://host:port/flexdeploy/rest/v1/releases/{releaseId}/snapshot/{snapshotId}

Request


ParameterTypeRequiredDescription
IdURLYesPath parameter for the snapshot Id which is used to return a snapshot

Response

Snapshot JSON objects can having the following attributes:

AttributesTypeDescription

snapshotId

LongThe id of the snapshot
snapshotNameStringThe name of the snapshot, which is the time when the snapshot was created
snapshotStatusStringThe status of the snapshot
descriptionStringThe description of the snapshot
snapshotVersionsList<SnapshotVersionPojo>The version information about the projects associated with the snapshot

Elements of snapshotVersions has following attributes:

AttributesTypeDescription
projectIdLongThe id of the project
projectStreamIdLongStream included in release for the project.
projectVersionIdLongThe version id of the project
packageNameStringThe name of the package (used for partial deployment projects only)
requestAllFilesBooleanWhether or not the project was told to request all files
snapshotVersionStatusStringThe current status of the snapshot

Response Codes

HTTP CodeDescription
200Snapshot was found and returned
400Bad request (Not found or snapshot wasn't in given releaseId)
401Unauthorized (User may not be signed in or user may not have read access to releases)
500Unexpected 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
themeEclipse
titleResponse JSON
{
	"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"
	}]
}