Skip to main content
GET
Get Waste Water Treatment Version History
Returns a paginated list of all changes made to a waste water treatment, newest first: who made each change, when, and which fields it modified. Tracked fields: name, m3_water_in, kg_bod_per_m3_wwt_line, kg_bod_per_kg_sludge_line, kg_sludge, kg_r_wwt_line, kg_r_sludge_line, kg_n_per_m3_wwt_line, kg_n_per_m3_wwd_line, kg_bod_per_m3_wwd_line, m3_water_out, file_url, file_name, start_date, end_date, facility_id. Fields a recalculation rewrites (status, co2e) are not tracked, so a recalculation never reads as a user edit. A parent organization can read the history of a treatment in one of its subsidiaries’ plants.

Request

Headers

string
required
Your API key for authenticationExample: sk_live_1234567890abcdef
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa

Path Parameters

string
required
UUID of the waste water treatmentExample: 550e8400-e29b-41d4-a716-446655440000

Query Parameters

integer
default:"1"
Page number (1-based)
integer
default:"50"
Number of version entries per page
integer
Return only the change made by this transaction, with its diff, instead of the newest onesExample: 48291

Response

array[object]
Version entries with change details
integer
Total number of version entries
integer
Current page number
integer
Items per page
For CREATE operations, old_value is always null and new_value holds the initial value of each tracked field. For UPDATE operations, only the fields that changed are included in changes.

Example

Successful Response

Common Errors

401 Unauthorized

Cause: Missing or invalid API key / JWT token

403 Forbidden

Cause: The authenticated user is not a member of the organization

404 Not Found

Cause: The treatment does not exist or belongs to an organization outside yours and its subsidiaries

Get Waste Water Treatment

View the current state of a treatment

List Waste Water Treatments

List the treatments of a plant