Skip to content
Merged
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
129 changes: 102 additions & 27 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6550,20 +6550,15 @@ components:
example: my-hostname
type: string
resource_kind:
description: >-
The kind of affected resource. Known values are `host`, `deployment`, `cluster`, `cluster_agent`, and `otel`.
example: host
type: string
$ref: "#/components/schemas/AgentHealthIssueResourceKind"
resource_type:
description: The type of the affected resource. Omitted when empty.
example: host
type: string
severity:
description: The severity of the issue. Known values are `low`, `medium`, `high`, and `unknown`.
example: high
type: string
$ref: "#/components/schemas/AgentHealthIssueSeverity"
state:
description: The state of the issue. Only issues with state `open` are returned.
description: The state of the issue, such as `open`.
example: open
type: string
tags:
Expand Down Expand Up @@ -6633,6 +6628,23 @@ components:
- type
- attributes
type: object
AgentHealthIssueResourceKind:
description: >-
The kind of affected resource. The meaning of `resource_id` depends on this: hostname for `host`, DaemonSet UID for `deployment` (node Agent), cluster UUID for `cluster`, hostname of the host running the Cluster Agent for `cluster_agent`, or OpenTelemetry collector ID for `otel`.
enum:
- host
- deployment
- cluster
- cluster_agent
- otel
example: host
type: string
x-enum-varnames:
- HOST
- DEPLOYMENT
- CLUSTER
- CLUSTER_AGENT
- OTEL
AgentHealthIssueResourceType:
description: The Agent Health issue resource type.
enum:
Expand All @@ -6649,6 +6661,20 @@ components:
required:
- data
type: object
AgentHealthIssueSeverity:
description: The severity of the issue.
enum:
- low
- medium
- high
- unknown
example: high
type: string
x-enum-varnames:
- LOW
- MEDIUM
- HIGH
- UNKNOWN
AgentHealthIssueTags:
description: Tags associated with the issue. Omitted when empty.
example:
Expand Down Expand Up @@ -6709,15 +6735,18 @@ components:
$ref: "#/components/schemas/AgentHealthIssuesResponseMeta"
required:
- data
- meta
type: object
AgentHealthIssuesResponseMeta:
description: >-
Aggregate counts for the matching Agent Health issues. Present only when `count_by=issue_type` is requested.
Pagination metadata for the matching Agent Health issues. Always present. Includes per-issue-type counts only when `count_by=issue_type` is requested.
example:
page:
counts_by_issue_type:
invalid_config: 8382
read-only_filesystem_error: 82
limit: 100
offset: 0
total_count: 25526
properties:
page:
Expand All @@ -6726,11 +6755,13 @@ components:
- page
type: object
AgentHealthIssuesResponsePage:
description: Counts for the matching Agent Health issues.
description: Pagination details and counts for the matching Agent Health issues.
example:
counts_by_issue_type:
invalid_config: 8382
read-only_filesystem_error: 82
limit: 100
offset: 0
total_count: 25526
properties:
counts_by_issue_type:
Expand All @@ -6742,14 +6773,25 @@ components:
invalid_config: 8382
read-only_filesystem_error: 82
type: object
limit:
description: The maximum number of issues returned, echoing the requested `page[limit]`.
example: 100
format: int64
type: integer
offset:
description: The number of issues skipped, echoing the requested `page[offset]`.
example: 0
format: int64
type: integer
total_count:
description: The total number of open issues matching the filters.
example: 25526
format: int64
type: integer
required:
- limit
- offset
- total_count
- counts_by_issue_type
type: object
AgentHealthRemediation:
description: Remediation for the issue. Omitted when no remediation is available.
Expand Down Expand Up @@ -6802,19 +6844,25 @@ components:
description: Whether the script requires root privileges.
example: true
type: boolean
required:
- requires_root
type: object
AgentHealthRemediationStep:
description: A step to remediate the issue.
properties:
order:
description: The order in which to perform the step.
example: 1
format: int64
format: int32
maximum: 2147483647
type: integer
text:
description: The instructions for the step.
example: Open datadog.yaml
type: string
required:
- order
- text
type: object
AgentHealthRemediationSteps:
description: Steps to remediate the issue.
Expand Down Expand Up @@ -165742,23 +165790,45 @@ paths:
(`high`, `medium`, `low`, then other values), then `first_seen_at` descending with
missing timestamps last, then issue ID ascending.

Set `count_by=issue_type` to include `meta.page`, where `total_count` is the number of
open issues matching the filters and `counts_by_issue_type` holds the per-type counts.
`meta` is omitted when `count_by` is not requested.
The response always includes `meta.page` with the applied `limit`, `offset`, and
`total_count` (the number of open issues matching the filters). Set `count_by=issue_type`
to also include `counts_by_issue_type` with per-issue-type counts.

Each filter accepts up to 50 comma-separated exact values of at most 256 characters
each, combined with OR within a filter and AND across filters. Blank entries are ignored; an all-blank filter
is treated as absent.
operationId: ListAgentHealthIssues
parameters:
- description: >-
Set to `issue_type` to include `meta.page` with `total_count` and per-issue-type counts. If you don't set this parameter, the response omits `meta`. Only `issue_type` is supported.
Set to `issue_type` to also include `counts_by_issue_type` in `meta.page` with per-issue-type counts. Pagination metadata is always included. Only `issue_type` is supported.
example: issue_type
in: query
name: count_by
required: false
schema:
$ref: "#/components/schemas/AgentHealthIssuesCountBy"
- description: >-
The maximum number of issues to return. Defaults to 100, with a minimum of 1 and a maximum of 1000.
example: 100
in: query
name: page[limit]
required: false
schema:
default: 100
format: int64
maximum: 1000
minimum: 1
type: integer
- description: The number of issues to skip before returning results. Defaults to 0, with a minimum of 0.
example: 0
in: query
name: page[offset]
required: false
schema:
default: 0
format: int64
minimum: 0
type: integer
- description: |-
Filter by a comma-separated list of exact `severity` values, up to 50 values
of at most 256 characters each. Values are combined with OR within this filter and AND across filters.
Expand Down Expand Up @@ -165851,6 +165921,8 @@ paths:
page:
counts_by_issue_type:
invalid_config: 8382
limit: 100
offset: 0
total_count: 25526
schema:
$ref: "#/components/schemas/AgentHealthIssuesResponse"
Expand Down Expand Up @@ -165883,23 +165955,23 @@ paths:
summary: List Agent Health issues
tags:
- Agent Health
x-pagination:
limitParam: page[limit]
pageOffsetParam: page[offset]
resultsPath: data
x-permission:
operator: OR
permissions:
- hosts_read
x-unstable: |-
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/agenthealth/issues/{issue_id}:
get:
description: |-
Get an Agent Health issue and its available remediation in your organization.
Only open issues are returned. The `remediation` attribute is omitted when
the issue has no remediation.
The `remediation` attribute is omitted when the issue has no remediation.

Returns `404` if the issue does not exist, is not open, belongs to another
organization, or you do not have access to its data. This response does not
reveal whether the issue exists. Returns `403` if you lack the `hosts_read` permission.
Returns `404` if the issue does not exist, belongs to another organization, or
you do not have access to its data. This response does not reveal whether the
issue exists. Returns `403` if you lack the `hosts_read` permission.
operationId: GetAgentHealthIssue
parameters:
- description: |-
Expand Down Expand Up @@ -165951,6 +166023,12 @@ paths:
schema:
$ref: "#/components/schemas/AgentHealthIssueResponse"
description: OK
"400":
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Bad Request
"401":
content:
application/json:
Expand Down Expand Up @@ -165983,9 +166061,6 @@ paths:
operator: OR
permissions:
- hosts_read
x-unstable: |-
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/agentless_scanning/accounts/aws:
get:
description: Fetches the scan options configured for AWS accounts.
Expand Down
1 change: 0 additions & 1 deletion examples/v2/agent-health/GetAgentHealthIssue.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
defaultClient.setUnstableOperationEnabled("v2.getAgentHealthIssue", true);
AgentHealthApi apiInstance = new AgentHealthApi(defaultClient);

try {
Expand Down
1 change: 0 additions & 1 deletion examples/v2/agent-health/ListAgentHealthIssues.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
defaultClient.setUnstableOperationEnabled("v2.listAgentHealthIssues", true);
AgentHealthApi apiInstance = new AgentHealthApi(defaultClient);

try {
Expand Down
28 changes: 28 additions & 0 deletions examples/v2/agent-health/ListAgentHealthIssues_3218609860.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// List Agent Health issues returns "OK" response with pagination

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.PaginationIterable;
import com.datadog.api.client.v2.api.AgentHealthApi;
import com.datadog.api.client.v2.model.AgentHealthIssueData;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
AgentHealthApi apiInstance = new AgentHealthApi(defaultClient);

try {
PaginationIterable<AgentHealthIssueData> iterable =
apiInstance.listAgentHealthIssuesWithPagination();

for (AgentHealthIssueData item : iterable) {
System.out.println(item);
}
} catch (RuntimeException e) {
System.err.println(
"Exception when calling AgentHealthApi#listAgentHealthIssuesWithPagination");
System.err.println("Reason: " + e.getMessage());
e.printStackTrace();
}
}
}
2 changes: 0 additions & 2 deletions src/main/java/com/datadog/api/client/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -1145,8 +1145,6 @@ public class ApiClient {
put("v2.getExecutionPolicy", false);
put("v2.listExecutionPolicies", false);
put("v2.updateExecutionPolicy", false);
put("v2.getAgentHealthIssue", false);
put("v2.listAgentHealthIssues", false);
put("v2.evaluateAIGuardRequest", false);
put("v2.createAnnotation", false);
put("v2.deleteAnnotation", false);
Expand Down
Loading
Loading