Get Import Package Details
Analyses uploaded package file and returns details about package elements and certificate. The package binary content should be available as multi-part content (see RFC-2387 for details). Details of working with multi-part resources depend on the used client's HTTP/REST library. For example, in Spring it will look like:
Sample client code:
-------------------
String url = "https://localhost:8281/vco/api/packages/";
MultiValueMapparts = new LinkedMultiValueMap ();
Resource r = new FileSystemResource("D:/path/to/some.package");
parts.put("file", Arrays.asList(r));
new RestTemplate().postForLocation(url, parts);
-------------------
{
"file": "string"
}
file
The request is successful
{
"packageName": "string",
"packageAlreadyExists": false,
"contentVerified": false,
"packageCertificateInfo": {
"organization": "string",
"organizationalUnit": "string",
"commonName": "string",
"validUntilDate": "string",
"validFromDate": "string",
"publicKeyAlgorithm": "string",
"fingerprint": "string",
"serialNumber": "string",
"country": "string"
},
"certificateUnknown": false,
"certificateTrusted": false,
"certificateValid": false,
"importElementDetails": [
{
"id": "string",
"type": "string",
"fileObjectName": "string",
"fileCategory": "string",
"versionComparison": "string",
"fileObjectVersion": "string",
"serverObjectName": "string",
"serverCategory": "string",
"serverObjectVersion": "string",
"importIt": false,
"hasTenantConflict": false,
"hasNameConflict": false,
"hasRights": false,
"renamed": false
}
]
}
packageName
packageAlreadyExists
contentVerified
packageCertificateInfo
certificateUnknown
certificateTrusted
certificateValid
importElementDetails
User is not authorized
"ImportPackageDetails Object"
packageName
packageAlreadyExists
contentVerified
packageCertificateInfo
certificateUnknown
certificateTrusted
certificateValid
importElementDetails
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: multipart/form-data' -d '{"file:"string"}' https://{api_host}/vco/api/packages/import-details