Run a published business function with supplied test context.
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://example.com/api/workspace/admin/function-catalog/example/test-invocations"), Content = new StringContent("{ \"Args\": {}, \"CorrelationId\": \"example\", \"EntityDefinitionId\": \"example\", \"EntityInstanceId\": \"example\", \"EntityOperation\": \"example\", \"Record\": {}, \"PreviousRecord\": {} }") { 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/admin/function-catalog/example/test-invocations';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"Args":{},"CorrelationId":"example","EntityDefinitionId":"example","EntityInstanceId":"example","EntityOperation":"example","Record":{},"PreviousRecord":{}}'};
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/admin/function-catalog/example/test-invocations \ --header 'Content-Type: application/json' \ --data '{ "Args": {}, "CorrelationId": "example", "EntityDefinitionId": "example", "EntityInstanceId": "example", "EntityOperation": "example", "Record": {}, "PreviousRecord": {} }'Authorizations
Section titled “Authorizations”- None
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”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”Admin test invocation request for a published business function.
object
Optional JSON arguments exposed as ctx.args.
object
Optional correlation identifier.
Optional related entity definition identifier for entity-scoped execution.
Optional related entity instance identifier for entity-scoped execution.
Optional related entity operation label for entity-scoped execution.
Optional draft/current entity record exposed to dynamic functions and package entity bridges.
object
Optional previous entity record exposed to dynamic functions and package entity bridges.
object
Examplegenerated
{ "Args": {}, "CorrelationId": "example", "EntityDefinitionId": "example", "EntityInstanceId": "example", "EntityOperation": "example", "Record": {}, "PreviousRecord": {}}Admin test invocation request for a published business function.
object
Optional JSON arguments exposed as ctx.args.
object
Optional correlation identifier.
Optional related entity definition identifier for entity-scoped execution.
Optional related entity instance identifier for entity-scoped execution.
Optional related entity operation label for entity-scoped execution.
Optional draft/current entity record exposed to dynamic functions and package entity bridges.
object
Optional previous entity record exposed to dynamic functions and package entity bridges.
object
Examplegenerated
{ "Args": {}, "CorrelationId": "example", "EntityDefinitionId": "example", "EntityInstanceId": "example", "EntityOperation": "example", "Record": {}, "PreviousRecord": {}}Admin test invocation request for a published business function.
object
Optional JSON arguments exposed as ctx.args.
object
Optional correlation identifier.
Optional related entity definition identifier for entity-scoped execution.
Optional related entity instance identifier for entity-scoped execution.
Optional related entity operation label for entity-scoped execution.
Optional draft/current entity record exposed to dynamic functions and package entity bridges.
object
Optional previous entity record exposed to dynamic functions and package entity bridges.
object
Examplegenerated
{ "Args": {}, "CorrelationId": "example", "EntityDefinitionId": "example", "EntityInstanceId": "example", "EntityOperation": "example", "Record": {}, "PreviousRecord": {}}Responses
Section titled “Responses”OK
object
Business function execution result.
object
Persisted run identifier.
Function identifier.
Executed function version identifier.
Execution source.
Actor user identifier.
Correlation identifier.
Execution start timestamp.
Execution completion timestamp.
Execution duration in milliseconds.
Bounded result summary.
Structured JSON result payload.
object
Bounded error summary.
Bounded diagnostic log summary.
Structured validation errors produced by a Validation contract.
Structured validation error emitted by a Validation business function.
object
Optional entity field key targeted by the error.
User-facing validation message.
Optional stable validation code.
Output produced by a BeforeSaveMutation function.
object
Mutated save draft exposed as ctx.record.
object
Stable machine-readable reason code for a platform or runtime failure.
Net Operation Project source revision captured for this execution.
Net Operation Project build captured for this execution.
Net Operation Project artifact captured by the published function version.
Net Operation Project artifact selected before runtime activation.
object
object
object
object
Example
{ "Data": { "Status": 0 }, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Bad Request
object
Business function execution result.
object
Persisted run identifier.
Function identifier.
Executed function version identifier.
Execution source.
Actor user identifier.
Correlation identifier.
Execution start timestamp.
Execution completion timestamp.
Execution duration in milliseconds.
Bounded result summary.
Structured JSON result payload.
object
Bounded error summary.
Bounded diagnostic log summary.
Structured validation errors produced by a Validation contract.
Structured validation error emitted by a Validation business function.
object
Optional entity field key targeted by the error.
User-facing validation message.
Optional stable validation code.
Output produced by a BeforeSaveMutation function.
object
Mutated save draft exposed as ctx.record.
object
Stable machine-readable reason code for a platform or runtime failure.
Net Operation Project source revision captured for this execution.
Net Operation Project build captured for this execution.
Net Operation Project artifact captured by the published function version.
Net Operation Project artifact selected before runtime activation.
object
object
object
object
Example
{ "Data": { "Status": 0 }, "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
Business function execution result.
object
Persisted run identifier.
Function identifier.
Executed function version identifier.
Execution source.
Actor user identifier.
Correlation identifier.
Execution start timestamp.
Execution completion timestamp.
Execution duration in milliseconds.
Bounded result summary.
Structured JSON result payload.
object
Bounded error summary.
Bounded diagnostic log summary.
Structured validation errors produced by a Validation contract.
Structured validation error emitted by a Validation business function.
object
Optional entity field key targeted by the error.
User-facing validation message.
Optional stable validation code.
Output produced by a BeforeSaveMutation function.
object
Mutated save draft exposed as ctx.record.
object
Stable machine-readable reason code for a platform or runtime failure.
Net Operation Project source revision captured for this execution.
Net Operation Project build captured for this execution.
Net Operation Project artifact captured by the published function version.
Net Operation Project artifact selected before runtime activation.
object
object
object
object
Example
{ "Data": { "Status": 0 }, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}