Get file details
get
https://api.imagekit.io
/v1/files/:fileId/details
Get file details API

Response structure and status code (application/JSON)

In case of an error, you will get an error code along with the error message. On success, you will receive a 200 status code with the file object in JSON-encoded response body.

Examples

Here is the example request to understand the API usage.
cURL
Node.js
Python
PHP
Java
Ruby
1
# The unique fileId of the uploaded file. fileId is returned in response of list files API and upload API.
2
curl -X GET "https://api.imagekit.io/v1/files/file_id/details" \
3
-u your_private_api_key:
Copied!
1
var ImageKit = require("imagekit");
2
3
var imagekit = new ImageKit({
4
publicKey : "your_public_api_key",
5
privateKey : "your_private_api_key",
6
urlEndpoint : "https://ik.imagekit.io/your_imagekit_id/"
7
});
8
9
imagekit.getFileDetails("file_id", function(error, result) {
10
if(error) console.log(error);
11
else console.log(result);
12
});
Copied!
1
from imagekitio import ImageKit
2
3
imagekit = ImageKit(
4
public_key='your_public_api_key',
5
private_key='your_private_api_key',
6
url_endpoint = 'https://ik.imagekit.io/your_imagekit_id/'
7
)
8
9
details = imagekit.get_file_details("file_id")
10
11
print("File detail-", details, end="\n\n")
Copied!
1
use ImageKit\ImageKit;
2
3
$public_key = "your_public_api_key";
4
$your_private_key = "your_private_api_key";
5
$url_end_point = "https://ik.imagekit.io/your_imagekit_id";
6
7
$imageKit = new ImageKit(
8
$public_key,
9
$your_private_key,
10
$url_end_point
11
);
12
13
$getFileDetails = $imageKit->getDetails("file_id");
14
15
echo("File details : " . json_encode($getFileDetails));
Copied!
1
Result result=ImageKit.getInstance().getFileDetail("file_id");
Copied!
1
imagekitio = ImageKitIo::Client.new("your_private_key", "your_public_key", "your_url_endpoint")
2
imagekitio.get_file_deltails(file_id: 'file_id')
Copied!