Unsupported Browser Detected

Internet Explorer lacks support for the features of this website. For the best experience, please use a modern browser such as Chrome, Firefox, or Edge.

West Coast Groundfish Observer Program In-Season Salmon Reporting

June 29, 2020

The In-Season Salmon Reporting Service is a RESTful web service that reports expanded weights and counts for WCGOP observed discarded salmon species from the Catch Shares sector. Data is available for 2015 through current year.

Description

The In-Season Salmon Reporting Service is a RESTful web service that reports expanded weights and counts for WCGOP observed discarded salmon species from the Catch Shares sector. Data is available for 2015 through current year. Details for accessing the API are described in the API description section below.

Application Programming Interface (API) Description

The web service can be accessed from the following location:

Base Service

The base service is accessible via the following URL:
https://www.webapps.nwfsc.noaa.gov/observersalmon/api/v1/data/observer/selection.csv

Output Format

Output file format may be specified by appending a file type suffix to the selection URL, as follows:
https://www.webapps.noaa.gov/observersalmon/api/v1/data/observer/selection.{format}

Supported formats include 'csv' (useful for spreadsheet import) and 'json' (for 3rd party App developers).

Subsetting

A subset of the available Data source variables may be obtained by specifying a DAP4 Constraint Expression, naming one or more of the data set fields delimited by semi-colons (';'). The service will default to retrieving all variables if no Constraint Expression is provided, or no ';' delimited fields are named.

Example:
https://www.webapps.nwfsc.noaa.gov/observersalmon/api/v1/data/observer/selection.csv?dap4.ce=common_name;season_year;

Example:
https://www.webapps.nwfsc.noaa.gov/observersalmon/api/v1/data/observer/selection.csv?dap4.ce=;

Filtering

The Data source selection may be filtered by appending a pipe-character ('|') and one or more comma-delimited filtering statements after any of the DAP4 Constrain Expression subsettings fields. (If no field subsettings have been specified and/or all variables are desired, but with filtering, a '|' can simply be included by itself [implying an empty/non-specified field to the right of the pipe]) Filter need not be included in the ';' separated field subsetting requesting that variable. A filter may follow any field subsetting, or even reference a variable not included in the subset e.g.: ?dap4.ce=pacfin_code;common_name|season_year=2012;

Example:
https://www.webapps.nwfsc.noaa.gov/observersalmon/api/v1/data/observer/selection.csv?dap4.ce=season_year|season_year>=2015,season_year<2016;pacfin_code;common_name;

Example:
https://www.webapps.nwfsc.noaa.gov/observersalmon/api/v1/data/observer/selection.csv?dap4.ce=|season_year<=2015;

Example: Service returning only 2016 records
https://www.webapps.nwfsc.noaa.gov/observersalmon/api/v1/data/observer/selection.csv?dap4.ce=|season_year=2016

Supported filter operations

  • {variable} < {value}
  • {variable} > {value}
  • {variable} = {value}
  • {variable} != {value}
  • {variable} <= {value}
  • {variable} >= {value}
  • {variable} ~= {value} - regular expression matching (pipe must be URLencoded as '%C7' with modulo sign 'double-URLencoded' as '%25', to work with modern browsers [or curl without --get and --data-urlencode options]), e.g.: pacfin_code~=(COHO)%25C7(PINK)

WCGOP bycatch data set items that are missing are marked by a 2-character placeholder code.

  • Data elements for any species of Salmon that was not observed to have been caught during a regulation year are marked: SA for "(S)pecies (A)bsent". (Zero values are used when a species was observed in a regulation year in one or more reporting sectors but NOT in another. Zero values are never used for 'wcgop_species_updated_date' - SA for "(S)pecies (A)bsent" is used instead. These are technical limitations.)

  • Data elements that are empty due to Magnuson-Stevens Fishery Conservation and Management Act confidentiality restrictions are marked with code: CF for "(C)on(f)idential".

Data Update Frequency

Daily

Other Data Sources

A list of all currently available data sources may be obtained via:
https://www.webapps.nwfsc.noaa.gov/observersalmon/api/v1/data

The data source (e.g.: Program) is specified via the URL when selecting as follows:
https://www.webapps.nwfsc.noaa.gov/observersalmon/api/v1/data/{source_id}/selection

Currently 'observer' is the only available data source.

Last updated by Northwest Fisheries Science Center on 02/02/2024