v2_case_management_GetCase/
v2_case-management_GetCase.rs

1// Get the details of a case returns "OK" response
2use datadog_api_client::datadog;
3use datadog_api_client::datadogV2::api_case_management::CaseManagementAPI;
4
5#[tokio::main]
6async fn main() {
7    // there is a valid "case" in the system
8    let case_id = std::env::var("CASE_ID").unwrap();
9    let configuration = datadog::Configuration::new();
10    let api = CaseManagementAPI::with_config(configuration);
11    let resp = api.get_case(case_id.clone()).await;
12    if let Ok(value) = resp {
13        println!("{:#?}", value);
14    } else {
15        println!("{:#?}", resp.unwrap_err());
16    }
17}