Skip to content

Commit 72dcd33

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit d1403f5 of spec repo
1 parent bb3eefc commit 72dcd33

File tree

13 files changed

+1378
-5
lines changed

13 files changed

+1378
-5
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,16 @@ components:
346346
required: true
347347
schema:
348348
type: string
349+
DisableCorrections:
350+
description: Whether to exclude correction windows from the SLO status calculation.
351+
Defaults to false.
352+
in: query
353+
name: disable_corrections
354+
required: false
355+
schema:
356+
default: false
357+
example: false
358+
type: boolean
349359
EntityID:
350360
description: UUID or Entity Ref.
351361
in: path
@@ -457,6 +467,15 @@ components:
457467
required: false
458468
schema:
459469
$ref: '#/components/schemas/RelationType'
470+
FromTimestamp:
471+
description: The starting timestamp for the SLO status query in epoch seconds.
472+
in: query
473+
name: from_ts
474+
required: true
475+
schema:
476+
example: 1690901870
477+
format: int64
478+
type: integer
460479
GCPSTSServiceAccountID:
461480
description: Your GCP STS enabled service account's unique ID.
462481
in: path
@@ -1096,6 +1115,14 @@ components:
10961115
required: false
10971116
schema:
10981117
type: boolean
1118+
SloID:
1119+
description: The ID of the SLO.
1120+
in: path
1121+
name: slo_id
1122+
required: true
1123+
schema:
1124+
example: 00000000-0000-0000-0000-000000000000
1125+
type: string
10991126
SpansMetricIDParameter:
11001127
description: The name of the span-based metric.
11011128
in: path
@@ -1117,6 +1144,15 @@ components:
11171144
required: true
11181145
schema:
11191146
type: string
1147+
ToTimestamp:
1148+
description: The ending timestamp for the SLO status query in epoch seconds.
1149+
in: query
1150+
name: to_ts
1151+
required: true
1152+
schema:
1153+
example: 1706803070
1154+
format: int64
1155+
type: integer
11201156
UserID:
11211157
description: The ID of the user.
11221158
in: path
@@ -45865,6 +45901,22 @@ components:
4586545901
from the other indexes
4586645902
type: string
4586745903
type: object
45904+
RawErrorBudgetRemaining:
45905+
description: The raw error budget remaining for the SLO.
45906+
properties:
45907+
unit:
45908+
description: The unit of the error budget (for example, `seconds`, `requests`).
45909+
example: seconds
45910+
type: string
45911+
value:
45912+
description: The numeric value of the remaining error budget.
45913+
example: 86400.5
45914+
format: double
45915+
type: number
45916+
required:
45917+
- value
45918+
- unit
45919+
type: object
4586845920
ReadinessGate:
4586945921
description: Used to merge multiple branches into a single branch.
4587045922
properties:
@@ -56388,6 +56440,70 @@ components:
5638856440
required:
5638956441
- attributes
5639056442
type: object
56443+
SloStatusData:
56444+
description: The data portion of the SLO status response.
56445+
properties:
56446+
attributes:
56447+
$ref: '#/components/schemas/SloStatusDataAttributes'
56448+
id:
56449+
description: The ID of the SLO.
56450+
example: 00000000-0000-0000-0000-000000000000
56451+
type: string
56452+
type:
56453+
$ref: '#/components/schemas/SloStatusType'
56454+
required:
56455+
- id
56456+
- type
56457+
- attributes
56458+
type: object
56459+
SloStatusDataAttributes:
56460+
description: The attributes of the SLO status.
56461+
properties:
56462+
error_budget_remaining:
56463+
description: The percentage of error budget remaining.
56464+
example: 99.5
56465+
format: double
56466+
type: number
56467+
raw_error_budget_remaining:
56468+
$ref: '#/components/schemas/RawErrorBudgetRemaining'
56469+
sli:
56470+
description: The current Service Level Indicator (SLI) value as a percentage.
56471+
example: 99.95
56472+
format: double
56473+
type: number
56474+
span_precision:
56475+
description: The precision of the time span in seconds.
56476+
example: 2
56477+
format: int64
56478+
type: integer
56479+
state:
56480+
description: The current state of the SLO (for example, `breached`, `warning`,
56481+
`ok`).
56482+
example: ok
56483+
type: string
56484+
required:
56485+
- sli
56486+
- error_budget_remaining
56487+
- raw_error_budget_remaining
56488+
- state
56489+
- span_precision
56490+
type: object
56491+
SloStatusResponse:
56492+
description: The SLO status response.
56493+
properties:
56494+
data:
56495+
$ref: '#/components/schemas/SloStatusData'
56496+
required:
56497+
- data
56498+
type: object
56499+
SloStatusType:
56500+
description: The type of the SLO status resource.
56501+
enum:
56502+
- slo_status
56503+
example: slo_status
56504+
type: string
56505+
x-enum-varnames:
56506+
- SLO_STATUS
5639156507
SoftwareCatalogTriggerWrapper:
5639256508
description: Schema for a Software Catalog-based trigger.
5639356509
properties:
@@ -92268,6 +92384,63 @@ paths:
9226892384
x-unstable: '**Note**: This feature is in private beta. To request access, use
9226992385
the request access form in the [Service Level Objectives](https://docs.datadoghq.com/service_management/service_level_objectives/#slo-csv-export)
9227092386
docs.'
92387+
/api/v2/slo/{slo_id}/status:
92388+
get:
92389+
description: 'Get the status of a Service Level Objective (SLO) for a given
92390+
time period.
92391+
92392+
92393+
This endpoint returns the current SLI value, error budget remaining, and other
92394+
status information for the specified SLO.'
92395+
operationId: GetSloStatus
92396+
parameters:
92397+
- $ref: '#/components/parameters/SloID'
92398+
- $ref: '#/components/parameters/FromTimestamp'
92399+
- $ref: '#/components/parameters/ToTimestamp'
92400+
- $ref: '#/components/parameters/DisableCorrections'
92401+
responses:
92402+
'200':
92403+
content:
92404+
application/json:
92405+
schema:
92406+
$ref: '#/components/schemas/SloStatusResponse'
92407+
description: OK
92408+
'400':
92409+
content:
92410+
application/json:
92411+
schema:
92412+
$ref: '#/components/schemas/JSONAPIErrorResponse'
92413+
description: Bad Request
92414+
'403':
92415+
content:
92416+
application/json:
92417+
schema:
92418+
$ref: '#/components/schemas/JSONAPIErrorResponse'
92419+
description: Forbidden
92420+
'404':
92421+
content:
92422+
application/json:
92423+
schema:
92424+
$ref: '#/components/schemas/JSONAPIErrorResponse'
92425+
description: Not Found
92426+
'429':
92427+
$ref: '#/components/responses/TooManyRequestsResponse'
92428+
security:
92429+
- apiKeyAuth: []
92430+
appKeyAuth: []
92431+
- AuthZ:
92432+
- slos_read
92433+
summary: Get SLO status
92434+
tags:
92435+
- Service Level Objectives
92436+
x-permission:
92437+
operator: OR
92438+
permissions:
92439+
- slos_read
92440+
x-unstable: '**Note**: This endpoint is in public beta and it''s subject to
92441+
change.
92442+
92443+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
9227192444
/api/v2/spa/recommendations/{service}:
9227292445
get:
9227392446
description: This endpoint is currently experimental and restricted to Datadog
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Get SLO status 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.ServiceLevelObjectivesApi;
6+
import com.datadog.api.client.v2.model.SloStatusResponse;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
defaultClient.setUnstableOperationEnabled("v2.getSloStatus", true);
12+
ServiceLevelObjectivesApi apiInstance = new ServiceLevelObjectivesApi(defaultClient);
13+
14+
try {
15+
SloStatusResponse result =
16+
apiInstance.getSloStatus(
17+
"00000000-0000-0000-0000-000000000000", 1690901870L, 1706803070L);
18+
System.out.println(result);
19+
} catch (ApiException e) {
20+
System.err.println("Exception when calling ServiceLevelObjectivesApi#getSloStatus");
21+
System.err.println("Status code: " + e.getCode());
22+
System.err.println("Reason: " + e.getResponseBody());
23+
System.err.println("Response headers: " + e.getResponseHeaders());
24+
e.printStackTrace();
25+
}
26+
}
27+
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,7 @@ public class ApiClient {
907907
put("v2.createSLOReportJob", false);
908908
put("v2.getSLOReport", false);
909909
put("v2.getSLOReportJobStatus", false);
910+
put("v2.getSloStatus", false);
910911
put("v2.getSPARecommendations", false);
911912
put("v2.getSPARecommendationsWithShard", false);
912913
put("v2.createCustomRule", false);

0 commit comments

Comments
 (0)