Type to search...

Image: rename

Fast way to rename the image. This method will change the image’s public ID.


HTTP request

PUT /image/v1/c/<cloudId>/o/<publicId>/rename/o/<newPublicId>   HTTP/1.1


PATCH /image/v1/c/<cloudId>/o/<publicId>/rename/o/<newPublicId>  HTTP/1.1


Parameter name Value Description
Path parameters
cloudId string ID of cloud
publicId string Public ID of image
newPublicId string New public ID for the image

Request Body

This method does not support request body.


If successful, this method returns a image resource in the response body.

Response HTTP status code

HTTP status code Description
200 Success
404 Image not found in cloud by public ID

For more information about HTTP codes, click here.

Rate limit

Detailed information for image rate limitation is available on Shardimage developers.


use shardimage\shardimagephp\auth\Client;
$client = new Client([
    'apiKey' => '<apiKey>',
    'apiSecret' => '<apiSecret>',
    'imageSecret' => '<imageSecret>',
$image = $client->getImageService()->rename(['cloudId' => '<cloudId>', 'publicId' => '<publicId>', 'newPublicId' => '<newPublicId>']);
Table of contents