API to get all annotations

Hello dear community,

I’m using annotations API, and it looks it returns only items added in Grafana.
Annotations configured with external queries in Dhasboard Settings/Annotations not returned by API.
May be I’m doing it in a wrong way.

const params: any = {
  // type: 'annotation',
  // dashboardId: props.dashboardId,
  // from: props.timeRange.from.valueOf(),
  // to: props.timeRange.to.valueOf()
}
const annotations = [];
getBackendSrv().get('/api/annotations', params).then(result => {
  window.console.log("Annotations", result);
});

Regards,
V.

The only way to get dashboard from Graph2 component I have found - is a dirty way via

const panelChrome = this._reactInternalFiber._debugOwner.[REPEAT _debugOwner if needed].stateNode;
const dashboard = panelChrome.props.dashboard;

And then to mimic AnnotationsSrv in executing dahsboard.annotations queries.