Notes on the FishSource API¶
- Table of contents
- Notes on the FishSource API
- FishSource API
- Stocks
- Fisheries
FishSource API¶
The V5 version of the FishSource API was released on the 8th of October 2019 in the production server: https://www.fishsource.org/apipie
The main changes are:
- the Stocks endpoint: https://www.fishsource.org/apipie/v5/stocks/index.html, which now returns information on nested Assessment units as well, but no longer contains the text data for the State of Marine Resource or Scientific Advice as was previously returned
- a new Stocks_Text endpoint https://www.fishsource.org/apipie/v5/stocks_text/index.html which returns the text data removed from the above endpoint
- Both the endpoints above now include a grsf_type element, that maps our node_type to the correct type for GRSF
- ManagementUnit elements now contain additional geographical_coverage and subdivision elements.
In January 2021 the APIs were further improved. A single stock record can be queried, for example Haddock - Georges Bank https://www.fishsource.org/api/bluebridge/v5/stock/1651
Stocks¶
We'll return all the StockOrAssessmentUnit records that are NOT Salmon based
Fields:
- Stock/AssessmentUnitID - SFP Internal Primary key
- Children - The nested StockOrAsssessmentUnit records. For each StockOrAssessmentUnit record, return Name and Type [Stock, AssessmentUnit, Unascertained, NOT SalmonRegion, NOT SalmonDistrict]
- Species (see fields in JSON)
- Fishing Areas
- Exploiting fishery - array of SFP Internal Primary Keys for Fisheries within the 'Stock'
- Management unit - this is an array of Organizations that are associated with management units within this stock
- Assessment methods - not currently captured nor exported
- Scientific Advice - TBD. Should this be FishSource score or TAC limits, advised catch limit or Bmsy reference points from data points.
- State of marine resource - narrative section. Restrict to text (XHTML) associated with the StockOrAssessmentUnit records related to the Current Status document node
- Exploitation Rate - return approved Data Points associated with the StockOrAssessmentUnit records, for the following variables (from the Current Removal Rate, Scientific Advised Target Removal Rate and Management Target Removal Rate lists):
- F (age-averaged)
- Harvest rate (Y/SSB)
- Harvest rate (Y/TSB)
- Ratio F/F35%
- Ratio F/F40%
- Ratio F/Fmsy
- Ratio F/Ftrp
- Ratio target/bycatch
- Ratio U/Umsy
- Ratio U/Utrp
- F0.1
- F30%B0
- F30%SPR
- F35%B0
- F35%SPR
- F40%B0
- F40%SPR
- F=Fmsy
- Fabc
- Fmax
- Fmed
- Fmey
- Fmsy
- Fpa
- Fref
- MSY harvest rate (Umsy)
- Multispecies Fmsy
- U=Umsy
- F management limit
- F management target
- Target harvest rate (Y/SSB from management plan)
- Abundance - same as for Exploitation rate, but use the Resource limit reference point, Resource target reference point, Resource current lists:
- 15%B0 ('000 t)
- 20%B0 ('000 t)
- 25%B0 ('000 t)
- 30%B0 ('000 t)
- 35%B0 ('000 t)
- 40%B0 ('000 t)
- 50%B0 ('000 t)
- B10% ('000 t)
- B15% ('000 t)
- B20% ('000 t)
- Bbuf ('000 t)
- Blim ('000 t)
- Bloss ('000 t)
- Bmax ('000 t)
- Brebuild ('000 t)
- CPUE ('000 t/day)
- CPUE ('000 t/hour)
- CPUE (individuals/1000 hooks/day)
- CPUE (kg/hour)
- Fecundity (M eggs)
- Fecundity limit (M eggs)
- Fecundity target (M eggs)
- FSB ('000 t)
- LPUE ('000 t/day)
- LPUE (kg/hour)
- LRP ('000 t)
- MBAL ('000 t)
- MSST ('000 t)
- MSY Bescapement ('000 t)
- MSY Btrigger ('000 t)
- Ratio SSB/SSB35%
- Ratio SSB/SSB40%
- Ratio SSB/SSBmsy
- Ratio TB/TBmsy
- SSB ('000 t)
- SSB35% ('000 t)
- SSB40% ('000 t)
- SSB=SSB10%
- SSB=SSB15%
- SSB=SSB20%
- SSB=SSB40%
- SSB=SSBlim
- SSB=SSBmsy
- SSBmey ('000 t)
- SSBmsy ('000 t)
- SSBpa ('000 t)
- TB ('000 t)
- TBmsy ('000 t)
- URL ('000 t)
- Source of information: link to Stock page on FishSource
- Ownership; TBD Needs group discussion to clarify since data is compiled from many sources
Example
Stock: {
id: 842,
name: 'South American',
type: 'Stock',
children: [
{
id: 843,
name: 'Argentine,
type: 'AssessmentUnit'
}
],
species: {
fao_name: 'Patagonian toothfish',
order: ,
family: ,
genus: "dissostichus",
specific_descriptor: "eleginoides",
code_3a:
},
fishing_areas: [
{
name: 'FAO 41',
type: 'FAO'
}...
],
exploiting_fisheries: [1776, 1777, 1778, 1779, 1780, 1781, 1782],
management_units: [
{
id: 1057,
name: 'ICCAT',
country: 'ES'
}
],
state_of_marine_resource: [
{
text: 'LOREM IPSUM',
stock_or_assessment_unit_id: 842,
},
{
text: 'LOREM IPSUM',
stock_or_assessment_unit_id: 843,
}
],
exploitation_rate: [
{
stock_or_assessment_unit_id: 842,
[
{variable: "Advised TAC ('000 T)", value: 135, year: 2016},
{variable: ""Catch ('000 T)", value: 150, year: 2016}
]
},
{
stock_or_assessment_unit_id: 843,
[
{variable: VARIABLE NAME, value:, year: }
]
}
],
abundance: [
{
stock_or_assessment_unit_id: 842,
[
{variable: "Advised TAC ('000 T)", value: 135, year: 2016},
{variable: ""Catch ('000 T)", value: 150, year: 2016}
]
},
{
stock_or_assessment_unit_id: 843,
[
{variable: VARIABLE NAME, value:, year: }
]
}
],
source_of_information: {http://www.fishsource.org/stock_page/842},
}
Fisheries¶
For Fisheries, have the following different fields:
- Fishery Name - Fishery name as shown on FishSOurce
- Exploiting Stocks - SFP Internal Primary Key for the Stock
- Prod system type - Industrial/Artesanal from ManagementUnit
- Flag state - ISO code 2 digit
- Fishing gear
- Annual Catch - Fetch the array of the latest approved data points moving up the Profile branch from the Fishery. Use the Fishery Removals list:
- Catch ('000 t)
- Catch (M individuals)
- Estimated catch ('000 t)
- Landings ('000 t)
- Reported catch ('000 t)
- Reported landings (' 000 t) Return the details of the Profile Tree node from which we're reporting data using object_id and object_type (one of: Stock, AssessmentUnit, Unascertained, ManagementUnit, FlagProfile, GearFlagProfile)
Example
fishery_name: "Blackspot seabream | Azores | EU | Portugal | Hooks and lines",
exploiting_stocks: 832,
prod_system_type: "Industrial",
flag_state: "AR",
fishing_gear: {
id: 11,
name: "Pots",
standard_abbreviation: "FPO",
isscfg: "08.2"
},
annual_catch: [
{
object_id: 857,
object_type: "ManagementUnit",
[
{variable: "Advised TAC ('000 T)", value: 135, year: 2016},
{variable: ""Catch ('000 T)", value: 150, year: 2016}
]
}
]