Function Compute API of the 2021-04-06 version and later versions comply with the Alibaba Cloud OpenAPI specifications. This allows you to view and call the API or an SDK in Alibaba Cloud OpenAPI Explorer. This topic describes how to call the API and an SDK of Function Compute in OpenAPI Explorer.
Before you start
Call the API
Log on to OpenAPI Explorer.
Move the pointer over Cloud Products in the top navigation bar. Enter Function Compute in the search box and select Function Compute 3.0 from the search results.
In the left-side navigation pane, choose Function > InvokeFunction.
Specify the following parameters and click Initiate Call. After the call is complete, you can view the execution result on the Response tab.
Parameter
Description
Parameter
Description
Region
The region in which the function that you want to invoke resides.
X-Fc-Invocation-Type
The function invocation mode. Valid values:
Sync: synchronous invocation
Async: asynchronous invocation
functionName
The name of the function.
Call an SDK
Log on to OpenAPI Explorer.
Move the pointer over Cloud Products in the top navigation bar. Enter Function Compute in the search box and select Function Compute 3.0 from the search results.
In the left-side navigation pane, choose Function > InvokeFunction.
Specify the following parameters and then select a programming language on the SDK Sample Code tab. The system automatically generates sample code. Click Example.
Parameter
Description
Parameter
Description
Region
The region in which the function that you want to invoke resides.
X-Fc-Invocation-Type
The function invocation mode. Valid values:
Sync: synchronous invocation
Async: asynchronous invocation
functionName
The name of the function.
After the execution is complete, view the execution result in the Alibaba Cloud Cloud Shell section.