For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/ko/api/latest/ci-visibility-pipelines/aggregate-pipelines-events.md. A documentation index is available at /llms.txt.
Language
Datadog site

파이프라인 이벤트 집계

POSThttps://api.datadoghq.com/api/v2/ci/pipelines/analytics/aggregatehttps://api.us3.datadoghq.com/api/v2/ci/pipelines/analytics/aggregatehttps://api.us5.datadoghq.com/api/v2/ci/pipelines/analytics/aggregatehttps://api.datadoghq.eu/api/v2/ci/pipelines/analytics/aggregatehttps://api.ap1.datadoghq.com/api/v2/ci/pipelines/analytics/aggregatehttps://api.ap2.datadoghq.com/api/v2/ci/pipelines/analytics/aggregatehttps://api.uk1.datadoghq.com/api/v2/ci/pipelines/analytics/aggregatehttps://api.ddog-gov.com/api/v2/ci/pipelines/analytics/aggregatehttps://api.us2.ddog-gov.com/api/v2/ci/pipelines/analytics/aggregate

개요

이 API 엔드포인트를 사용하여 CI Visibility 파이프라인 이벤트를 계산된 메트릭 및 시계열 버킷으로 집계합니다.

This endpoint requires the ci_visibility_read permission.

OAuth apps require the ci_visibility_read authorization scope to access this endpoint.

요청

Body Data (required)

항목
유형
설명
compute
[object]

소속 조직에서 파이프라인 이벤트의 집계 버킷을 가져오기 위한 요청과 함께 전송된 객체입니다.

filter
object

The search and filter query settings.

group_by
[object]

The rules for the group-by.

options
object

Global query options that are used during the query. Only supply timezone or time offset, not both. Otherwise, the query fails.

응답

OK

The response object for the pipeline events aggregate API endpoint.

항목
유형
설명
data
object

The query results.

links
object

Links attributes.

meta
object

The metadata associated with a request.

코드 예시

Aggregate pipelines events returns "OK" response
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/ci/pipelines/analytics/aggregate" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "compute": [
    {
      "aggregation": "pc90",
      "metric": "@duration",
      "type": "total"
    }
  ],
  "filter": {
    "from": "now-15m",
    "query": "@ci.provider.name:(gitlab OR github)",
    "to": "now"
  },
  "group_by": [
    {
      "facet": "@ci.status",
      "limit": 10,
      "total": false
    }
  ],
  "options": {
    "timezone": "GMT"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/ci/pipelines/analytics/aggregate" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "compute": [
    {
      "aggregation": "pc90",
      "metric": "@duration",
      "type": "total"
    }
  ],
  "filter": {
    "from": "now-15m",
    "query": "@ci.provider.name:(gitlab OR github)",
    "to": "now"
  },
  "group_by": [
    {
      "facet": "@ci.status",
      "limit": 10,
      "total": false
    }
  ],
  "options": {
    "timezone": "GMT"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/ci/pipelines/analytics/aggregate" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "compute": [
    {
      "aggregation": "pc90",
      "metric": "@duration",
      "type": "total"
    }
  ],
  "filter": {
    "from": "now-15m",
    "query": "@ci.provider.name:(gitlab OR github)",
    "to": "now"
  },
  "group_by": [
    {
      "facet": "@ci.status",
      "limit": 10,
      "total": false
    }
  ],
  "options": {
    "timezone": "GMT"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/ci/pipelines/analytics/aggregate" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "compute": [
    {
      "aggregation": "pc90",
      "metric": "@duration",
      "type": "total"
    }
  ],
  "filter": {
    "from": "now-15m",
    "query": "@ci.provider.name:(gitlab OR github)",
    "to": "now"
  },
  "group_by": [
    {
      "facet": "@ci.status",
      "limit": 10,
      "total": false
    }
  ],
  "options": {
    "timezone": "GMT"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/ci/pipelines/analytics/aggregate" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "compute": [
    {
      "aggregation": "pc90",
      "metric": "@duration",
      "type": "total"
    }
  ],
  "filter": {
    "from": "now-15m",
    "query": "@ci.provider.name:(gitlab OR github)",
    "to": "now"
  },
  "group_by": [
    {
      "facet": "@ci.status",
      "limit": 10,
      "total": false
    }
  ],
  "options": {
    "timezone": "GMT"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/ci/pipelines/analytics/aggregate" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "compute": [
    {
      "aggregation": "pc90",
      "metric": "@duration",
      "type": "total"
    }
  ],
  "filter": {
    "from": "now-15m",
    "query": "@ci.provider.name:(gitlab OR github)",
    "to": "now"
  },
  "group_by": [
    {
      "facet": "@ci.status",
      "limit": 10,
      "total": false
    }
  ],
  "options": {
    "timezone": "GMT"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/ci/pipelines/analytics/aggregate" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "compute": [
    {
      "aggregation": "pc90",
      "metric": "@duration",
      "type": "total"
    }
  ],
  "filter": {
    "from": "now-15m",
    "query": "@ci.provider.name:(gitlab OR github)",
    "to": "now"
  },
  "group_by": [
    {
      "facet": "@ci.status",
      "limit": 10,
      "total": false
    }
  ],
  "options": {
    "timezone": "GMT"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/ci/pipelines/analytics/aggregate" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "compute": [
    {
      "aggregation": "pc90",
      "metric": "@duration",
      "type": "total"
    }
  ],
  "filter": {
    "from": "now-15m",
    "query": "@ci.provider.name:(gitlab OR github)",
    "to": "now"
  },
  "group_by": [
    {
      "facet": "@ci.status",
      "limit": 10,
      "total": false
    }
  ],
  "options": {
    "timezone": "GMT"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/ci/pipelines/analytics/aggregate" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "compute": [
    {
      "aggregation": "pc90",
      "metric": "@duration",
      "type": "total"
    }
  ],
  "filter": {
    "from": "now-15m",
    "query": "@ci.provider.name:(gitlab OR github)",
    "to": "now"
  },
  "group_by": [
    {
      "facet": "@ci.status",
      "limit": 10,
      "total": false
    }
  ],
  "options": {
    "timezone": "GMT"
  }
}
EOF