Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,378 changes: 1,378 additions & 0 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions features/v2/cohort.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@endpoint(cohort) @endpoint(cohort-v2)
Feature: Cohort
API for Cohort.

Background:
Given a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "Cohort" API

@generated @skip @team:DataDog/product-analytics-backend
Scenario: Get rum cohort returns "Successful response with cohort analysis data" response
Given operation "GetRumCohort" enabled
And new "GetRumCohort" request
And body with value {"data": {"attributes": {"definition": {"audience_filters": {"accounts": [{"name": ""}], "segments": [{"name": "", "segment_id": ""}], "users": [{"name": ""}]}}, "time": {}}, "type": "cohort_request"}}
When the request is sent
Then the response status is 200 Successful response with cohort analysis data

@generated @skip @team:DataDog/product-analytics-backend
Scenario: Get rum cohort users returns "Successful response with cohort users" response
Given operation "GetRumCohortUsers" enabled
And new "GetRumCohortUsers" request
And body with value {"data": {"attributes": {"definition": {"audience_filters": {"accounts": [{"name": ""}], "segments": [{"name": "", "segment_id": ""}], "users": [{"name": ""}]}}, "time": {}}, "type": "cohort_users_request"}}
When the request is sent
Then the response status is 200 Successful response with cohort users
24 changes: 24 additions & 0 deletions features/v2/funnel.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@endpoint(funnel) @endpoint(funnel-v2)
Feature: Funnel
API for funnel.

Background:
Given a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "Funnel" API

@generated @skip @team:DataDog/product-analytics-backend
Scenario: Get rum funnel returns "Successful response with funnel analysis data" response
Given operation "GetRumFunnel" enabled
And new "GetRumFunnel" request
And body with value {"data": {"attributes": {"data_source": "rum", "enforced_execution_type": "", "request_id": "", "search": {"cross_session_filter": "", "query_string": "@type:view", "steps": [{"facet": "@view.name", "step_filter": "", "value": "/apm/home"}, {"facet": "@view.name", "step_filter": "", "value": "/apm/traces"}], "subquery_id": ""}, "time": {"from": 1756425600000, "to": 1756857600000}}, "id": "funnel_request", "type": "funnel_request"}}
When the request is sent
Then the response status is 200 Successful response with funnel analysis data

@generated @skip @team:DataDog/product-analytics-backend
Scenario: Get rum funnel step suggestions returns "Successful response with funnel step suggestions" response
Given operation "GetRumFunnelStepSuggestions" enabled
And new "GetRumFunnelStepSuggestions" request
And body with value {"data": {"attributes": {"data_source": "", "search": {"cross_session_filter": "", "query_string": "@type:view", "steps": [{"facet": "@view.name", "step_filter": "", "value": "/apm/home"}], "subquery_id": ""}, "term_search": {"query": "apm"}, "time": {"from": 1756425600000, "to": 1756857600000}}, "id": "funnel_suggestion_request", "type": "funnel_suggestion_request"}}
When the request is sent
Then the response status is 200 Successful response with funnel step suggestions
30 changes: 30 additions & 0 deletions features/v2/segments.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
@endpoint(segments) @endpoint(segments-v2)
Feature: Segments
API for segments.

Background:
Given a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "Segments" API

@generated @skip @team:DataDog/product-analytics-backend
Scenario: Create rum segment returns "Segment created successfully" response
Given operation "CreateRumSegment" enabled
And new "CreateRumSegment" request
And body with value {"data": {"attributes": {"created_at": "0001-01-01T00:00:00Z", "created_by": {"handle": "", "id": "", "uuid": ""}, "data_query": {"event_platform": [{"facet": "@usr.id", "from": "2025-08-01", "name": "high_value_users", "query": "@type:view @view.name:/logs @usr.session_duration:>300000", "to": "2025-09-01"}]}, "description": "Users who frequently visit logs and have high session duration", "modified_at": "0001-01-01T00:00:00Z", "modified_by": {"handle": "", "id": "", "uuid": ""}, "name": "High-Value Users", "org_id": 123456, "source": 0, "tags": ["high-value", "logs", "active"], "version": 1}, "id": "segment-12345", "type": "segment"}}
When the request is sent
Then the response status is 201 Segment created successfully

@generated @skip @team:DataDog/product-analytics-backend
Scenario: Initialize rum segments returns "Default segments created successfully" response
Given operation "InitializeRumSegments" enabled
And new "InitializeRumSegments" request
When the request is sent
Then the response status is 200 Default segments created successfully

@generated @skip @team:DataDog/product-analytics-backend
Scenario: List rum segments returns "Successful response with list of segments" response
Given operation "ListRumSegments" enabled
And new "ListRumSegments" request
When the request is sent
Then the response status is 200 Successful response with list of segments
48 changes: 48 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3254,6 +3254,18 @@
"type": "idempotent"
}
},
"GetRumCohort": {
"tag": "Cohort",
"undo": {
"type": "safe"
}
},
"GetRumCohortUsers": {
"tag": "Cohort",
"undo": {
"type": "safe"
}
},
"ListRumMetrics": {
"tag": "Rum Metrics",
"undo": {
Expand Down Expand Up @@ -3303,6 +3315,42 @@
"type": "safe"
}
},
"GetRumFunnel": {
"tag": "Funnel",
"undo": {
"type": "safe"
}
},
"GetRumFunnelStepSuggestions": {
"tag": "Funnel",
"undo": {
"type": "safe"
}
},
"GetRumSankey": {
"tag": "User Flow",
"undo": {
"type": "safe"
}
},
"ListRumSegments": {
"tag": "Segments",
"undo": {
"type": "safe"
}
},
"CreateRumSegment": {
"tag": "Segments",
"undo": {
"type": "safe"
}
},
"InitializeRumSegments": {
"tag": "Segments",
"undo": {
"type": "safe"
}
},
"UploadIdPMetadata": {
"tag": "Organizations",
"undo": {
Expand Down
14 changes: 14 additions & 0 deletions features/v2/user_flow.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@endpoint(user-flow) @endpoint(user-flow-v2)
Feature: User Flow
API for user flow.

@generated @skip @team:DataDog/product-analytics-backend
Scenario: Get rum sankey returns "Successful response with Sankey diagram data" response
Given a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "UserFlow" API
And operation "GetRumSankey" enabled
And new "GetRumSankey" request
And body with value {"data": {"attributes": {"data_source": "", "definition": {"entries_per_step": 10, "number_of_steps": 5, "source": "@view.name", "target": "@view.name"}, "enforced_execution_type": "", "request_id": "", "sampling": {"enabled": true}, "search": {"audience_filters": {}, "query": "@type:view @application.id:*", "subquery_id": ""}, "time": {"from": 1756425600000, "to": 1756857600000}}, "id": "sankey_request", "type": "sankey_request"}}
When the request is sent
Then the response status is 200 Successful response with Sankey diagram data
4 changes: 4 additions & 0 deletions packages/datadog-api-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ apiInstance
| Cloud Cost Management | @datadog/datadog-api-client-cloud-cost-management | [README.md](../../services/cloud-cost-management/README.md) |
| Cloud Network Monitoring | @datadog/datadog-api-client-cloud-network-monitoring | [README.md](../../services/cloud-network-monitoring/README.md) |
| Cloudflare Integration | @datadog/datadog-api-client-cloudflare-integration | [README.md](../../services/cloudflare-integration/README.md) |
| Cohort | @datadog/datadog-api-client-cohort | [README.md](../../services/cohort/README.md) |
| Confluent Cloud | @datadog/datadog-api-client-confluent-cloud | [README.md](../../services/confluent-cloud/README.md) |
| Container Images | @datadog/datadog-api-client-container-images | [README.md](../../services/container-images/README.md) |
| Containers | @datadog/datadog-api-client-containers | [README.md](../../services/containers/README.md) |
Expand All @@ -384,6 +385,7 @@ apiInstance
| Events | @datadog/datadog-api-client-events | [README.md](../../services/events/README.md) |
| Fastly Integration | @datadog/datadog-api-client-fastly-integration | [README.md](../../services/fastly-integration/README.md) |
| Fleet Automation | @datadog/datadog-api-client-fleet-automation | [README.md](../../services/fleet-automation/README.md) |
| Funnel | @datadog/datadog-api-client-funnel | [README.md](../../services/funnel/README.md) |
| GCP Integration | @datadog/datadog-api-client-gcp-integration | [README.md](../../services/gcp-integration/README.md) |
| Hosts | @datadog/datadog-api-client-hosts | [README.md](../../services/hosts/README.md) |
| Incident Services | @datadog/datadog-api-client-incident-services | [README.md](../../services/incident-services/README.md) |
Expand Down Expand Up @@ -420,6 +422,7 @@ apiInstance
| Rum Metrics | @datadog/datadog-api-client-rum-metrics | [README.md](../../services/rum-metrics/README.md) |
| Rum Retention Filters | @datadog/datadog-api-client-rum-retention-filters | [README.md](../../services/rum-retention-filters/README.md) |
| Security Monitoring | @datadog/datadog-api-client-security-monitoring | [README.md](../../services/security-monitoring/README.md) |
| Segments | @datadog/datadog-api-client-segments | [README.md](../../services/segments/README.md) |
| Sensitive Data Scanner | @datadog/datadog-api-client-sensitive-data-scanner | [README.md](../../services/sensitive-data-scanner/README.md) |
| Service Accounts | @datadog/datadog-api-client-service-accounts | [README.md](../../services/service-accounts/README.md) |
| Service Checks | @datadog/datadog-api-client-service-checks | [README.md](../../services/service-checks/README.md) |
Expand All @@ -439,6 +442,7 @@ apiInstance
| Teams | @datadog/datadog-api-client-teams | [README.md](../../services/teams/README.md) |
| Test Optimization | @datadog/datadog-api-client-test-optimization | [README.md](../../services/test-optimization/README.md) |
| Usage Metering | @datadog/datadog-api-client-usage-metering | [README.md](../../services/usage-metering/README.md) |
| User Flow | @datadog/datadog-api-client-user-flow | [README.md](../../services/user-flow/README.md) |
| Users | @datadog/datadog-api-client-users | [README.md](../../services/users/README.md) |
| Webhooks Integration | @datadog/datadog-api-client-webhooks-integration | [README.md](../../services/webhooks-integration/README.md) |
| Workflow Automation | @datadog/datadog-api-client-workflow-automation | [README.md](../../services/workflow-automation/README.md) |
48 changes: 48 additions & 0 deletions private/bdd_runner/src/support/scenarios_model_mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8001,6 +8001,20 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
},
operationResponseType: "RumRetentionFilterResponse",
},
"CohortApi.V2.GetRumCohort": {
body: {
type: "GetCohortRequest",
format: "",
},
operationResponseType: "GetCohortResponse",
},
"CohortApi.V2.GetRumCohortUsers": {
body: {
type: "GetCohortUsersRequest",
format: "",
},
operationResponseType: "GetCohortUsersResponse",
},
"RumMetricsApi.V2.ListRumMetrics": {
operationResponseType: "RumMetricsResponse",
},
Expand Down Expand Up @@ -8036,6 +8050,40 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
},
operationResponseType: "RumMetricResponse",
},
"FunnelApi.V2.GetRumFunnel": {
body: {
type: "FunnelRequest",
format: "",
},
operationResponseType: "FunnelResponse",
},
"FunnelApi.V2.GetRumFunnelStepSuggestions": {
body: {
type: "FunnelSuggestionRequest",
format: "",
},
operationResponseType: "FunnelSuggestionResponse",
},
"UserFlowApi.V2.GetRumSankey": {
body: {
type: "SankeyRequest",
format: "",
},
operationResponseType: "SankeyResponse",
},
"SegmentsApi.V2.ListRumSegments": {
operationResponseType: "SegmentArray",
},
"SegmentsApi.V2.CreateRumSegment": {
body: {
type: "Segment",
format: "",
},
operationResponseType: "Segment",
},
"SegmentsApi.V2.InitializeRumSegments": {
operationResponseType: "{}",
},
"ServiceScorecardsApi.V2.ListScorecardOutcomes": {
pageSize: {
type: "number",
Expand Down
1 change: 1 addition & 0 deletions services/cohort/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
44 changes: 44 additions & 0 deletions services/cohort/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# @datadog/datadog-api-client-cohort

## Description

API for Cohort.

## Navigation

- [Installation](#installation)
- [Getting Started](#getting-started)

## Installation

```sh
# NPM
npm install @datadog/datadog-api-client-cohort
# Yarn
yarn add @datadog/datadog-api-client-cohort
```

## Getting Started
```ts
import { createConfiguration } from "@datadog/datadog-api-client";
import { CohortApiV2 } from "@datadog/datadog-api-client-cohort";
import { v2 } from "@datadog/datadog-api-client-cohort";

const configuration = createConfiguration();
// Enable unstable operations
const configurationOpts = {
unstableOperations: {
"CohortApi.v2.getRumCohort": true
}
}

const configuration = createConfiguration(configurationOpts);
const apiInstance = new CohortApiV2(configuration);
const params = {/* parameters */};

apiInstance.getRumCohort(params).then((data) => {
console.log("API called successfully. Returned data: " + JSON.stringify(data));
}).catch((error) => {
console.error("Error calling API: " + error);
});
```
43 changes: 43 additions & 0 deletions services/cohort/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"name": "@datadog/datadog-api-client-cohort",
"description": "",
"author": "",
"keywords": [
"api",
"fetch",
"typescript"
],
"license": "Apache-2.0",
"licenses": [
{
"type": "Apache-2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0"
}
],
"repository": {
"type": "git",
"url": "https://github.com/DataDog/datadog-api-client-typescript.git",
"directory": "services/cohort"
},
"files": [
"dist/**/*"
],
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",
"scripts": {
"prepack": "yarn workspace @datadog/datadog-api-client build && yarn build",
"build": "yarn generate-version-files && tsc",
"generate-version-files": "node -p \"'export const version = ' + JSON.stringify(require('./package.json').version)\" > src/version.ts"
},
"dependencies": {
"@datadog/datadog-api-client": "^2.0.0-beta.0"
},
"devDependencies": {
"typescript": "5.8.3"
},
"engines": {
"node": ">=18.0.0"
},
"version": "0.0.1",
"packageManager": "yarn@4.9.1"
}
3 changes: 3 additions & 0 deletions services/cohort/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * as v2 from "./v2";

export { CohortApi as CohortApiV2 } from "./v2/CohortApi";
Loading