This is the primary programming interface to the Coordinated Assessments tables. In order to actively use the API for testing or production, you will need an API key. You can get an API key by contacting StreamNet.

The StreamNet REST API

The StreamNet REST API allows for simple access to data sets using direct HTTP calls and exchanges data in JSON or XML format.

The base URL for the REST endpoint is:

Here is an example usage:

The default format used by the API is JSON. In order to send or receive data in XML format, you must either include the request header (“ACCEPT: application/xml”) or append any URI with “.xml” (e.g.


Access your API key by passing your email and password as form fields or query parameters over HTTP Basic authentication. This will return an object
that contains the API key. You will need this key to make any other API calls.

Action Description
GET /api/v1/users Fetch the metadata for your user account.

Coordinated Assessments

Create, access, update, or delete data records collected for the Coordinated Assessments data sets.


Action Description
GET /api/v1/ca/tables Fetch the list of Coordinated Assessments data tables.
GET /api/v1/ca/tables/:id Fetch the metadata for a single table (field names & types). This is the table schema.


Action Description
GET /api/v1/ca Fetch a list of records based on query parameters (see params below).
POST /api/v1/ca Create a single record.
GET /api/v1/ca/:id Fetch a single record.
PUT /api/v1/ca/:id Update a single record.
DELETE /api/v1/ca/:id Delete a single record.

[Query Params]

Param Description
updated_since Date since epoch in seconds: 2012-04-24 15:05:22 -0400 = 1335294322. Not required.
table_id ID of the table the record is associated with. This is required for the GET record list action as well as the POST and PUT actions. For the GET action, include table_id as a form or query param. For PUT or POST, table_id must be included as a key of the object submitted in the body of the request along with the record_values object. See example below.
page Integer of the page selected. By default, all requests are paginated to 1000 records per request. Not required.
per_page Integer for the number of records per page. By default, all requests are paginated to the maximum value of 1000 records per request. Not required.
agency This is the agency that submitted the record. You can designate one or more (comma-separated) agency acronyms: IDFG, WDFW, ODFW, CRITFC, CCT, NOAA. Can also be used to retrieve only records submitted with your API key by setting this value to your API key value. Not required.

Must be present and an object (JSON or XML) in the body of the request for POST (insert) and PUT (update) actions. The keys of this object must reflect the keys (field names) in the table schema.

Note that while the ID field is required for PUT actions, it is not required for POST actions as a new ID (as a GUID) will be generated if it is not included. If the ID field is submitted for POST actions, it must be a properly formatted GUID. All successful POST actions return the ID field in the return payload.

For POST actions, all DES fields are required to be present in the object even if the values are NULL or empty. For PUT actions, only the ID and any fields to be updated are required in the object.

Non-DES fields (e.g., “compilerrecordid”) can be included in either PUT or POST actions but are not required.

Publishing Your Data

All records inserted by you are unpublished by default. You can insert, update, and delete records and test your system without any of your records showing on any output, including the CAX-EPA node, StreamNet, or the NOAA SPS web service.


Adding and updating CA records follows a strict set of requirements, including type & range validation and required fields based on the CA DES. Any validation errors will return a 422 and an object with a list of validation errors.

If you would like to validate your data before making any changes to the StreamNet database, you can include the header XValidate=true on any POST, PUT, or DELETE actions. If you do this, the actions will return the status code and any validation errors, but no changes will be made to the database.


Example validation response where three fields do not validate on a POST action:

{"error":{"msg":"data could not be processed",
"Age1Juvs":"required for DES, but does not exist in the incoming record",
"HarvestAdj|length=9":"the length of this string value must be <= 3",
"Age2Juvs|value=seven":"this should be a decimal value"},

Example of the request body object in JSON, for POST and PUT actions:

"rperstype":"Adult recruits per adult spawners",
"esu_dps":"Lower Columbia River Coho Salmon ESU",
"compilernote":"PSMFC - TEST DATA",
"lastupdated":"March, 12 2013 00:00:00",
"commonpopname":"Sandy River",
"commonname":"Coho salmon",
"recruitlocation":"Sandy River",
"upddate":"June, 11 2013 00:00:00",
"metacomments":"Consult the contact person for the MeasureLocation data.",
"cbfwapopname":"Sandy Coho",
"esapopname":"Coho Salmon (Lower Columbia River ESU) - Sandy River",
"spawnerlocation":"Sandy River",
"recoverydomain":"Willamette/Lower Columbia",