Update image
images.v1.edit(strimage_id, V1EditParams**kwargs) -> Image
PATCH/accounts/{account_id}/images/v1/{image_id}
Update image access control. On access control change, all copies of the image are purged from cache.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Parameters
User modifiable key-value store. Can be used for keeping references to another system of record for managing images. No change if not specified.
Update image
import os
from cloudflare import Cloudflare
client = Cloudflare(
api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted
)
image = client.images.v1.edit(
image_id="image_id",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
print(image.id){
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"result": {
"id": "id",
"creator": "107b9558-dd06-4bbd-5fef-9c2c16bb7900",
"filename": "logo.png",
"meta": {
"key": "value"
},
"requireSignedURLs": true,
"uploaded": "2014-01-02T02:20:00.123Z",
"variants": [
"https://imagedelivery.net/MTt4OTd0b0w5aj/107b9558-dd06-4bbd-5fef-9c2c16bb7900/thumbnail",
"https://imagedelivery.net/MTt4OTd0b0w5aj/107b9558-dd06-4bbd-5fef-9c2c16bb7900/hero",
"https://imagedelivery.net/MTt4OTd0b0w5aj/107b9558-dd06-4bbd-5fef-9c2c16bb7900/original"
]
},
"success": true
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"result": {
"id": "id",
"creator": "107b9558-dd06-4bbd-5fef-9c2c16bb7900",
"filename": "logo.png",
"meta": {
"key": "value"
},
"requireSignedURLs": true,
"uploaded": "2014-01-02T02:20:00.123Z",
"variants": [
"https://imagedelivery.net/MTt4OTd0b0w5aj/107b9558-dd06-4bbd-5fef-9c2c16bb7900/thumbnail",
"https://imagedelivery.net/MTt4OTd0b0w5aj/107b9558-dd06-4bbd-5fef-9c2c16bb7900/hero",
"https://imagedelivery.net/MTt4OTd0b0w5aj/107b9558-dd06-4bbd-5fef-9c2c16bb7900/original"
]
},
"success": true
}