Skip to content

Commit 0f57217

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 1e79ef0 of spec repo
1 parent 10c54e1 commit 0f57217

File tree

9 files changed

+111
-5
lines changed

9 files changed

+111
-5
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5847,7 +5847,7 @@ components:
58475847
description: Request object.
58485848
properties:
58495849
data:
5850-
$ref: '#/components/schemas/CIAppCreatePipelineEventRequestData'
5850+
$ref: '#/components/schemas/CIAppCreatePipelineEventRequestDataSingleOrArray'
58515851
type: object
58525852
CIAppCreatePipelineEventRequestAttributes:
58535853
description: Attributes of the pipeline event to create.
@@ -5883,6 +5883,16 @@ components:
58835883
type:
58845884
$ref: '#/components/schemas/CIAppCreatePipelineEventRequestDataType'
58855885
type: object
5886+
CIAppCreatePipelineEventRequestDataArray:
5887+
description: Array of pipeline events to create in batch.
5888+
items:
5889+
$ref: '#/components/schemas/CIAppCreatePipelineEventRequestData'
5890+
type: array
5891+
CIAppCreatePipelineEventRequestDataSingleOrArray:
5892+
description: Data of the pipeline events to create.
5893+
oneOf:
5894+
- $ref: '#/components/schemas/CIAppCreatePipelineEventRequestData'
5895+
- $ref: '#/components/schemas/CIAppCreatePipelineEventRequestDataArray'
58865896
CIAppCreatePipelineEventRequestDataType:
58875897
default: cipipeline_resource_request
58885898
description: Type of the event.
@@ -49695,6 +49705,9 @@ paths:
4969549705
we support, see [Pipeline Data Model And Execution Types](https://docs.datadoghq.com/continuous_integration/guides/pipeline_data_model/).
4969649706

4969749707

49708+
Multiple events can be sent in an array (up to 1000).
49709+
49710+
4969849711
Pipeline events can be submitted with a timestamp that is up to 18 hours in
4969949712
the past.'
4970049713
operationId: CreateCIAppPipelineEvent
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2025-09-02T15:10:26.479Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"log": {
3+
"_recordingName": "CI Visibility Pipelines/Send several pipeline events returns \"Request accepted for processing\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "072988315f64383f647bdf106bca8593",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 1069,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 509,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"data\":[{\"attributes\":{\"provider_name\":\"example-provider\",\"resource\":{\"end\":\"2025-09-02T15:09:56.479Z\",\"git\":{\"author_email\":\"[email protected]\",\"repository_url\":\"https://github.com/DataDog/datadog-agent\",\"sha\":\"7f263865994b76066c4612fd1965215e7dcb4cd2\"},\"level\":\"pipeline\",\"name\":\"Deploy to AWS\",\"partial_retry\":false,\"start\":\"2025-09-02T15:08:26.479Z\",\"status\":\"success\",\"unique_id\":\"3eacb6f3-ff04-4e10-8a9c-46e6d054024a\",\"url\":\"https://my-ci-provider.example/pipelines/my-pipeline/run/1\"}},\"type\":\"cipipeline_resource_request\"},{\"attributes\":{\"provider_name\":\"example-provider\",\"resource\":{\"end\":\"2025-09-02T15:09:41.479Z\",\"git\":{\"author_email\":\"[email protected]\",\"repository_url\":\"https://github.com/DataDog/datadog-agent\",\"sha\":\"9a4f7c28b3e5d12f8e6c9b2a5d8f3e1c7b4a6d9e\"},\"level\":\"pipeline\",\"name\":\"Deploy to Production\",\"partial_retry\":false,\"start\":\"2025-09-02T15:07:26.479Z\",\"status\":\"success\",\"unique_id\":\"7b2c8f9e-aa15-4d22-9c7d-83f4e065138b\",\"url\":\"https://my-ci-provider.example/pipelines/prod-pipeline/run/2\"}},\"type\":\"cipipeline_resource_request\"}]}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v2/ci/pipeline"
39+
},
40+
"response": {
41+
"bodySize": 13,
42+
"content": {
43+
"mimeType": "application/vnd.api+json",
44+
"size": 13,
45+
"text": "{\"data\":null}"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/vnd.api+json"
52+
}
53+
],
54+
"headersSize": 676,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 202,
58+
"statusText": "Accepted"
59+
},
60+
"startedDateTime": "2025-09-02T15:10:26.749Z",
61+
"time": 396
62+
}
63+
],
64+
"pages": [],
65+
"version": "1.2"
66+
}
67+
}

features/v2/ci_visibility_pipelines.feature

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,10 @@ Feature: CI Visibility Pipelines
128128
And body with value {"data": {"attributes": {"resource": {"level": "pipeline","unique_id": "3eacb6f3-ff04-4e10-8a9c-46e6d054024a","name": "Deploy to AWS","url": "https://my-ci-provider.example/pipelines/my-pipeline/run/1","start": "{{ timeISO('now - 120s') }}","status": "running","partial_retry": false,"git": {"repository_url": "https://github.com/DataDog/datadog-agent","sha": "7f263865994b76066c4612fd1965215e7dcb4cd2","author_email": "[email protected]"}}},"type": "cipipeline_resource_request"}}
129129
When the request is sent
130130
Then the response status is 202 Request accepted for processing
131+
132+
@team:DataDog/ci-app-backend
133+
Scenario: Send several pipeline events returns "Request accepted for processing" response
134+
Given new "CreateCIAppPipelineEvent" request
135+
And body with value {"data": [{"attributes": {"provider_name": "example-provider", "resource": {"level": "pipeline","unique_id": "3eacb6f3-ff04-4e10-8a9c-46e6d054024a","name": "Deploy to AWS","url": "https://my-ci-provider.example/pipelines/my-pipeline/run/1","start": "{{ timeISO('now - 120s') }}","end": "{{ timeISO('now - 30s') }}","status": "success","partial_retry": false,"git": {"repository_url": "https://github.com/DataDog/datadog-agent","sha": "7f263865994b76066c4612fd1965215e7dcb4cd2","author_email": "[email protected]"}}},"type": "cipipeline_resource_request"},{"attributes": {"provider_name": "example-provider", "resource": {"level": "pipeline","unique_id": "7b2c8f9e-aa15-4d22-9c7d-83f4e065138b","name": "Deploy to Production","url": "https://my-ci-provider.example/pipelines/prod-pipeline/run/2","start": "{{ timeISO('now - 180s') }}","end": "{{ timeISO('now - 45s') }}","status": "success","partial_retry": false,"git": {"repository_url": "https://github.com/DataDog/datadog-agent","sha": "9a4f7c28b3e5d12f8e6c9b2a5d8f3e1c7b4a6d9e","author_email": "[email protected]"}}},"type": "cipipeline_resource_request"}]}
136+
When the request is sent
137+
Then the response status is 202 Request accepted for processing

services/ci_visibility_pipelines/src/v2/CIVisibilityPipelinesApi.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,8 @@ export class CIVisibilityPipelinesApi {
619619
/**
620620
* Send your pipeline event to your Datadog platform over HTTP. For details about how pipeline executions are modeled and what execution types we support, see [Pipeline Data Model And Execution Types](https://docs.datadoghq.com/continuous_integration/guides/pipeline_data_model/).
621621
*
622+
* Multiple events can be sent in an array (up to 1000).
623+
*
622624
* Pipeline events can be submitted with a timestamp that is up to 18 hours in the past.
623625
* @param param The request object
624626
*/

services/ci_visibility_pipelines/src/v2/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export { CIAppCreatePipelineEventRequest } from "./models/CIAppCreatePipelineEve
2020
export { CIAppCreatePipelineEventRequestAttributes } from "./models/CIAppCreatePipelineEventRequestAttributes";
2121
export { CIAppCreatePipelineEventRequestAttributesResource } from "./models/CIAppCreatePipelineEventRequestAttributesResource";
2222
export { CIAppCreatePipelineEventRequestData } from "./models/CIAppCreatePipelineEventRequestData";
23+
export { CIAppCreatePipelineEventRequestDataSingleOrArray } from "./models/CIAppCreatePipelineEventRequestDataSingleOrArray";
2324
export { CIAppCreatePipelineEventRequestDataType } from "./models/CIAppCreatePipelineEventRequestDataType";
2425
export { CIAppGitInfo } from "./models/CIAppGitInfo";
2526
export { CIAppGroupByHistogram } from "./models/CIAppGroupByHistogram";

services/ci_visibility_pipelines/src/v2/models/CIAppCreatePipelineEventRequest.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import { AttributeTypeMap } from "@datadog/datadog-api-client";
22

3-
import { CIAppCreatePipelineEventRequestData } from "./CIAppCreatePipelineEventRequestData";
3+
import { CIAppCreatePipelineEventRequestDataSingleOrArray } from "./CIAppCreatePipelineEventRequestDataSingleOrArray";
44

55
/**
66
* Request object.
77
*/
88
export class CIAppCreatePipelineEventRequest {
99
/**
10-
* Data of the pipeline event to create.
10+
* Data of the pipeline events to create.
1111
*/
12-
"data"?: CIAppCreatePipelineEventRequestData;
12+
"data"?: CIAppCreatePipelineEventRequestDataSingleOrArray;
1313
/**
1414
* A container for additional, undeclared properties.
1515
* This is a holder for any undeclared properties as specified with
@@ -27,7 +27,7 @@ export class CIAppCreatePipelineEventRequest {
2727
static readonly attributeTypeMap: AttributeTypeMap = {
2828
data: {
2929
baseName: "data",
30-
type: "CIAppCreatePipelineEventRequestData",
30+
type: "CIAppCreatePipelineEventRequestDataSingleOrArray",
3131
},
3232
additionalProperties: {
3333
baseName: "additionalProperties",
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { UnparsedObject } from "@datadog/datadog-api-client";
2+
3+
import { CIAppCreatePipelineEventRequestData } from "./CIAppCreatePipelineEventRequestData";
4+
5+
/**
6+
* Data of the pipeline events to create.
7+
*/
8+
export type CIAppCreatePipelineEventRequestDataSingleOrArray =
9+
| CIAppCreatePipelineEventRequestData
10+
| Array<CIAppCreatePipelineEventRequestData>
11+
| UnparsedObject;

services/ci_visibility_pipelines/src/v2/models/TypingInfo.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ export const TypingInfo: ModelTypingInfo = {
9595
"CIAppPipelineEventJob",
9696
"CIAppPipelineEventStep",
9797
],
98+
CIAppCreatePipelineEventRequestDataSingleOrArray: [
99+
"CIAppCreatePipelineEventRequestData",
100+
"Array<CIAppCreatePipelineEventRequestData>",
101+
],
98102
CIAppGroupByMissing: ["string", "number"],
99103
CIAppGroupByTotal: ["boolean", "string", "number"],
100104
CIAppPipelineEventPipeline: [

0 commit comments

Comments
 (0)