Project

General

Profile

Notes on the FishSource API

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:

  1. 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
  2. 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
  3. Both the endpoints above now include a grsf_type element, that maps our node_type to the correct type for GRSF
  4. 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:

  1. Stock/AssessmentUnitID - SFP Internal Primary key
  2. Children - The nested StockOrAsssessmentUnit records. For each StockOrAssessmentUnit record, return Name and Type [Stock, AssessmentUnit, Unascertained, NOT SalmonRegion, NOT SalmonDistrict]
  3. Species (see fields in JSON)
  4. Fishing Areas
  5. Exploiting fishery - array of SFP Internal Primary Keys for Fisheries within the 'Stock'
  6. Management unit - this is an array of Organizations that are associated with management units within this stock
  7. Assessment methods - not currently captured nor exported
  8. Scientific Advice - TBD. Should this be FishSource score or TAC limits, advised catch limit or Bmsy reference points from data points.
  9. State of marine resource - narrative section. Restrict to text (XHTML) associated with the StockOrAssessmentUnit records related to the Current Status document node
  10. 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):
    1. F (age-averaged)
    2. Harvest rate (Y/SSB)
    3. Harvest rate (Y/TSB)
    4. Ratio F/F35%
    5. Ratio F/F40%
    6. Ratio F/Fmsy
    7. Ratio F/Ftrp
    8. Ratio target/bycatch
    9. Ratio U/Umsy
    10. Ratio U/Utrp
    11. F0.1
    12. F30%B0
    13. F30%SPR
    14. F35%B0
    15. F35%SPR
    16. F40%B0
    17. F40%SPR
    18. F=Fmsy
    19. Fabc
    20. Fmax
    21. Fmed
    22. Fmey
    23. Fmsy
    24. Fpa
    25. Fref
    26. MSY harvest rate (Umsy)
    27. Multispecies Fmsy
    28. U=Umsy
    29. F management limit
    30. F management target
    31. Target harvest rate (Y/SSB from management plan)
  11. Abundance - same as for Exploitation rate, but use the Resource limit reference point, Resource target reference point, Resource current lists:
    1. 15%B0 ('000 t)
    2. 20%B0 ('000 t)
    3. 25%B0 ('000 t)
    4. 30%B0 ('000 t)
    5. 35%B0 ('000 t)
    6. 40%B0 ('000 t)
    7. 50%B0 ('000 t)
    8. B10% ('000 t)
    9. B15% ('000 t)
    10. B20% ('000 t)
    11. Bbuf ('000 t)
    12. Blim ('000 t)
    13. Bloss ('000 t)
    14. Bmax ('000 t)
    15. Brebuild ('000 t)
    16. CPUE ('000 t/day)
    17. CPUE ('000 t/hour)
    18. CPUE (individuals/1000 hooks/day)
    19. CPUE (kg/hour)
    20. Fecundity (M eggs)
    21. Fecundity limit (M eggs)
    22. Fecundity target (M eggs)
    23. FSB ('000 t)
    24. LPUE ('000 t/day)
    25. LPUE (kg/hour)
    26. LRP ('000 t)
    27. MBAL ('000 t)
    28. MSST ('000 t)
    29. MSY Bescapement ('000 t)
    30. MSY Btrigger ('000 t)
    31. Ratio SSB/SSB35%
    32. Ratio SSB/SSB40%
    33. Ratio SSB/SSBmsy
    34. Ratio TB/TBmsy
    35. SSB ('000 t)
    36. SSB35% ('000 t)
    37. SSB40% ('000 t)
    38. SSB=SSB10%
    39. SSB=SSB15%
    40. SSB=SSB20%
    41. SSB=SSB40%
    42. SSB=SSBlim
    43. SSB=SSBmsy
    44. SSBmey ('000 t)
    45. SSBmsy ('000 t)
    46. SSBpa ('000 t)
    47. TB ('000 t)
    48. TBmsy ('000 t)
    49. URL ('000 t)
  12. Source of information: link to Stock page on FishSource
  13. 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:

  1. Fishery Name - Fishery name as shown on FishSOurce
  2. Exploiting Stocks - SFP Internal Primary Key for the Stock
  3. Prod system type - Industrial/Artesanal from ManagementUnit
  4. Flag state - ISO code 2 digit
  5. Fishing gear
  6. Annual Catch - Fetch the array of the latest approved data points moving up the Profile branch from the Fishery. Use the Fishery Removals list:
    1. Catch ('000 t)
    2. Catch (M individuals)
    3. Estimated catch ('000 t)
    4. Landings ('000 t)
    5. Reported catch ('000 t)
    6. 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}
      ]
    }
  ]

Add picture from clipboard (Maximum size: 8.91 MB)