Usage

Once you have completed the steps in Setup, go to Get Data > Online Services, select CloudCompli and press Connect:

Next up, you will be presented with a screen to select a data set from the CloudCompli API:

Generally speaking, many data sets do not require any custom parameters, but there are some like Reports that do (in this specific case, it requires report_definition_id derived from the id column in the Report Definitions data set). When specifying options, they must be written in JavaScript Object Notation (JSON) such as:

You can find documentation on each data set, as well as if they have any required or optional parameters, in the rest of this article.

Advanced Usage: Very Large Queries

In the event of very large queries that return back an error ("Maximum query limit reached for dataset"), you can also specify parameters that increase the maximum query size beyond the default of 20 queries of 1000 records. For Program Deficiencies for the construction program, as example, if you exceed this cap, you can increase the records per query and/or the maximum queries:

{"program":"construction", "RecordsPerQuery":2000, "MaxQueries": 50}

NOTE: This is not recommended though unless you are actually exceeding the default query size, which is already fairly large, and it may lead to significant resource consumption on your computer, as well as the API possibly throwing back an error in the event that your client is flagged as overburdening the CloudCompli API.

Datasets

The following datasets are available:

BMPs

Get a table of all BMP types. These correspond to bmp_id in many other datasets.

API Endpoint: /api/bmps

 

CASWRCB Industrial Facilities

Get a table of all active industrial facility records within the SMARTS database maintained by the California State Water Resources Control Board.

Most query properties like facility_city and facility_county will match to their corresponding field (or to any of sic1, sic2 and sic3 for sic). They also support a plural form such as facility_cities, facility_counties and sics, in which case each value should be separated by a comma.

The query properties latitude, longitude and distance require all three to be specified. In this case, results will be returned within the value of distance in meters from the latitude and longitude provided.

Column Relationships:

  • facility_county corresponding to a value in the CASWRCB Industrial Facilities - Counties dataset
  • facility_city  corresponding to a value in the CASWRCB Industrial Facilities - Cities dataset
  • region_board corresponding to a value in the CASWRCB Industrial Facilities - Region Boards dataset
  • receiving_water_name corresponding to a value in the CASWRCB Industrial Facilities - Receiving Waters dataset
  • sic1 corresponding to a value in the CASWRCB Industrial Facilities - SICs dataset
  • sic2 corresponding to a value in the CASWRCB Industrial Facilities - SICs dataset
  • sic3 corresponding to a value in the CASWRCB Industrial Facilities - SICs dataset

Query Properties:

  • [OPTIONAL] facility_county (string)
  • [OPTIONAL] facility_counties (string, comma separated between multiple)
  • [OPTIONAL] facility_city (string)
  • [OPTIONAL] facility_cities (string, comma separated between multiple)
  • [OPTIONAL] wdid (string)
  • [OPTIONAL] wdids (string, comma separated between multiple)
  • [OPTIONAL] sic (string)
  • [OPTIONAL] sics (string, comma separated between multiple)
  • [OPTIONAL] latitude (string, degrees) [requires: longitude and distance]
  • [OPTIONAL] longitude (string, degrees) [requires: latitude and distance]
  • [OPTIONAL] distance (int, meters) [requires: latitude and longitude]
  • [OPTIONALMaxQueries (int)
  • [OPTIONALMaxQueries (int)
  • [OPTIONALRecordsPerQuery (int)
  • [OPTIONALErrorOnAdditionalRecords (boolean)

Query Properties Examples:

{"receiving_water_name":"Aliso Creek"}
{"facility_county":"Orange", "facility_cities":"Irvine,Anaheim"}
{"latitude":"33.9487", "longitude":"-117.7158", "distance": 1000}

API Endpoint: /api/data/caswrcb/industrial-facilities

 

CASWRCB Industrial Facilities - Counties

 

 

CASWRCB Industrial Facilities - Cities

 

 

CASWRCB Industrial Facilities - Region Boards

 

 

CASWRCB Industrial Facilities - SICs

 

 

CASWRCB Industrial Facilities - Receiving Waters

 

 

CASWRCB Wastewater Facility Permits

 

 

CASWRCB Wastewater Facility Permits - Counties

 

 

CASWRCB Wastewater Facility Permits - Cities

 

 

CASWRCB Wastewater Facility Permits - Types

 

 

CASWRCB Wastewater Facility Permits - Waste Types

 

 

CASWRCB Wastewater Facility Permits - Threat Codes

 

 

CASWRCB Wastewater Facility Permits - Complexity Codes

 

 

CASWRCB Wastewater Facility Permits - Fee Codes

 

 

CASWRCB Wastewater Facility Permits - Pretreatment Codes

 

 

CASWRCB Wastewater Facility Permits - Reclamation Codes

 

 

Constituents

Get a table of all constituent types. These correspond to constituent_id in many other datasets.

API Endpoint: /api/constituents

 

Construction Deficiencies

Get a table of all deficiencies with construction locations.

Program: Construction

Column Relationships:

  • location_id corresponding to the id column of the Construction Locations dataset
  • deficiency_level_id corresponding to the id column of the Deficiency Levels dataset, if the deficiency was categorized with a deficiency level
  • resolved_by corresponding to the id column of the Users dataset, if the deficiency was resolved by a user
  • bmp_id corresponding to the id column of the Bmps dataset, if the deficiency was linked to a BMP

Query Properties:

  • [OPTIONALMaxQueries (int)
  • [OPTIONALRecordsPerQuery (int)
  • [OPTIONALErrorOnAdditionalRecords (boolean)

API Endpoint: /api/construction/deficiencies

 

Construction Locations

Get a table of all construction locations.

Program: Construction

Column Relationships:

  • location_status_id corresponding to the id column of the Location Statuses dataset
  • tag_ids (List) corresponding to the id column of the Location Tags dataset, if the location has been assigned to any tags

Query Properties:

  • [OPTIONALMaxQueries (int)
  • [OPTIONALRecordsPerQuery (int)
  • [OPTIONALErrorOnAdditionalRecords (boolean)

API Endpoint: /api/construction

 

Deficiency Levels

Get a table of all deficiency levels. These correspond to deficiency_level_id in many other datasets.

API Endpoint: /api/deficiency-levels

 

Education Interactions

 

 

Enforcement Levels

Get a table of all enforcement levels. These correspond to enforcement_level_id in many other datasets.

API Endpoint: /api/enforcement-levels

 

Enforcements

 

 

Flow Meters

 

 

Flow Records

 

 

Industrial Deficiencies

Get a table of all deficiencies with industrial locations.

Program: Industrial

Column Relationships:

  • location_id corresponding to the id column of the Industrial Locations dataset
  • deficiency_level_id corresponding to the id column of the Deficiency Levels dataset, if the deficiency was categorized with a deficiency level
  • resolved_by corresponding to the id column of the Users dataset, if the deficiency was resolved by a user
  • bmp_id corresponding to the id column of the Bmps dataset, if the deficiency was linked to a BMP

Query Properties:

  • [OPTIONALMaxQueries (int)
  • [OPTIONALRecordsPerQuery (int)
  • [OPTIONALErrorOnAdditionalRecords (boolean)

API Endpoint: /api/industrial/deficiencies

 

Industrial Locations

Get a table of all industrial locations.

Program: Industrial

Column Relationships:

  • location_status_id corresponding to the id column of the Location Statuses dataset
  • tag_ids (List) corresponding to the id column of the Location Tags dataset, if the location has been assigned to any tags

Query Properties:

  • [OPTIONALMaxQueries (int)
  • [OPTIONALRecordsPerQuery (int)
  • [OPTIONALErrorOnAdditionalRecords (boolean)

API Endpoint: /api/industrial

 

Investigations

 

 

Location Tags

Get a table of all deficiency levels. These correspond to location_tag_id or tag_id or a list of location_tag_ids or tag_ids in many other datasets.

API Endpoint: /api/locations-tags

 

Monitoring Locations

 

 

Monitoring Records

 

 

Municipal Field Activities Deficiencies

Get a table of all deficiencies with municipal field activities.

Program: Municipal Field Activities

Column Relationships:

  • location_id corresponding to the id column of the Municipal Field Activities dataset
  • deficiency_level_id corresponding to the id column of the Deficiency Levels dataset, if the deficiency was categorized with a deficiency level
  • resolved_by corresponding to the id column of the Users dataset, if the deficiency was resolved by a user
  • bmp_id corresponding to the id column of the Bmps dataset, if the deficiency was linked to a BMP

Query Properties:

  • [OPTIONALMaxQueries (int)
  • [OPTIONALRecordsPerQuery (int)
  • [OPTIONALErrorOnAdditionalRecords (boolean)

API Endpoint: /api/municipal-field-activities/deficiencies

 

Municipal Field Activities

Get a table of all municipal field activities.

Program: Municipal Field Activities

Column Relationships:

  • location_status_id corresponding to the id column of the Location Statuses dataset
  • tag_ids (List) corresponding to the id column of the Location Tags dataset, if the location has been assigned to any tags

Query Properties:

  • [OPTIONALMaxQueries (int)
  • [OPTIONALRecordsPerQuery (int)
  • [OPTIONALErrorOnAdditionalRecords (boolean)

API Endpoint: /api/municipal-field-activities

 

Municipal Fixed Assets Deficiencies

Get a table of all deficiencies with municipal fixed assets.

Program: Municipal Fixed Assets

Column Relationships:

  • location_id corresponding to the id column of the Municipal Fixed Assets dataset
  • deficiency_level_id corresponding to the id column of the Deficiency Levels dataset, if the deficiency was categorized with a deficiency level
  • resolved_by corresponding to the id column of the Users dataset, if the deficiency was resolved by a user
  • bmp_id corresponding to the id column of the Bmps dataset, if the deficiency was linked to a BMP

Query Properties:

  • [OPTIONALMaxQueries (int)
  • [OPTIONALRecordsPerQuery (int)
  • [OPTIONALErrorOnAdditionalRecords (boolean)

API Endpoint: /api/municipal-fixed-assets/deficiencies

 

Municipal Fixed Assets

Get a table of all municipal fixed assets.

Program: Municipal Fixed Assets

Column Relationships:

  • location_status_id corresponding to the id column of the Location Statuses dataset
  • tag_ids (List) corresponding to the id column of the Location Tags dataset, if the location has been assigned to any tags

Query Properties:

  • [OPTIONALMaxQueries (int)
  • [OPTIONALRecordsPerQuery (int)
  • [OPTIONALErrorOnAdditionalRecords (boolean)

API Endpoint: /api/municipal-fixed-assets

 

Post-Construction Deficiencies

Get a table of all deficiencies with post-construction locations.

Program: Post-Construction

Column Relationships:

  • location_id corresponding to the id column of the Post-Construction Locations dataset
  • deficiency_level_id corresponding to the id column of the Deficiency Levels dataset, if the deficiency was categorized with a deficiency level
  • resolved_by corresponding to the id column of the Users dataset, if the deficiency was resolved by a user
  • bmp_id corresponding to the id column of the Bmps dataset, if the deficiency was linked to a BMP

Query Properties:

  • [OPTIONALMaxQueries (int)
  • [OPTIONALRecordsPerQuery (int)
  • [OPTIONALErrorOnAdditionalRecords (boolean)

API Endpoint: /api/postconstruction/deficiencies

 

Post-Construction Locations

Get a table of all post-construction locations.

Program: Post-Construction

Column Relationships:

  • location_status_id corresponding to the id column of the Location Statuses dataset
  • tag_ids (List) corresponding to the id column of the Location Tags dataset, if the location has been assigned to any tags

Query Properties:

  • [OPTIONALMaxQueries (int)
  • [OPTIONALRecordsPerQuery (int)
  • [OPTIONALErrorOnAdditionalRecords (boolean)

API Endpoint: /api/postconstruction

 

Programs

Get a table of programs you have available within CloudCompli. Use the type column when specifying a program in Query Properties for another dataset like Program Deficiencies.

Query Properties:

  • None

Endpoint: /api/programs

 

Program Deficiencies

Get a table of all deficiencies for the specified program type (such as construction or municipal-fixed-assets). See the Programs dataset for a list of available programs.

NOTE: In most cases, it may be more appropriate to use a program-specific deficiencies dataset such as Construction DeficienciesIndustrial Deficiencies, etc.

Column Relationships:

  • location_id corresponding to the id column of the Municipal Field Activities dataset
  • deficiency_level_id corresponding to the id column of the Deficiency Levels dataset, if the deficiency was categorized with a deficiency level
  • resolved_by corresponding to the id column of the Users dataset, if the deficiency was resolved by a user
  • bmp_id corresponding to the id column of the Bmps dataset, if the deficiency was linked to a BMP

Query Properties:

  • [REQUIREDprogram (string) from the type in the Programs dataset
  • [OPTIONALMaxQueries (int)
  • [OPTIONALRecordsPerQuery (int)
  • [OPTIONALErrorOnAdditionalRecords (boolean)

Required Query Properties Example:

{"program":"construction"}

API Endpoint: /api/[program]/deficiencies

 

Program Locations

 

 

Report Definitions

Get a table of all report definitions. These correspond to report_definition_id in many other datasets, as well as what you should use in {"report_definition_id":#} for the required query parameter of the Reports dataset.

API Endpoint: /api/report-definitions

 

Reports

 

 

Users

Get a table of all users. These correspond to user_id (as well as other columns like created_by as documented in other dataset documentation) in many other datasets.

API Endpoint: /api/users

 

Weather Hydstra Observations Stations