Version 1.9.72 (Release Notes)


deletehttps://api.pixlab.io/delete

Description

Remove a previously stored media file. All your processed media files are stored by default on pixlab.xyz unless you set your own AWS S3 key (refer to your dashboard on how to do that). In which case, everything shall be stored on your own S3 bucket.

HTTP Methods

GET

Request Parameters

Required

FieldsTypeDescription
linkURLTarget media URL or Unique media ID.
keyStringYour PixLab API Key. You can also embed your key in the WWW-Authenticate: HTTP header and omit this parameter if you want to.

Response

application/json.

This command always return a JSON object after each call. The following are the JSON fields returned in response body:

FieldsTypeDescription
statusIntegerStatus code 200 indicates success, any other code indicates failure.
idStringUnique media ID.
deletedBooleanResult of the delete operation.
errorStringError message if status != 200.

Python Example

import requests
import json
# Generate an oilpaint pic and delete it
req = requests.get('https://api.pixlab.io/oilpaint',params={'img':'http://cf.broadsheet.ie/wp-content/uploads/2015/03/jeremy-clarkson_3090507b.jpg','radius':3,'key':'My_PixLab_Key'})
reply = req.json()
if reply['status'] != 200:
	print (reply['error'])
	exit()
print ("Deleting: "+ reply['link'] +"...")
req = requests.get('https://api.pixlab.io/delete',params={'link':reply['link'],'key':'My_PixLab_Key'})
reply = req.json()
if reply['status'] != 200:
	print (reply['error'])
else:
	print ("Deletion succeed")

See Also