Skip to content

Commit 7dcb01a

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-specskarimo
authored
Add v2 endpoints for Opsgenie Integration (#1021)
* Regenerate client from commit a5080035 of spec repo * pre-commit fixes Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: skarimo <[email protected]>
1 parent 76802a2 commit 7dcb01a

29 files changed

+1617
-4
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.2",
7-
"regenerated": "2022-06-07 09:27:01.673760",
8-
"spec_repo_commit": "3e311663"
7+
"regenerated": "2022-06-07 17:15:35.537573",
8+
"spec_repo_commit": "a5080035"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.2",
12-
"regenerated": "2022-06-07 09:27:01.690798",
13-
"spec_repo_commit": "3e311663"
12+
"regenerated": "2022-06-07 17:15:35.551177",
13+
"spec_repo_commit": "a5080035"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 334 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,13 @@ components:
224224
required: true
225225
schema:
226226
type: string
227+
OpsgenieServiceIDPathParameter:
228+
description: The UUID of the service.
229+
in: path
230+
name: integration_service_id
231+
required: true
232+
schema:
233+
type: string
227234
PageNumber:
228235
description: Specific page number to return.
229236
in: query
@@ -4510,6 +4517,174 @@ components:
45104517
- id
45114518
- type
45124519
type: object
4520+
OpsgenieServiceCreateAttributes:
4521+
description: The Opsgenie service attributes for a create request.
4522+
properties:
4523+
custom_url:
4524+
description: The custom URL for a custom region.
4525+
example: https://example.com
4526+
type: string
4527+
name:
4528+
description: The name for the Opsgenie service.
4529+
example: fake-opsgenie-service-name
4530+
type: string
4531+
opsgenie_api_key:
4532+
description: The Opsgenie API key for your Opsgenie service.
4533+
example: 00000000-0000-0000-0000-000000000000
4534+
type: string
4535+
region:
4536+
$ref: '#/components/schemas/OpsgenieServiceRegionType'
4537+
required:
4538+
- name
4539+
- opsgenie_api_key
4540+
- region
4541+
type: object
4542+
OpsgenieServiceCreateData:
4543+
description: Opsgenie service data for a create request.
4544+
properties:
4545+
attributes:
4546+
$ref: '#/components/schemas/OpsgenieServiceCreateAttributes'
4547+
type:
4548+
$ref: '#/components/schemas/OpsgenieServiceType'
4549+
required:
4550+
- type
4551+
- attributes
4552+
type: object
4553+
OpsgenieServiceCreateRequest:
4554+
description: Create request for an Opsgenie service.
4555+
properties:
4556+
data:
4557+
$ref: '#/components/schemas/OpsgenieServiceCreateData'
4558+
required:
4559+
- data
4560+
type: object
4561+
OpsgenieServiceRegionType:
4562+
description: The region for the Opsgenie service.
4563+
enum:
4564+
- us
4565+
- eu
4566+
- custom
4567+
example: us
4568+
type: string
4569+
x-enum-varnames:
4570+
- US
4571+
- EU
4572+
- CUSTOM
4573+
OpsgenieServiceResponse:
4574+
description: Response of an Opsgenie service.
4575+
properties:
4576+
data:
4577+
$ref: '#/components/schemas/OpsgenieServiceResponseData'
4578+
required:
4579+
- data
4580+
type: object
4581+
OpsgenieServiceResponseAttributes:
4582+
description: The attributes from an Opsgenie service response.
4583+
properties:
4584+
custom_url:
4585+
description: The custom URL for a custom region.
4586+
example: https://example.com
4587+
nullable: true
4588+
type: string
4589+
name:
4590+
description: The name for the Opsgenie service.
4591+
example: fake-opsgenie-service-name
4592+
type: string
4593+
region:
4594+
$ref: '#/components/schemas/OpsgenieServiceRegionType'
4595+
type: object
4596+
OpsgenieServiceResponseData:
4597+
description: Opsgenie service data from a response.
4598+
properties:
4599+
attributes:
4600+
$ref: '#/components/schemas/OpsgenieServiceResponseAttributes'
4601+
id:
4602+
description: The ID of the Opsgenie service.
4603+
example: 596da4af-0563-4097-90ff-07230c3f9db3
4604+
type: string
4605+
type:
4606+
$ref: '#/components/schemas/OpsgenieServiceType'
4607+
required:
4608+
- id
4609+
- type
4610+
- attributes
4611+
type: object
4612+
OpsgenieServiceType:
4613+
default: opsgenie-service
4614+
description: Opsgenie service resource type.
4615+
enum:
4616+
- opsgenie-service
4617+
example: opsgenie-service
4618+
type: string
4619+
x-enum-varnames:
4620+
- OPSGENIE_SERVICE
4621+
OpsgenieServiceUpdateAttributes:
4622+
description: The Opsgenie service attributes for an update request.
4623+
properties:
4624+
custom_url:
4625+
description: The custom URL for a custom region.
4626+
example: https://example.com
4627+
nullable: true
4628+
type: string
4629+
name:
4630+
description: The name for the Opsgenie service.
4631+
example: fake-opsgenie-service-name
4632+
type: string
4633+
opsgenie_api_key:
4634+
description: The Opsgenie API key for your Opsgenie service.
4635+
example: 00000000-0000-0000-0000-000000000000
4636+
type: string
4637+
region:
4638+
$ref: '#/components/schemas/OpsgenieServiceRegionType'
4639+
type: object
4640+
OpsgenieServiceUpdateData:
4641+
description: Opsgenie service for an update request.
4642+
properties:
4643+
attributes:
4644+
$ref: '#/components/schemas/OpsgenieServiceUpdateAttributes'
4645+
id:
4646+
description: The ID of the Opsgenie service.
4647+
example: 596da4af-0563-4097-90ff-07230c3f9db3
4648+
type: string
4649+
type:
4650+
$ref: '#/components/schemas/OpsgenieServiceType'
4651+
required:
4652+
- id
4653+
- type
4654+
- attributes
4655+
type: object
4656+
OpsgenieServiceUpdateRequest:
4657+
description: Update request for an Opsgenie service.
4658+
properties:
4659+
data:
4660+
$ref: '#/components/schemas/OpsgenieServiceUpdateData'
4661+
required:
4662+
- data
4663+
type: object
4664+
OpsgenieServicesResponse:
4665+
description: Response with a list of Opsgenie services.
4666+
properties:
4667+
data:
4668+
description: An array of Opsgenie services.
4669+
example:
4670+
- attributes:
4671+
custom_url: null
4672+
name: fake-opsgenie-service-name
4673+
region: us
4674+
id: 596da4af-0563-4097-90ff-07230c3f9db3
4675+
type: opsgenie-service
4676+
- attributes:
4677+
custom_url: null
4678+
name: fake-opsgenie-service-name-2
4679+
region: eu
4680+
id: 0d2937f1-b561-44fa-914a-99910f848014
4681+
type: opsgenie-service
4682+
items:
4683+
$ref: '#/components/schemas/OpsgenieServiceResponseData'
4684+
type: array
4685+
required:
4686+
- data
4687+
type: object
45134688
Organization:
45144689
description: Organization object.
45154690
properties:
@@ -8512,6 +8687,159 @@ paths:
85128687
x-unstable: '**Note**: This endpoint is in public beta.
85138688
85148689
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
8690+
/api/v2/integration/opsgenie/services:
8691+
get:
8692+
description: Get a list of all services from the Datadog Opsgenie integration.
8693+
operationId: ListOpsgenieServices
8694+
responses:
8695+
'200':
8696+
content:
8697+
application/json:
8698+
schema:
8699+
$ref: '#/components/schemas/OpsgenieServicesResponse'
8700+
description: OK
8701+
'403':
8702+
$ref: '#/components/responses/ForbiddenResponse'
8703+
'429':
8704+
$ref: '#/components/responses/TooManyRequestsResponse'
8705+
summary: Get all service objects
8706+
tags:
8707+
- Opsgenie Integration
8708+
x-menu-order: 1
8709+
x-undo:
8710+
type: safe
8711+
post:
8712+
description: Create a new service object in the Opsgenie integration.
8713+
operationId: CreateOpsgenieService
8714+
requestBody:
8715+
content:
8716+
application/json:
8717+
schema:
8718+
$ref: '#/components/schemas/OpsgenieServiceCreateRequest'
8719+
description: Opsgenie service payload
8720+
required: true
8721+
responses:
8722+
'201':
8723+
content:
8724+
application/json:
8725+
schema:
8726+
$ref: '#/components/schemas/OpsgenieServiceResponse'
8727+
description: CREATED
8728+
'400':
8729+
$ref: '#/components/responses/BadRequestResponse'
8730+
'403':
8731+
$ref: '#/components/responses/ForbiddenResponse'
8732+
'409':
8733+
$ref: '#/components/responses/ConflictResponse'
8734+
'429':
8735+
$ref: '#/components/responses/TooManyRequestsResponse'
8736+
summary: Create a new service object
8737+
tags:
8738+
- Opsgenie Integration
8739+
x-codegen-request-body-name: body
8740+
x-given:
8741+
opsgenie_service:
8742+
parameters:
8743+
- name: body
8744+
value: "{\n \"data\": {\n \"attributes\": {\n \"name\": \"{{
8745+
unique }}\",\n \"opsgenie_api_key\": \"00000000-0000-0000-0000-000000000000\",\n
8746+
\ \"region\": \"us\"\n },\n \"type\": \"opsgenie-service\"\n
8747+
\ }\n}"
8748+
step: there is a valid "opsgenie_service" in the system
8749+
x-menu-order: 2
8750+
x-undo:
8751+
operationId: DeleteOpsgenieService
8752+
parameters:
8753+
- name: integration_service_id
8754+
source: data.id
8755+
type: unsafe
8756+
/api/v2/integration/opsgenie/services/{integration_service_id}:
8757+
delete:
8758+
description: Delete a single service object in the Datadog Opsgenie integration.
8759+
operationId: DeleteOpsgenieService
8760+
parameters:
8761+
- $ref: '#/components/parameters/OpsgenieServiceIDPathParameter'
8762+
responses:
8763+
'204':
8764+
description: OK
8765+
'400':
8766+
$ref: '#/components/responses/BadRequestResponse'
8767+
'403':
8768+
$ref: '#/components/responses/ForbiddenResponse'
8769+
'404':
8770+
$ref: '#/components/responses/NotFoundResponse'
8771+
'429':
8772+
$ref: '#/components/responses/TooManyRequestsResponse'
8773+
summary: Delete a single service object
8774+
tags:
8775+
- Opsgenie Integration
8776+
x-menu-order: 5
8777+
x-undo:
8778+
type: idempotent
8779+
get:
8780+
description: Get a single service from the Datadog Opsgenie integration.
8781+
operationId: GetOpsgenieService
8782+
parameters:
8783+
- $ref: '#/components/parameters/OpsgenieServiceIDPathParameter'
8784+
responses:
8785+
'200':
8786+
content:
8787+
application/json:
8788+
schema:
8789+
$ref: '#/components/schemas/OpsgenieServiceResponse'
8790+
description: OK
8791+
'400':
8792+
$ref: '#/components/responses/BadRequestResponse'
8793+
'403':
8794+
$ref: '#/components/responses/ForbiddenResponse'
8795+
'404':
8796+
$ref: '#/components/responses/NotFoundResponse'
8797+
'409':
8798+
$ref: '#/components/responses/ConflictResponse'
8799+
'429':
8800+
$ref: '#/components/responses/TooManyRequestsResponse'
8801+
summary: Get a single service object
8802+
tags:
8803+
- Opsgenie Integration
8804+
x-menu-order: 3
8805+
x-undo:
8806+
type: safe
8807+
patch:
8808+
description: Update a single service object in the Datadog Opsgenie integration.
8809+
operationId: UpdateOpsgenieService
8810+
parameters:
8811+
- $ref: '#/components/parameters/OpsgenieServiceIDPathParameter'
8812+
requestBody:
8813+
content:
8814+
application/json:
8815+
schema:
8816+
$ref: '#/components/schemas/OpsgenieServiceUpdateRequest'
8817+
description: Opsgenie service payload.
8818+
required: true
8819+
responses:
8820+
'200':
8821+
content:
8822+
application/json:
8823+
schema:
8824+
$ref: '#/components/schemas/OpsgenieServiceResponse'
8825+
description: OK
8826+
'400':
8827+
$ref: '#/components/responses/BadRequestResponse'
8828+
'403':
8829+
$ref: '#/components/responses/ForbiddenResponse'
8830+
'404':
8831+
$ref: '#/components/responses/NotFoundResponse'
8832+
'409':
8833+
$ref: '#/components/responses/ConflictResponse'
8834+
'429':
8835+
$ref: '#/components/responses/TooManyRequestsResponse'
8836+
summary: Update a single service object
8837+
tags:
8838+
- Opsgenie Integration
8839+
x-codegen-request-body-name: body
8840+
x-menu-order: 4
8841+
x-undo:
8842+
type: idempotent
85158843
/api/v2/logs:
85168844
post:
85178845
description: 'Send your logs to your Datadog platform over HTTP. Limits per
@@ -13247,6 +13575,12 @@ tags:
1324713575
that set number.\n\nThe Post, Patch, and Delete `manage_tags` API methods can
1324813576
only be performed by\na user who has the `Manage Tags for Metrics` permission."
1324913577
name: Metrics
13578+
- description: 'Configure your [Datadog Opsgenie integration](https://docs.datadoghq.com/api/latest/opsgenie-integration)
13579+
13580+
directly through the Datadog API.'
13581+
externalDocs:
13582+
url: https://docs.datadoghq.com/api/latest/opsgenie-integration
13583+
name: Opsgenie Integration
1325013584
- description: Create, edit, and manage your organizations. Read more about [multi-org
1325113585
accounts](https://docs.datadoghq.com/account_management/multi_organization).
1325213586
externalDocs:

docs/datadog_api_client.v2.api.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,13 @@ metrics\_api
8585
:members:
8686
:show-inheritance:
8787

88+
opsgenie\_integration\_api
89+
--------------------------
90+
91+
.. automodule:: datadog_api_client.v2.api.opsgenie_integration_api
92+
:members:
93+
:show-inheritance:
94+
8895
organizations\_api
8996
------------------
9097

0 commit comments

Comments
 (0)