Skip to content

Commit 87ec524

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 1b048cb of spec repo
1 parent 2f4a7ce commit 87ec524

File tree

11 files changed

+1273
-0
lines changed

11 files changed

+1273
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 253 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17289,6 +17289,76 @@ components:
1728917289
- score
1729017290
- severity
1729117291
type: object
17292+
Email:
17293+
description: On-Call User Email.
17294+
example:
17295+
data:
17296+
attributes:
17297+
active: true
17298+
17299+
alias: ''
17300+
blocked: false
17301+
created_at: '2024-04-16T23:38:50.388642Z'
17302+
formats:
17303+
- html
17304+
modified_at: '2024-04-16T23:38:50.388642Z'
17305+
id: 45cd9fe5-dd96-42ad-83de-2242ea9f6efd
17306+
type: emails
17307+
properties:
17308+
data:
17309+
$ref: '#/components/schemas/EmailData'
17310+
type: object
17311+
EmailAttributes:
17312+
description: Attributes for an on-call email.
17313+
properties:
17314+
active:
17315+
description: Whether the email is currently active.
17316+
type: boolean
17317+
address:
17318+
description: Email address.
17319+
type: string
17320+
alias:
17321+
description: Optional display alias for the email.
17322+
type: string
17323+
blocked:
17324+
description: Whether the email is blocked.
17325+
type: boolean
17326+
created_at:
17327+
description: Creation time of the email resource.
17328+
format: date-time
17329+
type: string
17330+
formats:
17331+
description: Preferred content formats for notifications.
17332+
items:
17333+
type: string
17334+
type: array
17335+
modified_at:
17336+
description: Last modification time of the email resource.
17337+
format: date-time
17338+
type: string
17339+
type: object
17340+
EmailData:
17341+
description: Data for an on-call email resource.
17342+
properties:
17343+
attributes:
17344+
$ref: '#/components/schemas/EmailAttributes'
17345+
id:
17346+
description: The email's unique identifier.
17347+
type: string
17348+
type:
17349+
$ref: '#/components/schemas/EmailType'
17350+
required:
17351+
- type
17352+
type: object
17353+
EmailType:
17354+
default: emails
17355+
description: Indicates that the resource is of type 'emails'.
17356+
enum:
17357+
- emails
17358+
example: emails
17359+
type: string
17360+
x-enum-varnames:
17361+
- EMAILS
1729217362
Enabled:
1729317363
description: Field used to enable or disable the rule.
1729417364
example: true
@@ -70837,6 +70907,189 @@ paths:
7083770907
operator: AND
7083870908
permissions:
7083970909
- on_call_write
70910+
/api/v2/on-call/users/{user_id}/notification-channels/emails:
70911+
post:
70912+
description: Create a new email notification channel for an on-call user
70913+
operationId: CreateUserEmailNotificationChannel
70914+
parameters:
70915+
- description: The user ID
70916+
in: path
70917+
name: user_id
70918+
required: true
70919+
schema:
70920+
example: 00000000-0000-0000-0000-000000000000
70921+
type: string
70922+
requestBody:
70923+
content:
70924+
application/json:
70925+
schema:
70926+
$ref: '#/components/schemas/Email'
70927+
required: true
70928+
responses:
70929+
'201':
70930+
description: Created
70931+
'400':
70932+
$ref: '#/components/responses/BadRequestResponse'
70933+
'401':
70934+
$ref: '#/components/responses/UnauthorizedResponse'
70935+
'403':
70936+
$ref: '#/components/responses/ForbiddenResponse'
70937+
'404':
70938+
$ref: '#/components/responses/NotFoundResponse'
70939+
'429':
70940+
$ref: '#/components/responses/TooManyRequestsResponse'
70941+
security:
70942+
- apiKeyAuth: []
70943+
appKeyAuth: []
70944+
- AuthZ: []
70945+
summary: Create email notification channel for user
70946+
tags:
70947+
- On-Call
70948+
x-permission:
70949+
operator: AND
70950+
permissions:
70951+
- on_call_admin
70952+
/api/v2/on-call/users/{user_id}/notification-channels/emails/{email_id}:
70953+
delete:
70954+
description: Delete an email notification channel for an on-call user
70955+
operationId: DeleteUserEmailNotificationChannel
70956+
parameters:
70957+
- description: The user ID
70958+
in: path
70959+
name: user_id
70960+
required: true
70961+
schema:
70962+
example: 00000000-0000-0000-0000-000000000000
70963+
type: string
70964+
- description: The email ID
70965+
in: path
70966+
name: email_id
70967+
required: true
70968+
schema:
70969+
example: 45bb8fe5-dd96-42ad-83de-2241ea9f6ffc
70970+
type: string
70971+
responses:
70972+
'204':
70973+
description: No Content
70974+
'400':
70975+
$ref: '#/components/responses/BadRequestResponse'
70976+
'401':
70977+
$ref: '#/components/responses/UnauthorizedResponse'
70978+
'403':
70979+
$ref: '#/components/responses/ForbiddenResponse'
70980+
'404':
70981+
$ref: '#/components/responses/NotFoundResponse'
70982+
'429':
70983+
$ref: '#/components/responses/TooManyRequestsResponse'
70984+
security:
70985+
- apiKeyAuth: []
70986+
appKeyAuth: []
70987+
- AuthZ: []
70988+
summary: Delete email notification channel
70989+
tags:
70990+
- On-Call
70991+
x-permission:
70992+
operator: AND
70993+
permissions:
70994+
- on_call_admin
70995+
get:
70996+
description: Get an email notification channel for an on-call user
70997+
operationId: GetUserEmailNotificationChannel
70998+
parameters:
70999+
- description: The user ID
71000+
in: path
71001+
name: user_id
71002+
required: true
71003+
schema:
71004+
example: 00000000-0000-0000-0000-000000000000
71005+
type: string
71006+
- description: The email ID
71007+
in: path
71008+
name: email_id
71009+
required: true
71010+
schema:
71011+
example: 45bb8fe5-dd96-42ad-83de-2241ea9f6ffc
71012+
type: string
71013+
responses:
71014+
'200':
71015+
content:
71016+
application/json:
71017+
schema:
71018+
$ref: '#/components/schemas/Email'
71019+
description: OK
71020+
'400':
71021+
$ref: '#/components/responses/BadRequestResponse'
71022+
'401':
71023+
$ref: '#/components/responses/UnauthorizedResponse'
71024+
'403':
71025+
$ref: '#/components/responses/ForbiddenResponse'
71026+
'404':
71027+
$ref: '#/components/responses/NotFoundResponse'
71028+
'429':
71029+
$ref: '#/components/responses/TooManyRequestsResponse'
71030+
security:
71031+
- apiKeyAuth: []
71032+
appKeyAuth: []
71033+
- AuthZ: []
71034+
summary: Get email notification channel
71035+
tags:
71036+
- On-Call
71037+
x-permission:
71038+
operator: AND
71039+
permissions:
71040+
- on_call_admin
71041+
put:
71042+
description: Update an email notification channel for an on-call user
71043+
operationId: UpdateUserEmailNotificationChannel
71044+
parameters:
71045+
- description: The user ID
71046+
in: path
71047+
name: user_id
71048+
required: true
71049+
schema:
71050+
example: 00000000-0000-0000-0000-000000000000
71051+
type: string
71052+
- description: The email ID
71053+
in: path
71054+
name: email_id
71055+
required: true
71056+
schema:
71057+
example: 45bb8fe5-dd96-42ad-83de-2241ea9f6ffc
71058+
type: string
71059+
requestBody:
71060+
content:
71061+
application/json:
71062+
schema:
71063+
$ref: '#/components/schemas/Email'
71064+
required: true
71065+
responses:
71066+
'200':
71067+
content:
71068+
application/json:
71069+
schema:
71070+
$ref: '#/components/schemas/Email'
71071+
description: OK
71072+
'400':
71073+
$ref: '#/components/responses/BadRequestResponse'
71074+
'401':
71075+
$ref: '#/components/responses/UnauthorizedResponse'
71076+
'403':
71077+
$ref: '#/components/responses/ForbiddenResponse'
71078+
'404':
71079+
$ref: '#/components/responses/NotFoundResponse'
71080+
'429':
71081+
$ref: '#/components/responses/TooManyRequestsResponse'
71082+
security:
71083+
- apiKeyAuth: []
71084+
appKeyAuth: []
71085+
- AuthZ: []
71086+
summary: Update email notification channel
71087+
tags:
71088+
- On-Call
71089+
x-permission:
71090+
operator: AND
71091+
permissions:
71092+
- on_call_admin
7084071093
/api/v2/org_configs:
7084171094
get:
7084271095
description: Returns all Org Configs (name, description, and value).

features/v2/on-call.feature

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,30 @@ Feature: On-Call
4343
When the request is sent
4444
Then the response status is 201 Created
4545

46+
@generated @skip @team:DataDog/on-call
47+
Scenario: Create email notification channel for user returns "Bad Request" response
48+
Given new "CreateUserEmailNotificationChannel" request
49+
And request contains "user_id" parameter from "REPLACE.ME"
50+
And body with value {"data": {"attributes": {"active": true, "address": "[email protected]", "alias": "", "blocked": false, "created_at": "2024-04-16T23:38:50.388642Z", "formats": ["html"], "modified_at": "2024-04-16T23:38:50.388642Z"}, "id": "45cd9fe5-dd96-42ad-83de-2242ea9f6efd", "type": "emails"}}
51+
When the request is sent
52+
Then the response status is 400 Bad Request
53+
54+
@generated @skip @team:DataDog/on-call
55+
Scenario: Create email notification channel for user returns "Created" response
56+
Given new "CreateUserEmailNotificationChannel" request
57+
And request contains "user_id" parameter from "REPLACE.ME"
58+
And body with value {"data": {"attributes": {"active": true, "address": "[email protected]", "alias": "", "blocked": false, "created_at": "2024-04-16T23:38:50.388642Z", "formats": ["html"], "modified_at": "2024-04-16T23:38:50.388642Z"}, "id": "45cd9fe5-dd96-42ad-83de-2242ea9f6efd", "type": "emails"}}
59+
When the request is sent
60+
Then the response status is 201 Created
61+
62+
@generated @skip @team:DataDog/on-call
63+
Scenario: Create email notification channel for user returns "Not Found" response
64+
Given new "CreateUserEmailNotificationChannel" request
65+
And request contains "user_id" parameter from "REPLACE.ME"
66+
And body with value {"data": {"attributes": {"active": true, "address": "[email protected]", "alias": "", "blocked": false, "created_at": "2024-04-16T23:38:50.388642Z", "formats": ["html"], "modified_at": "2024-04-16T23:38:50.388642Z"}, "id": "45cd9fe5-dd96-42ad-83de-2242ea9f6efd", "type": "emails"}}
67+
When the request is sent
68+
Then the response status is 404 Not Found
69+
4670
@team:DataDog/on-call
4771
Scenario: Delete On-Call escalation policy returns "No Content" response
4872
Given new "DeleteOnCallEscalationPolicy" request
@@ -77,6 +101,30 @@ Feature: On-Call
77101
When the request is sent
78102
Then the response status is 404 Not Found
79103

104+
@generated @skip @team:DataDog/on-call
105+
Scenario: Delete email notification channel returns "Bad Request" response
106+
Given new "DeleteUserEmailNotificationChannel" request
107+
And request contains "user_id" parameter from "REPLACE.ME"
108+
And request contains "email_id" parameter from "REPLACE.ME"
109+
When the request is sent
110+
Then the response status is 400 Bad Request
111+
112+
@generated @skip @team:DataDog/on-call
113+
Scenario: Delete email notification channel returns "No Content" response
114+
Given new "DeleteUserEmailNotificationChannel" request
115+
And request contains "user_id" parameter from "REPLACE.ME"
116+
And request contains "email_id" parameter from "REPLACE.ME"
117+
When the request is sent
118+
Then the response status is 204 No Content
119+
120+
@generated @skip @team:DataDog/on-call
121+
Scenario: Delete email notification channel returns "Not Found" response
122+
Given new "DeleteUserEmailNotificationChannel" request
123+
And request contains "user_id" parameter from "REPLACE.ME"
124+
And request contains "email_id" parameter from "REPLACE.ME"
125+
When the request is sent
126+
Then the response status is 404 Not Found
127+
80128
@generated @skip @team:DataDog/on-call
81129
Scenario: Get On-Call escalation policy returns "Bad Request" response
82130
Given new "GetOnCallEscalationPolicy" request
@@ -126,6 +174,30 @@ Feature: On-Call
126174
When the request is sent
127175
Then the response status is 200 OK
128176

177+
@generated @skip @team:DataDog/on-call
178+
Scenario: Get email notification channel returns "Bad Request" response
179+
Given new "GetUserEmailNotificationChannel" request
180+
And request contains "user_id" parameter from "REPLACE.ME"
181+
And request contains "email_id" parameter from "REPLACE.ME"
182+
When the request is sent
183+
Then the response status is 400 Bad Request
184+
185+
@generated @skip @team:DataDog/on-call
186+
Scenario: Get email notification channel returns "Not Found" response
187+
Given new "GetUserEmailNotificationChannel" request
188+
And request contains "user_id" parameter from "REPLACE.ME"
189+
And request contains "email_id" parameter from "REPLACE.ME"
190+
When the request is sent
191+
Then the response status is 404 Not Found
192+
193+
@generated @skip @team:DataDog/on-call
194+
Scenario: Get email notification channel returns "OK" response
195+
Given new "GetUserEmailNotificationChannel" request
196+
And request contains "user_id" parameter from "REPLACE.ME"
197+
And request contains "email_id" parameter from "REPLACE.ME"
198+
When the request is sent
199+
Then the response status is 200 OK
200+
129201
@generated @skip @team:DataDog/on-call
130202
Scenario: Get team on-call users returns "Bad Request" response
131203
Given new "GetTeamOnCallUsers" request
@@ -243,3 +315,30 @@ Feature: On-Call
243315
And body with value {"data": { "id": "{{ schedule.data.id }}", "attributes": {"layers": [{"id": "{{ schedule.data.relationships.layers.data[0].id }}" , "effective_date": "{{ timeISO('now - 10d') }}", "end_date": "{{ timeISO('now + 10d') }}", "interval": {"seconds": 3600}, "members": [{"user": {"id": "{{user.data.id}}"}}], "name": "Layer 1", "restrictions": [{"end_day": "friday", "end_time": "17:00:00", "start_day": "monday", "start_time": "09:00:00"}], "rotation_start": "{{ timeISO('now - 5d') }}"}], "name": "{{ unique }}", "time_zone": "America/New_York"}, "relationships": {"teams": {"data": [{"id": "{{dd_team.data.id}}", "type": "teams"}]}}, "type": "schedules"}}
244316
When the request is sent
245317
Then the response status is 200 OK
318+
319+
@generated @skip @team:DataDog/on-call
320+
Scenario: Update email notification channel returns "Bad Request" response
321+
Given new "UpdateUserEmailNotificationChannel" request
322+
And request contains "user_id" parameter from "REPLACE.ME"
323+
And request contains "email_id" parameter from "REPLACE.ME"
324+
And body with value {"data": {"attributes": {"active": true, "address": "[email protected]", "alias": "", "blocked": false, "created_at": "2024-04-16T23:38:50.388642Z", "formats": ["html"], "modified_at": "2024-04-16T23:38:50.388642Z"}, "id": "45cd9fe5-dd96-42ad-83de-2242ea9f6efd", "type": "emails"}}
325+
When the request is sent
326+
Then the response status is 400 Bad Request
327+
328+
@generated @skip @team:DataDog/on-call
329+
Scenario: Update email notification channel returns "Not Found" response
330+
Given new "UpdateUserEmailNotificationChannel" request
331+
And request contains "user_id" parameter from "REPLACE.ME"
332+
And request contains "email_id" parameter from "REPLACE.ME"
333+
And body with value {"data": {"attributes": {"active": true, "address": "[email protected]", "alias": "", "blocked": false, "created_at": "2024-04-16T23:38:50.388642Z", "formats": ["html"], "modified_at": "2024-04-16T23:38:50.388642Z"}, "id": "45cd9fe5-dd96-42ad-83de-2242ea9f6efd", "type": "emails"}}
334+
When the request is sent
335+
Then the response status is 404 Not Found
336+
337+
@generated @skip @team:DataDog/on-call
338+
Scenario: Update email notification channel returns "OK" response
339+
Given new "UpdateUserEmailNotificationChannel" request
340+
And request contains "user_id" parameter from "REPLACE.ME"
341+
And request contains "email_id" parameter from "REPLACE.ME"
342+
And body with value {"data": {"attributes": {"active": true, "address": "[email protected]", "alias": "", "blocked": false, "created_at": "2024-04-16T23:38:50.388642Z", "formats": ["html"], "modified_at": "2024-04-16T23:38:50.388642Z"}, "id": "45cd9fe5-dd96-42ad-83de-2242ea9f6efd", "type": "emails"}}
343+
When the request is sent
344+
Then the response status is 200 OK

0 commit comments

Comments
 (0)