Versions of Function Compute API that are released on April 6, 2021 and later conform to the OpenAPI specifications of Alibaba Cloud. You can view and debug API operations and SDKs of Function Compute by using OpenAPI Explorer provided by Alibaba Cloud. This topic describes how to call API operations and SDKs of Function Compute in OpenAPI Explorer.
Prerequisite
Call an API operation
- Log on to the OpenAPI Explorer.
In the top navigation bar, click Select a cloud service. In the search field, enter Function Compute and click Function Compute in the search result.
In the left-side navigation pane, click InvokeFunction.
Configure the parameters and click Submit Request.
The following table describes the code parameters.
Parameter | Description |
Region | The region in which the function you want to execute resides. |
X-Fc-Invocation-Type | The type of function invocation. Take note of the following items:
|
serviceName | The name of the service to which the function belongs. |
functionName | The name of the function. |
Use Function Compute SDKs
- Log on to the OpenAPI Explorer.
In the top navigation bar, click Select a cloud service. In the search field, enter Function Compute and click Function Compute in the search result.
In the left-side navigation pane, click InvokeFunction.
Configure the parameters. Click the tab of the programming language that you want to use on the SDK Sample Code tab. The system automatically generates the sample code. Click Example.
The following table describes the code parameters.
Parameter | Description |
Region | The region in which the function you want to execute resides. |
X-Fc-Invocation-Type | The type of function invocation. Take note of the following items:
|
serviceName | The name of the service to which the function belongs. |
functionName | The name of the function. |
After the execution is complete, view the execution result in the Alibaba Cloud Cloud Shell section.