Create Configuration

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/";
MultiValueMap parts = 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);
-------------------

Request
URI
POST
https://{api_host}/vco/api/configurations
COPY
Query Parameters
boolean
uniqueName
Optional
Constraints: default: false

uniqueName

string
categoryId
Optional

categoryId


Request Body
WsConfiguration of type(s) application/json
Optional
{
    "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"
}
object
relations
Optional

relations

string
id
Optional

id

string
name
Optional

name

string
description
Optional

description

string
version
Optional

version

integer As int32 As int32
status
Optional

status

array of object
attributes
Optional

attributes

string
href
Optional

href

string
category-id
Optional

category-id

Authentication
This operation uses the following authentication methods.
Responses
201

The request is successful

Returns WsConfiguration of type(s) application/json
"WsConfiguration Object"
object
relations
Optional

relations

string
id
Optional

id

string
name
Optional

name

string
description
Optional

description

string
version
Optional

version

integer As int32 As int32
status
Optional

status

array of object
attributes
Optional

attributes

string
href
Optional

href

string
category-id
Optional

category-id


202

Configuration successfully imported

Returns WsConfiguration of type(s) application/json
"WsConfiguration Object"
object
relations
Optional

relations

string
id
Optional

id

string
name
Optional

name

string
description
Optional

description

string
version
Optional

version

integer As int32 As int32
status
Optional

status

array of object
attributes
Optional

attributes

string
href
Optional

href

string
category-id
Optional

category-id


400

The request is invalid

Returns WsConfiguration of type(s) application/json
"WsConfiguration Object"
object
relations
Optional

relations

string
id
Optional

id

string
name
Optional

name

string
description
Optional

description

string
version
Optional

version

integer As int32 As int32
status
Optional

status

array of object
attributes
Optional

attributes

string
href
Optional

href

string
category-id
Optional

category-id


401

The user is not authorized

Returns WsConfiguration of type(s) application/json
"WsConfiguration Object"
object
relations
Optional

relations

string
id
Optional

id

string
name
Optional

name

string
description
Optional

description

string
version
Optional

version

integer As int32 As int32
status
Optional

status

array of object
attributes
Optional

attributes

string
href
Optional

href

string
category-id
Optional

category-id


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{}' https://{api_host}/vco/api/configurations