Create Configuration
Creates new configuration.
When a request is sent to this endpoint with "multipart/form-data" as the request body content type, this operation is equivalent to "Import configuration":
Imports configuration in a given category. The configuration 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/configurations/";
MultiValueMapparts = new LinkedMultiValueMap ();
Resource r = new FileSystemResource("D:/path/to/some.vsoconf");
parts.put("file", Arrays.asList(r));
parts.put("categoryId", "828080808080808080808080808080807F818080013217004819830adebdb10ea");
new RestTemplate().postForLocation(url, parts);
-------------------
uniqueName
categoryId
{
"relations": {
"startIndex": 0,
"count": 0,
"total": 0,
"link": [
{
"rel": "string",
"type": "string",
"attributes": [
{
"name": "string",
"displayName": "string",
"value": "string",
"displayValue": "string"
}
],
"href": "string"
}
]
},
"id": "string",
"name": "string",
"description": "string",
"version": "string",
"status": 0,
"attributes": [
{
"name": "string",
"type": "Example types are: SecureString, MimeAttachment, Regexp, Array/VC:VirtualMachine, boolean, string and etc.",
"description": "string",
"scope": "string",
"updated": false,
"encrypt-value": false
}
],
"href": "string",
"category-id": "string"
}
relations
id
name
description
version
status
attributes
href
category-id
The request is successful
"WsConfiguration Object"
relations
id
name
description
version
status
attributes
href
category-id
Configuration successfully imported
"WsConfiguration Object"
relations
id
name
description
version
status
attributes
href
category-id
The request is invalid
"WsConfiguration Object"
relations
id
name
description
version
status
attributes
href
category-id
The user is not authorized
"WsConfiguration Object"
relations
id
name
description
version
status
attributes
href
category-id
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{}' https://{api_host}/vco/api/configurations