Implementing Asynchronous Function Execution
Function
This API is used to implement asynchronous function execution. To ensure compatibility between v1 and v2 APIs, request_id in both snake and camel cases will be returned.
URI
POST /v2/{project_id}/fgs/functions/{function_urn}/invocations-async
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| function_urn | Yes | String | Function URN. |
| project_id | Yes | String | Tenant's project ID. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| {User defined key} | Yes | Map<String,> | Request body of the asynchronous function (JSON) |
Response Parameters
Status code: 202
| Parameter | Type | Description |
|---|---|---|
| request_id | String | Request ID of the asynchronous function. |
Example Requests
POST https://{functiongraph_endpoint}/v2/7aad83af3e8d42e99ac194e8419e2c9b/fgs/functions/urn:fss:xxxxxxxxx:7aad83af3e8d42e99ac194e8419e2c9b:function:default:test:latest/invocations-async
{
"message" : "Hello World"
} Example Responses
Status code: 202
Accepted
{
"request_id" : "1167bf8c-87b0-43ab-8f5f-26b16c64f252"
} Status code: 404
Not Found
{
"error_code" : "FSS.1051",
"error_msg" : "Not found the function"
} Status Codes
| Status Code | Description |
|---|---|
| 202 | Accepted |
| 404 | Not Found |
Error Codes
See Error Codes.
Last Article: Implementing Synchronous Function Execution
Next Article: Permissions Policies and Supported Actions
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.