Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark v1 downtime endpoints as deprecated #2334

Merged
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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2023-12-27 15:09:03.590991",
"spec_repo_commit": "61dc4c3e"
"regenerated": "2023-12-28 18:23:02.396506",
"spec_repo_commit": "42c21a14"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2023-12-27 15:09:03.612003",
"spec_repo_commit": "61dc4c3e"
"regenerated": "2023-12-28 18:23:02.415132",
"spec_repo_commit": "42c21a14"
}
}
}
30 changes: 23 additions & 7 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22984,7 +22984,9 @@ paths:
x-codegen-request-body-name: body
/api/v1/downtime:
get:
description: Get all scheduled downtimes.
deprecated: true
description: Get all scheduled downtimes. **Note:** This endpoint has been deprecated.
Please use v2 endpoints.
operationId: ListDowntimes
parameters:
- description: Only return downtimes that are active when the request is made.
Expand Down Expand Up @@ -23025,7 +23027,9 @@ paths:
tags:
- Downtimes
post:
description: Schedule a downtime.
deprecated: true
description: Schedule a downtime. **Note:** This endpoint has been deprecated.
Please use v2 endpoints.
operationId: CreateDowntime
requestBody:
content:
Expand Down Expand Up @@ -23066,7 +23070,11 @@ paths:
x-codegen-request-body-name: body
/api/v1/downtime/cancel/by_scope:
post:
description: Delete all downtimes that match the scope of `X`.
deprecated: true
description: Delete all downtimes that match the scope of `X`. **Note:** This
only interacts with Downtimes created using v1 endpoints. This endpoint has
been deprecated and will not be replaced. Please use v2 endpoints to find
and cancel downtimes.
operationId: CancelDowntimesByScope
requestBody:
content:
Expand Down Expand Up @@ -23113,7 +23121,9 @@ paths:
x-codegen-request-body-name: body
/api/v1/downtime/{downtime_id}:
delete:
description: Cancel a downtime.
deprecated: true
description: Cancel a downtime. **Note:** This endpoint has been deprecated.
Please use v2 endpoints.
operationId: CancelDowntime
parameters:
- description: ID of the downtime to cancel.
Expand Down Expand Up @@ -23150,7 +23160,9 @@ paths:
tags:
- Downtimes
get:
description: Get downtime detail by `downtime_id`.
deprecated: true
description: Get downtime detail by `downtime_id`. **Note:** This endpoint has
been deprecated. Please use v2 endpoints.
operationId: GetDowntime
parameters:
- description: ID of the downtime to fetch.
Expand Down Expand Up @@ -23191,7 +23203,9 @@ paths:
tags:
- Downtimes
put:
description: Update a single downtime by `downtime_id`.
deprecated: true
description: Update a single downtime by `downtime_id`. **Note:** This endpoint
has been deprecated. Please use v2 endpoints.
operationId: UpdateDowntime
parameters:
- description: ID of the downtime to update.
Expand Down Expand Up @@ -27176,7 +27190,9 @@ paths:
x-codegen-request-body-name: body
/api/v1/monitor/{monitor_id}/downtimes:
get:
description: Get all active downtimes for the specified monitor.
deprecated: true
description: Get all active v1 downtimes for the specified monitor. **Note:**
This endpoint has been deprecated. Please use v2 endpoints.
operationId: ListMonitorDowntimes
parameters:
- description: The id of the monitor
Expand Down
28 changes: 21 additions & 7 deletions api/datadogV1/api_downtimes.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ import (
type DowntimesApi datadog.Service

// CancelDowntime Cancel a downtime.
// Cancel a downtime.
// Cancel a downtime. **Note:** This endpoint has been deprecated. Please use v2 endpoints.
//
// Deprecated: This API is deprecated.
func (a *DowntimesApi) CancelDowntime(ctx _context.Context, downtimeId int64) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodDelete
Expand Down Expand Up @@ -78,7 +80,9 @@ func (a *DowntimesApi) CancelDowntime(ctx _context.Context, downtimeId int64) (*
}

// CancelDowntimesByScope Cancel downtimes by scope.
// Delete all downtimes that match the scope of `X`.
// Delete all downtimes that match the scope of `X`. **Note:** This only interacts with Downtimes created using v1 endpoints. This endpoint has been deprecated and will not be replaced. Please use v2 endpoints to find and cancel downtimes.
//
// Deprecated: This API is deprecated.
func (a *DowntimesApi) CancelDowntimesByScope(ctx _context.Context, body CancelDowntimesByScopeRequest) (CanceledDowntimesIds, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
Expand Down Expand Up @@ -151,7 +155,9 @@ func (a *DowntimesApi) CancelDowntimesByScope(ctx _context.Context, body CancelD
}

// CreateDowntime Schedule a downtime.
// Schedule a downtime.
// Schedule a downtime. **Note:** This endpoint has been deprecated. Please use v2 endpoints.
//
// Deprecated: This API is deprecated.
func (a *DowntimesApi) CreateDowntime(ctx _context.Context, body Downtime) (Downtime, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
Expand Down Expand Up @@ -224,7 +230,9 @@ func (a *DowntimesApi) CreateDowntime(ctx _context.Context, body Downtime) (Down
}

// GetDowntime Get a downtime.
// Get downtime detail by `downtime_id`.
// Get downtime detail by `downtime_id`. **Note:** This endpoint has been deprecated. Please use v2 endpoints.
//
// Deprecated: This API is deprecated.
func (a *DowntimesApi) GetDowntime(ctx _context.Context, downtimeId int64) (Downtime, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
Expand Down Expand Up @@ -319,7 +327,9 @@ func (r *ListDowntimesOptionalParameters) WithWithCreator(withCreator bool) *Lis
}

// ListDowntimes Get all downtimes.
// Get all scheduled downtimes.
// Get all scheduled downtimes. **Note:** This endpoint has been deprecated. Please use v2 endpoints.
//
// Deprecated: This API is deprecated.
func (a *DowntimesApi) ListDowntimes(ctx _context.Context, o ...ListDowntimesOptionalParameters) ([]Downtime, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
Expand Down Expand Up @@ -403,7 +413,9 @@ func (a *DowntimesApi) ListDowntimes(ctx _context.Context, o ...ListDowntimesOpt
}

// ListMonitorDowntimes Get active downtimes for a monitor.
// Get all active downtimes for the specified monitor.
// Get all active v1 downtimes for the specified monitor. **Note:** This endpoint has been deprecated. Please use v2 endpoints.
//
// Deprecated: This API is deprecated.
func (a *DowntimesApi) ListMonitorDowntimes(ctx _context.Context, monitorId int64) ([]Downtime, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
Expand Down Expand Up @@ -474,7 +486,9 @@ func (a *DowntimesApi) ListMonitorDowntimes(ctx _context.Context, monitorId int6
}

// UpdateDowntime Update a downtime.
// Update a single downtime by `downtime_id`.
// Update a single downtime by `downtime_id`. **Note:** This endpoint has been deprecated. Please use v2 endpoints.
//
// Deprecated: This API is deprecated.
func (a *DowntimesApi) UpdateDowntime(ctx _context.Context, downtimeId int64, body Downtime) (Downtime, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
Expand Down
Loading