Skip to main content
Version: V3 (Ignition 8.3)

system.mes.operation.exportAsJsonBytes

Description​

Exports all Operations as raw bytes in JSON format (UTF-8 encoded). Streams operation data from the database and formats it as JSON, including a header row.

Syntax​

system.mes.operation.exportAsJsonBytes()
system.mes.operation.exportAsJsonBytes(locationIdOrPaths)

Parameters​

Method 1: Export all operations​

ParameterTypeNullableDescription
None--This method does not take any parameters.

Method 2: Export operations for specific locations​

ParameterTypeNullableDescription
locationIdOrPathsString[]FalseThe IDs or paths of the locations to export operations for.

Returns​

A Byte array (Byte[]) containing the raw byte data of the JSON export.

Code Examples​

Perspective​

jsonBytes = system.mes.operation.exportAsJsonBytes()
system.perspective.download("operations.json", jsonBytes)