Skip to content

Commit 94f98cf

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 60f5af4 of spec repo
1 parent a633078 commit 94f98cf

File tree

11 files changed

+1361
-0
lines changed

11 files changed

+1361
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,16 @@ components:
338338
required: true
339339
schema:
340340
type: string
341+
DisableCorrections:
342+
description: Whether to exclude correction windows from the SLO status calculation.
343+
Defaults to false.
344+
in: query
345+
name: disable_corrections
346+
required: false
347+
schema:
348+
default: false
349+
example: false
350+
type: boolean
341351
EntityID:
342352
description: UUID or Entity Ref.
343353
in: path
@@ -449,6 +459,15 @@ components:
449459
required: false
450460
schema:
451461
$ref: '#/components/schemas/RelationType'
462+
FromTimestamp:
463+
description: The starting timestamp for the SLO status query in epoch seconds.
464+
in: query
465+
name: from_ts
466+
required: true
467+
schema:
468+
example: 1690901870
469+
format: int64
470+
type: integer
452471
GCPSTSServiceAccountID:
453472
description: Your GCP STS enabled service account's unique ID.
454473
in: path
@@ -1088,6 +1107,14 @@ components:
10881107
required: false
10891108
schema:
10901109
type: boolean
1110+
SloID:
1111+
description: The ID of the SLO.
1112+
in: path
1113+
name: slo_id
1114+
required: true
1115+
schema:
1116+
example: 00000000-0000-0000-0000-000000000000
1117+
type: string
10911118
SpansMetricIDParameter:
10921119
description: The name of the span-based metric.
10931120
in: path
@@ -1109,6 +1136,15 @@ components:
11091136
required: true
11101137
schema:
11111138
type: string
1139+
ToTimestamp:
1140+
description: The ending timestamp for the SLO status query in epoch seconds.
1141+
in: query
1142+
name: to_ts
1143+
required: true
1144+
schema:
1145+
example: 1706803070
1146+
format: int64
1147+
type: integer
11121148
UserID:
11131149
description: The ID of the user.
11141150
in: path
@@ -44149,6 +44185,22 @@ components:
4414944185
from the other indexes
4415044186
type: string
4415144187
type: object
44188+
RawErrorBudgetRemaining:
44189+
description: The raw error budget remaining for the SLO.
44190+
properties:
44191+
unit:
44192+
description: The unit of the error budget (for example, `seconds`, `requests`).
44193+
example: seconds
44194+
type: string
44195+
value:
44196+
description: The numeric value of the remaining error budget.
44197+
example: 86400.5
44198+
format: double
44199+
type: number
44200+
required:
44201+
- value
44202+
- unit
44203+
type: object
4415244204
ReadinessGate:
4415344205
description: Used to merge multiple branches into a single branch.
4415444206
properties:
@@ -54592,6 +54644,70 @@ components:
5459254644
required:
5459354645
- attributes
5459454646
type: object
54647+
SloStatusData:
54648+
description: The data portion of the SLO status response.
54649+
properties:
54650+
attributes:
54651+
$ref: '#/components/schemas/SloStatusDataAttributes'
54652+
id:
54653+
description: The ID of the SLO.
54654+
example: 00000000-0000-0000-0000-000000000000
54655+
type: string
54656+
type:
54657+
$ref: '#/components/schemas/SloStatusType'
54658+
required:
54659+
- id
54660+
- type
54661+
- attributes
54662+
type: object
54663+
SloStatusDataAttributes:
54664+
description: The attributes of the SLO status.
54665+
properties:
54666+
error_budget_remaining:
54667+
description: The percentage of error budget remaining.
54668+
example: 99.5
54669+
format: double
54670+
type: number
54671+
raw_error_budget_remaining:
54672+
$ref: '#/components/schemas/RawErrorBudgetRemaining'
54673+
sli:
54674+
description: The current Service Level Indicator (SLI) value as a percentage.
54675+
example: 99.95
54676+
format: double
54677+
type: number
54678+
span_precision:
54679+
description: The precision of the time span in seconds.
54680+
example: 2
54681+
format: int64
54682+
type: integer
54683+
state:
54684+
description: The current state of the SLO (for example, `breached`, `warning`,
54685+
`ok`).
54686+
example: ok
54687+
type: string
54688+
required:
54689+
- sli
54690+
- error_budget_remaining
54691+
- raw_error_budget_remaining
54692+
- state
54693+
- span_precision
54694+
type: object
54695+
SloStatusResponse:
54696+
description: The SLO status response.
54697+
properties:
54698+
data:
54699+
$ref: '#/components/schemas/SloStatusData'
54700+
required:
54701+
- data
54702+
type: object
54703+
SloStatusType:
54704+
description: The type of the SLO status resource.
54705+
enum:
54706+
- slo_status
54707+
example: slo_status
54708+
type: string
54709+
x-enum-varnames:
54710+
- SLO_STATUS
5459554711
SoftwareCatalogTriggerWrapper:
5459654712
description: Schema for a Software Catalog-based trigger.
5459754713
properties:
@@ -89125,6 +89241,63 @@ paths:
8912589241
x-unstable: '**Note**: This feature is in private beta. To request access, use
8912689242
the request access form in the [Service Level Objectives](https://docs.datadoghq.com/service_management/service_level_objectives/#slo-csv-export)
8912789243
docs.'
89244+
/api/v2/slo/{slo_id}/status:
89245+
get:
89246+
description: 'Get the status of a Service Level Objective (SLO) for a given
89247+
time period.
89248+
89249+
89250+
This endpoint returns the current SLI value, error budget remaining, and other
89251+
status information for the specified SLO.'
89252+
operationId: GetSloStatus
89253+
parameters:
89254+
- $ref: '#/components/parameters/SloID'
89255+
- $ref: '#/components/parameters/FromTimestamp'
89256+
- $ref: '#/components/parameters/ToTimestamp'
89257+
- $ref: '#/components/parameters/DisableCorrections'
89258+
responses:
89259+
'200':
89260+
content:
89261+
application/json:
89262+
schema:
89263+
$ref: '#/components/schemas/SloStatusResponse'
89264+
description: OK
89265+
'400':
89266+
content:
89267+
application/json:
89268+
schema:
89269+
$ref: '#/components/schemas/JSONAPIErrorResponse'
89270+
description: Bad Request
89271+
'403':
89272+
content:
89273+
application/json:
89274+
schema:
89275+
$ref: '#/components/schemas/JSONAPIErrorResponse'
89276+
description: Forbidden
89277+
'404':
89278+
content:
89279+
application/json:
89280+
schema:
89281+
$ref: '#/components/schemas/JSONAPIErrorResponse'
89282+
description: Not Found
89283+
'429':
89284+
$ref: '#/components/responses/TooManyRequestsResponse'
89285+
security:
89286+
- apiKeyAuth: []
89287+
appKeyAuth: []
89288+
- AuthZ:
89289+
- slos_read
89290+
summary: Get SLO status
89291+
tags:
89292+
- Service Level Objectives
89293+
x-permission:
89294+
operator: OR
89295+
permissions:
89296+
- slos_read
89297+
x-unstable: '**Note**: This endpoint is in public beta and it''s subject to
89298+
change.
89299+
89300+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
8912889301
/api/v2/spa/recommendations/{service}:
8912989302
get:
8913089303
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
@@ -909,6 +909,7 @@ public class ApiClient {
909909
put("v2.createSLOReportJob", false);
910910
put("v2.getSLOReport", false);
911911
put("v2.getSLOReportJobStatus", false);
912+
put("v2.getSloStatus", false);
912913
put("v2.getSPARecommendations", false);
913914
put("v2.getSPARecommendationsWithShard", false);
914915
put("v2.createSCAResolveVulnerableSymbols", false);

0 commit comments

Comments
 (0)