Invoke Service#
Description#
Synchronously invoke a function service.
URI#
POST /serverless/v1/functions/{functionVersionURN}/invocations
Path Parameters:
Parameter |
Required |
Type |
Description |
|---|---|---|---|
functionVersionURN |
Yes |
String |
Function version URN. |
Request Parameters#
Request Header Parameters
Parameter |
Required |
Type |
Description |
|---|---|---|---|
Content-Type |
Yes |
string |
Message body type. |
X-Instance-Cpu |
No |
string |
CPU required for the function instance. |
X-Instance-Memory |
No |
string |
Memory required for the function instance. |
X-Instance-Custom-Resource |
No |
string |
Custom resources required for the function instance. |
X-Pool-Label |
No |
string |
Resource pool label for affinity scheduling of the function instance. |
X-Instance-Label |
No |
string |
Run on function instances with this label. |
X-Instance-Session |
No |
string |
Specify an instance session for invocation; the session is uniquely bound to the instance. |
Request Body Parameters
Custom format defined by the user function.
Response Parameters#
Custom format defined by the user function.
Request Example#
POST {frontend endpoint}/serverless/v1/functions/{functionVersionURN}/invocations
{
"name":"yuanrong"
}
Response Example#
Status Code: 200
Indicates successful function invocation.
"hello yuanrong"
Error Codes#
See Error Codes