Invoke a published command function and return its typed result.
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://example.com/api/workspace/commands/example"), Content = new StringContent("{ \"Args\": {}, \"CorrelationId\": \"example\" }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}const url = 'https://example.com/api/workspace/commands/example';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"Args":{},"CorrelationId":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/workspace/commands/example \ --header 'Content-Type: application/json' \ --data '{ "Args": {}, "CorrelationId": "example" }'Authorizations
Section titled “Authorizations”- None
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Callable command function key.
Query Parameters
Section titled “Query Parameters”Optional access token for clients that cannot set Authorization headers. Prefer Authorization: Bearer <token> when possible.
Request Body
Section titled “Request Body”Optional command arguments and correlation identifier.
Request payload for synchronous command function invocation.
object
Optional JSON arguments deserialized into the command argument type.
object
Optional correlation identifier propagated to the function run.
Examplegenerated
{ "Args": {}, "CorrelationId": "example"}Request payload for synchronous command function invocation.
object
Optional JSON arguments deserialized into the command argument type.
object
Optional correlation identifier propagated to the function run.
Examplegenerated
{ "Args": {}, "CorrelationId": "example"}Request payload for synchronous command function invocation.
object
Optional JSON arguments deserialized into the command argument type.
object
Optional correlation identifier propagated to the function run.
Examplegenerated
{ "Args": {}, "CorrelationId": "example"}Responses
Section titled “Responses”OK
object
Result of a synchronous command function invocation.
object
Persisted function run identifier.
Optional result summary produced by the command.
Structured JSON result payload produced by the command.
object
Execution duration in milliseconds.
Correlation identifier of the run.
object
object
object
object
Example
{ "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Bad Request
object
Result of a synchronous command function invocation.
object
Persisted function run identifier.
Optional result summary produced by the command.
Structured JSON result payload produced by the command.
object
Execution duration in milliseconds.
Correlation identifier of the run.
object
object
object
object
Example
{ "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Forbidden
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Not Found
object
Result of a synchronous command function invocation.
object
Persisted function run identifier.
Optional result summary produced by the command.
Structured JSON result payload produced by the command.
object
Execution duration in milliseconds.
Correlation identifier of the run.
object
object
object
object
Example
{ "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}