The request syntax of the Cloud Paralleled File System (CPFS) API is specific. Each request includes the endpoint, communication protocol, request method, request parameters, encoding, SDK, and other information.

Note The request syntax of the CPFS API is the same as that of the Apsara File Storage NAS API. The APIs use the same endpoints and SDKs.

Endpoints

The syntax of the CPFS API is nas.aliyuncs.com and nas.[ RegionId.]aliyuncs.com. The RegionId specifies the ID of a region. The ID changes based on the region where your CPFS file system resides. The following table lists regions that support CPFS.

Region RegionId Endpoint
China (Beijing) cn-beijing nas.cn-beijing.aliyuncs.com
China (Shanghai) cn-shanghai nas.cn-shanghai.aliyuncs.com
China (Hangzhou) cn-hangzhou nas.cn-hangzhou.aliyuncs.com
China (Shenzhen) cn-shenzhen nas.cn-shenzhen.aliyuncs.com
China (Zhangjiakou-Beijing Winter Olympics) cn-zhangjiakou nas.cn-zhangjiakou.aliyuncs.com
China (Hohhot) cn-huhehaote nas.cn-huhehaote.aliyuncs.com

Communication protocols

You can use HTTP or HTTPS to send requests. To ensure a high level of security, we recommend that you use HTTPS to send requests.

Request methods

You can use the HTTP GET method to send requests. If the HTTP GET method is applied, you must specify request parameters in each request URL.

Request parameters

Each request must include the Action parameter that specifies an API operation to be called. For example, set the Action parameter to CreateLDAPConfig. Request parameters include both common parameters and operation-specific parameters.

Encoding

All requests and responses are encoded in the UTF-8 format.

Use an SDK

Available SDKs for CPFS file systems include SDK for Java, SDK for Python, and SDK for PHP.

We recommend that you use an SDK. Compared with HTTP requests that you make, an SDK eliminates the need to encapsulate HTTPS packets and generate signatures.

Download a language-specific SDK from one of the following GitHub links: