Skip to content

Commit

Permalink
Add v2 endpoints for Opsgenie Integration (#1021)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
3 people authored Jun 8, 2022
1 parent 76802a2 commit 7dcb01a
Show file tree
Hide file tree
Showing 29 changed files with 1,617 additions and 4 deletions.
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.2",
"regenerated": "2022-06-07 09:27:01.673760",
"spec_repo_commit": "3e311663"
"regenerated": "2022-06-07 17:15:35.537573",
"spec_repo_commit": "a5080035"
},
"v2": {
"apigentools_version": "1.6.2",
"regenerated": "2022-06-07 09:27:01.690798",
"spec_repo_commit": "3e311663"
"regenerated": "2022-06-07 17:15:35.551177",
"spec_repo_commit": "a5080035"
}
}
}
334 changes: 334 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,13 @@ components:
required: true
schema:
type: string
OpsgenieServiceIDPathParameter:
description: The UUID of the service.
in: path
name: integration_service_id
required: true
schema:
type: string
PageNumber:
description: Specific page number to return.
in: query
Expand Down Expand Up @@ -4510,6 +4517,174 @@ components:
- id
- type
type: object
OpsgenieServiceCreateAttributes:
description: The Opsgenie service attributes for a create request.
properties:
custom_url:
description: The custom URL for a custom region.
example: https://example.com
type: string
name:
description: The name for the Opsgenie service.
example: fake-opsgenie-service-name
type: string
opsgenie_api_key:
description: The Opsgenie API key for your Opsgenie service.
example: 00000000-0000-0000-0000-000000000000
type: string
region:
$ref: '#/components/schemas/OpsgenieServiceRegionType'
required:
- name
- opsgenie_api_key
- region
type: object
OpsgenieServiceCreateData:
description: Opsgenie service data for a create request.
properties:
attributes:
$ref: '#/components/schemas/OpsgenieServiceCreateAttributes'
type:
$ref: '#/components/schemas/OpsgenieServiceType'
required:
- type
- attributes
type: object
OpsgenieServiceCreateRequest:
description: Create request for an Opsgenie service.
properties:
data:
$ref: '#/components/schemas/OpsgenieServiceCreateData'
required:
- data
type: object
OpsgenieServiceRegionType:
description: The region for the Opsgenie service.
enum:
- us
- eu
- custom
example: us
type: string
x-enum-varnames:
- US
- EU
- CUSTOM
OpsgenieServiceResponse:
description: Response of an Opsgenie service.
properties:
data:
$ref: '#/components/schemas/OpsgenieServiceResponseData'
required:
- data
type: object
OpsgenieServiceResponseAttributes:
description: The attributes from an Opsgenie service response.
properties:
custom_url:
description: The custom URL for a custom region.
example: https://example.com
nullable: true
type: string
name:
description: The name for the Opsgenie service.
example: fake-opsgenie-service-name
type: string
region:
$ref: '#/components/schemas/OpsgenieServiceRegionType'
type: object
OpsgenieServiceResponseData:
description: Opsgenie service data from a response.
properties:
attributes:
$ref: '#/components/schemas/OpsgenieServiceResponseAttributes'
id:
description: The ID of the Opsgenie service.
example: 596da4af-0563-4097-90ff-07230c3f9db3
type: string
type:
$ref: '#/components/schemas/OpsgenieServiceType'
required:
- id
- type
- attributes
type: object
OpsgenieServiceType:
default: opsgenie-service
description: Opsgenie service resource type.
enum:
- opsgenie-service
example: opsgenie-service
type: string
x-enum-varnames:
- OPSGENIE_SERVICE
OpsgenieServiceUpdateAttributes:
description: The Opsgenie service attributes for an update request.
properties:
custom_url:
description: The custom URL for a custom region.
example: https://example.com
nullable: true
type: string
name:
description: The name for the Opsgenie service.
example: fake-opsgenie-service-name
type: string
opsgenie_api_key:
description: The Opsgenie API key for your Opsgenie service.
example: 00000000-0000-0000-0000-000000000000
type: string
region:
$ref: '#/components/schemas/OpsgenieServiceRegionType'
type: object
OpsgenieServiceUpdateData:
description: Opsgenie service for an update request.
properties:
attributes:
$ref: '#/components/schemas/OpsgenieServiceUpdateAttributes'
id:
description: The ID of the Opsgenie service.
example: 596da4af-0563-4097-90ff-07230c3f9db3
type: string
type:
$ref: '#/components/schemas/OpsgenieServiceType'
required:
- id
- type
- attributes
type: object
OpsgenieServiceUpdateRequest:
description: Update request for an Opsgenie service.
properties:
data:
$ref: '#/components/schemas/OpsgenieServiceUpdateData'
required:
- data
type: object
OpsgenieServicesResponse:
description: Response with a list of Opsgenie services.
properties:
data:
description: An array of Opsgenie services.
example:
- attributes:
custom_url: null
name: fake-opsgenie-service-name
region: us
id: 596da4af-0563-4097-90ff-07230c3f9db3
type: opsgenie-service
- attributes:
custom_url: null
name: fake-opsgenie-service-name-2
region: eu
id: 0d2937f1-b561-44fa-914a-99910f848014
type: opsgenie-service
items:
$ref: '#/components/schemas/OpsgenieServiceResponseData'
type: array
required:
- data
type: object
Organization:
description: Organization object.
properties:
Expand Down Expand Up @@ -8512,6 +8687,159 @@ paths:
x-unstable: '**Note**: This endpoint is in public beta.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/integration/opsgenie/services:
get:
description: Get a list of all services from the Datadog Opsgenie integration.
operationId: ListOpsgenieServices
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/OpsgenieServicesResponse'
description: OK
'403':
$ref: '#/components/responses/ForbiddenResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Get all service objects
tags:
- Opsgenie Integration
x-menu-order: 1
x-undo:
type: safe
post:
description: Create a new service object in the Opsgenie integration.
operationId: CreateOpsgenieService
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OpsgenieServiceCreateRequest'
description: Opsgenie service payload
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/OpsgenieServiceResponse'
description: CREATED
'400':
$ref: '#/components/responses/BadRequestResponse'
'403':
$ref: '#/components/responses/ForbiddenResponse'
'409':
$ref: '#/components/responses/ConflictResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Create a new service object
tags:
- Opsgenie Integration
x-codegen-request-body-name: body
x-given:
opsgenie_service:
parameters:
- name: body
value: "{\n \"data\": {\n \"attributes\": {\n \"name\": \"{{
unique }}\",\n \"opsgenie_api_key\": \"00000000-0000-0000-0000-000000000000\",\n
\ \"region\": \"us\"\n },\n \"type\": \"opsgenie-service\"\n
\ }\n}"
step: there is a valid "opsgenie_service" in the system
x-menu-order: 2
x-undo:
operationId: DeleteOpsgenieService
parameters:
- name: integration_service_id
source: data.id
type: unsafe
/api/v2/integration/opsgenie/services/{integration_service_id}:
delete:
description: Delete a single service object in the Datadog Opsgenie integration.
operationId: DeleteOpsgenieService
parameters:
- $ref: '#/components/parameters/OpsgenieServiceIDPathParameter'
responses:
'204':
description: OK
'400':
$ref: '#/components/responses/BadRequestResponse'
'403':
$ref: '#/components/responses/ForbiddenResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Delete a single service object
tags:
- Opsgenie Integration
x-menu-order: 5
x-undo:
type: idempotent
get:
description: Get a single service from the Datadog Opsgenie integration.
operationId: GetOpsgenieService
parameters:
- $ref: '#/components/parameters/OpsgenieServiceIDPathParameter'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/OpsgenieServiceResponse'
description: OK
'400':
$ref: '#/components/responses/BadRequestResponse'
'403':
$ref: '#/components/responses/ForbiddenResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'409':
$ref: '#/components/responses/ConflictResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Get a single service object
tags:
- Opsgenie Integration
x-menu-order: 3
x-undo:
type: safe
patch:
description: Update a single service object in the Datadog Opsgenie integration.
operationId: UpdateOpsgenieService
parameters:
- $ref: '#/components/parameters/OpsgenieServiceIDPathParameter'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OpsgenieServiceUpdateRequest'
description: Opsgenie service payload.
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/OpsgenieServiceResponse'
description: OK
'400':
$ref: '#/components/responses/BadRequestResponse'
'403':
$ref: '#/components/responses/ForbiddenResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'409':
$ref: '#/components/responses/ConflictResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Update a single service object
tags:
- Opsgenie Integration
x-codegen-request-body-name: body
x-menu-order: 4
x-undo:
type: idempotent
/api/v2/logs:
post:
description: 'Send your logs to your Datadog platform over HTTP. Limits per
Expand Down Expand Up @@ -13247,6 +13575,12 @@ tags:
that set number.\n\nThe Post, Patch, and Delete `manage_tags` API methods can
only be performed by\na user who has the `Manage Tags for Metrics` permission."
name: Metrics
- description: 'Configure your [Datadog Opsgenie integration](https://docs.datadoghq.com/api/latest/opsgenie-integration)
directly through the Datadog API.'
externalDocs:
url: https://docs.datadoghq.com/api/latest/opsgenie-integration
name: Opsgenie Integration
- description: Create, edit, and manage your organizations. Read more about [multi-org
accounts](https://docs.datadoghq.com/account_management/multi_organization).
externalDocs:
Expand Down
7 changes: 7 additions & 0 deletions docs/datadog_api_client.v2.api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ metrics\_api
:members:
:show-inheritance:

opsgenie\_integration\_api
--------------------------

.. automodule:: datadog_api_client.v2.api.opsgenie_integration_api
:members:
:show-inheritance:

organizations\_api
------------------

Expand Down
Loading

0 comments on commit 7dcb01a

Please sign in to comment.