Image Deletion API
Through this API, you can delete image files previously uploaded to the PaaSoo platform. This operation is useful for actively cleaning up image resources that are no longer needed, thereby reducing redundant storage usage.
1. Invocation Method
- HTTP Method:
GET - API Endpoint:
https://api.paasoo.com/image/delete - Request Parameters: Appended to the URL via
key,secret, andaddress.
Important Note: The address parameter must be URL-encoded to avoid errors when passing special characters.
2. Request Example
Below is an example of a GET request directly in a browser or command line:
https://api.paasoo.com/image/delete?key=API_KEY&secret=API_SECRET&address=ENCODED_IMAGE_URL
- ENCODED_IMAGE_URL refers to the result of URL-encoding the original image link in UTF-8 format.
- If you need to test the encoding, you can use an online text conversion tool.
3. Request Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| key | string | Yes | API Key (composed of 8 letters or numbers), used to uniquely identify your account. Can be obtained in the PaaSoo dashboard. | Abcdefgh |
| secret | string | Yes | API Secret (composed of 8 letters or numbers), used in conjunction with key for authentication. Can be obtained in the PaaSoo dashboard. | Abc123EF |
| address | string | Yes | The address of the image to be deleted. Please URL-encode it before appending it to the request parameters. | https%3A%2F%2Ffiles.paasoo.com%2Fimages%2Fxxx.jpg |
4. Response Parameters
4.1 Response Fields
| Parameter | Type | Description | Example |
|---|---|---|---|
| status | integer | Response status code submitted to the PaaSoo cloud communication platform. API status code list:
| 0 |
| status_code | string | Status description. | Missing parameters |
4.2 Success Response Example
{
"status": 0,
"status_code": "success"
}
Note: status = 0 indicates that the image file has been successfully deleted.
4.3 Failure Response Example
{
"status": 2,
"status_code": "Missing parameters."
}
Note: status = 2 indicates that required parameters are missing from the request.
5. Best Practices and Precautions
- Deletion is Irreversible: Once this deletion operation is executed, the deleted image cannot be recovered. Please invoke it with caution.
- Security: It is recommended to protect your resources using the HTTPS protocol in combination with an IP Whitelist to prevent unauthorized malicious deletions.
- Parameter Validation: Before submitting a deletion request, ensure that the URL encoding is done correctly and the
keyandsecretare accurate. - Combined Use: It is recommended to use this API in conjunction with the Image Upload API and MMS API to promptly clean up expired or unneeded images.
- Automatic Cleanup: To improve system efficiency, PaaSoo may automatically delete the image 30 days after upload. If you call this API after 30 days, the image may have already been cleaned up by the system and cannot be deleted again.
6. Appendix
- Logging: Log the deletion operations to serve as a reference for future auditing or troubleshooting.
- Automated Strategies: If there is a need for periodic cleanup, you can develop automated tasks on your business side to call this API for batch deletions.
If you encounter any technical issues or have business inquiries during the API integration, please do not hesitate to contact our Support team at support@paasoo.com. We are always here to assist you.