All Products
Search
Document Center

:Make API requests

Last Updated:Oct 30, 2023

Serverless Workflow API operations use the RPC protocol. You can call Serverless Workflow API operations by sending HTTP GET or HTTP POST requests. This topic describes how to call Serverless Workflow API operations. Each API request must contain parameters and be signed and authenticated.

Request syntax

This section describes the syntax of an API request sent over HTTP or HTTPS.

Use the following URL format for a GET request. The URL must be encoded in UTF-8.

http(s)://Endpoint/? Action=xx&Parameters
  • Endpoint: the endpoint of the Serverless Workflow API.
  • Action: the name of the operation being performed. For example, to execute a flow, you must set the Action parameter to StartExecution.
  • Parameters: the request parameters for the operation. Separate multiple parameters with ampersands (&). Request parameters include both common parameters and operation-specific parameters.

The following example demonstrates how to call the StartExecution operation in Serverless Workflow:

https://[Endpoint]/?Action=StartExecution
&FlowName=Flow
&Common request parameters
Note We recommend that you send API requests over HTTPS to enhance security.

Endpoint

The endpoint of Serverless Workflow API is XXX.aliyuncs.com.

Network typeRegionEndpoint
Internet serviceChina (Hangzhou){account-id}.cn-hangzhou.fnf.aliyuncs.com
China (Shanghai){account-id}.cn-shanghai.fnf.aliyuncs.com
China (Beijing){account-id}.cn-beijing.fnf.aliyuncs.com
China (Shenzhen){account-id}.cn-shenzhen.fnf.aliyuncs.com
US (Silicon Valley){account-id}.us-west-1.fnf.aliyuncs.com
Singapore{account-id}.ap-southeast-1.fnf.aliyuncs.com
Internal network serviceChina (Hangzhou){account-id}.cn-hangzhou-internal.fnf.aliyuncs.com
China (Shanghai){account-id}.cn-shanghai-internal.fnf.aliyuncs.com
China (Beijing){account-id}.cn-beijing-internal.fnf.aliyuncs.com
China (Shenzhen){account-id}.cn-shenzhen-internal.fnf.aliyuncs.com
US (Silicon Valley){account-id}.us-west-1-internal.fnf.aliyuncs.com
Singapore{account-id}.ap-southeast-1-internal.fnf.aliyuncs.com
Note The {account-id} in the preceding table must be changed to your Alibaba Cloud account ID. You can click the profile picture in the upper-right corner of the Serverless Workflow console to view the enterprise alias, which is your account ID.

Common parameters

The following table describes common request parameters that can be used when you call Serverless Workflow API operations by sending GET requests over URLs.

ParameterTypeRequiredExampleDescription
ActionStringYesStartExecutionThe operation that you want to perform.
AccessKeyIdStringYesLTAIp4********fjxThe AccessKey ID provided to you by Alibaba Cloud. For more information, see Obtain an AccessKey pair.
SignatureStringYesOLeaidS1JvxuMvnyHOwuJ%2BuX5qY%3DThe signature string of the current request. For more information, see RPC invocation method.
SignatureMethodStringYesHMAC-SHA1The encryption method of the signature string. Default value: HMAC-SHA1.
SignatureVersionStringYes1.0The version of the signature encryption algorithm. Default value: 1.0.
SignatureNonceStringYes3ee8c1b8-****-44af-****-4e0ad82fd6cfA unique, random number used to prevent replay attacks. You must use different numbers for different requests.
TimestampStringYes2018-01-01T12:00:00ZThe timestamp of the request. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0.
VersionStringYes2019-03-15The version number of the API. The value must be in the YYYY-MM-DD format. Default value: 2019-03-15.
FormatStringNojsonThe format in which to return the response. Valid values: JSON and XML. Default value: JSON.