Examples
Here is the example request to understand the API usage.
curl -X POST "https://api.imagekit.io/v1/bulkJobs/moveFolder" \ -H 'Content-Type: application/json' \ -u your_private_key: -d ' { "sourceFolderPath" : "/folder/to/move", "destinationPath" : "/folder/to/move/into/" } '
var ImageKit = require("imagekit"); var imagekit = new ImageKit({ publicKey : "your_public_api_key", privateKey : "your_private_api_key", urlEndpoint : "https://ik.imagekit.io/your_imagekit_id/" }); imagekit.moveFolder({ sourceFolderPath: "/folder/to/move", destinationPath: "/folder/to/move/into/" }, function(error, result) { if(error) console.log(error); else console.log(result); });
from imagekitio import ImageKit imagekit = ImageKit( public_key='your_public_api_key', private_key='your_private_api_key', url_endpoint = 'https://ik.imagekit.io/your_imagekit_id/' ) move_folder = imagekit.move_folder(options=MoveFolderRequestOptions(source_folder_path="/demo1/testing", destination_path="/")) print("Move folder-", move_folder, end="\n\n") # Raw Response print(move_folder.response_metadata.raw) # print the job's id print(move_folder.job_id)
use ImageKit\ImageKit; $public_key = "your_public_api_key"; $your_private_key = "your_private_api_key"; $url_end_point = "https://ik.imagekit.io/your_imagekit_id"; $imageKit = new ImageKit( $public_key, $your_private_key, $url_end_point ); $sourceFolderPath = '/folder/to/move'; $destinationPath = '/folder/to/move/into/'; $moveFolder = $imageKit->moveFolder([ 'sourceFolderPath' => $sourceFolderPath, 'destinationPath' => $destinationPath ]); echo("Move Folder : " . json_encode($moveFolder));
MoveFolderRequest moveFolderRequest = new MoveFolderRequest(); moveFolderRequest.setSourceFolderPath("/folder/to/move"); moveFolderRequest.setDestinationPath("/folder/to/move/into/"); ResultOfFolderActions resultOfFolderActions = ImageKit.getInstance().moveFolder(moveFolderRequest);
imagekitio = ImageKitIo::Client.new("your_private_key", "your_public_key", "your_url_endpoint") imagekitio.move_folder(source_folder_path: '/folder/to/move', destination_path: '/folder/to/move/into/')
resp, err := ik.Media.MoveFolder(ctx, media.MoveFolderParam{ SourceFolderPath: "/folder/to/move", DestinationPath: "/folder/to/move/into/", })
var imagekit = new ImageKit({ publicKey : "your_public_api_key", privateKey : "your_private_api_key", urlEndpoint : "https://ik.imagekit.io/your_imagekit_id/" }); MoveFolderRequest moveFolderRequest = new MoveFolderRequest { sourceFolderPath = "/folder/to/move", destinationPath = "/folder/to/move/into/" }; ResultOfFolderActions resultOfFolderActions1 = imagekit.MoveFolder(moveFolderRequest);