Skip to content

Commit 42fea30

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit c96d162 of spec repo
1 parent 09b33e8 commit 42fea30

13 files changed

Lines changed: 1487 additions & 0 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44827,6 +44827,57 @@ components:
4482744827
required:
4482844828
- data
4482944829
type: object
44830+
ProjectFavorite:
44831+
description: Project favorite
44832+
properties:
44833+
id:
44834+
description: The project's identifier
44835+
example: d4bbe1af-f36e-42f1-87c1-493ca35c320e
44836+
type: string
44837+
relationships:
44838+
$ref: '#/components/schemas/ProjectFavoriteRelationships'
44839+
type:
44840+
$ref: '#/components/schemas/ProjectFavoriteResourceType'
44841+
required:
44842+
- id
44843+
- type
44844+
- relationships
44845+
type: object
44846+
ProjectFavoriteRelationships:
44847+
description: Project favorite relationships
44848+
properties:
44849+
user:
44850+
$ref: '#/components/schemas/ProjectFavoriteUserRelationship'
44851+
required:
44852+
- user
44853+
type: object
44854+
ProjectFavoriteResourceType:
44855+
description: Project favorite resource type
44856+
enum:
44857+
- project_favorite
44858+
example: project_favorite
44859+
type: string
44860+
x-enum-varnames:
44861+
- PROJECT_FAVORITE
44862+
ProjectFavoriteUserRelationship:
44863+
description: Relationship to user
44864+
properties:
44865+
data:
44866+
$ref: '#/components/schemas/UserRelationshipData'
44867+
required:
44868+
- data
44869+
type: object
44870+
ProjectFavoritesResponse:
44871+
description: Response with project favorites
44872+
properties:
44873+
data:
44874+
description: Array of project favorites
44875+
items:
44876+
$ref: '#/components/schemas/ProjectFavorite'
44877+
type: array
44878+
required:
44879+
- data
44880+
type: object
4483044881
ProjectRelationship:
4483144882
description: Relationship to project
4483244883
properties:
@@ -85757,6 +85808,139 @@ paths:
8575785808
tags:
8575885809
- Rum Audience Management
8575985810
x-unstable: '**Note**: This endpoint may be subject to changes.'
85811+
/api/v2/projects/favorites:
85812+
get:
85813+
description: Get all projects marked as favorite by the current user
85814+
operationId: ListUserProjectFavorites
85815+
responses:
85816+
'200':
85817+
content:
85818+
application/json:
85819+
schema:
85820+
$ref: '#/components/schemas/ProjectFavoritesResponse'
85821+
description: OK
85822+
'400':
85823+
content:
85824+
application/json:
85825+
schema:
85826+
$ref: '#/components/schemas/JSONAPIErrorResponse'
85827+
description: Bad Request
85828+
'401':
85829+
content:
85830+
application/json:
85831+
schema:
85832+
$ref: '#/components/schemas/JSONAPIErrorResponse'
85833+
description: Unauthorized
85834+
'403':
85835+
content:
85836+
application/json:
85837+
schema:
85838+
$ref: '#/components/schemas/JSONAPIErrorResponse'
85839+
description: Forbidden
85840+
'429':
85841+
$ref: '#/components/responses/TooManyRequestsResponse'
85842+
security:
85843+
- apiKeyAuth: []
85844+
appKeyAuth: []
85845+
- AuthZ:
85846+
- cases_read
85847+
summary: Get user's project favorites
85848+
tags:
85849+
- Case Management
85850+
x-unstable: '**Note**: This endpoint is in preview and is subject to change.
85851+
85852+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
85853+
/api/v2/projects/{project_id}/favorites:
85854+
delete:
85855+
description: Remove a project from the current user's favorites
85856+
operationId: UnfavoriteProject
85857+
parameters:
85858+
- $ref: '#/components/parameters/ProjectIDPathParameter'
85859+
responses:
85860+
'204':
85861+
description: No Content
85862+
'400':
85863+
content:
85864+
application/json:
85865+
schema:
85866+
$ref: '#/components/schemas/JSONAPIErrorResponse'
85867+
description: Bad Request
85868+
'401':
85869+
content:
85870+
application/json:
85871+
schema:
85872+
$ref: '#/components/schemas/JSONAPIErrorResponse'
85873+
description: Unauthorized
85874+
'403':
85875+
content:
85876+
application/json:
85877+
schema:
85878+
$ref: '#/components/schemas/JSONAPIErrorResponse'
85879+
description: Forbidden
85880+
'404':
85881+
content:
85882+
application/json:
85883+
schema:
85884+
$ref: '#/components/schemas/JSONAPIErrorResponse'
85885+
description: Not Found
85886+
'429':
85887+
$ref: '#/components/responses/TooManyRequestsResponse'
85888+
security:
85889+
- apiKeyAuth: []
85890+
appKeyAuth: []
85891+
- AuthZ:
85892+
- cases_write
85893+
summary: Remove project from favorites
85894+
tags:
85895+
- Case Management
85896+
x-unstable: '**Note**: This endpoint is in preview and is subject to change.
85897+
85898+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
85899+
post:
85900+
description: Add a project to the current user's favorites
85901+
operationId: FavoriteProject
85902+
parameters:
85903+
- $ref: '#/components/parameters/ProjectIDPathParameter'
85904+
responses:
85905+
'204':
85906+
description: No Content
85907+
'400':
85908+
content:
85909+
application/json:
85910+
schema:
85911+
$ref: '#/components/schemas/JSONAPIErrorResponse'
85912+
description: Bad Request
85913+
'401':
85914+
content:
85915+
application/json:
85916+
schema:
85917+
$ref: '#/components/schemas/JSONAPIErrorResponse'
85918+
description: Unauthorized
85919+
'403':
85920+
content:
85921+
application/json:
85922+
schema:
85923+
$ref: '#/components/schemas/JSONAPIErrorResponse'
85924+
description: Forbidden
85925+
'404':
85926+
content:
85927+
application/json:
85928+
schema:
85929+
$ref: '#/components/schemas/JSONAPIErrorResponse'
85930+
description: Not Found
85931+
'429':
85932+
$ref: '#/components/responses/TooManyRequestsResponse'
85933+
security:
85934+
- apiKeyAuth: []
85935+
appKeyAuth: []
85936+
- AuthZ:
85937+
- cases_write
85938+
summary: Add project to favorites
85939+
tags:
85940+
- Case Management
85941+
x-unstable: '**Note**: This endpoint is in preview and is subject to change.
85942+
85943+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
8576085944
/api/v2/query/scalar:
8576185945
post:
8576285946
description: 'Query scalar values (as seen on Query Value, Table, and Toplist
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Add project to favorites returns "No Content" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.CaseManagementApi;
6+
7+
public class Example {
8+
public static void main(String[] args) {
9+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
10+
defaultClient.setUnstableOperationEnabled("v2.favoriteProject", true);
11+
CaseManagementApi apiInstance = new CaseManagementApi(defaultClient);
12+
13+
try {
14+
apiInstance.favoriteProject("e555e290-ed65-49bd-ae18-8acbfcf18db7");
15+
} catch (ApiException e) {
16+
System.err.println("Exception when calling CaseManagementApi#favoriteProject");
17+
System.err.println("Status code: " + e.getCode());
18+
System.err.println("Reason: " + e.getResponseBody());
19+
System.err.println("Response headers: " + e.getResponseHeaders());
20+
e.printStackTrace();
21+
}
22+
}
23+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Get user's project favorites returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.CaseManagementApi;
6+
import com.datadog.api.client.v2.model.ProjectFavoritesResponse;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
defaultClient.setUnstableOperationEnabled("v2.listUserProjectFavorites", true);
12+
CaseManagementApi apiInstance = new CaseManagementApi(defaultClient);
13+
14+
try {
15+
ProjectFavoritesResponse result = apiInstance.listUserProjectFavorites();
16+
System.out.println(result);
17+
} catch (ApiException e) {
18+
System.err.println("Exception when calling CaseManagementApi#listUserProjectFavorites");
19+
System.err.println("Status code: " + e.getCode());
20+
System.err.println("Reason: " + e.getResponseBody());
21+
System.err.println("Response headers: " + e.getResponseHeaders());
22+
e.printStackTrace();
23+
}
24+
}
25+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Remove project from favorites returns "No Content" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.CaseManagementApi;
6+
7+
public class Example {
8+
public static void main(String[] args) {
9+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
10+
defaultClient.setUnstableOperationEnabled("v2.unfavoriteProject", true);
11+
CaseManagementApi apiInstance = new CaseManagementApi(defaultClient);
12+
13+
try {
14+
apiInstance.unfavoriteProject("e555e290-ed65-49bd-ae18-8acbfcf18db7");
15+
} catch (ApiException e) {
16+
System.err.println("Exception when calling CaseManagementApi#unfavoriteProject");
17+
System.err.println("Status code: " + e.getCode());
18+
System.err.println("Reason: " + e.getResponseBody());
19+
System.err.println("Response headers: " + e.getResponseHeaders());
20+
e.printStackTrace();
21+
}
22+
}
23+
}

src/main/java/com/datadog/api/client/ApiClient.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,9 @@ public class ApiClient {
775775
put("v2.getOpenAPI", false);
776776
put("v2.listAPIs", false);
777777
put("v2.updateOpenAPI", false);
778+
put("v2.favoriteProject", false);
779+
put("v2.listUserProjectFavorites", false);
780+
put("v2.unfavoriteProject", false);
778781
put("v2.cancelThreatHuntingJob", false);
779782
put("v2.convertJobResultToSignal", false);
780783
put("v2.deleteThreatHuntingJob", false);

0 commit comments

Comments
 (0)