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
75 changes: 66 additions & 9 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51339,6 +51339,49 @@ components:
$ref: '#/components/schemas/ServiceDefinitionData'
type: array
type: object
ServiceList:
properties:
data:
$ref: '#/components/schemas/ServiceListData'
type: object
ServiceListData:
properties:
attributes:
$ref: '#/components/schemas/ServiceListDataAttributes'
id:
type: string
type:
$ref: '#/components/schemas/ServiceListDataType'
required:
- type
type: object
ServiceListDataAttributes:
properties:
metadata:
items:
$ref: '#/components/schemas/ServiceListDataAttributesMetadataItems'
type: array
services:
items:
type: string
type: array
type: object
ServiceListDataAttributesMetadataItems:
properties:
isTraced:
type: boolean
isUsm:
type: boolean
type: object
ServiceListDataType:
default: services_list
description: Services list resource type.
enum:
- services_list
example: services_list
type: string
x-enum-varnames:
- SERVICES_LIST
ServiceNowBasicAuth:
description: The definition of the `ServiceNowBasicAuth` object.
properties:
Expand Down Expand Up @@ -61601,6 +61644,26 @@ paths:
permissions:
- apm_retention_filter_write
- apm_pipelines_write
/api/v2/apm/services:
get:
operationId: GetServiceList
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceList'
description: OK
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- apm_read
summary: Get service list
tags:
- APM
/api/v2/app-builder/apps:
delete:
description: Delete multiple apps in a single request from a list of app IDs.
Expand Down Expand Up @@ -69334,9 +69397,6 @@ paths:
operator: OR
permissions:
- incident_read
x-unstable: '**Note**: This endpoint is in Preview.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
post:
description: Create an impact for an incident.
operationId: CreateIncidentImpact
Expand Down Expand Up @@ -69380,9 +69440,6 @@ paths:
operator: OR
permissions:
- incident_write
x-unstable: '**Note**: This endpoint is in Preview.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/incidents/{incident_id}/impacts/{impact_id}:
delete:
description: Delete an incident impact.
Expand Down Expand Up @@ -69413,9 +69470,6 @@ paths:
operator: OR
permissions:
- incident_write
x-unstable: '**Note**: This endpoint is in Preview.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/incidents/{incident_id}/relationships/integrations:
get:
description: Get all integration metadata for an incident.
Expand Down Expand Up @@ -88586,6 +88640,9 @@ servers:
tags:
- description: Configure your API endpoints through the Datadog API.
name: API Management
- description: Observe, troubleshoot, and improve cloud-scale applications with all
telemetry in context
name: APM
- description: Manage configuration of [APM retention filters](https://app.datadoghq.com/apm/traces/retention-filters)
for your organization. You need an API and application key with Admin rights to
interact with this endpoint. See [retention filters](https://docs.datadoghq.com/tracing/trace_pipeline/trace_retention/#retention-filters)
Expand Down
24 changes: 24 additions & 0 deletions examples/v2/apm/GetServiceList.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Get service list returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.ApmApi;
import com.datadog.api.client.v2.model.ServiceList;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
ApmApi apiInstance = new ApmApi(defaultClient);

try {
ServiceList result = apiInstance.getServiceList();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ApmApi#getServiceList");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
3 changes: 0 additions & 3 deletions src/main/java/com/datadog/api/client/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -748,14 +748,12 @@ public class ApiClient {
put("v2.updateDeploymentGate", false);
put("v2.updateDeploymentRule", false);
put("v2.createIncident", false);
put("v2.createIncidentImpact", false);
put("v2.createIncidentIntegration", false);
put("v2.createIncidentNotificationRule", false);
put("v2.createIncidentNotificationTemplate", false);
put("v2.createIncidentTodo", false);
put("v2.createIncidentType", false);
put("v2.deleteIncident", false);
put("v2.deleteIncidentImpact", false);
put("v2.deleteIncidentIntegration", false);
put("v2.deleteIncidentNotificationRule", false);
put("v2.deleteIncidentNotificationTemplate", false);
Expand All @@ -768,7 +766,6 @@ public class ApiClient {
put("v2.getIncidentTodo", false);
put("v2.getIncidentType", false);
put("v2.listIncidentAttachments", false);
put("v2.listIncidentImpacts", false);
put("v2.listIncidentIntegrations", false);
put("v2.listIncidentNotificationRules", false);
put("v2.listIncidentNotificationTemplates", false);
Expand Down
151 changes: 151 additions & 0 deletions src/main/java/com/datadog/api/client/v2/api/ApmApi.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
package com.datadog.api.client.v2.api;

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.ApiResponse;
import com.datadog.api.client.Pair;
import com.datadog.api.client.v2.model.ServiceList;
import jakarta.ws.rs.client.Invocation;
import jakarta.ws.rs.core.GenericType;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.CompletableFuture;

@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
public class ApmApi {
private ApiClient apiClient;

public ApmApi() {
this(ApiClient.getDefaultApiClient());
}

public ApmApi(ApiClient apiClient) {
this.apiClient = apiClient;
}

/**
* Get the API client.
*
* @return API client
*/
public ApiClient getApiClient() {
return apiClient;
}

/**
* Set the API client.
*
* @param apiClient an instance of API client
*/
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}

/**
* Get service list.
*
* <p>See {@link #getServiceListWithHttpInfo}.
*
* @return ServiceList
* @throws ApiException if fails to make API call
*/
public ServiceList getServiceList() throws ApiException {
return getServiceListWithHttpInfo().getData();
}

/**
* Get service list.
*
* <p>See {@link #getServiceListWithHttpInfoAsync}.
*
* @return CompletableFuture&lt;ServiceList&gt;
*/
public CompletableFuture<ServiceList> getServiceListAsync() {
return getServiceListWithHttpInfoAsync()
.thenApply(
response -> {
return response.getData();
});
}

/**
* @return ApiResponse&lt;ServiceList&gt;
* @throws ApiException if fails to make API call
* @http.response.details
* <table border="1">
* <caption>Response details</caption>
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> OK </td><td> - </td></tr>
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
* </table>
*/
public ApiResponse<ServiceList> getServiceListWithHttpInfo() throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/v2/apm/services";

Map<String, String> localVarHeaderParams = new HashMap<String, String>();

Invocation.Builder builder =
apiClient.createBuilder(
"v2.ApmApi.getServiceList",
localVarPath,
new ArrayList<Pair>(),
localVarHeaderParams,
new HashMap<String, String>(),
new String[] {"application/json"},
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
return apiClient.invokeAPI(
"GET",
builder,
localVarHeaderParams,
new String[] {},
localVarPostBody,
new HashMap<String, Object>(),
false,
new GenericType<ServiceList>() {});
}

/**
* Get service list.
*
* <p>See {@link #getServiceListWithHttpInfo}.
*
* @return CompletableFuture&lt;ApiResponse&lt;ServiceList&gt;&gt;
*/
public CompletableFuture<ApiResponse<ServiceList>> getServiceListWithHttpInfoAsync() {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/v2/apm/services";

Map<String, String> localVarHeaderParams = new HashMap<String, String>();

Invocation.Builder builder;
try {
builder =
apiClient.createBuilder(
"v2.ApmApi.getServiceList",
localVarPath,
new ArrayList<Pair>(),
localVarHeaderParams,
new HashMap<String, String>(),
new String[] {"application/json"},
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
} catch (ApiException ex) {
CompletableFuture<ApiResponse<ServiceList>> result = new CompletableFuture<>();
result.completeExceptionally(ex);
return result;
}
return apiClient.invokeAPIAsync(
"GET",
builder,
localVarHeaderParams,
new String[] {},
localVarPostBody,
new HashMap<String, Object>(),
false,
new GenericType<ServiceList>() {});
}
}
Loading
Loading