Skip to content

Commit 2e2f611

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 5b5e690 of spec repo
1 parent 8eb7535 commit 2e2f611

File tree

8 files changed

+97
-10
lines changed

8 files changed

+97
-10
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17455,6 +17455,12 @@ components:
1745517455
format: date-time
1745617456
readOnly: true
1745717457
type: string
17458+
date_last_used:
17459+
description: Date the API Key was last used
17460+
example: '2020-11-27T10:00:00.000Z'
17461+
format: date-time
17462+
readOnly: true
17463+
type: string
1745817464
key:
1745917465
description: The API key.
1746017466
readOnly: true
@@ -17513,6 +17519,13 @@ components:
1751317519
minLength: 4
1751417520
readOnly: true
1751517521
type: string
17522+
last_used_at:
17523+
description: Last usage timestamp of the application key.
17524+
example: '2020-12-20T10:00:00.000Z'
17525+
format: date-time
17526+
nullable: true
17527+
readOnly: true
17528+
type: string
1751617529
name:
1751717530
description: Name of the application key.
1751817531
example: Application Key for managing dashboards
@@ -32380,6 +32393,12 @@ components:
3238032393
example: '2020-11-23T10:00:00.000Z'
3238132394
readOnly: true
3238232395
type: string
32396+
date_last_used:
32397+
description: Date the API Key was last used.
32398+
example: '2020-11-27T10:00:00.000Z'
32399+
format: date-time
32400+
readOnly: true
32401+
type: string
3238332402
last4:
3238432403
description: The last four characters of the API key.
3238532404
example: abcd
@@ -32428,6 +32447,12 @@ components:
3242832447
minLength: 4
3242932448
readOnly: true
3243032449
type: string
32450+
last_used_at:
32451+
description: Last usage timestamp of the application key.
32452+
example: '2020-12-20T10:00:00.000Z'
32453+
nullable: true
32454+
readOnly: true
32455+
type: string
3243132456
name:
3243232457
description: Name of the application key.
3243332458
example: Application Key for managing dashboards

features/v2/key_management.feature

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,10 @@ Feature: Key Management
182182
And the response "data.id" is equal to "{{ application_key.data.id }}"
183183
And the response "data.attributes.name" is equal to "{{ application_key.data.attributes.name }}-updated"
184184

185-
@generated @skip @team:DataDog/credentials-management
185+
@team:DataDog/credentials-management
186186
Scenario: Get API key returns "Not Found" response
187187
Given new "GetAPIKey" request
188-
And request contains "api_key_id" parameter from "REPLACE.ME"
188+
And request contains "api_key_id" parameter with value "invalidId"
189189
When the request is sent
190190
Then the response status is 404 Not Found
191191

@@ -198,8 +198,9 @@ Feature: Key Management
198198
Then the response status is 200 OK
199199
And the response "data.type" is equal to "api_keys"
200200
And the response "data.id" is equal to "{{ api_key.data.id }}"
201+
And the response "data.attributes" has field "date_last_used"
201202

202-
@generated @skip @team:DataDog/credentials-management
203+
@team:DataDog/credentials-management
203204
Scenario: Get all API keys returns "Bad Request" response
204205
Given new "ListAPIKeys" request
205206
When the request is sent
@@ -213,6 +214,7 @@ Feature: Key Management
213214
When the request is sent
214215
Then the response status is 200 OK
215216
And the response "data[0].type" is equal to "api_keys"
217+
And the response "data[0].attributes" has field "date_last_used"
216218

217219
@generated @skip @team:DataDog/credentials-management
218220
Scenario: Get all application keys owned by current user returns "Bad Request" response
@@ -232,6 +234,7 @@ Feature: Key Management
232234
When the request is sent
233235
Then the response status is 200 OK
234236
And the response "data[0].type" is equal to "application_keys"
237+
And the response "data[0].attributes" has field "last_used_at"
235238

236239
@generated @skip @team:DataDog/credentials-management
237240
Scenario: Get all application keys returns "Bad Request" response
@@ -252,6 +255,7 @@ Feature: Key Management
252255
When the request is sent
253256
Then the response status is 200 OK
254257
And the response "data[0].type" is equal to "application_keys"
258+
And the response "data[0].attributes" has field "last_used_at"
255259

256260
@generated @skip @team:DataDog/credentials-management
257261
Scenario: Get an application key returns "Bad Request" response
@@ -260,10 +264,9 @@ Feature: Key Management
260264
When the request is sent
261265
Then the response status is 400 Bad Request
262266

263-
@generated @skip @team:DataDog/credentials-management
267+
@gteam:DataDog/credentials-management @team:DataDog/credentials-management
264268
Scenario: Get an application key returns "Not Found" response
265269
Given new "GetApplicationKey" request
266-
And request contains "app_key_id" parameter from "REPLACE.ME"
267270
When the request is sent
268271
Then the response status is 404 Not Found
269272

@@ -276,17 +279,24 @@ Feature: Key Management
276279
Then the response status is 200 OK
277280
And the response "data.type" is equal to "application_keys"
278281
And the response "data.id" has the same value as "application_key.data.id"
282+
And the response "data.attributes" has field "last_used_at"
279283

280-
@generated @skip @team:DataDog/credentials-management
284+
@team:DataDog/credentials-management
281285
Scenario: Get one application key owned by current user returns "Not Found" response
282286
Given new "GetCurrentUserApplicationKey" request
283-
And request contains "app_key_id" parameter from "REPLACE.ME"
287+
And request contains "app_key_id" parameter with value "incorrectId"
284288
When the request is sent
285289
Then the response status is 404 Not Found
286290

287-
@generated @skip @team:DataDog/credentials-management
291+
@team:DataDog/credentials-management
288292
Scenario: Get one application key owned by current user returns "OK" response
289-
Given new "GetCurrentUserApplicationKey" request
290-
And request contains "app_key_id" parameter from "REPLACE.ME"
293+
Given there is a valid "application_key" in the system
294+
And new "GetCurrentUserApplicationKey" request
295+
And request contains "app_key_id" parameter from "application_key.data.id"
291296
When the request is sent
292297
Then the response status is 200 OK
298+
And the response "data.type" is equal to "application_keys"
299+
And the response "data.id" is equal to "{{ application_key.data.id }}"
300+
And the response "data.attributes.name" is equal to "{{ application_key.data.attributes.name }}"
301+
And the response "data.attributes" has field "scopes"
302+
And the response "data.attributes" has field "last_used_at"

services/key_management/src/v2/models/FullAPIKeyAttributes.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ export class FullAPIKeyAttributes {
1212
* Creation date of the API key.
1313
*/
1414
"createdAt"?: Date;
15+
/**
16+
* Date the API Key was last used
17+
*/
18+
"dateLastUsed"?: Date;
1519
/**
1620
* The API key.
1721
*/
@@ -56,6 +60,11 @@ export class FullAPIKeyAttributes {
5660
type: "Date",
5761
format: "date-time",
5862
},
63+
dateLastUsed: {
64+
baseName: "date_last_used",
65+
type: "Date",
66+
format: "date-time",
67+
},
5968
key: {
6069
baseName: "key",
6170
type: "string",

services/key_management/src/v2/models/FullApplicationKeyAttributes.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ export class FullApplicationKeyAttributes {
1616
* The last four characters of the application key.
1717
*/
1818
"last4"?: string;
19+
/**
20+
* Last usage timestamp of the application key.
21+
*/
22+
"lastUsedAt"?: Date;
1923
/**
2024
* Name of the application key.
2125
*/
@@ -52,6 +56,11 @@ export class FullApplicationKeyAttributes {
5256
baseName: "last4",
5357
type: "string",
5458
},
59+
lastUsedAt: {
60+
baseName: "last_used_at",
61+
type: "Date",
62+
format: "date-time",
63+
},
5564
name: {
5665
baseName: "name",
5766
type: "string",

services/key_management/src/v2/models/PartialAPIKeyAttributes.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ export class PartialAPIKeyAttributes {
1212
* Creation date of the API key.
1313
*/
1414
"createdAt"?: string;
15+
/**
16+
* Date the API Key was last used.
17+
*/
18+
"dateLastUsed"?: Date;
1519
/**
1620
* The last four characters of the API key.
1721
*/
@@ -51,6 +55,11 @@ export class PartialAPIKeyAttributes {
5155
baseName: "created_at",
5256
type: "string",
5357
},
58+
dateLastUsed: {
59+
baseName: "date_last_used",
60+
type: "Date",
61+
format: "date-time",
62+
},
5463
last4: {
5564
baseName: "last4",
5665
type: "string",

services/key_management/src/v2/models/PartialApplicationKeyAttributes.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ export class PartialApplicationKeyAttributes {
1212
* The last four characters of the application key.
1313
*/
1414
"last4"?: string;
15+
/**
16+
* Last usage timestamp of the application key.
17+
*/
18+
"lastUsedAt"?: string;
1519
/**
1620
* Name of the application key.
1721
*/
@@ -43,6 +47,10 @@ export class PartialApplicationKeyAttributes {
4347
baseName: "last4",
4448
type: "string",
4549
},
50+
lastUsedAt: {
51+
baseName: "last_used_at",
52+
type: "string",
53+
},
4654
name: {
4755
baseName: "name",
4856
type: "string",

services/service_accounts/src/v2/models/FullApplicationKeyAttributes.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ export class FullApplicationKeyAttributes {
1616
* The last four characters of the application key.
1717
*/
1818
"last4"?: string;
19+
/**
20+
* Last usage timestamp of the application key.
21+
*/
22+
"lastUsedAt"?: Date;
1923
/**
2024
* Name of the application key.
2125
*/
@@ -52,6 +56,11 @@ export class FullApplicationKeyAttributes {
5256
baseName: "last4",
5357
type: "string",
5458
},
59+
lastUsedAt: {
60+
baseName: "last_used_at",
61+
type: "Date",
62+
format: "date-time",
63+
},
5564
name: {
5665
baseName: "name",
5766
type: "string",

services/service_accounts/src/v2/models/PartialApplicationKeyAttributes.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ export class PartialApplicationKeyAttributes {
1212
* The last four characters of the application key.
1313
*/
1414
"last4"?: string;
15+
/**
16+
* Last usage timestamp of the application key.
17+
*/
18+
"lastUsedAt"?: string;
1519
/**
1620
* Name of the application key.
1721
*/
@@ -43,6 +47,10 @@ export class PartialApplicationKeyAttributes {
4347
baseName: "last4",
4448
type: "string",
4549
},
50+
lastUsedAt: {
51+
baseName: "last_used_at",
52+
type: "string",
53+
},
4654
name: {
4755
baseName: "name",
4856
type: "string",

0 commit comments

Comments
 (0)