Type to search...

Image - API representation

The image resource represents an image in Shardimage.

For the list of methods for this resource, see the end of this page.

Resource Representation

Image resource

{
  "publicId": string,
  "createdAt": unsigned double,
  "object": objectResource,
  "orientation": unsigned int, 
  "format": string,
  "mimeType": string,
  "dimensions": dimensionsResource,
  "metadata": metadataResource,
  "metadataXml": string,
  "tags": string[],
  "detections": detectionsResource,
  "superBackup": superBackupResource
}
Property name Value Description Notes
publicId string ID of image
createdAt unsigned double Time of creation unix timestamp
object objectResource Information of object
orientation unsigned int Orientation of image (EXIF number) See more
format string Format of image
mimeType string MIME type of image
dimensions dimensionsResource Dimension data
metadata metadataResource Metadata of image
metadataXml string Metadata of image in XML structure
tags string[] Tags of Image
detections detectionsResource Detections
superBackup superBackupResource Super Backup data

Object resource

{
  "md5": string,
  "size": unsigned int,
}
Property name Value Description Notes
md5 string BASE64 encoded binary MD5
size unsigned int object size [bytes]

Dimensions resource

{
  "width": unsigned int,
  "height": unsigned int,
  "frameCount": unsigned int,
  "duration": float,
}
Property name Value Description Notes
width unsigned int Width [px]
height unsigned int Height [px]
frameCount unsigned int Frame count
duration float Duration [s]

Metadata resource

{
  "camera": {
    "iso": unsigned int,
    "exposureProgram": string
  }
}

Detections resource

{
  "eye": array,
  "face": array
}

Super Backup resource

{
  "destinationObjectPath": string|null,
  "isCurrentSession": boolean
}
Property name Value Description Notes
destinationObjectPath string / null Destination path on backup storage
isCurrentSession boolean The data generated by setting the current Super Backup target.

Image list resource

{
  "items": imageResource[],
  "nextPageToken": bool|string
}

Projections

Name Description
noObject Remove object key from response
noDimensions Remove dimensions key from response
metadata Add metadata content to response
metadataHR Metadata in human-readable format
metadataXML Metadata in raw XML format
noTags Remove tags key from response
detections Add detections content to response
superBackupInfo Add Super Backup information to response

Plugins

Name Description
metadata.save Saves metadata into record’s metadata properties if they are empty 
metadata.refresh Saves metadata into record’s metadata properties anyway 
metadata.clear Clear record’s metadata properties 

Methods

Available methods for Images resources are as follows:

  • view: Returns the specified image.
  • exists: Fast way to check if the image exists.
  • list: List images from cloud.
  • rename: This method will change the image’s public ID.
  • update: Updates an existing image tags and set up plugins.
  • delete: Deletes image permanently from the cloud.
  • delete by tag: This method deletes every image which has the given tag.
Table of contents