All Products
Search
Document Center

Function Compute (2.0):Differences between API versions

Last Updated:Jul 11, 2023

Function Compute provides two API versions. The two versions are incompatible with each other. This topic describes the differences between the two API versions. Information in this topic can help you smoothly upgrade from the earlier API version to the latest.

API versions

Function Compute provides the following two API versions.

API version

Description

2021-04-06

The latest version. For more information about how to use SDKs to call API operations of this version, see SDK reference (2021-04-16, recommended).

2016-08-15

The earlier version. For more information about how to use SDKs to call API operations of this version, see SDKs.

Differences between versions

Item

Version 2016-08-15

Version 2021-04-06

Value of the version parameter in paths

Path format: /{version}/services/xxxx

2016-08-15

2021-04-06

Location of the qualifier parameter

Path. Example: /version/serviceName.qualifier/xxx.

Query string. Example: /version/serviceName/xxx?qualifier=xxx.

Paths of API operations

The paths of the following API operations are changed:

  • CreateVpcBinding

    /{version}/services/{serviceName}/binding
  • DeleteVpcBinding

    /{version}/services/{serviceName}/binding
  • ListReservedCapacities

    /{version}/reservedCapacities

The paths of the following API operations are changed:

  • CreateVpcBinding

    /{version}/services/{serviceName}/bindings
  • DeleteVpcBinding

    /{version}/services/{serviceName}/bindings/{vpcId}
  • ListReservedCapacities

    /{version}/reserved-capacities

Method of calculating signatures

For more information, see Signature authentication.

For more information, see the Request Signatures section in ROA invocation method.

Data integrity verification for request bodies

Data integrity is not verified for request bodies.

A signature contains the MD5 value of the request body. SDKs read this value from the Content-MD5 header in the request. SDKs do not generate this value.

To meet the requirements for verification of payload integrity, the backend checks whether the Content-MD5 header is empty.

  • If the header is empty, the backend does not verify the integrity of the request body.

  • If the field is not empty, the backend generates an MD5 value and compares it against the MD5 value obtained from the request header.

Data type of the triggerConfig parameter in trigger-related API operations

Interface.

String. You must encode the data that you want to specify for the triggerConfig parameter into a JSON string and pass the string to the API operations.