{"message" : "The requested asset does not exist.","help" : "For support kindly contact us at support@imagekit.io ."}
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.
# The unique fileId and versionId of the uploaded file. fileId and versionId (versionInfo.id) is returned in response of list files API and upload API.
curl-XGET"https://api.imagekit.io/v1/files/file_id/versions/version_id" \-u your_private_api_key:
from imagekitio import ImageKitimagekit =ImageKit( public_key='your_public_api_key', private_key='your_private_api_key', url_endpoint ='https://ik.imagekit.io/your_imagekit_id/')file_versions_details = imagekit.get_file_version_details(file_id='file_id', version_id='version_id')print("Get File version details-", "\n", file_versions_details)# Raw Responseprint(file_versions_details.response_metadata.raw)# print that file's idprint(file_versions_details.file_id)# print that file's version idprint(file_versions_details.version_info.id)