Skip to main content

Execute Command

Motivation

Execute a command using API

Functional Design

POST /api/v2/apps/{owner}/{app}/workspaces/{wsid}/commands/{pkg}.{command}

Headers

KeyValue
AuthorizationBearer {PrincipalToken}
Content-Typeapplication/json

Parameters

ParameterTypeDescription
ownerstringname of a user who owns the application
appstringname of an application
wsidint64the ID of workspace
pkg, commandstringidentifies a command

Body

Command arguments in JSON format, with optional "args" and "unloggedArgs" fields:

{
"args": {
"key1": "value1",
"key2": "value2"
},
"unloggedArgs": {
"password": "myPassword",
}
}

Result

CodeDescriptionBody
200OKcurrent WLog offset, see example below
400Bad Request, e.g. Record requires sys.ParentIDerror object
401Unauthorizederror object

Example result 200:

{
"currentWLogOffset":114,
"result": {
"key1": "value1",
"key2": "value2"
},
}