대시보드 주석 API

Tier: Free, Premium, Ultimate Offering: GitLab.com, Self-managed, GitLab Dedicated
  • GitLab 12.10에서 비활성화된 피처 플래그를 통해 도입되었습니다.

메트릭 대시보드 주석을 사용하면 그래프에서 단일 시점이나 시간 범위에 걸친 이벤트를 표시할 수 있습니다.

새 주석 생성

POST /environments/:id/metrics_dashboard/annotations/
POST /clusters/:id/metrics_dashboard/annotations/

매개변수:

속성 유형 필수 설명
dashboard_path string 주석을 추가해야 하는 대시보드의 ID. CGI 이스케이프된 경로로 취급되며 자동으로 언-이스케이프됩니다.
starting_at string ISO 8601 형식인 날짜 및 시간 문자열, 예: 2016-03-11T03:45:40Z. 주석의 시작점을 표시하는 타임스탬프입니다.
ending_at string 아니요 ISO 8601 형식인 날짜 및 시간 문자열, 예: 2016-03-11T03:45:40Z. 주석의 끝점을 표시하는 타임스탬프입니다. 제공되지 않으면 주석은 시작점에서 단일 이벤트로 표시됩니다.
description string 주석의 설명.
curl --header "Private-Token: <your_access_token>" "https://gitlab.example.com/api/v4/environments/1/metrics_dashboard/annotations" \
 --data-urlencode "dashboard_path=.gitlab/dashboards/custom_metrics.yml" \
 --data-urlencode "starting_at=2016-03-11T03:45:40Z" \
 --data-urlencode "description=주석 설명"

예시 응답:

{
  "id": 4,
  "starting_at": "2016-04-08T03:45:40.000Z",
  "ending_at": null,
  "dashboard_path": ".gitlab/dashboards/custom_metrics.yml",
  "description": "주석 설명",
  "environment_id": 1,
  "cluster_id": null
}