Batch Protect Excel Files
This REST API enables batch protection of eligible Excel files.
REST API
POST http://api.aspose.cloud/v3.0/cells/batch/protect
Security and Authentication
The Aspose.Cells Cloud APIs are secure and require JWT token-based authentication.
Request Parameters
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| batchProtectRequest | BatchProtectRequest | body | JSON payload that specifies the source folder, match conditions, protection type, password, and output folder. |
BatchProtectRequest Properties
| Name | Type | Description | Notes |
|---|---|---|---|
| SourceFolder | string | Folder containing the source Excel files. | optional |
| MatchCondition | MatchConditionRequest | Criteria used to select files for protection. | optional |
| ProtectionType | string | Type of protection to apply (e.g., All, ReadOnly). |
optional |
| Password | string | Password to set for the protected files. | optional |
| OutFolder | string | Destination folder for the protected files. | optional |
MatchConditionRequest Properties
| Name | Type | Description | Notes |
|---|---|---|---|
| RegexPattern | string | Regular expression used to match file names. | optional |
| FullMatchConditions | string[] | List of exact file name conditions. | optional |
Request Body Parameter
| Parameter Name | Type | Description |
|---|---|---|
| data | file | Binary content of the workbook file to create. |
Response
{
"Name": "ResponseFile",
"DataType": {
"Identifier": "File",
"Reference": "Stream",
"Name": "file"
}
}
HTTP Status Codes
| Code | Meaning | When Returned |
|---|---|---|
| 200 OK | Workbook created successfully | Normal flow |
| 201 Created | Workbook created (alternative response) | When the API returns a created status |
| 400 Bad Request | Invalid parameters | Client‑side error |
| 401 Unauthorized | Missing or invalid token | Authentication error |
| 409 Conflict | File exists and isWriteOver=false |
Conflict with existing file |
How to Use the PostProtectConvert API with SDKs
PostProtectConvert API Specification
The OpenAPI Specification defines a publicly accessible programming interface and lets you carry out REST interactions directly from a web browser.
You can use the cURL command‑line tool to access Aspose.Cells web services easily. The following example shows how to make a call to the Cloud API with cURL.
Use Aspose.Cells Cloud SDKs
Using an SDK is the best way to speed up development. An SDK handles low‑level details and lets you focus on your project tasks. Please check out the GitHub repository for a complete list of Aspose.Cells Cloud SDKs.
The following code examples demonstrate how to make calls to Aspose.Cells web services using various SDKs: