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
Endpoint
The endpoint of Serverless Workflow API is XXX.aliyuncs.com.
Network type | Region | Endpoint |
Internet service | China (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 service | China (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 |
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.
Parameter | Type | Required | Example | Description |
Action | String | Yes | StartExecution | The operation that you want to perform. |
AccessKeyId | String | Yes | LTAIp4********fjx | The AccessKey ID provided to you by Alibaba Cloud. For more information, see Obtain an AccessKey pair. |
Signature | String | Yes | OLeaidS1JvxuMvnyHOwuJ%2BuX5qY%3D | The signature string of the current request. For more information, see RPC invocation method. |
SignatureMethod | String | Yes | HMAC-SHA1 | The encryption method of the signature string. Default value: HMAC-SHA1. |
SignatureVersion | String | Yes | 1.0 | The version of the signature encryption algorithm. Default value: 1.0. |
SignatureNonce | String | Yes | 3ee8c1b8-****-44af-****-4e0ad82fd6cf | A unique, random number used to prevent replay attacks. You must use different numbers for different requests. |
Timestamp | String | Yes | 2018-01-01T12:00:00Z | The 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. |
Version | String | Yes | 2019-03-15 | The version number of the API. The value must be in the YYYY-MM-DD format. Default value: 2019-03-15. |
Format | String | No | json | The format in which to return the response. Valid values: JSON and XML. Default value: JSON. |