Skip to main content

system.kanoa.cmms.getImageData(paramsDict)

Returns a dataset of CMMS image records, filtered according to the keys supplied in paramsDict. All keys in paramsDict are optional, so callers can narrow the results by image ID, name, type, linked procedure step check, or a date range, and can optionally request that the actual image and/or thumbnail bytes be included inline in the results (both default to excluded for performance, since callers often just need the listing metadata). This is the function to use when browsing or searching across many image records, rather than fetching a single image directly (see getImage and getImageThumbnail for single-record retrieval).


Parameters

paramsDict Dictionary

- chkImageIdIntegerFilter by chkImageId
- imageNameStringFilter by image name
- imageTypeStringFilter by image type
- includeImageBooleanInclude image. Set to False if not supplied
- includeThumbnailBooleanInclude thumbnail. Set to False if not supplied
- procedureStepCheckIdIntegerFilter by procedureStepCheckId
- rangeEndDateTime
- rangeStartDateTime

Returns

imageData pyDataset


Example

# Look up all images attached to a specific procedure step check, taken within the last 7 days, including thumbnail bytes for a gallery view.

rangeEnd = system.date.now()
rangeStart = system.date.addDays(rangeEnd, -7)

paramsDict = {
"procedureStepCheckId": 9821,
"includeThumbnail": True,
"includeImage": False,
"rangeStart": rangeStart,
"rangeEnd": rangeEnd
}

imageData = system.kanoa.cmms.getImageData(paramsDict)