-
Notifications
You must be signed in to change notification settings - Fork 18
buildin_endpoints_post_commands_command
Marcel Kloubert edited this page Feb 17, 2017
·
5 revisions
Home >> Build-in endpoints >> [POST] /api/commands/{command}
Executes a command.
canExecute property must be set to (true)
for an user or guest in the settings to access the endpoint.
POST /api/commands/editor.action.selectAll
Possible result:
Content-type: application/json; charset=utf-8
X-Vscode-Restapi: 1.0.0
Date: Fri, 10 Feb 2017 00:26:21 GMT
Connection: keep-alive
Transfer-Encoding: chunked
{
"code": 0
}
POST /api/commands/mkloubert.myCommand
[
"TM",
5979,
"mk",
23.979,
true,
undefined,
false,
{
"a": 1,
"b": "2"
},
[1, 2, 3, 4]
]
Possible result:
Content-type: application/json; charset=utf-8
X-Vscode-Restapi: 1.0.0
Date: Fri, 10 Feb 2017 00:26:21 GMT
Connection: keep-alive
Transfer-Encoding: chunked
{
"code": 0
}
Code | Description |
---|---|
403 |
User has no right to execute commands. |
404 |
Command not found. |