Type to search...

Image: rename

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

Request

HTTP request

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

or

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

Parameters

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.

Response

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.

SDK

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