Create Action
When a request is sent to this endpoint with "application/octet-stream" or "multipart/form-data" as the value for the Content-Type header this operation is equivalent to "Import an action in the given category":
Imports an action in a given category. The action 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/actions/";
MultiValueMapparts = new LinkedMultiValueMap ();
Resource r = new FileSystemResource("D:/path/to/some.action");
parts.put("file", Arrays.asList(r));
parts.put("categoryName", "com.vmware.basic");
new RestTemplate().postForLocation(url, parts);
-------------------
uniqueName
Show optional properties
{
"name": "string",
"module": "string"
}
{
"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",
"module": "string",
"description": "string",
"version": "string",
"fqn": "string",
"script": "string",
"runtime": "string",
"outputParameterType": "string",
"href": "string",
"input-parameters": [
{
"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
}
],
"output-type": "string",
"iconId": "string",
"bundleHasContent": false,
"runtimeMemoryLimit": 0,
"runtimeTimeout": 0,
"entryPoint": "string",
"actionEnvironmentId": "string",
"actionEnvironmentName": "string",
"validationMessage": "string"
}
relations
id
name
module
description
version
fqn
script
runtime
outputParameterType
href
input-parameters
output-type
iconId
bundleHasContent
runtimeMemoryLimit
runtimeTimeout
entryPoint
actionEnvironmentId
actionEnvironmentName
validationMessage
The action was created successfully
"Action Object"
relations
id
name
module
description
version
fqn
script
runtime
outputParameterType
href
input-parameters
output-type
iconId
bundleHasContent
runtimeMemoryLimit
runtimeTimeout
entryPoint
actionEnvironmentId
actionEnvironmentName
validationMessage
Action successfully imported
"Action Object"
relations
id
name
module
description
version
fqn
script
runtime
outputParameterType
href
input-parameters
output-type
iconId
bundleHasContent
runtimeMemoryLimit
runtimeTimeout
entryPoint
actionEnvironmentId
actionEnvironmentName
validationMessage
The request is invalid
"Action Object"
relations
id
name
module
description
version
fqn
script
runtime
outputParameterType
href
input-parameters
output-type
iconId
bundleHasContent
runtimeMemoryLimit
runtimeTimeout
entryPoint
actionEnvironmentId
actionEnvironmentName
validationMessage
The user is not authorized
"Action Object"
relations
id
name
module
description
version
fqn
script
runtime
outputParameterType
href
input-parameters
output-type
iconId
bundleHasContent
runtimeMemoryLimit
runtimeTimeout
entryPoint
actionEnvironmentId
actionEnvironmentName
validationMessage
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"module:"string","name:"string"}' https://{api_host}/vco/api/actions