Skip to main content

Stock Assessment Graphs (SAG)

Stock assessment summaries, reference points and stock status from the ICES Stock Assessment Graphs database.

Base url: https://sag.ices.dk/SAG_API/api · Documentation · Website

Checked 21 November 2026, 13:18 UTC. Responses are compared with the baseline recorded on 2026-10-20.

Used by

Directly: icesSAG

Through a dependency: buseful, fisheriesXplorer, fisheryO, icesAdviceSheet, icesASD, icesConsistenSEA, icesFO, icesTAF, icesTAFextra, icesUtils

Notes

Topic Observation Affects
Filtering StockList by stock StockList?fishStock= returns 204 No Content for every value tried (stock label ple.27.420, StockKey, StockDatabaseID), with or without year. Filtering by assessmentKey works. getListStocks(stock = ) returns no data.
Modified dates Every record in StockList has ModifiedDate set to the time of the nightly update (e.g. 20-10-2026 02:00:03), so modifiedAfter returns all assessments. The dates are day-month-year, not ISO 8601. getListStocks(modifiedAfter = ) can not find recently changed assessments.
Case of field names Field names mix PascalCase (AssessmentKey, StockKeyLabel) and camelCase (lineNumber, fishingPressure, settingKey), sometimes within one endpoint. Code that uses field names; the change check reports any change of case.
Type of AssessmentKey AssessmentKey is text in StockSettings and StockDownload, and a number in StockList, SummaryTable, StockStatusValues and FishStockReferencePoints. In the documentation the assessmentKey parameter is text for FishStockReferencePoints and the image endpoints, and an integer elsewhere. Joining results from different endpoints on AssessmentKey.
Text values Status has surrounding spaces (" Published "). Numbers such as StockKey and StockDatabaseID are returned as text. Comparisons on these fields need trimws() or conversion.
Base path The documentation gives the base path /sag_api, icesSAG uses /SAG_API; both work. Parameter names are not case sensitive (icesSAG sends SAGChartKey, the documentation has sagChartKey). Nothing at present.
Documentation The API root (/SAG_API/) shows a default ASP.NET page; the documentation is at /sag_api/docs/swagger/. It lists PublishSag/Run and PublishSag/Test as GET operations, which are not called by this check. Nothing at present.

Endpoints checked

Endpoint Status HTTP Time (s) Size (kB) Records Fields
StockList No changes 200 1.37 102.2 198 17
StockList, by stock No changes 204 0.57 0.0 0
LatestStockAdviceList No changes 200 1.67 140.7 271 17
SummaryTable No changes 200 0.26 45.3 1 102
StockStatusValues No changes 200 0.33 1.9 3 15
FishStockReferencePoints No changes 200 0.36 1.0 1 52
StockDownload No changes 200 0.31 199.7 68 142
StockSettings No changes 200 0.20 2.0 10 9
SAGTypeCharts No changes 200 0.21 0.7 16 4
SettingsForChartType No changes 200 0.22 6.2 16 6

Changes since the baseline

No changes: every endpoint returns the same structure as the baseline.

Documented operations

The documentation (SAG API v2) lists 23 operations, of which 9 are checked here. No changes to the operations or their parameters since the baseline.

Operation Parameters Checked
GET /api/AdviceLink/{assessmentKey} assessmentKey (path, integer, required)
GET /LatestStocks/Download ecoregion (query, string)
GET /LatestStocks/Status ecoregion (query, string)
GET /LatestStocks/Settings ecoregion (query, string)
GET /PublishSag/Run
GET /PublishSag/Test
GET /api/StockList year (query, integer)
modifiedAfter (query, string)
fishStock (query, string)
assessmentKey (query, integer)
StockList, StockList, by stock
GET /api/LatestStockAdviceList LatestStockAdviceList
GET /api/SAGTypeCharts SAGTypeCharts
GET /api/StockDownload assessmentKey (query, integer) StockDownload
GET /api/FishStockReferencePoints assessmentKey (query, string)
token (query, string)
FishStockReferencePoints
GET /api/StockSettings assessmentKey (query, integer)
token (query, string)
StockSettings
POST /api/UploadStock sessionId (query, integer)
GET /api/SummaryTable assessmentKey (query, integer)
token (query, string)
SummaryTable
GET /api/SAGDownload year (query, string)
EcoRegion (query, string)
Species (query, string)
GET /api/StockStatusValues assessmentKey (query, integer) StockStatusValues
GET /api/SettingsForChartType sagChartKey (query, string) SettingsForChartType
GET /api/get_image assessmentKey (query, string)
type (query, string)
width (query, integer)
forceRefresh (query, boolean)
token (query, string)
GET /api/get_custom_plot assessmentKey (query, string)
sgKey (query, integer)
width (query, integer)
forceRefresh (query, boolean)
token (query, string)
GET /api/get_ppt_custom assessmentKey (query, string)
token (query, string)
forceRefresh (query, boolean)
GET /api/get_archive assessmentKey (query, string)
size (query, string)
token (query, string)
forceRefresh (query, boolean)
GET /api/get_plot_path assessmentKey (query, string)
sgKey (query, integer)
size (query, string)
width (query, integer)
forceRefresh (query, boolean)
token (query, string)
GET /StockXMLDownload/{assessmentKey} assessmentKey (path, string, required)

R functions

The packages are designed with one R function for each endpoint, and further functions that combine endpoints into a dataset. Functions are found by reading the code of icesSAG. 10 of the 20 operations that read data have an R function; a function name is suggested for the others.

Operations and R functions

Operation R function Also used in
GET /api/AdviceLink/{assessmentKey} missing: suggest getAdviceLink()
GET /LatestStocks/Download missing: suggest getLatestStocksDownload()
GET /LatestStocks/Status missing: suggest getLatestStocksStatus()
GET /LatestStocks/Settings missing: suggest getLatestStocksSettings()
GET /PublishSag/Run none: uploads or changes data
GET /PublishSag/Test none: uploads or changes data
GET /api/StockList getListStocks() findAssessmentKey(), getSAG()
GET /api/LatestStockAdviceList getLatestStockAdviceList()
GET /api/SAGTypeCharts getSAGTypeGraphs()
GET /api/StockDownload getStockDownloadData() getCustomColumns(), getSAG()
GET /api/FishStockReferencePoints getFishStockReferencePoints() getSAG()
GET /api/StockSettings getSAGSettingsForAStock()
POST /api/UploadStock uploadStock()
GET /api/SummaryTable getSummaryTable() getSAG()
GET /api/SAGDownload missing: suggest getSAGDownload()
GET /api/StockStatusValues getStockStatusValues()
GET /api/SettingsForChartType getSAGTypeSettings()
GET /api/get_image missing: suggest getImage()
GET /api/get_custom_plot missing: suggest getCustomPlot()
GET /api/get_ppt_custom missing: suggest getPptCustom()
GET /api/get_archive missing: suggest getArchive()
GET /api/get_plot_path getLandingsGraph() getCustomGraph(), getFishingMortalityGraph(), getFishingMortalityHistoricalPerformance(), getFishMortality(), getRecruitmentGraph(), getRecruitmentHistoricalPerformance(), getSpawningStockBiomassGraph(), getSSBHistoricalPerformance(), getstock_recruitment(), getStockStatusTable(), getYSSB()
GET /StockXMLDownload/{assessmentKey} missing: suggest getStockXMLDownload()

Combined functions

Function Builds on Operations
findAssessmentKey() getListStocks() /api/StockList
getCustomColumns() getStockDownloadData() /api/StockDownload
getCustomGraph() getLandingsGraph() /api/get_plot_path
getFishMortality() getLandingsGraph() /api/get_plot_path
getFishingMortalityGraph() getLandingsGraph() /api/get_plot_path
getFishingMortalityHistoricalPerformance() getLandingsGraph() /api/get_plot_path
getRecruitmentGraph() getLandingsGraph() /api/get_plot_path
getRecruitmentHistoricalPerformance() getLandingsGraph() /api/get_plot_path
getSAG() findAssessmentKey(), getFishStockReferencePoints(), getStockDownloadData(), getSummaryTable() /api/FishStockReferencePoints, /api/StockDownload, /api/StockList, /api/SummaryTable
getSSBHistoricalPerformance() getLandingsGraph() /api/get_plot_path
getSpawningStockBiomassGraph() getLandingsGraph() /api/get_plot_path
getStockStatusTable() getLandingsGraph() /api/get_plot_path
getYSSB() getLandingsGraph() /api/get_plot_path
getstock_recruitment() getLandingsGraph() /api/get_plot_path

Endpoint details

StockList

https://sag.ices.dk/SAG_API/api/StockList?year=2024

Called by: getListStocks(), findAssessmentKey(), getSAG()

Operation: GET /api/StockList

HTTP 200 · application/json · 1.37 s · 198 records

Field Type
(root) array
[] object
[].AssessmentComponent null | string | string (empty)
[].AssessmentKey number
[].AssessmentYear number
[].LinkToAdvice string
[].ModelName null | string
[].ModelType null | string
[].ModifiedDate string
[].Purpose string
[].SAGStamp string
[].SpeciesName string
[].Status string
[].StockDatabaseID string (number)
[].StockDescription string
[].StockKey string (number)
[].StockKeyLabel string

StockList, by stock

https://sag.ices.dk/SAG_API/api/StockList?year=2024&fishStock=ple.27.420

Called by: getListStocks(), findAssessmentKey(), getSAG()

Operation: GET /api/StockList

HTTP 204 · 0.57 s

LatestStockAdviceList

https://sag.ices.dk/SAG_API/api/LatestStockAdviceList

Called by: getLatestStockAdviceList()

Operation: GET /api/LatestStockAdviceList

HTTP 200 · application/json · 1.67 s · 271 records

Field Type
(root) array
[] object
[].AssessmentComponent null | string | string (empty)
[].AssessmentKey number
[].AssessmentYear number
[].LinkToAdvice null | string
[].ModelName null | string
[].ModelType null | string
[].ModifiedDate string
[].Purpose string
[].SAGStamp string
[].SpeciesName string
[].Status string
[].StockDatabaseID string (number)
[].StockDescription string
[].StockKey string (number)
[].StockKeyLabel string

SummaryTable

https://sag.ices.dk/SAG_API/api/SummaryTable?assessmentKey=18688

Called by: getSummaryTable(), getSAG()

Operation: GET /api/SummaryTable

HTTP 200 · application/json · 0.26 s · 1 records

Field Type
(root) object
AssessmentComponent null
AssessmentKey number
AssessmentYear number
Comments null
CustomName1 null
CustomName10 null
CustomName11 null
CustomName12 null
CustomName13 null
CustomName14 null
CustomName15 null
CustomName16 null
CustomName17 null
CustomName18 null
CustomName19 null
CustomName2 null
CustomName20 null
CustomName3 null
CustomName4 null
CustomName5 null
CustomName6 null
CustomName7 null
CustomName8 null
CustomName9 null
CustomUnits1 null
CustomUnits10 null
CustomUnits11 null
CustomUnits12 null
CustomUnits13 null
CustomUnits14 null
CustomUnits15 null
CustomUnits16 null
CustomUnits17 null
CustomUnits18 null
CustomUnits19 null
CustomUnits2 null
CustomUnits20 null
CustomUnits3 null
CustomUnits4 null
CustomUnits5 null
CustomUnits6 null
CustomUnits7 null
CustomUnits8 null
CustomUnits9 null
FAge null
Fbarrho null
FishingPressureDescription string
FishingPressureUnits null
FishStock string
Lines array
Lines[] object
Lines[].Catches null | number
Lines[].Custom1 null
Lines[].Custom10 null
Lines[].Custom11 null
Lines[].Custom12 null
Lines[].Custom13 null
Lines[].Custom14 null
Lines[].Custom15 null
Lines[].Custom16 null
Lines[].Custom17 null
Lines[].Custom18 null
Lines[].Custom19 null
Lines[].Custom2 null
Lines[].Custom20 null
Lines[].Custom3 null
Lines[].Custom4 null
Lines[].Custom5 null
Lines[].Custom6 null
Lines[].Custom7 null
Lines[].Custom8 null
Lines[].Custom9 null
Lines[].Discards null | number
Lines[].F null | number
Lines[].High_F null | number
Lines[].High_Recruitment null | number
Lines[].High_SSB number
Lines[].IBC null
Lines[].Landings null | number
Lines[].LandingsBMS null
Lines[].LogbookRegisteredDiscards null
Lines[].Low_F null | number
Lines[].Low_Recruitment null | number
Lines[].Low_SSB number
Lines[].Recruitment number
Lines[].SSB number
Lines[].TBiomass null
Lines[].Unallocated_Removals null
Lines[].Year number
Purpose string
RecruitmentAge number
Recruitmentrho null
RecruitmentrhoYear null
RetroAssessment null
SSBrho null
SSBrhoYear null
StockPublishNote string
StockSizeDescription string
StockSizeUnits string
TerminalYear null
Units string

StockStatusValues

https://sag.ices.dk/SAG_API/api/StockStatusValues?assessmentKey=18688

Called by: getStockStatusValues()

Operation: GET /api/StockStatusValues

HTTP 200 · application/json · 0.33 s · 3 records

Field Type
(root) array
[] object
[].AssessmentKey number
[].fishingPressure string
[].fishingPressureStatus string
[].lineDescription string
[].lineNumber number
[].stockSize string
[].stockSizeStatus string
[].YearStatus array
[].YearStatus[] object
[].YearStatus[].status number
[].YearStatus[].statusicon null
[].YearStatus[].type string
[].YearStatus[].year number

FishStockReferencePoints

https://sag.ices.dk/SAG_API/api/FishStockReferencePoints?assessmentKey=18688

Called by: getFishStockReferencePoints(), getSAG()

Operation: GET /api/FishStockReferencePoints

HTTP 200 · application/json · 0.36 s · 1 records

Field Type
(root) array
[] object
[].AssessmentKey number
[].AssessmentYear number
[].Blim string (number)
[].Bmanagement null
[].BMGT_lower null
[].BMGT_upper null
[].BMGTRange_high null
[].BMGTRange_low null
[].BMSY null
[].Bpa string (number)
[].Comments null
[].ConfidenceIntervalDefinition string
[].CustomRefPointName1 null
[].CustomRefPointName2 null
[].CustomRefPointName3 null
[].CustomRefPointName4 null
[].CustomRefPointName5 null
[].CustomRefPointValue1 null
[].CustomRefPointValue2 null
[].CustomRefPointValue3 null
[].CustomRefPointValue4 null
[].CustomRefPointValue5 null
[].FAge null
[].Fbarrho null
[].FCap null
[].FLength null
[].FLim string (number)
[].Fmanagement null
[].FMGT_lower string (number)
[].FMGT_upper string (number)
[].FMGTRange_high null
[].FMGTRange_low null
[].FMSY string (number)
[].Fpa string (number)
[].HRMGT null
[].ModelName string
[].ModelType string
[].MSYBescapement null
[].MSYBtrigger string (number)
[].RecruitmentAge string (number)
[].RecruitmentLength null
[].Recruitmentrho null
[].RecruitmentrhoYear null
[].RetroAssessment null
[].SSBrho null
[].SSBrhoYear null
[].StockDatabaseID string (number)
[].StockKey string (number)
[].StockKeyLabel string
[].TerminalYear null

StockDownload

https://sag.ices.dk/SAG_API/api/StockDownload?assessmentKey=18688

Called by: getStockDownloadData(), getCustomColumns(), getSAG()

Operation: GET /api/StockDownload

HTTP 200 · application/json · 0.31 s · 68 records

Field Type
(root) array
[] object
[].AssessmentComponent string (empty)
[].AssessmentKey string (number)
[].AssessmentYear string (number)
[].Blim string (number)
[].Bmanagement string (empty)
[].Bpa string (number)
[].Catches string (empty) | string (number)
[].CatchesLandingsUnits string
[].ConfidenceIntervalDefinition string
[].Custom1 string (empty)
[].Custom10 string (empty)
[].Custom11 string (empty)
[].Custom12 string (empty)
[].Custom13 string (empty)
[].Custom14 string (empty)
[].Custom15 string (empty)
[].Custom16 string (empty)
[].Custom17 string (empty)
[].Custom18 string (empty)
[].Custom19 string (empty)
[].Custom2 string (empty)
[].Custom20 string (empty)
[].Custom3 string (empty)
[].Custom4 string (empty)
[].Custom5 string (empty)
[].Custom6 string (empty)
[].Custom7 string (empty)
[].Custom8 string (empty)
[].Custom9 string (empty)
[].CustomName1 string (empty)
[].CustomName10 string (empty)
[].CustomName11 string (empty)
[].CustomName12 string (empty)
[].CustomName13 string (empty)
[].CustomName14 string (empty)
[].CustomName15 string (empty)
[].CustomName16 string (empty)
[].CustomName17 string (empty)
[].CustomName18 string (empty)
[].CustomName19 string (empty)
[].CustomName2 string (empty)
[].CustomName20 string (empty)
[].CustomName3 string (empty)
[].CustomName4 string (empty)
[].CustomName5 string (empty)
[].CustomName6 string (empty)
[].CustomName7 string (empty)
[].CustomName8 string (empty)
[].CustomName9 string (empty)
[].CustomRefPointName1 string (empty)
[].CustomRefPointName2 string (empty)
[].CustomRefPointName3 string (empty)
[].CustomRefPointName4 string (empty)
[].CustomRefPointName5 string (empty)
[].CustomRefPointNotes1 string (empty)
[].CustomRefPointNotes2 string (empty)
[].CustomRefPointNotes3 string (empty)
[].CustomRefPointNotes4 string (empty)
[].CustomRefPointNotes5 string (empty)
[].CustomRefPointValue1 string (empty)
[].CustomRefPointValue2 string (empty)
[].CustomRefPointValue3 string (empty)
[].CustomRefPointValue4 string (empty)
[].CustomRefPointValue5 string (empty)
[].CustomUnits1 string (empty)
[].CustomUnits10 string (empty)
[].CustomUnits11 string (empty)
[].CustomUnits12 string (empty)
[].CustomUnits13 string (empty)
[].CustomUnits14 string (empty)
[].CustomUnits15 string (empty)
[].CustomUnits16 string (empty)
[].CustomUnits17 string (empty)
[].CustomUnits18 string (empty)
[].CustomUnits19 string (empty)
[].CustomUnits2 string (empty)
[].CustomUnits20 string (empty)
[].CustomUnits3 string (empty)
[].CustomUnits4 string (empty)
[].CustomUnits5 string (empty)
[].CustomUnits6 string (empty)
[].CustomUnits7 string (empty)
[].CustomUnits8 string (empty)
[].CustomUnits9 string (empty)
[].Discards string (empty) | string (number)
[].F_Discards string (empty)
[].F_IBC string (empty)
[].F_Landings string (empty)
[].F_Unallocated string (empty)
[].FAge string (empty)
[].FishingPressure string (empty) | string (number)
[].FishingPressureDescription string
[].FishingPressureUnits string (empty)
[].FLength string (empty)
[].Flim string (number)
[].FlowerWithAR string (empty)
[].FlowerWithoutAR string (empty)
[].Fmanagement string (empty)
[].FMSY string (number)
[].Fpa string (number)
[].FupperWithAR string (empty)
[].FupperWithoutAR string (empty)
[].High_FishingPressure string (empty) | string (number)
[].High_Recruitment string (empty) | string (number)
[].High_StockSize string (number)
[].High_TBiomass string (empty)
[].IBC string (empty)
[].ICES_Areas string
[].Landings string (empty) | string (number)
[].Low_FishingPressure string (empty) | string (number)
[].Low_Recruitment string (empty) | string (number)
[].Low_StockSize string (number)
[].Low_TBiomass string (empty)
[].ModelName null
[].ModelType null
[].MSYBtrigger string (number)
[].OfficialLandings string (empty)
[].Published string
[].Purpose string
[].Recruitment string (number)
[].RecruitmentAge string (number)
[].RecruitmentDescription string
[].RecruitmentLength string (empty)
[].Report string
[].SGName string (empty)
[].SpeciesName string
[].StockDatabaseID string (number)
[].StockDescription string
[].StockKey string (number)
[].StockKeyLabel string
[].StockSize string (number)
[].StockSizeDescription string
[].StockSizeUnits string
[].TBiomass string (empty) | string (number)
[].TotalBiomassUnits string (empty)
[].TypeStock string (empty)
[].Unallocated_Removals string (empty)
[].UnitOfRecruitment string
[].Year string (number)
[].YieldSSB string (empty)

StockSettings

https://sag.ices.dk/SAG_API/api/StockSettings?assessmentKey=18688

Called by: getSAGSettingsForAStock()

Operation: GET /api/StockSettings

HTTP 200 · application/json · 0.2 s · 10 records

Field Type
(root) array
[] object
[].AssessmentKey string (number)
[].SAGChartKey string (number)
[].SAGChartName string
[].settingDescription string
[].settingExplanation null
[].settingKey string (number)
[].settingValue string | string (number)

SAGTypeCharts

https://sag.ices.dk/SAG_API/api/SAGTypeCharts

Called by: getSAGTypeGraphs()

Operation: GET /api/SAGTypeCharts

HTTP 200 · application/json · 0.21 s · 16 records

Field Type
(root) array
[] object
[].ChartName string
[].SAGChartKey number

SettingsForChartType

https://sag.ices.dk/SAG_API/api/SettingsForChartType?SAGChartKey=1

Called by: getSAGTypeSettings()

Operation: GET /api/SettingsForChartType

HTTP 200 · application/json · 0.22 s · 16 records

Field Type
(root) array
[] object
[].SAGChartKey string (number)
[].settingDescription string
[].settingExplanation string
[].settingKey string (number)