Skip to content

[DOCS-10044] Fix outdated feature name in CI Visibility Tests API docs #514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-02-12 18:33:49.810961",
"spec_repo_commit": "6a4cfb82"
"regenerated": "2025-02-13 17:14:22.887558",
"spec_repo_commit": "393eda14"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-02-12 18:33:49.826925",
"spec_repo_commit": "6a4cfb82"
"regenerated": "2025-02-13 17:14:22.904614",
"spec_repo_commit": "393eda14"
}
}
}
25 changes: 11 additions & 14 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3741,7 +3741,7 @@ components:
properties:
attributes:
additionalProperties: {}
description: JSON object of attributes from CI Visibility test events.
description: JSON object of attributes from Test Optimization test events.
example:
customAttribute: 123
duration: 2345
Expand Down Expand Up @@ -35086,8 +35086,8 @@ paths:
- ci_visibility_read
/api/v2/ci/tests/analytics/aggregate:
post:
description: The API endpoint to aggregate CI Visibility test events into buckets
of computed metrics and timeseries.
description: The API endpoint to aggregate test events into buckets of computed
metrics and timeseries.
operationId: AggregateCIAppTestEvents
requestBody:
content:
Expand Down Expand Up @@ -35115,16 +35115,15 @@ paths:
- ci_visibility_read
summary: Aggregate tests events
tags:
- CI Visibility Tests
- Test Optimization
x-codegen-request-body-name: body
x-permission:
operator: OR
permissions:
- ci_visibility_read
/api/v2/ci/tests/events:
get:
description: 'List endpoint returns CI Visibility test events that match a [search
query](https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/).
description: 'List endpoint returns test events that match a [search query](https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/).

[Results are paginated similarly to logs](https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination).

Expand Down Expand Up @@ -35199,7 +35198,7 @@ paths:
- ci_visibility_read
summary: Get a list of tests events
tags:
- CI Visibility Tests
- Test Optimization
x-pagination:
cursorParam: page[cursor]
cursorPath: meta.page.after
Expand All @@ -35211,8 +35210,7 @@ paths:
- ci_visibility_read
/api/v2/ci/tests/events/search:
post:
description: 'List endpoint returns CI Visibility test events that match a [search
query](https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/).
description: 'List endpoint returns test events that match a [search query](https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/).

[Results are paginated similarly to logs](https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination).

Expand Down Expand Up @@ -35245,7 +35243,7 @@ paths:
- ci_visibility_read
summary: Search tests events
tags:
- CI Visibility Tests
- Test Optimization
x-codegen-request-body-name: body
x-pagination:
cursorParam: body.page.cursor
Expand Down Expand Up @@ -51224,10 +51222,6 @@ tags:
to your Datadog site over HTTP. See the [CI Pipeline Visibility in Datadog page](https://docs.datadoghq.com/continuous_integration/pipelines/)
for more information.
name: CI Visibility Pipelines
- description: Search or aggregate your CI Visibility test events over HTTP. See the
[Test Visibility in Datadog page](https://docs.datadoghq.com/tests/) for more
information.
name: CI Visibility Tests
- description: 'Datadog Cloud Security Management (CSM) delivers real-time threat
detection

Expand Down Expand Up @@ -51574,6 +51568,9 @@ tags:
- description: View and manage teams within Datadog. See the [Teams page](https://docs.datadoghq.com/account_management/teams/)
for more information.
name: Teams
- description: Search or aggregate your test events over HTTP. See the [Test Optimization
in Datadog](https://docs.datadoghq.com/tests/) page for more information.
name: Test Optimization
- description: 'The usage metering API allows you to get hourly, daily, and

monthly usage across multiple facets of Datadog.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Aggregate tests events returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_ci_visibility_tests::CIVisibilityTestsAPI;
use datadog_api_client::datadogV2::api_test_optimization::TestOptimizationAPI;
use datadog_api_client::datadogV2::model::CIAppAggregateSort;
use datadog_api_client::datadogV2::model::CIAppAggregationFunction;
use datadog_api_client::datadogV2::model::CIAppCompute;
Expand Down Expand Up @@ -30,7 +30,7 @@ async fn main() {
.total(CIAppGroupByTotal::CIAppGroupByTotalBoolean(false))])
.options(CIAppQueryOptions::new().timezone("GMT".to_string()));
let configuration = datadog::Configuration::new();
let api = CIVisibilityTestsAPI::with_config(configuration);
let api = TestOptimizationAPI::with_config(configuration);
let resp = api.aggregate_ci_app_test_events(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Get a list of tests events returns "OK" response
use chrono::{DateTime, Utc};
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_ci_visibility_tests::CIVisibilityTestsAPI;
use datadog_api_client::datadogV2::api_ci_visibility_tests::ListCIAppTestEventsOptionalParams;
use datadog_api_client::datadogV2::api_test_optimization::ListCIAppTestEventsOptionalParams;
use datadog_api_client::datadogV2::api_test_optimization::TestOptimizationAPI;

#[tokio::main]
async fn main() {
let configuration = datadog::Configuration::new();
let api = CIVisibilityTestsAPI::with_config(configuration);
let api = TestOptimizationAPI::with_config(configuration);
let resp = api
.list_ci_app_test_events(
ListCIAppTestEventsOptionalParams::default()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// Get a list of tests events returns "OK" response with pagination
use chrono::{DateTime, Utc};
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_ci_visibility_tests::CIVisibilityTestsAPI;
use datadog_api_client::datadogV2::api_ci_visibility_tests::ListCIAppTestEventsOptionalParams;
use datadog_api_client::datadogV2::api_test_optimization::ListCIAppTestEventsOptionalParams;
use datadog_api_client::datadogV2::api_test_optimization::TestOptimizationAPI;
use futures_util::pin_mut;
use futures_util::stream::StreamExt;

#[tokio::main]
async fn main() {
let configuration = datadog::Configuration::new();
let api = CIVisibilityTestsAPI::with_config(configuration);
let api = TestOptimizationAPI::with_config(configuration);
let response = api.list_ci_app_test_events_with_pagination(
ListCIAppTestEventsOptionalParams::default()
.filter_from(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Search tests events returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_ci_visibility_tests::CIVisibilityTestsAPI;
use datadog_api_client::datadogV2::api_ci_visibility_tests::SearchCIAppTestEventsOptionalParams;
use datadog_api_client::datadogV2::api_test_optimization::SearchCIAppTestEventsOptionalParams;
use datadog_api_client::datadogV2::api_test_optimization::TestOptimizationAPI;
use datadog_api_client::datadogV2::model::CIAppQueryOptions;
use datadog_api_client::datadogV2::model::CIAppQueryPageOptions;
use datadog_api_client::datadogV2::model::CIAppSort;
Expand All @@ -21,7 +21,7 @@ async fn main() {
.page(CIAppQueryPageOptions::new().limit(25))
.sort(CIAppSort::TIMESTAMP_ASCENDING);
let configuration = datadog::Configuration::new();
let api = CIVisibilityTestsAPI::with_config(configuration);
let api = TestOptimizationAPI::with_config(configuration);
let resp = api
.search_ci_app_test_events(SearchCIAppTestEventsOptionalParams::default().body(body))
.await;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Search tests events returns "OK" response with pagination
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_ci_visibility_tests::CIVisibilityTestsAPI;
use datadog_api_client::datadogV2::api_ci_visibility_tests::SearchCIAppTestEventsOptionalParams;
use datadog_api_client::datadogV2::api_test_optimization::SearchCIAppTestEventsOptionalParams;
use datadog_api_client::datadogV2::api_test_optimization::TestOptimizationAPI;
use datadog_api_client::datadogV2::model::CIAppQueryPageOptions;
use datadog_api_client::datadogV2::model::CIAppSort;
use datadog_api_client::datadogV2::model::CIAppTestEventsRequest;
Expand All @@ -21,7 +21,7 @@ async fn main() {
.page(CIAppQueryPageOptions::new().limit(2))
.sort(CIAppSort::TIMESTAMP_ASCENDING);
let configuration = datadog::Configuration::new();
let api = CIVisibilityTestsAPI::with_config(configuration);
let api = TestOptimizationAPI::with_config(configuration);
let response = api.search_ci_app_test_events_with_pagination(
SearchCIAppTestEventsOptionalParams::default().body(body),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use reqwest::header::{HeaderMap, HeaderValue};
use serde::{Deserialize, Serialize};
use std::io::Write;

/// ListCIAppTestEventsOptionalParams is a struct for passing parameters to the method [`CIVisibilityTestsAPI::list_ci_app_test_events`]
/// ListCIAppTestEventsOptionalParams is a struct for passing parameters to the method [`TestOptimizationAPI::list_ci_app_test_events`]
#[non_exhaustive]
#[derive(Clone, Default, Debug)]
pub struct ListCIAppTestEventsOptionalParams {
Expand Down Expand Up @@ -63,7 +63,7 @@ impl ListCIAppTestEventsOptionalParams {
}
}

/// SearchCIAppTestEventsOptionalParams is a struct for passing parameters to the method [`CIVisibilityTestsAPI::search_ci_app_test_events`]
/// SearchCIAppTestEventsOptionalParams is a struct for passing parameters to the method [`TestOptimizationAPI::search_ci_app_test_events`]
#[non_exhaustive]
#[derive(Clone, Default, Debug)]
pub struct SearchCIAppTestEventsOptionalParams {
Expand All @@ -77,44 +77,44 @@ impl SearchCIAppTestEventsOptionalParams {
}
}

/// AggregateCIAppTestEventsError is a struct for typed errors of method [`CIVisibilityTestsAPI::aggregate_ci_app_test_events`]
/// AggregateCIAppTestEventsError is a struct for typed errors of method [`TestOptimizationAPI::aggregate_ci_app_test_events`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum AggregateCIAppTestEventsError {
APIErrorResponse(crate::datadogV2::model::APIErrorResponse),
UnknownValue(serde_json::Value),
}

/// ListCIAppTestEventsError is a struct for typed errors of method [`CIVisibilityTestsAPI::list_ci_app_test_events`]
/// ListCIAppTestEventsError is a struct for typed errors of method [`TestOptimizationAPI::list_ci_app_test_events`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListCIAppTestEventsError {
APIErrorResponse(crate::datadogV2::model::APIErrorResponse),
UnknownValue(serde_json::Value),
}

/// SearchCIAppTestEventsError is a struct for typed errors of method [`CIVisibilityTestsAPI::search_ci_app_test_events`]
/// SearchCIAppTestEventsError is a struct for typed errors of method [`TestOptimizationAPI::search_ci_app_test_events`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum SearchCIAppTestEventsError {
APIErrorResponse(crate::datadogV2::model::APIErrorResponse),
UnknownValue(serde_json::Value),
}

/// Search or aggregate your CI Visibility test events over HTTP. See the [Test Visibility in Datadog page](<https://docs.datadoghq.com/tests/>) for more information.
/// Search or aggregate your test events over HTTP. See the [Test Optimization in Datadog](<https://docs.datadoghq.com/tests/>) page for more information.
#[derive(Debug, Clone)]
pub struct CIVisibilityTestsAPI {
pub struct TestOptimizationAPI {
config: datadog::Configuration,
client: reqwest_middleware::ClientWithMiddleware,
}

impl Default for CIVisibilityTestsAPI {
impl Default for TestOptimizationAPI {
fn default() -> Self {
Self::with_config(datadog::Configuration::default())
}
}

impl CIVisibilityTestsAPI {
impl TestOptimizationAPI {
pub fn new() -> Self {
Self::default()
}
Expand Down Expand Up @@ -166,7 +166,7 @@ impl CIVisibilityTestsAPI {
Self { config, client }
}

/// The API endpoint to aggregate CI Visibility test events into buckets of computed metrics and timeseries.
/// The API endpoint to aggregate test events into buckets of computed metrics and timeseries.
pub async fn aggregate_ci_app_test_events(
&self,
body: crate::datadogV2::model::CIAppTestsAggregateRequest,
Expand All @@ -188,7 +188,7 @@ impl CIVisibilityTestsAPI {
}
}

/// The API endpoint to aggregate CI Visibility test events into buckets of computed metrics and timeseries.
/// The API endpoint to aggregate test events into buckets of computed metrics and timeseries.
pub async fn aggregate_ci_app_test_events_with_http_info(
&self,
body: crate::datadogV2::model::CIAppTestsAggregateRequest,
Expand Down Expand Up @@ -321,7 +321,7 @@ impl CIVisibilityTestsAPI {
}
}

/// List endpoint returns CI Visibility test events that match a [search query](<https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/>).
/// List endpoint returns test events that match a [search query](<https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/>).
/// [Results are paginated similarly to logs](<https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination>).
///
/// Use this endpoint to see your latest test events.
Expand Down Expand Up @@ -384,7 +384,7 @@ impl CIVisibilityTestsAPI {
}
}

/// List endpoint returns CI Visibility test events that match a [search query](<https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/>).
/// List endpoint returns test events that match a [search query](<https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/>).
/// [Results are paginated similarly to logs](<https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination>).
///
/// Use this endpoint to see your latest test events.
Expand Down Expand Up @@ -510,7 +510,7 @@ impl CIVisibilityTestsAPI {
}
}

/// List endpoint returns CI Visibility test events that match a [search query](<https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/>).
/// List endpoint returns test events that match a [search query](<https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/>).
/// [Results are paginated similarly to logs](<https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination>).
///
/// Use this endpoint to build complex events filtering and search.
Expand Down Expand Up @@ -579,7 +579,7 @@ impl CIVisibilityTestsAPI {
}
}

/// List endpoint returns CI Visibility test events that match a [search query](<https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/>).
/// List endpoint returns test events that match a [search query](<https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/>).
/// [Results are paginated similarly to logs](<https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination>).
///
/// Use this endpoint to build complex events filtering and search.
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV2/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ pub mod api_aws_integration;
pub mod api_aws_logs_integration;
pub mod api_case_management;
pub mod api_ci_visibility_pipelines;
pub mod api_ci_visibility_tests;
pub mod api_cloud_cost_management;
pub mod api_cloudflare_integration;
pub mod api_confluent_cloud;
Expand Down Expand Up @@ -63,6 +62,7 @@ pub mod api_spans;
pub mod api_spans_metrics;
pub mod api_synthetics;
pub mod api_teams;
pub mod api_test_optimization;
pub mod api_usage_metering;
pub mod api_users;
pub mod api_workflow_automation;
2 changes: 1 addition & 1 deletion src/datadogV2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ pub use self::api::api_aws_integration;
pub use self::api::api_aws_logs_integration;
pub use self::api::api_case_management;
pub use self::api::api_ci_visibility_pipelines;
pub use self::api::api_ci_visibility_tests;
pub use self::api::api_cloud_cost_management;
pub use self::api::api_cloudflare_integration;
pub use self::api::api_confluent_cloud;
Expand Down Expand Up @@ -64,6 +63,7 @@ pub use self::api::api_spans;
pub use self::api::api_spans_metrics;
pub use self::api::api_synthetics;
pub use self::api::api_teams;
pub use self::api::api_test_optimization;
pub use self::api::api_usage_metering;
pub use self::api::api_users;
pub use self::api::api_workflow_automation;
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV2/model/model_ci_app_event_attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::fmt::{self, Formatter};
#[skip_serializing_none]
#[derive(Clone, Debug, PartialEq, Serialize)]
pub struct CIAppEventAttributes {
/// JSON object of attributes from CI Visibility test events.
/// JSON object of attributes from Test Optimization test events.
#[serde(rename = "attributes")]
pub attributes: Option<std::collections::BTreeMap<String, serde_json::Value>>,
/// Array of tags associated with your event.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
@endpoint(ci-visibility-tests) @endpoint(ci-visibility-tests-v2)
Feature: CI Visibility Tests
Search or aggregate your CI Visibility test events over HTTP. See the
[Test Visibility in Datadog page](https://docs.datadoghq.com/tests/) for
more information.
@endpoint(test-optimization) @endpoint(test-optimization-v2)
Feature: Test Optimization
Search or aggregate your test events over HTTP. See the [Test Optimization
in Datadog](https://docs.datadoghq.com/tests/) page for more information.

Background:
Given a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "CIVisibilityTests" API
And an instance of "TestOptimization" API

@generated @skip @team:Datadog/ci-app-backend
Scenario: Aggregate tests events returns "Bad Request" response
Expand Down
Loading
Loading