Sha256: 6238fbd5e4c711f9c55056beb9fb1b8bb51d89848b5108da7fbe03616aca0885

Contents?: true

Size: 1004 Bytes

Versions: 1

Compression:

Stored size: 1004 Bytes

Contents

# Aggregate pipelines events returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::CIVisibilityPipelinesAPI.new

body = DatadogAPIClient::V2::CIAppPipelinesAggregateRequest.new({
  compute: [
    DatadogAPIClient::V2::CIAppCompute.new({
      aggregation: DatadogAPIClient::V2::CIAppAggregationFunction::PERCENTILE_90,
      metric: "@duration",
      type: DatadogAPIClient::V2::CIAppComputeType::TOTAL,
    }),
  ],
  filter: DatadogAPIClient::V2::CIAppPipelinesQueryFilter.new({
    from: "now-15m",
    query: "@ci.provider.name:github AND @ci.provider.instance:github-actions",
    to: "now",
  }),
  group_by: [
    DatadogAPIClient::V2::CIAppPipelinesGroupBy.new({
      facet: "@ci.status",
      limit: 10,
      total: false,
    }),
  ],
  options: DatadogAPIClient::V2::CIAppQueryOptions.new({
    timezone: "GMT",
  }),
  page: DatadogAPIClient::V2::CIAppQueryPageOptions.new({
    limit: 25,
  }),
})
p api_instance.aggregate_ci_app_pipeline_events(body)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
datadog_api_client-2.4.0 examples/v2/ci-visibility-pipelines/AggregateCIAppPipelineEvents.rb