pub struct ErrorTrackingAPI { /* private fields */ }
Expand description
View and manage issues within Error Tracking. See the Error Tracking page for more information.
Implementations§
Source§impl ErrorTrackingAPI
impl ErrorTrackingAPI
pub fn new() -> Self
Sourcepub fn with_config(config: Configuration) -> Self
pub fn with_config(config: Configuration) -> Self
Examples found in repository?
7async fn main() {
8 // there is a valid "issue" in the system
9 let issue_id = std::env::var("ISSUE_ID").unwrap();
10 let configuration = datadog::Configuration::new();
11 let api = ErrorTrackingAPI::with_config(configuration);
12 let resp = api
13 .get_issue(issue_id.clone(), GetIssueOptionalParams::default())
14 .await;
15 if let Ok(value) = resp {
16 println!("{:#?}", value);
17 } else {
18 println!("{:#?}", resp.unwrap_err());
19 }
20}
More examples
9async fn main() {
10 // there is a valid "issue" in the system
11 let issue_id = std::env::var("ISSUE_ID").unwrap();
12 let body = IssueUpdateAssigneeRequest::new(IssueUpdateAssigneeRequestData::new(
13 "87cb11a0-278c-440a-99fe-701223c80296".to_string(),
14 IssueUpdateAssigneeRequestDataType::ASSIGNEE,
15 ));
16 let configuration = datadog::Configuration::new();
17 let api = ErrorTrackingAPI::with_config(configuration);
18 let resp = api.update_issue_assignee(issue_id.clone(), body).await;
19 if let Ok(value) = resp {
20 println!("{:#?}", value);
21 } else {
22 println!("{:#?}", resp.unwrap_err());
23 }
24}
11async fn main() {
12 // there is a valid "issue" in the system
13 let issue_id = std::env::var("ISSUE_ID").unwrap();
14 let body = IssueUpdateStateRequest::new(IssueUpdateStateRequestData::new(
15 IssueUpdateStateRequestDataAttributes::new(IssueState::RESOLVED),
16 issue_id.clone(),
17 IssueUpdateStateRequestDataType::ERROR_TRACKING_ISSUE,
18 ));
19 let configuration = datadog::Configuration::new();
20 let api = ErrorTrackingAPI::with_config(configuration);
21 let resp = api.update_issue_state(issue_id.clone(), body).await;
22 if let Ok(value) = resp {
23 println!("{:#?}", value);
24 } else {
25 println!("{:#?}", resp.unwrap_err());
26 }
27}
12async fn main() {
13 let body = IssuesSearchRequest::new(IssuesSearchRequestData::new(
14 IssuesSearchRequestDataAttributes::new(
15 1671612804000,
16 "service:orders-* AND @language:go".to_string(),
17 1671620004000,
18 )
19 .track(IssuesSearchRequestDataAttributesTrack::TRACE),
20 IssuesSearchRequestDataType::SEARCH_REQUEST,
21 ));
22 let configuration = datadog::Configuration::new();
23 let api = ErrorTrackingAPI::with_config(configuration);
24 let resp = api
25 .search_issues(body, SearchIssuesOptionalParams::default())
26 .await;
27 if let Ok(value) = resp {
28 println!("{:#?}", value);
29 } else {
30 println!("{:#?}", resp.unwrap_err());
31 }
32}
pub fn with_client_and_config( config: Configuration, client: ClientWithMiddleware, ) -> Self
Sourcepub async fn get_issue(
&self,
issue_id: String,
params: GetIssueOptionalParams,
) -> Result<IssueResponse, Error<GetIssueError>>
pub async fn get_issue( &self, issue_id: String, params: GetIssueOptionalParams, ) -> Result<IssueResponse, Error<GetIssueError>>
Retrieve the full details for a specific error tracking issue, including attributes and relationships.
Examples found in repository?
7async fn main() {
8 // there is a valid "issue" in the system
9 let issue_id = std::env::var("ISSUE_ID").unwrap();
10 let configuration = datadog::Configuration::new();
11 let api = ErrorTrackingAPI::with_config(configuration);
12 let resp = api
13 .get_issue(issue_id.clone(), GetIssueOptionalParams::default())
14 .await;
15 if let Ok(value) = resp {
16 println!("{:#?}", value);
17 } else {
18 println!("{:#?}", resp.unwrap_err());
19 }
20}
Sourcepub async fn get_issue_with_http_info(
&self,
issue_id: String,
params: GetIssueOptionalParams,
) -> Result<ResponseContent<IssueResponse>, Error<GetIssueError>>
pub async fn get_issue_with_http_info( &self, issue_id: String, params: GetIssueOptionalParams, ) -> Result<ResponseContent<IssueResponse>, Error<GetIssueError>>
Retrieve the full details for a specific error tracking issue, including attributes and relationships.
Sourcepub async fn search_issues(
&self,
body: IssuesSearchRequest,
params: SearchIssuesOptionalParams,
) -> Result<IssuesSearchResponse, Error<SearchIssuesError>>
pub async fn search_issues( &self, body: IssuesSearchRequest, params: SearchIssuesOptionalParams, ) -> Result<IssuesSearchResponse, Error<SearchIssuesError>>
Search issues endpoint allows you to programmatically search for issues within your organization. This endpoint returns a list of issues that match a given search query, following the event search syntax. The search results are limited to a maximum of 100 issues per request.
Examples found in repository?
12async fn main() {
13 let body = IssuesSearchRequest::new(IssuesSearchRequestData::new(
14 IssuesSearchRequestDataAttributes::new(
15 1671612804000,
16 "service:orders-* AND @language:go".to_string(),
17 1671620004000,
18 )
19 .track(IssuesSearchRequestDataAttributesTrack::TRACE),
20 IssuesSearchRequestDataType::SEARCH_REQUEST,
21 ));
22 let configuration = datadog::Configuration::new();
23 let api = ErrorTrackingAPI::with_config(configuration);
24 let resp = api
25 .search_issues(body, SearchIssuesOptionalParams::default())
26 .await;
27 if let Ok(value) = resp {
28 println!("{:#?}", value);
29 } else {
30 println!("{:#?}", resp.unwrap_err());
31 }
32}
Sourcepub async fn search_issues_with_http_info(
&self,
body: IssuesSearchRequest,
params: SearchIssuesOptionalParams,
) -> Result<ResponseContent<IssuesSearchResponse>, Error<SearchIssuesError>>
pub async fn search_issues_with_http_info( &self, body: IssuesSearchRequest, params: SearchIssuesOptionalParams, ) -> Result<ResponseContent<IssuesSearchResponse>, Error<SearchIssuesError>>
Search issues endpoint allows you to programmatically search for issues within your organization. This endpoint returns a list of issues that match a given search query, following the event search syntax. The search results are limited to a maximum of 100 issues per request.
Sourcepub async fn update_issue_assignee(
&self,
issue_id: String,
body: IssueUpdateAssigneeRequest,
) -> Result<IssueResponse, Error<UpdateIssueAssigneeError>>
pub async fn update_issue_assignee( &self, issue_id: String, body: IssueUpdateAssigneeRequest, ) -> Result<IssueResponse, Error<UpdateIssueAssigneeError>>
Update the assignee of an issue by issue_id
.
Examples found in repository?
9async fn main() {
10 // there is a valid "issue" in the system
11 let issue_id = std::env::var("ISSUE_ID").unwrap();
12 let body = IssueUpdateAssigneeRequest::new(IssueUpdateAssigneeRequestData::new(
13 "87cb11a0-278c-440a-99fe-701223c80296".to_string(),
14 IssueUpdateAssigneeRequestDataType::ASSIGNEE,
15 ));
16 let configuration = datadog::Configuration::new();
17 let api = ErrorTrackingAPI::with_config(configuration);
18 let resp = api.update_issue_assignee(issue_id.clone(), body).await;
19 if let Ok(value) = resp {
20 println!("{:#?}", value);
21 } else {
22 println!("{:#?}", resp.unwrap_err());
23 }
24}
Sourcepub async fn update_issue_assignee_with_http_info(
&self,
issue_id: String,
body: IssueUpdateAssigneeRequest,
) -> Result<ResponseContent<IssueResponse>, Error<UpdateIssueAssigneeError>>
pub async fn update_issue_assignee_with_http_info( &self, issue_id: String, body: IssueUpdateAssigneeRequest, ) -> Result<ResponseContent<IssueResponse>, Error<UpdateIssueAssigneeError>>
Update the assignee of an issue by issue_id
.
Sourcepub async fn update_issue_state(
&self,
issue_id: String,
body: IssueUpdateStateRequest,
) -> Result<IssueResponse, Error<UpdateIssueStateError>>
pub async fn update_issue_state( &self, issue_id: String, body: IssueUpdateStateRequest, ) -> Result<IssueResponse, Error<UpdateIssueStateError>>
Update the state of an issue by issue_id
. Use this endpoint to move an issue between states such as OPEN
, RESOLVED
, or IGNORED
.
Examples found in repository?
11async fn main() {
12 // there is a valid "issue" in the system
13 let issue_id = std::env::var("ISSUE_ID").unwrap();
14 let body = IssueUpdateStateRequest::new(IssueUpdateStateRequestData::new(
15 IssueUpdateStateRequestDataAttributes::new(IssueState::RESOLVED),
16 issue_id.clone(),
17 IssueUpdateStateRequestDataType::ERROR_TRACKING_ISSUE,
18 ));
19 let configuration = datadog::Configuration::new();
20 let api = ErrorTrackingAPI::with_config(configuration);
21 let resp = api.update_issue_state(issue_id.clone(), body).await;
22 if let Ok(value) = resp {
23 println!("{:#?}", value);
24 } else {
25 println!("{:#?}", resp.unwrap_err());
26 }
27}
Sourcepub async fn update_issue_state_with_http_info(
&self,
issue_id: String,
body: IssueUpdateStateRequest,
) -> Result<ResponseContent<IssueResponse>, Error<UpdateIssueStateError>>
pub async fn update_issue_state_with_http_info( &self, issue_id: String, body: IssueUpdateStateRequest, ) -> Result<ResponseContent<IssueResponse>, Error<UpdateIssueStateError>>
Update the state of an issue by issue_id
. Use this endpoint to move an issue between states such as OPEN
, RESOLVED
, or IGNORED
.
Trait Implementations§
Source§impl Clone for ErrorTrackingAPI
impl Clone for ErrorTrackingAPI
Source§fn clone(&self) -> ErrorTrackingAPI
fn clone(&self) -> ErrorTrackingAPI
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more