Get Information About a Specific Application Snapshot (11.1.2.3.600)

Returns information about all the operations that can be performed on a particular application snapshot. It provides details on operations such as Migration import and export, upload, download, and delete.

Required Roles

Service Administrator

REST Resource

GET /interop/rest/11.1.2.3.600/applicationsnapshots/{applicationSnapshotName}

Request

The following table summarizes the GET request parameters.

Table 9-47 Parameters

Name Description Type Required Default
applicationSnapshotName Application snapshot name to retrieve the details Path Yes N/A

Response

Supported Media Types: application/json

Table 9-48 Parameters

Name Description
details In the case of an error, details are published with the error string
status See Migration Status Codes
items Detailed information about the API
name Name of the application snapshot
type Possible values: LCM, EXTERNAL
canexport Identifies whether this application snapshot can be exported using Migration. Applicable only to Migration application artifacts
canimport Identifies whether this application snapshot can be imported using Migration. Applicable only to Migration application artifacts
canupload Identifies whether the application snapshot can be uploaded
candownload Identifies whether the application snapshot can be downloaded
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Possible values: self, import, export, upload, download, or delete depending on the operation permitted on an application snapshot
data Parameters as key value pairs passed in the request

Example of Response Body

{	
	"status":0,
	"items":[{
		"name":"snapshot1",
		"type":"LCM",
		"canexport":true,
		"canimport":true,
		"canupload":true,
		"candownload":true
	}],
	"details":null,
	"links":[{
		"data":null,
		"action":"GET",
		"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/applicationsnapshots/snapshot1",
		"rel":"self"
		},{
		"data":null,
		"action":"GET",
		"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/applicationsnapshots/snapshot1/contents",
		"rel":"download"
		},{
		"data":null,
		"action":"POST",
		"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/applicationsnapshots/snapshot1/contents?isLast=true&chunkSize=52428800&isFirst=true",
		"rel":"upload"
		},{
		"data":null,
		"action":"POST",
		"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/applicationsnapshots/snapshot1/migrationq={type:"export}"
		"rel":"export"
		},{
		"data":null,
		"action":"POST",
		"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/applicationsnapshots/snapshot1/migrationq={type:"import}",
		"rel":"import"
		},{
		"data":null,
		"action":"DELETE",
		"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/applicationsnapshots/ss1",
		"rel":"delete"
	}]
}

cURL Sample

funcGetApplicationSnapshotDetails() {
	url=$SERVER_URL/interop/rest/$API_VERSION/applicationsnapshots/$1
	funcExecuteRequest "GET" $url

	output=`cat response.txt`
	status=`echo $output | jq '.status'`
	if [ $status == 0 ]; then
		echo "Application details :"
		echo "Application snapshot name : " `echo $output | jq '.items[0].name'`
		echo "Application snapshot type : " `echo $output | jq '.items[0].type'`
		echo "Can be exported flag : " `echo $output | jq '.items[0].canExport'`
		echo "Can be imported flag : " `echo $output | jq '.items[0].canImport'`
		echo "Can be uploaded flag : " `echo $output | jq '.items[0].canUpload'`
		echo "Can be downloaded flag : " `echo $output | jq '.items[0].canDownload'`
		count=`echo $output | jq '.links | length'`
		i=0
		echo "Services details :"
		while [ $i -lt $count ]; do
			echo "Service : " `echo $output | jq '.links['$i'].rel'`
			echo "URL :" `echo $output | jq '.links['$i'].href'`
			echo "Action :" `echo $output | jq '.links['$i'].action'`
			echo ""
			i=`expr $i + 1`
		done
	else
		error=`echo $output | jq '.details'`
		echo "Error occurred. " $error
	fi
	funcRemoveTempFiles "respHeader.txt" "response.txt"
}