Import Package 1

Import Package 1

Imports a package. 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/content/packages/";
MultiValueMap parts = new LinkedMultiValueMap();
Resource r = new FileSystemResource("D:/path/to/some.package");
parts.put("file", Arrays.asList(r));
new RestTemplate().postForLocation(url, parts);
-------------------

Request
URI
POST
https://{api_host}/vco/api/content/packages
COPY
Query Parameters
boolean
overwrite
Optional
Constraints: default: false

overwrite

boolean
importConfigurationAttributeValues
Optional
Constraints: default: true

importConfigurationAttributeValues

string
tagImportMode
Optional
Constraints: default: ImportButPreserveExistingValue

tagImportMode

Possible values are : DoNotImport, ImportAndOverwriteExistingValue, ImportButPreserveExistingValue,
boolean
importConfigSecureStringAttributeValues
Optional
Constraints: default: false

importConfigSecureStringAttributeValues


Request Body
File of type(s) multipart/form-data
Optional
{
    "file": "string"
}
string
file
Required

file

Authentication
This operation uses the following authentication methods.
Responses
202

Package successfully imported

Returns PackageImportResult of type(s) application/json
{
    "errors": [
        {
            "message": "string",
            "elementId": "string",
            "elementType": "string",
            "elementName": "string"
        }
    ]
}
array of object
errors
Optional

errors


400

Request is not valid (validation error)

Returns PackageImportResult of type(s) application/json
"PackageImportResult Object"
array of object
errors
Optional

errors


401

User is not authorized

Returns PackageImportResult of type(s) application/json
"PackageImportResult Object"
array of object
errors
Optional

errors


409

One or more package elements have an older version.

Returns PackageImportResult of type(s) application/json
"PackageImportResult Object"
array of object
errors
Optional

errors


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: multipart/form-data' -d '{"file:"string"}' https://{api_host}/vco/api/content/packages