Invoke a Dynatrace app function through the App Functions API with POST, using the app ID and function name path parameters to run server-side logic.
| POST | SaaS | https://{your-environment-id}.apps.dynatrace.com/v1/apps/{appId}/api/{functionName} |
You use the appId and functionName path parameters to choose which installed app function to execute. The operation returns 200 OK when Dynatrace runs the function successfully.
To execute this request, you need a platform token or OAuth access token with app-engine:apps:run scope. To learn how to obtain and use it, see Tokens and authentication.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| appId | string | The unique identifier for the app | path | Required |
| functionName | string | The name of the called function | path | Required |
| body | string | Request body for HTTP methods supporting body. | body | Optional |
RequestBody objectRequest body for HTTP methods supporting body.
| Code | Type | Description |
|---|---|---|
| 200 | string | OK |
| 400 | Error | Bad Request |
| 404 | string | The app was not found. |
| 409 | string | The app's backend is being deployed and not able to serve requests yet. |
| 540 | Function | JavaScript Error occurred |
| 541 | Function | Runtime Error occurred |
ResponseBody objectErrorEnvelope objectError response for all 4xx and 5xx errors.
| Element | Type | Description |
|---|---|---|
| error | Error | Contains information for 4xx and 5xx errors. |
Error objectContains information for 4xx and 5xx errors.
| Element | Type | Description |
|---|---|---|
| code | integer | The HTTP status code |
| message | string | The error message |
| details | Error | Contains details for 4xx and 5xx errors. |
| help | string | Additional information related to the error |
| retryAfterSeconds | integer | Seconds to wait until the next retry |
ErrorDetails objectContains details for 4xx and 5xx errors.
| Element | Type | Description |
|---|---|---|
| errorRef | string | Generated unique value for 5xx errors. |
| traceId | string | OpenTelemetry trace id of the trace where error occurs. |
| errorCode | string | An optional error code that contains more detailed error information than the HTTP response code alone. |
| errorCodeProperties | object | Additional properties related to the provided error code |
| constraintViolations | Constraint | A list of constraint violations |
ConstraintViolation objectContains information about a constraint violation caused by invalid input.
| Element | Type | Description |
|---|---|---|
| path | string | The path of the property that caused the constraint violation |
| message | string | The error message |
| errorCode | string | An optional error code that contains more detailed error information. |
| errorCodeProperties | object | Additional properties related to the provided error code. |
{"error": {"code": 1,"message": "string","details": {"errorRef": "string","traceId": "string","errorCode": "string","errorCodeProperties": {},"constraintViolations": [{"path": "string","message": "string","errorCode": "string","errorCodeProperties": {}}]},"help": "string","retryAfterSeconds": 1}}