The read_all function retrieves all records associated with a given production.
See record fields for more information on the fields returned.
Example JSON request for this function:
{ "action": "read_all", // string "user": "api@greenlit.org.nz", // email string "production": "YmU9U5evebUbUjagydejU3Ehuna2a2", // string "key": "50d95141da41a5e502ada5c7da7de33d" // string "records": {}, // empty "data": {} // empty }
Example JSON response for this function:
{ "status": "success", // or partial, or error "error": "", // string message "data": [ // array of records, see record fields for more info {
"iid": "572", "production_id": "191", "created_on": "1693186970", "created_by": "71", "emission_factor": "402", "map_used": "2", "map_record": "110", "record_dom": "0", "record_date": "1693144800", "record_milestone": "0", "record_value": "12", "record_value_multiplier": "0", "record_actual": "1", "record_aggregate": "0", "record_identifier": "A unique id string", "record_offset": "0", "record_offset_cost": "0", "tool_locked": "0", "tool_record": "0", "tool_updated": "0", "api_app": null, "api_updated": null, "dropped": "0", "department": "1", "tracking": "0", "country": "169" }, // ... more records ], "actions": [], "lookups": { "tracking": { "2": "A tracker", // ... trackers associated with production }, "department": { "1": "Production", // ... all departments }, "map_record": { "110": {
"iid": "110", "category": "2", "level_2": "Taxi", "level_3": "", "level_4": "", "factor": "401", "co2e": "0.224697", "co2": "0.220883", "ch4": "0.000295203", "n2o": "0.00351882", "unit": "dollars", "unit_multiplier": null, "scope": "3" }, // ... map records associated with records }, "category": { "2": "Vehicles", // ... categories associated with records } } }