Skip to main content

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

Invocation Details
  • HTTP Method: GET
  • API Endpoint: https://api.paasoo.com/image/delete
  • Request Parameters: Appended to the URL via key, secret, and address.

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
Note
  • 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

ParameterTypeRequiredDescriptionExample
keystringYesAPI Key (composed of 8 letters or numbers), used to uniquely identify your account. Can be obtained in the PaaSoo dashboard.Abcdefgh
secretstringYesAPI Secret (composed of 8 letters or numbers), used in conjunction with key for authentication. Can be obtained in the PaaSoo dashboard.Abc123EF
addressstringYesThe 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

ParameterTypeDescriptionExample
statusintegerResponse status code submitted to the PaaSoo cloud communication platform.
API status code list:
  • 0 - success: Deletion successful
  • 2 - Missing parameters: Required parameters are missing
  • 3 - Invalid parameters: Parameter format error
  • 4 - Invalid credentials: key or secret error
  • 5 - Unauthorized IP: IP Whitelist restriction
  • 11 - System error: System error
0
status_codestringStatus 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

  1. Deletion is Irreversible: Once this deletion operation is executed, the deleted image cannot be recovered. Please invoke it with caution.
  2. Security: It is recommended to protect your resources using the HTTPS protocol in combination with an IP Whitelist to prevent unauthorized malicious deletions.
  3. Parameter Validation: Before submitting a deletion request, ensure that the URL encoding is done correctly and the key and secret are accurate.
  4. 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.
  5. 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.
Support

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.