diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index 2f8393d08b0..5221d14e9f4 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -33171,6 +33171,827 @@ components:
type: string
x-enum-varnames:
- DELETE_TESTS
+ DemBatchGetJourneysAttributes:
+ description: Attributes for a batch get journeys request.
+ properties:
+ test_suite_ids:
+ $ref: '#/components/schemas/DemTestSuiteIDs'
+ required:
+ - test_suite_ids
+ type: object
+ DemBatchGetJourneysData:
+ description: Data object for a batch get journeys request.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/DemBatchGetJourneysAttributes'
+ type:
+ $ref: '#/components/schemas/DemBatchGetJourneysRequestType'
+ required:
+ - type
+ - attributes
+ type: object
+ DemBatchGetJourneysRequest:
+ description: Request body for retrieving DEM journeys by test suite IDs.
+ properties:
+ data:
+ $ref: "#/components/schemas/DemBatchGetJourneysData"
+ example:
+ attributes:
+ test_suite_ids:
+ - "suite-abc123"
+ - "suite-def456"
+ type: "batch_get_journeys_by_test_suite_ids_request"
+ required:
+ - data
+ type: object
+ DemBatchGetJourneysRequestType:
+ description: The resource type for a request to retrieve DEM journeys by test suite IDs.
+ enum:
+ - batch_get_journeys_by_test_suite_ids_request
+ example: batch_get_journeys_by_test_suite_ids_request
+ type: string
+ x-enum-varnames:
+ - BATCH_GET_JOURNEYS_BY_TEST_SUITE_IDS_REQUEST
+ DemCreateJourneyTestSuiteAttributes:
+ description: Attributes for creating a test suite for a DEM journey.
+ properties:
+ include_tests_from_journey_coverage:
+ description: Whether to populate the test suite based on journey coverage data.
+ example: true
+ nullable: true
+ type: boolean
+ test_suite_name:
+ description: An optional custom name for the auto-created test suite.
+ example: "My Custom Suite"
+ nullable: true
+ type: string
+ type: object
+ DemCreateJourneyTestSuiteData:
+ description: Data object for a create test suite request.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/DemCreateJourneyTestSuiteAttributes'
+ type:
+ $ref: '#/components/schemas/DemCreateJourneyTestSuiteRequestType'
+ required:
+ - type
+ type: object
+ DemCreateJourneyTestSuiteRequest:
+ description: Request body for creating a test suite for a DEM journey.
+ properties:
+ data:
+ $ref: "#/components/schemas/DemCreateJourneyTestSuiteData"
+ example:
+ attributes:
+ test_suite_name: "My Custom Suite"
+ type: "create_test_suite_for_journey_request"
+ required:
+ - data
+ type: object
+ DemCreateJourneyTestSuiteRequestType:
+ description: The resource type for a request to create a DEM journey test suite.
+ enum:
+ - create_test_suite_for_journey_request
+ example: create_test_suite_for_journey_request
+ type: string
+ x-enum-varnames:
+ - CREATE_TEST_SUITE_FOR_JOURNEY_REQUEST
+ DemInferredJourneyCandidateAttributes:
+ description: Attributes of an inferred journey candidate.
+ properties:
+ created_at:
+ description: Timestamp when the inferred journey was first observed.
+ example: "2024-01-15T10:30:00Z"
+ format: date-time
+ readOnly: true
+ type: string
+ description:
+ description: An optional description of the inferred journey.
+ example:
+ nullable: true
+ type: string
+ journey_rum:
+ $ref: '#/components/schemas/DemJourneyRum'
+ name:
+ description: The name of the inferred journey.
+ example: "Checkout Flow"
+ type: string
+ org_id:
+ description: The organization ID that owns this inferred journey.
+ example: 12345
+ format: int64
+ readOnly: true
+ type: integer
+ rank:
+ description: Ranking score of the inferred journey candidate.
+ example: 1
+ format: int64
+ nullable: true
+ readOnly: true
+ type: integer
+ tags:
+ $ref: '#/components/schemas/DemTags'
+ test_suite:
+ $ref: "#/components/schemas/DemTestSuiteNested"
+ nullable: true
+ readOnly: true
+ variants:
+ $ref: '#/components/schemas/DemVariants'
+ required:
+ - name
+ - tags
+ - org_id
+ - journey_rum
+ - variants
+ - created_at
+ type: object
+ DemInferredJourneyCandidateData:
+ description: Data object for an inferred journey candidate.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/DemInferredJourneyCandidateAttributes'
+ id:
+ description: The unique identifier of the inferred journey.
+ example: "inferred-journey-abc123"
+ type: string
+ type:
+ $ref: '#/components/schemas/DemJourneyType'
+ required:
+ - id
+ - type
+ - attributes
+ type: object
+ DemInferredJourneyIgnoredAttributes:
+ description: Attributes of an ignored inferred journey.
+ properties:
+ created_at:
+ description: Timestamp when the inferred journey was first observed.
+ example: "2024-01-15T10:30:00Z"
+ format: date-time
+ readOnly: true
+ type: string
+ description:
+ description: An optional description of the inferred journey.
+ example:
+ nullable: true
+ type: string
+ ignored_at:
+ description: Timestamp when the inferred journey was ignored.
+ example: "2024-01-15T10:30:00Z"
+ format: date-time
+ readOnly: true
+ type: string
+ journey_rum:
+ $ref: '#/components/schemas/DemJourneyRum'
+ name:
+ description: The name of the inferred journey.
+ example: "Checkout Flow"
+ type: string
+ org_id:
+ description: The organization ID that owns this inferred journey.
+ example: 12345
+ format: int64
+ readOnly: true
+ type: integer
+ tags:
+ $ref: '#/components/schemas/DemTags'
+ test_suite:
+ $ref: "#/components/schemas/DemTestSuiteNested"
+ nullable: true
+ readOnly: true
+ variants:
+ $ref: '#/components/schemas/DemVariants'
+ required:
+ - name
+ - tags
+ - org_id
+ - journey_rum
+ - variants
+ - ignored_at
+ - created_at
+ type: object
+ DemInferredJourneyIgnoredData:
+ description: Data object for an ignored inferred journey.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/DemInferredJourneyIgnoredAttributes'
+ id:
+ description: The unique identifier of the ignored inferred journey.
+ example: "inferred-journey-abc123"
+ type: string
+ type:
+ $ref: '#/components/schemas/DemJourneyType'
+ required:
+ - id
+ - type
+ - attributes
+ type: object
+ DemInferredJourneyStatus:
+ default: candidate
+ description: The status of an inferred DEM journey.
+ enum:
+ - candidate
+ - ignored
+ example: candidate
+ type: string
+ x-enum-varnames:
+ - CANDIDATE
+ - IGNORED
+ DemJourneyCreateAttributes:
+ description: Attributes for creating or updating a DEM journey.
+ properties:
+ description:
+ description: An optional human-readable description of the journey.
+ example: "Tracks the user checkout flow from cart to confirmation."
+ type: string
+ journey_rum:
+ $ref: '#/components/schemas/DemJourneyRum'
+ name:
+ description: The name of the DEM journey.
+ example: "Checkout Flow"
+ type: string
+ tags:
+ $ref: '#/components/schemas/DemTags'
+ variants:
+ $ref: '#/components/schemas/DemVariants'
+ required:
+ - name
+ - tags
+ - journey_rum
+ type: object
+ DemJourneyCreateData:
+ description: Data object for a DEM journey create or update request.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/DemJourneyCreateAttributes'
+ type:
+ $ref: '#/components/schemas/DemJourneyType'
+ required:
+ - type
+ - attributes
+ type: object
+ DemJourneyCreateRequest:
+ description: Request body for creating or updating a DEM journey.
+ properties:
+ data:
+ $ref: "#/components/schemas/DemJourneyCreateData"
+ example:
+ attributes:
+ journey_rum:
+ rum_steps:
+ - nodes:
+ - query: "action.name:'checkout'"
+ type: start
+ - nodes:
+ - query: "action.name:'confirmation'"
+ type: stop
+ name: "Checkout Flow"
+ tags:
+ - "team:synthetics"
+ type: journeys
+ required:
+ - data
+ type: object
+ DemJourneyResponse:
+ description: Response body for a single DEM journey.
+ properties:
+ data:
+ $ref: '#/components/schemas/DemJourneyResponseData'
+ required:
+ - data
+ type: object
+ DemJourneyResponseAttributes:
+ description: Attributes returned in a DEM journey response.
+ properties:
+ created_at:
+ description: The timestamp when the journey was created.
+ example: "2024-01-15T10:30:00Z"
+ format: date-time
+ readOnly: true
+ type: string
+ created_by:
+ $ref: "#/components/schemas/DemUser"
+ nullable: true
+ readOnly: true
+ description:
+ description: An optional human-readable description of the journey.
+ example: "Tracks the user checkout flow from cart to confirmation."
+ nullable: true
+ type: string
+ journey_rum:
+ $ref: '#/components/schemas/DemJourneyRum'
+ name:
+ description: The name of the DEM journey.
+ example: "Checkout Flow"
+ type: string
+ org_id:
+ description: The organization ID that owns this journey.
+ example: 12345
+ format: int64
+ readOnly: true
+ type: integer
+ tags:
+ $ref: '#/components/schemas/DemTags'
+ test_suite:
+ $ref: "#/components/schemas/DemTestSuiteNested"
+ nullable: true
+ readOnly: true
+ updated_at:
+ description: The timestamp when the journey was last updated.
+ example: "2024-01-16T08:00:00Z"
+ format: date-time
+ nullable: true
+ readOnly: true
+ type: string
+ updated_by:
+ $ref: "#/components/schemas/DemUser"
+ nullable: true
+ readOnly: true
+ variants:
+ $ref: '#/components/schemas/DemVariants'
+ required:
+ - name
+ - description
+ - tags
+ - org_id
+ - journey_rum
+ - test_suite
+ - variants
+ - created_by
+ - created_at
+ - updated_by
+ - updated_at
+ type: object
+ DemJourneyResponseData:
+ description: Data object in a DEM journey response.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/DemJourneyResponseAttributes'
+ id:
+ description: The unique identifier of the DEM journey.
+ example: "journey-abc123"
+ type: string
+ type:
+ $ref: '#/components/schemas/DemJourneyType'
+ required:
+ - id
+ - type
+ - attributes
+ type: object
+ DemJourneyRum:
+ description: The RUM definition for a DEM journey.
+ properties:
+ filter:
+ description: An optional RUM query filter applied to the entire journey.
+ example: "env:prod"
+ type: string
+ rum_steps:
+ $ref: "#/components/schemas/DemRumSteps"
+ example:
+ - nodes:
+ - query: "action.name:'checkout'"
+ type: start
+ - nodes:
+ - query: "action.name:'confirmation'"
+ type: stop
+ variants:
+ $ref: '#/components/schemas/DemVariants'
+ required:
+ - rum_steps
+ type: object
+ DemJourneyTestSuiteResponse:
+ description: Response body for a DEM journey test suite.
+ properties:
+ data:
+ $ref: '#/components/schemas/DemJourneyTestSuiteResponseData'
+ required:
+ - data
+ type: object
+ DemJourneyTestSuiteResponseAttributes:
+ description: Attributes of a DEM journey test suite response.
+ properties:
+ created_at:
+ description: The timestamp when the test suite was created.
+ example: "2024-01-15T10:30:00Z"
+ format: date-time
+ readOnly: true
+ type: string
+ dropped_test_ids:
+ description: Test IDs omitted because the caller lacks read access.
+ items:
+ type: string
+ type: array
+ name:
+ description: The name of the test suite.
+ example: "Checkout Flow Suite"
+ type: string
+ required:
+ - name
+ - created_at
+ type: object
+ DemJourneyTestSuiteResponseData:
+ description: Data object in a DEM test suite response.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/DemJourneyTestSuiteResponseAttributes'
+ id:
+ description: The public ID of the test suite.
+ example: "suite-abc123"
+ type: string
+ type:
+ $ref: '#/components/schemas/DemJourneyTestSuiteType'
+ required:
+ - id
+ - type
+ - attributes
+ type: object
+ DemJourneyTestSuiteType:
+ description: The type identifier for DEM journey test suites.
+ enum:
+ - journey_test_suite
+ example: journey_test_suite
+ type: string
+ x-enum-varnames:
+ - JOURNEY_TEST_SUITE
+ DemJourneyType:
+ description: The type identifier for DEM journeys.
+ enum:
+ - journeys
+ example: journeys
+ type: string
+ x-enum-varnames:
+ - JOURNEYS
+ DemJourneysListData:
+ description: List of DEM journey data objects.
+ items:
+ $ref: '#/components/schemas/DemJourneyResponseData'
+ type: array
+ DemJourneysListResponse:
+ description: Response body for a list of DEM journeys.
+ properties:
+ data:
+ $ref: "#/components/schemas/DemJourneysListData"
+ example:
+ - attributes:
+ created_at: "2024-01-15T10:30:00Z"
+ created_by:
+ email: "jane.doe@example.com"
+ handle: "jane.doe"
+ name: "Jane Doe"
+ uuid: "00000000-0000-0000-0000-000000000001"
+ description: "Tracks checkout flow."
+ journey_rum:
+ rum_steps:
+ - nodes:
+ - query: "action.name:'checkout'"
+ type: start
+ - nodes:
+ - query: "action.name:'confirmation'"
+ type: stop
+ name: "Checkout Flow"
+ org_id: 12345
+ tags:
+ - "team:synthetics"
+ test_suite:
+ updated_at:
+ updated_by:
+ variants: []
+ id: "journey-abc123"
+ type: journeys
+ required:
+ - data
+ type: object
+ DemRecommendedTestAttributes:
+ description: Attributes of an AI-recommended synthetic test for a DEM journey.
+ properties:
+ config:
+ $ref: '#/components/schemas/DemRecommendedTestConfig'
+ created_at:
+ description: The time when the recommendation was generated.
+ example: "2026-08-31T16:00:00Z"
+ format: date-time
+ type: string
+ name:
+ description: The display name of the recommended test.
+ example: "Checkout journey"
+ type: string
+ result_id:
+ description: The identifier of the validating sample run, when available.
+ example: "result-abc123"
+ type: string
+ session_id:
+ description: The RUM session identifier for the validating sample run, when available.
+ example: "session-abc123"
+ type: string
+ source:
+ description: The pipeline that produced the recommendation.
+ example: gbt
+ type: string
+ type:
+ description: The type of synthetic test.
+ example: browser
+ type: string
+ variant_id:
+ description: The variant associated with the recommendation, when applicable.
+ example: "variant-001"
+ type: string
+ required:
+ - type
+ - name
+ - source
+ - config
+ - created_at
+ type: object
+ DemRecommendedTestConfig:
+ additionalProperties: {}
+ description: The browser test configuration that can be used to create the recommended test.
+ example:
+ name: "Checkout journey"
+ type: browser
+ type: object
+ DemRecommendedTestData:
+ description: Data object for a recommended synthetic test.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/DemRecommendedTestAttributes'
+ id:
+ description: The identifier of the journey associated with the recommendation.
+ example: "journey-abc123"
+ type: string
+ type:
+ $ref: '#/components/schemas/DemRecommendedTestType'
+ required:
+ - id
+ - type
+ - attributes
+ type: object
+ DemRecommendedTestType:
+ description: The type identifier for a recommended synthetic test.
+ enum:
+ - recommended_tests
+ example: recommended_tests
+ type: string
+ x-enum-varnames:
+ - RECOMMENDED_TESTS
+ DemRecommendedTests:
+ description: Recommended synthetic tests for a DEM journey.
+ items:
+ $ref: '#/components/schemas/DemRecommendedTestData'
+ type: array
+ DemRecommendedTestsResponse:
+ description: Response containing recommended synthetic tests for a DEM journey.
+ properties:
+ data:
+ $ref: '#/components/schemas/DemRecommendedTests'
+ required:
+ - data
+ type: object
+ DemRumNode:
+ description: A RUM node within a journey step.
+ properties:
+ app_id:
+ description: The application ID associated with this node.
+ example: "app-xyz789"
+ type: string
+ id:
+ description: The ID of the RUM node element.
+ example: "element-id-123"
+ type: string
+ query:
+ description: The RUM query for matching this node.
+ example: "action.name:'checkout'"
+ type: string
+ required:
+ - query
+ type: object
+ DemRumNodes:
+ description: List of RUM nodes within a journey step.
+ example:
+ - query: "action.name:'checkout'"
+ items:
+ $ref: '#/components/schemas/DemRumNode'
+ type: array
+ DemRumStep:
+ description: A single step in a RUM journey definition.
+ properties:
+ nodes:
+ $ref: "#/components/schemas/DemRumNodes"
+ example:
+ - query: "action.name:'checkout'"
+ type:
+ $ref: '#/components/schemas/DemRumStepType'
+ required:
+ - type
+ - nodes
+ type: object
+ DemRumStepType:
+ description: The type of a RUM journey step.
+ enum:
+ - start
+ - stop
+ - step
+ example: start
+ type: string
+ x-enum-varnames:
+ - START
+ - STOP
+ - STEP
+ DemRumSteps:
+ description: List of RUM journey steps.
+ example:
+ - nodes:
+ - query: "action.name:'checkout'"
+ type: start
+ - nodes:
+ - query: "action.name:'confirmation'"
+ type: stop
+ items:
+ $ref: '#/components/schemas/DemRumStep'
+ type: array
+ DemSearchInferredJourneysResponse:
+ description: >-
+ Response body for searching inferred journeys. Contains either candidate or ignored items depending on the `status` query parameter.
+ properties:
+ data:
+ description: List of inferred journey items matching the search criteria.
+ items:
+ anyOf:
+ - $ref: '#/components/schemas/DemInferredJourneyCandidateData'
+ - $ref: '#/components/schemas/DemInferredJourneyIgnoredData'
+ description: A single inferred journey item, either a candidate or an ignored journey.
+ type: array
+ required:
+ - data
+ type: object
+ DemTags:
+ description: List of tags associated with a DEM resource.
+ example:
+ - "team:synthetics"
+ - "env:prod"
+ items:
+ description: A tag in the format `key:value`.
+ type: string
+ type: array
+ DemTestSuiteIDs:
+ description: List of test suite IDs.
+ example:
+ - "suite-abc123"
+ - "suite-def456"
+ items:
+ description: A test suite ID.
+ type: string
+ type: array
+ DemTestSuiteNested:
+ description: A test suite associated with a DEM resource.
+ properties:
+ id:
+ description: The ID of the test suite.
+ example: "suite-abc123"
+ type: string
+ name:
+ description: The name of the test suite.
+ example: "My Journey Suite"
+ type: string
+ required:
+ - id
+ - name
+ type: object
+ DemUser:
+ description: A Datadog user associated with a DEM operation.
+ properties:
+ email:
+ description: The email address of the user.
+ example: "jane.doe@example.com"
+ type: string
+ handle:
+ description: The handle of the user.
+ example: "jane.doe"
+ type: string
+ name:
+ description: The display name of the user.
+ example: "Jane Doe"
+ type: string
+ uuid:
+ description: The UUID of the user.
+ example: "00000000-0000-0000-0000-000000000001"
+ type: string
+ required:
+ - uuid
+ - name
+ - email
+ - handle
+ type: object
+ DemVariant:
+ description: A variant (sub-funnel) of a DEM journey with its own steps.
+ properties:
+ filter:
+ description: An optional RUM query filter to scope this variant.
+ example: "device.type:mobile"
+ type: string
+ id:
+ description: The unique identifier of the variant.
+ example: "variant-001"
+ readOnly: true
+ type: string
+ name:
+ description: The name of the variant.
+ example: "Mobile checkout"
+ type: string
+ rum_steps:
+ $ref: "#/components/schemas/DemRumSteps"
+ example:
+ - nodes:
+ - query: "action.name:'checkout'"
+ type: start
+ - nodes:
+ - query: "action.name:'confirmation'"
+ type: stop
+ required:
+ - name
+ - rum_steps
+ type: object
+ DemVariantAttributes:
+ description: Attributes of a DEM journey variant.
+ properties:
+ filter:
+ description: An optional RUM query filter to scope this variant.
+ example: "device.type:mobile"
+ type: string
+ name:
+ description: The name of the variant.
+ example: "Mobile checkout"
+ type: string
+ rum_steps:
+ $ref: '#/components/schemas/DemRumSteps'
+ required:
+ - name
+ - rum_steps
+ type: object
+ DemVariantRequest:
+ description: Request to create or update a DEM journey variant.
+ properties:
+ data:
+ $ref: '#/components/schemas/DemVariantRequestData'
+ required:
+ - data
+ type: object
+ DemVariantRequestData:
+ description: Data object for a DEM journey variant request.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/DemVariantAttributes'
+ type:
+ $ref: '#/components/schemas/DemVariantType'
+ required:
+ - type
+ - attributes
+ type: object
+ DemVariantResponse:
+ description: Response containing a DEM journey variant.
+ properties:
+ data:
+ $ref: '#/components/schemas/DemVariantResponseData'
+ required:
+ - data
+ type: object
+ DemVariantResponseData:
+ description: Data object returned for a DEM journey variant.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/DemVariantAttributes'
+ id:
+ description: The unique identifier of the variant.
+ example: "variant-001"
+ type: string
+ type:
+ $ref: '#/components/schemas/DemVariantType'
+ required:
+ - id
+ - type
+ - attributes
+ type: object
+ DemVariantType:
+ description: The type identifier for DEM journey variants.
+ enum:
+ - variants
+ example: variants
+ type: string
+ x-enum-varnames:
+ - VARIANTS
+ DemVariants:
+ description: List of variants associated with a DEM journey.
+ example:
+ - name: "Mobile checkout"
+ rum_steps:
+ - nodes:
+ - query: "action.name:'checkout'"
+ type: start
+ - nodes:
+ - query: "action.name:'confirmation'"
+ type: stop
+ items:
+ $ref: '#/components/schemas/DemVariant'
+ type: array
DependencyLocation:
description: Static library vulnerability location.
properties:
@@ -146391,6 +147212,916 @@ paths:
operator: OR
permissions:
- logs_delete_data
+ /api/v2/dem/journeys:
+ post:
+ description: Create a DEM journey.
+ operationId: CreateJourney
+ requestBody:
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ description: Tracks the user checkout flow from cart to confirmation.
+ journey_rum:
+ rum_steps:
+ - nodes:
+ - query: action.name:'checkout'
+ type: start
+ - nodes:
+ - query: action.name:'confirmation'
+ type: stop
+ name: Checkout Flow
+ tags:
+ - team:synthetics
+ type: journeys
+ schema:
+ $ref: '#/components/schemas/DemJourneyCreateRequest'
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ created_at: "2024-01-15T10:30:00Z"
+ created_by:
+ email: jane.doe@example.com
+ handle: jane.doe
+ name: Jane Doe
+ uuid: 00000000-0000-0000-0000-000000000001
+ description: Tracks checkout flow.
+ journey_rum:
+ rum_steps:
+ - nodes:
+ - query: action.name:'checkout'
+ type: start
+ - nodes:
+ - query: action.name:'confirmation'
+ type: stop
+ name: Checkout Flow
+ org_id: 12345
+ tags:
+ - team:synthetics
+ test_suite:
+ updated_at:
+ updated_by:
+ variants: []
+ id: journey-abc123
+ type: journeys
+ schema:
+ $ref: '#/components/schemas/DemJourneyResponse'
+ description: OK
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Create a DEM journey
+ tags:
+ - DEM
+ x-permission:
+ operator: OR
+ permissions:
+ - synthetics_write
+ /api/v2/dem/journeys/inferred/ignored/{journey_id}:
+ delete:
+ description: Remove an ignored inferred DEM journey, making it eligible to appear as a candidate again.
+ operationId: DeleteIgnoredInferredJourney
+ parameters:
+ - description: The unique identifier of the ignored inferred journey to delete.
+ example: inferred-abc123
+ in: path
+ name: journey_id
+ required: true
+ schema:
+ type: string
+ responses:
+ "204":
+ description: No Content
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Not Found
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Delete an ignored inferred DEM journey
+ tags:
+ - DEM
+ x-permission:
+ operator: OR
+ permissions:
+ - synthetics_write
+ /api/v2/dem/journeys/inferred/search:
+ get:
+ description: >-
+ Search for inferred DEM journeys by status. Returns candidates (status=candidate, the default) or ignored journeys (status=ignored). Supports optional fuzzy name filtering and app ID filtering.
+ operationId: SearchInferredJourneys
+ parameters:
+ - description: >-
+ Filter by inferred journey status. Use `candidate` (default) to retrieve journeys suggested for promotion, or `ignored` to retrieve journeys that have been dismissed.
+ in: query
+ name: status
+ required: false
+ schema:
+ $ref: '#/components/schemas/DemInferredJourneyStatus'
+ - description: Fuzzy search query to filter inferred journeys by name.
+ in: query
+ name: q
+ required: false
+ schema:
+ type: string
+ - description: Filter inferred journeys by application ID.
+ in: query
+ name: app_id
+ required: false
+ schema:
+ type: string
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ candidates:
+ value:
+ data:
+ - attributes:
+ created_at: "2024-01-15T10:30:00Z"
+ description:
+ journey_rum:
+ rum_steps:
+ - nodes:
+ - query: action.name:'checkout'
+ type: start
+ - nodes:
+ - query: action.name:'confirmation'
+ type: stop
+ name: Checkout Flow
+ org_id: 12345
+ rank: 1
+ tags:
+ - team:synthetics
+ test_suite:
+ variants: []
+ id: inferred-abc123
+ type: journeys
+ default:
+ value:
+ data:
+ - attributes:
+ created_at: "2024-01-01T00:00:00+00:00"
+ description:
+ journey_rum:
+ rum_steps:
+ - nodes:
+ - query: action.name:'checkout'
+ type: start
+ - nodes:
+ - query: action.name:'confirmation'
+ type: stop
+ name: Checkout Flow
+ org_id: 123
+ rank: 1
+ tags:
+ - team:synthetics
+ variants: []
+ id: inferred-abc123
+ type: journeys
+ ignored:
+ value:
+ data:
+ - attributes:
+ created_at: "2024-01-15T10:30:00Z"
+ description:
+ ignored_at: "2024-01-16T08:00:00Z"
+ journey_rum:
+ rum_steps:
+ - nodes:
+ - query: action.name:'login'
+ type: start
+ - nodes:
+ - query: action.name:'dashboard'
+ type: stop
+ name: Login Flow
+ org_id: 12345
+ tags:
+ - team:synthetics
+ test_suite:
+ variants: []
+ id: inferred-def456
+ type: journeys
+ schema:
+ $ref: '#/components/schemas/DemSearchInferredJourneysResponse'
+ description: OK
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Bad Request
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Not Found
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Search inferred DEM journeys
+ tags:
+ - DEM
+ x-permission:
+ operator: OR
+ permissions:
+ - synthetics_read
+ /api/v2/dem/journeys/inferred/{journey_id}/ignore:
+ post:
+ description: Mark an inferred DEM journey as ignored so it no longer appears in the candidate list.
+ operationId: IgnoreInferredJourney
+ parameters:
+ - description: The unique identifier of the inferred journey to ignore.
+ example: inferred-abc123
+ in: path
+ name: journey_id
+ required: true
+ schema:
+ type: string
+ responses:
+ "204":
+ description: No Content
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Not Found
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Ignore an inferred DEM journey
+ tags:
+ - DEM
+ x-permission:
+ operator: OR
+ permissions:
+ - synthetics_write
+ /api/v2/dem/journeys/search:
+ get:
+ description: Search for DEM journeys with optional filtering by query, creator, team, and app.
+ operationId: SearchJourneys
+ parameters:
+ - description: A search query string to filter journeys by name.
+ in: query
+ name: query
+ required: false
+ schema:
+ type: string
+ - description: The offset for pagination.
+ in: query
+ name: page[offset]
+ required: false
+ schema:
+ format: int64
+ type: integer
+ - description: The maximum number of results to return.
+ in: query
+ name: page[limit]
+ required: false
+ schema:
+ format: int64
+ type: integer
+ - description: Filter journeys by creator handle.
+ in: query
+ name: creator
+ required: false
+ schema:
+ type: string
+ - description: Filter journeys by team tag.
+ in: query
+ name: team
+ required: false
+ schema:
+ type: string
+ - description: Filter journeys by application ID.
+ in: query
+ name: app_id
+ required: false
+ schema:
+ type: string
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ - attributes:
+ created_at: "2024-01-15T10:30:00Z"
+ created_by:
+ email: jane.doe@example.com
+ handle: jane.doe
+ name: Jane Doe
+ uuid: 00000000-0000-0000-0000-000000000001
+ description: Tracks checkout flow.
+ journey_rum:
+ rum_steps:
+ - nodes:
+ - query: action.name:'checkout'
+ type: start
+ - nodes:
+ - query: action.name:'confirmation'
+ type: stop
+ name: Checkout Flow
+ org_id: 12345
+ tags:
+ - team:synthetics
+ test_suite:
+ updated_at:
+ updated_by:
+ variants: []
+ id: journey-abc123
+ type: journeys
+ schema:
+ $ref: '#/components/schemas/DemJourneysListResponse'
+ description: OK
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Bad Request
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Not Found
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Search DEM journeys
+ tags:
+ - DEM
+ x-permission:
+ operator: OR
+ permissions:
+ - synthetics_read
+ /api/v2/dem/journeys/suites/batch:
+ post:
+ description: Return DEM journeys associated with multiple given test suite IDs.
+ operationId: BatchGetJourneysByTestSuiteIDs
+ requestBody:
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ test_suite_ids:
+ - suite-abc123
+ - suite-def456
+ type: batch_get_journeys_by_test_suite_ids_request
+ schema:
+ $ref: '#/components/schemas/DemBatchGetJourneysRequest'
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ - attributes:
+ created_at: "2024-01-15T10:30:00Z"
+ created_by:
+ email: jane.doe@example.com
+ handle: jane.doe
+ name: Jane Doe
+ uuid: 00000000-0000-0000-0000-000000000001
+ description: Tracks checkout flow.
+ journey_rum:
+ rum_steps:
+ - nodes:
+ - query: action.name:'checkout'
+ type: start
+ - nodes:
+ - query: action.name:'confirmation'
+ type: stop
+ name: Checkout Flow
+ org_id: 12345
+ tags:
+ - team:synthetics
+ test_suite:
+ updated_at:
+ updated_by:
+ variants: []
+ id: journey-abc123
+ type: journeys
+ schema:
+ $ref: '#/components/schemas/DemJourneysListResponse'
+ description: OK
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Bad Request
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Not Found
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Batch get DEM journeys by test suite IDs
+ tags:
+ - DEM
+ x-permission:
+ operator: OR
+ permissions:
+ - synthetics_read
+ /api/v2/dem/journeys/variants/{variant_id}:
+ delete:
+ description: Delete a variant from a DEM journey.
+ operationId: DeleteJourneyVariant
+ parameters:
+ - description: The unique identifier of the variant to delete.
+ example: "variant-001"
+ in: path
+ name: variant_id
+ required: true
+ schema:
+ type: string
+ responses:
+ "204":
+ description: No Content
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Not Found
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Delete a DEM journey variant
+ tags:
+ - DEM
+ x-permission:
+ operator: OR
+ permissions:
+ - synthetics_write
+ put:
+ description: Update an existing variant of a DEM journey.
+ operationId: UpdateJourneyVariant
+ parameters:
+ - description: The unique identifier of the variant to update.
+ example: "variant-001"
+ in: path
+ name: variant_id
+ required: true
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ filter: device.type:mobile
+ name: Mobile checkout
+ rum_steps:
+ - nodes:
+ - query: action.name:'checkout'
+ type: start
+ - nodes:
+ - query: action.name:'confirmation'
+ type: stop
+ type: variants
+ schema:
+ $ref: '#/components/schemas/DemVariantRequest'
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ filter: device.type:mobile
+ name: Mobile checkout
+ rum_steps:
+ - nodes:
+ - query: action.name:'checkout'
+ type: start
+ - nodes:
+ - query: action.name:'confirmation'
+ type: stop
+ id: variant-001
+ type: variants
+ schema:
+ $ref: '#/components/schemas/DemVariantResponse'
+ description: OK
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Bad Request
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Not Found
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Update a DEM journey variant
+ tags:
+ - DEM
+ x-permission:
+ operator: OR
+ permissions:
+ - synthetics_write
+ /api/v2/dem/journeys/{journey_id}:
+ delete:
+ description: Delete a DEM journey by its ID.
+ operationId: DeleteJourney
+ parameters:
+ - description: The unique identifier of the DEM journey to delete.
+ example: journey-abc123
+ in: path
+ name: journey_id
+ required: true
+ schema:
+ type: string
+ responses:
+ "204":
+ description: No Content
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Not Found
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Delete a DEM journey
+ tags:
+ - DEM
+ x-permission:
+ operator: OR
+ permissions:
+ - synthetics_write
+ get:
+ description: Retrieve a single DEM journey by its ID.
+ operationId: GetJourney
+ parameters:
+ - description: The unique identifier of the DEM journey.
+ example: journey-abc123
+ in: path
+ name: journey_id
+ required: true
+ schema:
+ type: string
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ created_at: "2024-01-15T10:30:00Z"
+ created_by:
+ email: jane.doe@example.com
+ handle: jane.doe
+ name: Jane Doe
+ uuid: 00000000-0000-0000-0000-000000000001
+ description: Tracks checkout flow.
+ journey_rum:
+ rum_steps:
+ - nodes:
+ - query: action.name:'checkout'
+ type: start
+ - nodes:
+ - query: action.name:'confirmation'
+ type: stop
+ name: Checkout Flow
+ org_id: 12345
+ tags:
+ - team:synthetics
+ test_suite:
+ updated_at:
+ updated_by:
+ variants: []
+ id: journey-abc123
+ type: journeys
+ schema:
+ $ref: '#/components/schemas/DemJourneyResponse'
+ description: OK
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Not Found
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Get a DEM journey
+ tags:
+ - DEM
+ x-permission:
+ operator: OR
+ permissions:
+ - synthetics_read
+ put:
+ description: Update an existing DEM journey by its ID.
+ operationId: UpdateJourney
+ parameters:
+ - description: The unique identifier of the DEM journey to update.
+ example: journey-abc123
+ in: path
+ name: journey_id
+ required: true
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ description: Tracks the user checkout flow from cart to confirmation.
+ journey_rum:
+ rum_steps:
+ - nodes:
+ - query: action.name:'checkout'
+ type: start
+ - nodes:
+ - query: action.name:'confirmation'
+ type: stop
+ name: Checkout Flow
+ tags:
+ - team:synthetics
+ type: journeys
+ schema:
+ $ref: '#/components/schemas/DemJourneyCreateRequest'
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ created_at: "2024-01-15T10:30:00Z"
+ created_by:
+ email: jane.doe@example.com
+ handle: jane.doe
+ name: Jane Doe
+ uuid: 00000000-0000-0000-0000-000000000001
+ description: Tracks checkout flow.
+ journey_rum:
+ rum_steps:
+ - nodes:
+ - query: action.name:'checkout'
+ type: start
+ - nodes:
+ - query: action.name:'confirmation'
+ type: stop
+ name: Checkout Flow
+ org_id: 12345
+ tags:
+ - team:synthetics
+ test_suite:
+ updated_at: "2024-01-16T08:00:00Z"
+ updated_by:
+ email: jane.doe@example.com
+ handle: jane.doe
+ name: Jane Doe
+ uuid: 00000000-0000-0000-0000-000000000001
+ variants: []
+ id: journey-abc123
+ type: journeys
+ schema:
+ $ref: '#/components/schemas/DemJourneyResponse'
+ description: OK
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Not Found
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Update a DEM journey
+ tags:
+ - DEM
+ x-permission:
+ operator: OR
+ permissions:
+ - synthetics_write
+ /api/v2/dem/journeys/{journey_id}/recommended-tests:
+ get:
+ description: >-
+ Retrieve AI-recommended synthetic tests for a DEM journey. Returns an empty list when no recommendation is available.
+ operationId: GetJourneyRecommendedTests
+ parameters:
+ - description: The unique identifier of the journey.
+ example: "journey-abc123"
+ in: path
+ name: journey_id
+ required: true
+ schema:
+ type: string
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ - attributes:
+ config:
+ name: Checkout journey
+ type: browser
+ created_at: "2026-08-31T16:00:00Z"
+ name: Checkout journey
+ result_id: result-abc123
+ session_id: session-abc123
+ source: gbt
+ type: browser
+ variant_id: variant-001
+ id: journey-abc123
+ type: recommended_tests
+ schema:
+ $ref: '#/components/schemas/DemRecommendedTestsResponse'
+ description: OK
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Not Found
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Get recommended tests for a DEM journey
+ tags:
+ - DEM
+ x-permission:
+ operator: OR
+ permissions:
+ - synthetics_read
+ /api/v2/dem/journeys/{journey_id}/variants:
+ post:
+ description: Create a variant for a DEM journey.
+ operationId: CreateJourneyVariant
+ parameters:
+ - description: The unique identifier of the journey that owns the variant.
+ example: "journey-abc123"
+ in: path
+ name: journey_id
+ required: true
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ filter: device.type:mobile
+ name: Mobile checkout
+ rum_steps:
+ - nodes:
+ - query: action.name:'checkout'
+ type: start
+ - nodes:
+ - query: action.name:'confirmation'
+ type: stop
+ type: variants
+ schema:
+ $ref: '#/components/schemas/DemVariantRequest'
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ filter: device.type:mobile
+ name: Mobile checkout
+ rum_steps:
+ - nodes:
+ - query: action.name:'checkout'
+ type: start
+ - nodes:
+ - query: action.name:'confirmation'
+ type: stop
+ id: variant-001
+ type: variants
+ schema:
+ $ref: '#/components/schemas/DemVariantResponse'
+ description: OK
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Bad Request
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Not Found
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Create a DEM journey variant
+ tags:
+ - DEM
+ x-permission:
+ operator: OR
+ permissions:
+ - synthetics_write
+ /api/v2/dem/journeys/{public_journey_id}/suite:
+ post:
+ description: Trigger test suite creation for a given DEM journey.
+ operationId: CreateTestSuiteForJourney
+ parameters:
+ - description: The public identifier of the DEM journey for which to create a test suite.
+ example: journey-abc123
+ in: path
+ name: public_journey_id
+ required: true
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ include_tests_from_journey_coverage: true
+ test_suite_name: Checkout Flow Suite
+ type: create_test_suite_for_journey_request
+ schema:
+ $ref: '#/components/schemas/DemCreateJourneyTestSuiteRequest'
+ required: true
+ responses:
+ "201":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ created_at: "2024-01-15T10:30:00Z"
+ name: Checkout Flow Suite
+ id: suite-abc123
+ type: journey_test_suite
+ schema:
+ $ref: '#/components/schemas/DemJourneyTestSuiteResponse'
+ description: Created
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Not Found
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Create a test suite for a DEM journey
+ tags:
+ - DEM
+ x-permission:
+ operator: OR
+ permissions:
+ - synthetics_write
/api/v2/deployment_gates:
get:
description: |-
@@ -223180,6 +224911,8 @@ tags:
a `query_id`, and clients poll the fetch endpoint until the response transitions to
`completed` with a column-major result set.
name: DDSQL
+ - description: Manage Digital Experience Monitoring journeys.
+ name: DEM
- description: |-
Search, send, or delete events for DORA Metrics to measure and improve your software delivery performance. See the [DORA Metrics page](https://docs.datadoghq.com/dora_metrics/) for more information.
diff --git a/examples/v2/dem/BatchGetJourneysByTestSuiteIDs.java b/examples/v2/dem/BatchGetJourneysByTestSuiteIDs.java
new file mode 100644
index 00000000000..5240d1af0eb
--- /dev/null
+++ b/examples/v2/dem/BatchGetJourneysByTestSuiteIDs.java
@@ -0,0 +1,40 @@
+// Batch get DEM journeys by test suite IDs returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.DemApi;
+import com.datadog.api.client.v2.model.DemBatchGetJourneysAttributes;
+import com.datadog.api.client.v2.model.DemBatchGetJourneysData;
+import com.datadog.api.client.v2.model.DemBatchGetJourneysRequest;
+import com.datadog.api.client.v2.model.DemBatchGetJourneysRequestType;
+import com.datadog.api.client.v2.model.DemJourneysListResponse;
+import java.util.Arrays;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ DemApi apiInstance = new DemApi(defaultClient);
+
+ DemBatchGetJourneysRequest body =
+ new DemBatchGetJourneysRequest()
+ .data(
+ new DemBatchGetJourneysData()
+ .attributes(
+ new DemBatchGetJourneysAttributes()
+ .testSuiteIds(Arrays.asList("suite-abc123", "suite-def456")))
+ .type(
+ DemBatchGetJourneysRequestType
+ .BATCH_GET_JOURNEYS_BY_TEST_SUITE_IDS_REQUEST));
+
+ try {
+ DemJourneysListResponse result = apiInstance.batchGetJourneysByTestSuiteIDs(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DemApi#batchGetJourneysByTestSuiteIDs");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/dem/CreateJourney.java b/examples/v2/dem/CreateJourney.java
new file mode 100644
index 00000000000..bbdf4ac9378
--- /dev/null
+++ b/examples/v2/dem/CreateJourney.java
@@ -0,0 +1,102 @@
+// Create a DEM journey returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.DemApi;
+import com.datadog.api.client.v2.model.DemJourneyCreateAttributes;
+import com.datadog.api.client.v2.model.DemJourneyCreateData;
+import com.datadog.api.client.v2.model.DemJourneyCreateRequest;
+import com.datadog.api.client.v2.model.DemJourneyResponse;
+import com.datadog.api.client.v2.model.DemJourneyRum;
+import com.datadog.api.client.v2.model.DemJourneyType;
+import com.datadog.api.client.v2.model.DemRumNode;
+import com.datadog.api.client.v2.model.DemRumStep;
+import com.datadog.api.client.v2.model.DemRumStepType;
+import com.datadog.api.client.v2.model.DemVariant;
+import java.util.Arrays;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ DemApi apiInstance = new DemApi(defaultClient);
+
+ DemJourneyCreateRequest body =
+ new DemJourneyCreateRequest()
+ .data(
+ new DemJourneyCreateData()
+ .attributes(
+ new DemJourneyCreateAttributes()
+ .description("Tracks the user checkout flow from cart to confirmation.")
+ .journeyRum(
+ new DemJourneyRum()
+ .filter("env:prod")
+ .rumSteps(
+ Arrays.asList(
+ new DemRumStep()
+ .nodes(
+ Collections.singletonList(
+ new DemRumNode()
+ .query("action.name:'checkout'")))
+ .type(DemRumStepType.START),
+ new DemRumStep()
+ .nodes(
+ Collections.singletonList(
+ new DemRumNode()
+ .query("action.name:'confirmation'")))
+ .type(DemRumStepType.STOP)))
+ .variants(
+ Collections.singletonList(
+ new DemVariant()
+ .name("Mobile checkout")
+ .rumSteps(
+ Arrays.asList(
+ new DemRumStep()
+ .nodes(
+ Collections.singletonList(
+ new DemRumNode()
+ .query(
+ "action.name:'checkout'")))
+ .type(DemRumStepType.START),
+ new DemRumStep()
+ .nodes(
+ Collections.singletonList(
+ new DemRumNode()
+ .query(
+ "action.name:'confirmation'")))
+ .type(DemRumStepType.STOP))))))
+ .name("Checkout Flow")
+ .tags(Arrays.asList("team:synthetics", "env:prod"))
+ .variants(
+ Collections.singletonList(
+ new DemVariant()
+ .name("Mobile checkout")
+ .rumSteps(
+ Arrays.asList(
+ new DemRumStep()
+ .nodes(
+ Collections.singletonList(
+ new DemRumNode()
+ .query("action.name:'checkout'")))
+ .type(DemRumStepType.START),
+ new DemRumStep()
+ .nodes(
+ Collections.singletonList(
+ new DemRumNode()
+ .query(
+ "action.name:'confirmation'")))
+ .type(DemRumStepType.STOP))))))
+ .type(DemJourneyType.JOURNEYS));
+
+ try {
+ DemJourneyResponse result = apiInstance.createJourney(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DemApi#createJourney");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/dem/CreateJourneyVariant.java b/examples/v2/dem/CreateJourneyVariant.java
new file mode 100644
index 00000000000..7988e6591e5
--- /dev/null
+++ b/examples/v2/dem/CreateJourneyVariant.java
@@ -0,0 +1,56 @@
+// Create a DEM journey variant returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.DemApi;
+import com.datadog.api.client.v2.model.DemRumNode;
+import com.datadog.api.client.v2.model.DemRumStep;
+import com.datadog.api.client.v2.model.DemRumStepType;
+import com.datadog.api.client.v2.model.DemVariantAttributes;
+import com.datadog.api.client.v2.model.DemVariantRequest;
+import com.datadog.api.client.v2.model.DemVariantRequestData;
+import com.datadog.api.client.v2.model.DemVariantResponse;
+import com.datadog.api.client.v2.model.DemVariantType;
+import java.util.Arrays;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ DemApi apiInstance = new DemApi(defaultClient);
+
+ DemVariantRequest body =
+ new DemVariantRequest()
+ .data(
+ new DemVariantRequestData()
+ .attributes(
+ new DemVariantAttributes()
+ .filter("device.type:mobile")
+ .name("Mobile checkout")
+ .rumSteps(
+ Arrays.asList(
+ new DemRumStep()
+ .nodes(
+ Collections.singletonList(
+ new DemRumNode().query("action.name:'checkout'")))
+ .type(DemRumStepType.START),
+ new DemRumStep()
+ .nodes(
+ Collections.singletonList(
+ new DemRumNode()
+ .query("action.name:'confirmation'")))
+ .type(DemRumStepType.STOP))))
+ .type(DemVariantType.VARIANTS));
+
+ try {
+ DemVariantResponse result = apiInstance.createJourneyVariant("journey-abc123", body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DemApi#createJourneyVariant");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/dem/CreateTestSuiteForJourney.java b/examples/v2/dem/CreateTestSuiteForJourney.java
new file mode 100644
index 00000000000..0722626d0f2
--- /dev/null
+++ b/examples/v2/dem/CreateTestSuiteForJourney.java
@@ -0,0 +1,41 @@
+// Create a test suite for a DEM journey returns "Created" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.DemApi;
+import com.datadog.api.client.v2.model.DemCreateJourneyTestSuiteAttributes;
+import com.datadog.api.client.v2.model.DemCreateJourneyTestSuiteData;
+import com.datadog.api.client.v2.model.DemCreateJourneyTestSuiteRequest;
+import com.datadog.api.client.v2.model.DemCreateJourneyTestSuiteRequestType;
+import com.datadog.api.client.v2.model.DemJourneyTestSuiteResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ DemApi apiInstance = new DemApi(defaultClient);
+
+ DemCreateJourneyTestSuiteRequest body =
+ new DemCreateJourneyTestSuiteRequest()
+ .data(
+ new DemCreateJourneyTestSuiteData()
+ .attributes(
+ new DemCreateJourneyTestSuiteAttributes()
+ .includeTestsFromJourneyCoverage(true)
+ .testSuiteName("My Custom Suite"))
+ .type(
+ DemCreateJourneyTestSuiteRequestType
+ .CREATE_TEST_SUITE_FOR_JOURNEY_REQUEST));
+
+ try {
+ DemJourneyTestSuiteResponse result =
+ apiInstance.createTestSuiteForJourney("journey-abc123", body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DemApi#createTestSuiteForJourney");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/dem/DeleteIgnoredInferredJourney.java b/examples/v2/dem/DeleteIgnoredInferredJourney.java
new file mode 100644
index 00000000000..3be3a59eb71
--- /dev/null
+++ b/examples/v2/dem/DeleteIgnoredInferredJourney.java
@@ -0,0 +1,22 @@
+// Delete an ignored inferred DEM journey returns "No Content" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.DemApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ DemApi apiInstance = new DemApi(defaultClient);
+
+ try {
+ apiInstance.deleteIgnoredInferredJourney("inferred-abc123");
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DemApi#deleteIgnoredInferredJourney");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/dem/DeleteJourney.java b/examples/v2/dem/DeleteJourney.java
new file mode 100644
index 00000000000..230cbbe522f
--- /dev/null
+++ b/examples/v2/dem/DeleteJourney.java
@@ -0,0 +1,22 @@
+// Delete a DEM journey returns "No Content" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.DemApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ DemApi apiInstance = new DemApi(defaultClient);
+
+ try {
+ apiInstance.deleteJourney("journey-abc123");
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DemApi#deleteJourney");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/dem/DeleteJourneyVariant.java b/examples/v2/dem/DeleteJourneyVariant.java
new file mode 100644
index 00000000000..8e9835afa13
--- /dev/null
+++ b/examples/v2/dem/DeleteJourneyVariant.java
@@ -0,0 +1,22 @@
+// Delete a DEM journey variant returns "No Content" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.DemApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ DemApi apiInstance = new DemApi(defaultClient);
+
+ try {
+ apiInstance.deleteJourneyVariant("variant-001");
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DemApi#deleteJourneyVariant");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/dem/GetJourney.java b/examples/v2/dem/GetJourney.java
new file mode 100644
index 00000000000..515baa83cf7
--- /dev/null
+++ b/examples/v2/dem/GetJourney.java
@@ -0,0 +1,24 @@
+// Get a DEM journey returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.DemApi;
+import com.datadog.api.client.v2.model.DemJourneyResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ DemApi apiInstance = new DemApi(defaultClient);
+
+ try {
+ DemJourneyResponse result = apiInstance.getJourney("journey-abc123");
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DemApi#getJourney");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/dem/GetJourneyRecommendedTests.java b/examples/v2/dem/GetJourneyRecommendedTests.java
new file mode 100644
index 00000000000..460626e8236
--- /dev/null
+++ b/examples/v2/dem/GetJourneyRecommendedTests.java
@@ -0,0 +1,24 @@
+// Get recommended tests for a DEM journey returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.DemApi;
+import com.datadog.api.client.v2.model.DemRecommendedTestsResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ DemApi apiInstance = new DemApi(defaultClient);
+
+ try {
+ DemRecommendedTestsResponse result = apiInstance.getJourneyRecommendedTests("journey-abc123");
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DemApi#getJourneyRecommendedTests");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/dem/IgnoreInferredJourney.java b/examples/v2/dem/IgnoreInferredJourney.java
new file mode 100644
index 00000000000..64bd605af0d
--- /dev/null
+++ b/examples/v2/dem/IgnoreInferredJourney.java
@@ -0,0 +1,22 @@
+// Ignore an inferred DEM journey returns "No Content" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.DemApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ DemApi apiInstance = new DemApi(defaultClient);
+
+ try {
+ apiInstance.ignoreInferredJourney("inferred-abc123");
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DemApi#ignoreInferredJourney");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/dem/SearchInferredJourneys.java b/examples/v2/dem/SearchInferredJourneys.java
new file mode 100644
index 00000000000..75ffc93ebbb
--- /dev/null
+++ b/examples/v2/dem/SearchInferredJourneys.java
@@ -0,0 +1,24 @@
+// Search inferred DEM journeys returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.DemApi;
+import com.datadog.api.client.v2.model.DemSearchInferredJourneysResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ DemApi apiInstance = new DemApi(defaultClient);
+
+ try {
+ DemSearchInferredJourneysResponse result = apiInstance.searchInferredJourneys();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DemApi#searchInferredJourneys");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/dem/SearchJourneys.java b/examples/v2/dem/SearchJourneys.java
new file mode 100644
index 00000000000..4d04acaff32
--- /dev/null
+++ b/examples/v2/dem/SearchJourneys.java
@@ -0,0 +1,24 @@
+// Search DEM journeys returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.DemApi;
+import com.datadog.api.client.v2.model.DemJourneysListResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ DemApi apiInstance = new DemApi(defaultClient);
+
+ try {
+ DemJourneysListResponse result = apiInstance.searchJourneys();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DemApi#searchJourneys");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/dem/UpdateJourney.java b/examples/v2/dem/UpdateJourney.java
new file mode 100644
index 00000000000..5e04479e3fd
--- /dev/null
+++ b/examples/v2/dem/UpdateJourney.java
@@ -0,0 +1,102 @@
+// Update a DEM journey returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.DemApi;
+import com.datadog.api.client.v2.model.DemJourneyCreateAttributes;
+import com.datadog.api.client.v2.model.DemJourneyCreateData;
+import com.datadog.api.client.v2.model.DemJourneyCreateRequest;
+import com.datadog.api.client.v2.model.DemJourneyResponse;
+import com.datadog.api.client.v2.model.DemJourneyRum;
+import com.datadog.api.client.v2.model.DemJourneyType;
+import com.datadog.api.client.v2.model.DemRumNode;
+import com.datadog.api.client.v2.model.DemRumStep;
+import com.datadog.api.client.v2.model.DemRumStepType;
+import com.datadog.api.client.v2.model.DemVariant;
+import java.util.Arrays;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ DemApi apiInstance = new DemApi(defaultClient);
+
+ DemJourneyCreateRequest body =
+ new DemJourneyCreateRequest()
+ .data(
+ new DemJourneyCreateData()
+ .attributes(
+ new DemJourneyCreateAttributes()
+ .description("Tracks the user checkout flow from cart to confirmation.")
+ .journeyRum(
+ new DemJourneyRum()
+ .filter("env:prod")
+ .rumSteps(
+ Arrays.asList(
+ new DemRumStep()
+ .nodes(
+ Collections.singletonList(
+ new DemRumNode()
+ .query("action.name:'checkout'")))
+ .type(DemRumStepType.START),
+ new DemRumStep()
+ .nodes(
+ Collections.singletonList(
+ new DemRumNode()
+ .query("action.name:'confirmation'")))
+ .type(DemRumStepType.STOP)))
+ .variants(
+ Collections.singletonList(
+ new DemVariant()
+ .name("Mobile checkout")
+ .rumSteps(
+ Arrays.asList(
+ new DemRumStep()
+ .nodes(
+ Collections.singletonList(
+ new DemRumNode()
+ .query(
+ "action.name:'checkout'")))
+ .type(DemRumStepType.START),
+ new DemRumStep()
+ .nodes(
+ Collections.singletonList(
+ new DemRumNode()
+ .query(
+ "action.name:'confirmation'")))
+ .type(DemRumStepType.STOP))))))
+ .name("Checkout Flow")
+ .tags(Arrays.asList("team:synthetics", "env:prod"))
+ .variants(
+ Collections.singletonList(
+ new DemVariant()
+ .name("Mobile checkout")
+ .rumSteps(
+ Arrays.asList(
+ new DemRumStep()
+ .nodes(
+ Collections.singletonList(
+ new DemRumNode()
+ .query("action.name:'checkout'")))
+ .type(DemRumStepType.START),
+ new DemRumStep()
+ .nodes(
+ Collections.singletonList(
+ new DemRumNode()
+ .query(
+ "action.name:'confirmation'")))
+ .type(DemRumStepType.STOP))))))
+ .type(DemJourneyType.JOURNEYS));
+
+ try {
+ DemJourneyResponse result = apiInstance.updateJourney("journey-abc123", body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DemApi#updateJourney");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/dem/UpdateJourneyVariant.java b/examples/v2/dem/UpdateJourneyVariant.java
new file mode 100644
index 00000000000..8c8ea0183fe
--- /dev/null
+++ b/examples/v2/dem/UpdateJourneyVariant.java
@@ -0,0 +1,56 @@
+// Update a DEM journey variant returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.DemApi;
+import com.datadog.api.client.v2.model.DemRumNode;
+import com.datadog.api.client.v2.model.DemRumStep;
+import com.datadog.api.client.v2.model.DemRumStepType;
+import com.datadog.api.client.v2.model.DemVariantAttributes;
+import com.datadog.api.client.v2.model.DemVariantRequest;
+import com.datadog.api.client.v2.model.DemVariantRequestData;
+import com.datadog.api.client.v2.model.DemVariantResponse;
+import com.datadog.api.client.v2.model.DemVariantType;
+import java.util.Arrays;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ DemApi apiInstance = new DemApi(defaultClient);
+
+ DemVariantRequest body =
+ new DemVariantRequest()
+ .data(
+ new DemVariantRequestData()
+ .attributes(
+ new DemVariantAttributes()
+ .filter("device.type:mobile")
+ .name("Mobile checkout")
+ .rumSteps(
+ Arrays.asList(
+ new DemRumStep()
+ .nodes(
+ Collections.singletonList(
+ new DemRumNode().query("action.name:'checkout'")))
+ .type(DemRumStepType.START),
+ new DemRumStep()
+ .nodes(
+ Collections.singletonList(
+ new DemRumNode()
+ .query("action.name:'confirmation'")))
+ .type(DemRumStepType.STOP))))
+ .type(DemVariantType.VARIANTS));
+
+ try {
+ DemVariantResponse result = apiInstance.updateJourneyVariant("variant-001", body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DemApi#updateJourneyVariant");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/api/DemApi.java b/src/main/java/com/datadog/api/client/v2/api/DemApi.java
new file mode 100644
index 00000000000..58b61ba9604
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/api/DemApi.java
@@ -0,0 +1,2221 @@
+package com.datadog.api.client.v2.api;
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.ApiResponse;
+import com.datadog.api.client.Pair;
+import com.datadog.api.client.v2.model.DemBatchGetJourneysRequest;
+import com.datadog.api.client.v2.model.DemCreateJourneyTestSuiteRequest;
+import com.datadog.api.client.v2.model.DemInferredJourneyStatus;
+import com.datadog.api.client.v2.model.DemJourneyCreateRequest;
+import com.datadog.api.client.v2.model.DemJourneyResponse;
+import com.datadog.api.client.v2.model.DemJourneyTestSuiteResponse;
+import com.datadog.api.client.v2.model.DemJourneysListResponse;
+import com.datadog.api.client.v2.model.DemRecommendedTestsResponse;
+import com.datadog.api.client.v2.model.DemSearchInferredJourneysResponse;
+import com.datadog.api.client.v2.model.DemVariantRequest;
+import com.datadog.api.client.v2.model.DemVariantResponse;
+import jakarta.ws.rs.client.Invocation;
+import jakarta.ws.rs.core.GenericType;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.CompletableFuture;
+
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class DemApi {
+ private ApiClient apiClient;
+
+ public DemApi() {
+ this(ApiClient.getDefaultApiClient());
+ }
+
+ public DemApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Get the API client.
+ *
+ * @return API client
+ */
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ /**
+ * Set the API client.
+ *
+ * @param apiClient an instance of API client
+ */
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Batch get DEM journeys by test suite IDs.
+ *
+ *
See {@link #batchGetJourneysByTestSuiteIDsWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return DemJourneysListResponse
+ * @throws ApiException if fails to make API call
+ */
+ public DemJourneysListResponse batchGetJourneysByTestSuiteIDs(DemBatchGetJourneysRequest body)
+ throws ApiException {
+ return batchGetJourneysByTestSuiteIDsWithHttpInfo(body).getData();
+ }
+
+ /**
+ * Batch get DEM journeys by test suite IDs.
+ *
+ *
See {@link #batchGetJourneysByTestSuiteIDsWithHttpInfoAsync}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<DemJourneysListResponse>
+ */
+ public CompletableFuture batchGetJourneysByTestSuiteIDsAsync(
+ DemBatchGetJourneysRequest body) {
+ return batchGetJourneysByTestSuiteIDsWithHttpInfoAsync(body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Return DEM journeys associated with multiple given test suite IDs.
+ *
+ * @param body (required)
+ * @return ApiResponse<DemJourneysListResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse batchGetJourneysByTestSuiteIDsWithHttpInfo(
+ DemBatchGetJourneysRequest body) throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling batchGetJourneysByTestSuiteIDs");
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/dem/journeys/suites/batch";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.DemApi.batchGetJourneysByTestSuiteIDs",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Batch get DEM journeys by test suite IDs.
+ *
+ * See {@link #batchGetJourneysByTestSuiteIDsWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<DemJourneysListResponse>>
+ */
+ public CompletableFuture>
+ batchGetJourneysByTestSuiteIDsWithHttpInfoAsync(DemBatchGetJourneysRequest body) {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'body' when calling batchGetJourneysByTestSuiteIDs"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/dem/journeys/suites/batch";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.DemApi.batchGetJourneysByTestSuiteIDs",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Create a DEM journey.
+ *
+ * See {@link #createJourneyWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return DemJourneyResponse
+ * @throws ApiException if fails to make API call
+ */
+ public DemJourneyResponse createJourney(DemJourneyCreateRequest body) throws ApiException {
+ return createJourneyWithHttpInfo(body).getData();
+ }
+
+ /**
+ * Create a DEM journey.
+ *
+ *
See {@link #createJourneyWithHttpInfoAsync}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<DemJourneyResponse>
+ */
+ public CompletableFuture createJourneyAsync(DemJourneyCreateRequest body) {
+ return createJourneyWithHttpInfoAsync(body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Create a DEM journey.
+ *
+ * @param body (required)
+ * @return ApiResponse<DemJourneyResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse createJourneyWithHttpInfo(DemJourneyCreateRequest body)
+ throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling createJourney");
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/dem/journeys";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.DemApi.createJourney",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Create a DEM journey.
+ *
+ * See {@link #createJourneyWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<DemJourneyResponse>>
+ */
+ public CompletableFuture> createJourneyWithHttpInfoAsync(
+ DemJourneyCreateRequest body) {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'body' when calling createJourney"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/dem/journeys";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.DemApi.createJourney",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Create a DEM journey variant.
+ *
+ * See {@link #createJourneyVariantWithHttpInfo}.
+ *
+ * @param journeyId The unique identifier of the journey that owns the variant. (required)
+ * @param body (required)
+ * @return DemVariantResponse
+ * @throws ApiException if fails to make API call
+ */
+ public DemVariantResponse createJourneyVariant(String journeyId, DemVariantRequest body)
+ throws ApiException {
+ return createJourneyVariantWithHttpInfo(journeyId, body).getData();
+ }
+
+ /**
+ * Create a DEM journey variant.
+ *
+ *
See {@link #createJourneyVariantWithHttpInfoAsync}.
+ *
+ * @param journeyId The unique identifier of the journey that owns the variant. (required)
+ * @param body (required)
+ * @return CompletableFuture<DemVariantResponse>
+ */
+ public CompletableFuture createJourneyVariantAsync(
+ String journeyId, DemVariantRequest body) {
+ return createJourneyVariantWithHttpInfoAsync(journeyId, body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Create a variant for a DEM journey.
+ *
+ * @param journeyId The unique identifier of the journey that owns the variant. (required)
+ * @param body (required)
+ * @return ApiResponse<DemVariantResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse createJourneyVariantWithHttpInfo(
+ String journeyId, DemVariantRequest body) throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'journeyId' is set
+ if (journeyId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'journeyId' when calling createJourneyVariant");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling createJourneyVariant");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/dem/journeys/{journey_id}/variants"
+ .replaceAll("\\{" + "journey_id" + "\\}", apiClient.escapeString(journeyId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.DemApi.createJourneyVariant",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Create a DEM journey variant.
+ *
+ * See {@link #createJourneyVariantWithHttpInfo}.
+ *
+ * @param journeyId The unique identifier of the journey that owns the variant. (required)
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<DemVariantResponse>>
+ */
+ public CompletableFuture> createJourneyVariantWithHttpInfoAsync(
+ String journeyId, DemVariantRequest body) {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'journeyId' is set
+ if (journeyId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'journeyId' when calling createJourneyVariant"));
+ return result;
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'body' when calling createJourneyVariant"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/dem/journeys/{journey_id}/variants"
+ .replaceAll("\\{" + "journey_id" + "\\}", apiClient.escapeString(journeyId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.DemApi.createJourneyVariant",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Create a test suite for a DEM journey.
+ *
+ * See {@link #createTestSuiteForJourneyWithHttpInfo}.
+ *
+ * @param publicJourneyId The public identifier of the DEM journey for which to create a test
+ * suite. (required)
+ * @param body (required)
+ * @return DemJourneyTestSuiteResponse
+ * @throws ApiException if fails to make API call
+ */
+ public DemJourneyTestSuiteResponse createTestSuiteForJourney(
+ String publicJourneyId, DemCreateJourneyTestSuiteRequest body) throws ApiException {
+ return createTestSuiteForJourneyWithHttpInfo(publicJourneyId, body).getData();
+ }
+
+ /**
+ * Create a test suite for a DEM journey.
+ *
+ *
See {@link #createTestSuiteForJourneyWithHttpInfoAsync}.
+ *
+ * @param publicJourneyId The public identifier of the DEM journey for which to create a test
+ * suite. (required)
+ * @param body (required)
+ * @return CompletableFuture<DemJourneyTestSuiteResponse>
+ */
+ public CompletableFuture createTestSuiteForJourneyAsync(
+ String publicJourneyId, DemCreateJourneyTestSuiteRequest body) {
+ return createTestSuiteForJourneyWithHttpInfoAsync(publicJourneyId, body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Trigger test suite creation for a given DEM journey.
+ *
+ * @param publicJourneyId The public identifier of the DEM journey for which to create a test
+ * suite. (required)
+ * @param body (required)
+ * @return ApiResponse<DemJourneyTestSuiteResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 201 | Created | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse createTestSuiteForJourneyWithHttpInfo(
+ String publicJourneyId, DemCreateJourneyTestSuiteRequest body) throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'publicJourneyId' is set
+ if (publicJourneyId == null) {
+ throw new ApiException(
+ 400,
+ "Missing the required parameter 'publicJourneyId' when calling"
+ + " createTestSuiteForJourney");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling createTestSuiteForJourney");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/dem/journeys/{public_journey_id}/suite"
+ .replaceAll(
+ "\\{" + "public_journey_id" + "\\}",
+ apiClient.escapeString(publicJourneyId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.DemApi.createTestSuiteForJourney",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Create a test suite for a DEM journey.
+ *
+ * See {@link #createTestSuiteForJourneyWithHttpInfo}.
+ *
+ * @param publicJourneyId The public identifier of the DEM journey for which to create a test
+ * suite. (required)
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<DemJourneyTestSuiteResponse>>
+ */
+ public CompletableFuture>
+ createTestSuiteForJourneyWithHttpInfoAsync(
+ String publicJourneyId, DemCreateJourneyTestSuiteRequest body) {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'publicJourneyId' is set
+ if (publicJourneyId == null) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'publicJourneyId' when calling"
+ + " createTestSuiteForJourney"));
+ return result;
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'body' when calling createTestSuiteForJourney"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/dem/journeys/{public_journey_id}/suite"
+ .replaceAll(
+ "\\{" + "public_journey_id" + "\\}",
+ apiClient.escapeString(publicJourneyId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.DemApi.createTestSuiteForJourney",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Delete an ignored inferred DEM journey.
+ *
+ * See {@link #deleteIgnoredInferredJourneyWithHttpInfo}.
+ *
+ * @param journeyId The unique identifier of the ignored inferred journey to delete. (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteIgnoredInferredJourney(String journeyId) throws ApiException {
+ deleteIgnoredInferredJourneyWithHttpInfo(journeyId);
+ }
+
+ /**
+ * Delete an ignored inferred DEM journey.
+ *
+ *
See {@link #deleteIgnoredInferredJourneyWithHttpInfoAsync}.
+ *
+ * @param journeyId The unique identifier of the ignored inferred journey to delete. (required)
+ * @return CompletableFuture
+ */
+ public CompletableFuture deleteIgnoredInferredJourneyAsync(String journeyId) {
+ return deleteIgnoredInferredJourneyWithHttpInfoAsync(journeyId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Remove an ignored inferred DEM journey, making it eligible to appear as a candidate again.
+ *
+ * @param journeyId The unique identifier of the ignored inferred journey to delete. (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 204 | No Content | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse deleteIgnoredInferredJourneyWithHttpInfo(String journeyId)
+ throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'journeyId' is set
+ if (journeyId == null) {
+ throw new ApiException(
+ 400,
+ "Missing the required parameter 'journeyId' when calling deleteIgnoredInferredJourney");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/dem/journeys/inferred/ignored/{journey_id}"
+ .replaceAll("\\{" + "journey_id" + "\\}", apiClient.escapeString(journeyId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.DemApi.deleteIgnoredInferredJourney",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Delete an ignored inferred DEM journey.
+ *
+ * See {@link #deleteIgnoredInferredJourneyWithHttpInfo}.
+ *
+ * @param journeyId The unique identifier of the ignored inferred journey to delete. (required)
+ * @return CompletableFuture<ApiResponse<Void>>
+ */
+ public CompletableFuture> deleteIgnoredInferredJourneyWithHttpInfoAsync(
+ String journeyId) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'journeyId' is set
+ if (journeyId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'journeyId' when calling"
+ + " deleteIgnoredInferredJourney"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/dem/journeys/inferred/ignored/{journey_id}"
+ .replaceAll("\\{" + "journey_id" + "\\}", apiClient.escapeString(journeyId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.DemApi.deleteIgnoredInferredJourney",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Delete a DEM journey.
+ *
+ * See {@link #deleteJourneyWithHttpInfo}.
+ *
+ * @param journeyId The unique identifier of the DEM journey to delete. (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteJourney(String journeyId) throws ApiException {
+ deleteJourneyWithHttpInfo(journeyId);
+ }
+
+ /**
+ * Delete a DEM journey.
+ *
+ *
See {@link #deleteJourneyWithHttpInfoAsync}.
+ *
+ * @param journeyId The unique identifier of the DEM journey to delete. (required)
+ * @return CompletableFuture
+ */
+ public CompletableFuture deleteJourneyAsync(String journeyId) {
+ return deleteJourneyWithHttpInfoAsync(journeyId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Delete a DEM journey by its ID.
+ *
+ * @param journeyId The unique identifier of the DEM journey to delete. (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 204 | No Content | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse deleteJourneyWithHttpInfo(String journeyId) throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'journeyId' is set
+ if (journeyId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'journeyId' when calling deleteJourney");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/dem/journeys/{journey_id}"
+ .replaceAll("\\{" + "journey_id" + "\\}", apiClient.escapeString(journeyId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.DemApi.deleteJourney",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Delete a DEM journey.
+ *
+ * See {@link #deleteJourneyWithHttpInfo}.
+ *
+ * @param journeyId The unique identifier of the DEM journey to delete. (required)
+ * @return CompletableFuture<ApiResponse<Void>>
+ */
+ public CompletableFuture> deleteJourneyWithHttpInfoAsync(String journeyId) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'journeyId' is set
+ if (journeyId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'journeyId' when calling deleteJourney"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/dem/journeys/{journey_id}"
+ .replaceAll("\\{" + "journey_id" + "\\}", apiClient.escapeString(journeyId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.DemApi.deleteJourney",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Delete a DEM journey variant.
+ *
+ * See {@link #deleteJourneyVariantWithHttpInfo}.
+ *
+ * @param variantId The unique identifier of the variant to delete. (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteJourneyVariant(String variantId) throws ApiException {
+ deleteJourneyVariantWithHttpInfo(variantId);
+ }
+
+ /**
+ * Delete a DEM journey variant.
+ *
+ *
See {@link #deleteJourneyVariantWithHttpInfoAsync}.
+ *
+ * @param variantId The unique identifier of the variant to delete. (required)
+ * @return CompletableFuture
+ */
+ public CompletableFuture deleteJourneyVariantAsync(String variantId) {
+ return deleteJourneyVariantWithHttpInfoAsync(variantId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Delete a variant from a DEM journey.
+ *
+ * @param variantId The unique identifier of the variant to delete. (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 204 | No Content | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse deleteJourneyVariantWithHttpInfo(String variantId) throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'variantId' is set
+ if (variantId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'variantId' when calling deleteJourneyVariant");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/dem/journeys/variants/{variant_id}"
+ .replaceAll("\\{" + "variant_id" + "\\}", apiClient.escapeString(variantId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.DemApi.deleteJourneyVariant",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Delete a DEM journey variant.
+ *
+ * See {@link #deleteJourneyVariantWithHttpInfo}.
+ *
+ * @param variantId The unique identifier of the variant to delete. (required)
+ * @return CompletableFuture<ApiResponse<Void>>
+ */
+ public CompletableFuture> deleteJourneyVariantWithHttpInfoAsync(
+ String variantId) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'variantId' is set
+ if (variantId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'variantId' when calling deleteJourneyVariant"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/dem/journeys/variants/{variant_id}"
+ .replaceAll("\\{" + "variant_id" + "\\}", apiClient.escapeString(variantId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.DemApi.deleteJourneyVariant",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Get a DEM journey.
+ *
+ * See {@link #getJourneyWithHttpInfo}.
+ *
+ * @param journeyId The unique identifier of the DEM journey. (required)
+ * @return DemJourneyResponse
+ * @throws ApiException if fails to make API call
+ */
+ public DemJourneyResponse getJourney(String journeyId) throws ApiException {
+ return getJourneyWithHttpInfo(journeyId).getData();
+ }
+
+ /**
+ * Get a DEM journey.
+ *
+ *
See {@link #getJourneyWithHttpInfoAsync}.
+ *
+ * @param journeyId The unique identifier of the DEM journey. (required)
+ * @return CompletableFuture<DemJourneyResponse>
+ */
+ public CompletableFuture getJourneyAsync(String journeyId) {
+ return getJourneyWithHttpInfoAsync(journeyId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Retrieve a single DEM journey by its ID.
+ *
+ * @param journeyId The unique identifier of the DEM journey. (required)
+ * @return ApiResponse<DemJourneyResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse getJourneyWithHttpInfo(String journeyId)
+ throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'journeyId' is set
+ if (journeyId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'journeyId' when calling getJourney");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/dem/journeys/{journey_id}"
+ .replaceAll("\\{" + "journey_id" + "\\}", apiClient.escapeString(journeyId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.DemApi.getJourney",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get a DEM journey.
+ *
+ * See {@link #getJourneyWithHttpInfo}.
+ *
+ * @param journeyId The unique identifier of the DEM journey. (required)
+ * @return CompletableFuture<ApiResponse<DemJourneyResponse>>
+ */
+ public CompletableFuture> getJourneyWithHttpInfoAsync(
+ String journeyId) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'journeyId' is set
+ if (journeyId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'journeyId' when calling getJourney"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/dem/journeys/{journey_id}"
+ .replaceAll("\\{" + "journey_id" + "\\}", apiClient.escapeString(journeyId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.DemApi.getJourney",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get recommended tests for a DEM journey.
+ *
+ * See {@link #getJourneyRecommendedTestsWithHttpInfo}.
+ *
+ * @param journeyId The unique identifier of the journey. (required)
+ * @return DemRecommendedTestsResponse
+ * @throws ApiException if fails to make API call
+ */
+ public DemRecommendedTestsResponse getJourneyRecommendedTests(String journeyId)
+ throws ApiException {
+ return getJourneyRecommendedTestsWithHttpInfo(journeyId).getData();
+ }
+
+ /**
+ * Get recommended tests for a DEM journey.
+ *
+ *
See {@link #getJourneyRecommendedTestsWithHttpInfoAsync}.
+ *
+ * @param journeyId The unique identifier of the journey. (required)
+ * @return CompletableFuture<DemRecommendedTestsResponse>
+ */
+ public CompletableFuture getJourneyRecommendedTestsAsync(
+ String journeyId) {
+ return getJourneyRecommendedTestsWithHttpInfoAsync(journeyId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Retrieve AI-recommended synthetic tests for a DEM journey. Returns an empty list when no
+ * recommendation is available.
+ *
+ * @param journeyId The unique identifier of the journey. (required)
+ * @return ApiResponse<DemRecommendedTestsResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse getJourneyRecommendedTestsWithHttpInfo(
+ String journeyId) throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'journeyId' is set
+ if (journeyId == null) {
+ throw new ApiException(
+ 400,
+ "Missing the required parameter 'journeyId' when calling getJourneyRecommendedTests");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/dem/journeys/{journey_id}/recommended-tests"
+ .replaceAll("\\{" + "journey_id" + "\\}", apiClient.escapeString(journeyId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.DemApi.getJourneyRecommendedTests",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get recommended tests for a DEM journey.
+ *
+ * See {@link #getJourneyRecommendedTestsWithHttpInfo}.
+ *
+ * @param journeyId The unique identifier of the journey. (required)
+ * @return CompletableFuture<ApiResponse<DemRecommendedTestsResponse>>
+ */
+ public CompletableFuture>
+ getJourneyRecommendedTestsWithHttpInfoAsync(String journeyId) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'journeyId' is set
+ if (journeyId == null) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'journeyId' when calling"
+ + " getJourneyRecommendedTests"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/dem/journeys/{journey_id}/recommended-tests"
+ .replaceAll("\\{" + "journey_id" + "\\}", apiClient.escapeString(journeyId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.DemApi.getJourneyRecommendedTests",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Ignore an inferred DEM journey.
+ *
+ * See {@link #ignoreInferredJourneyWithHttpInfo}.
+ *
+ * @param journeyId The unique identifier of the inferred journey to ignore. (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void ignoreInferredJourney(String journeyId) throws ApiException {
+ ignoreInferredJourneyWithHttpInfo(journeyId);
+ }
+
+ /**
+ * Ignore an inferred DEM journey.
+ *
+ *
See {@link #ignoreInferredJourneyWithHttpInfoAsync}.
+ *
+ * @param journeyId The unique identifier of the inferred journey to ignore. (required)
+ * @return CompletableFuture
+ */
+ public CompletableFuture ignoreInferredJourneyAsync(String journeyId) {
+ return ignoreInferredJourneyWithHttpInfoAsync(journeyId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Mark an inferred DEM journey as ignored so it no longer appears in the candidate list.
+ *
+ * @param journeyId The unique identifier of the inferred journey to ignore. (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 204 | No Content | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse ignoreInferredJourneyWithHttpInfo(String journeyId) throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'journeyId' is set
+ if (journeyId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'journeyId' when calling ignoreInferredJourney");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/dem/journeys/inferred/{journey_id}/ignore"
+ .replaceAll("\\{" + "journey_id" + "\\}", apiClient.escapeString(journeyId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.DemApi.ignoreInferredJourney",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Ignore an inferred DEM journey.
+ *
+ * See {@link #ignoreInferredJourneyWithHttpInfo}.
+ *
+ * @param journeyId The unique identifier of the inferred journey to ignore. (required)
+ * @return CompletableFuture<ApiResponse<Void>>
+ */
+ public CompletableFuture> ignoreInferredJourneyWithHttpInfoAsync(
+ String journeyId) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'journeyId' is set
+ if (journeyId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'journeyId' when calling ignoreInferredJourney"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/dem/journeys/inferred/{journey_id}/ignore"
+ .replaceAll("\\{" + "journey_id" + "\\}", apiClient.escapeString(journeyId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.DemApi.ignoreInferredJourney",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /** Manage optional parameters to searchInferredJourneys. */
+ public static class SearchInferredJourneysOptionalParameters {
+ private DemInferredJourneyStatus status;
+ private String q;
+ private String appId;
+
+ /**
+ * Set status.
+ *
+ * @param status Filter by inferred journey status. Use candidate (default) to
+ * retrieve journeys suggested for promotion, or ignored to retrieve journeys
+ * that have been dismissed. (optional, default to "candidate")
+ * @return SearchInferredJourneysOptionalParameters
+ */
+ public SearchInferredJourneysOptionalParameters status(DemInferredJourneyStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Set q.
+ *
+ * @param q Fuzzy search query to filter inferred journeys by name. (optional)
+ * @return SearchInferredJourneysOptionalParameters
+ */
+ public SearchInferredJourneysOptionalParameters q(String q) {
+ this.q = q;
+ return this;
+ }
+
+ /**
+ * Set appId.
+ *
+ * @param appId Filter inferred journeys by application ID. (optional)
+ * @return SearchInferredJourneysOptionalParameters
+ */
+ public SearchInferredJourneysOptionalParameters appId(String appId) {
+ this.appId = appId;
+ return this;
+ }
+ }
+
+ /**
+ * Search inferred DEM journeys.
+ *
+ * See {@link #searchInferredJourneysWithHttpInfo}.
+ *
+ * @return DemSearchInferredJourneysResponse
+ * @throws ApiException if fails to make API call
+ */
+ public DemSearchInferredJourneysResponse searchInferredJourneys() throws ApiException {
+ return searchInferredJourneysWithHttpInfo(new SearchInferredJourneysOptionalParameters())
+ .getData();
+ }
+
+ /**
+ * Search inferred DEM journeys.
+ *
+ *
See {@link #searchInferredJourneysWithHttpInfoAsync}.
+ *
+ * @return CompletableFuture<DemSearchInferredJourneysResponse>
+ */
+ public CompletableFuture searchInferredJourneysAsync() {
+ return searchInferredJourneysWithHttpInfoAsync(new SearchInferredJourneysOptionalParameters())
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Search inferred DEM journeys.
+ *
+ * See {@link #searchInferredJourneysWithHttpInfo}.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return DemSearchInferredJourneysResponse
+ * @throws ApiException if fails to make API call
+ */
+ public DemSearchInferredJourneysResponse searchInferredJourneys(
+ SearchInferredJourneysOptionalParameters parameters) throws ApiException {
+ return searchInferredJourneysWithHttpInfo(parameters).getData();
+ }
+
+ /**
+ * Search inferred DEM journeys.
+ *
+ *
See {@link #searchInferredJourneysWithHttpInfoAsync}.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<DemSearchInferredJourneysResponse>
+ */
+ public CompletableFuture searchInferredJourneysAsync(
+ SearchInferredJourneysOptionalParameters parameters) {
+ return searchInferredJourneysWithHttpInfoAsync(parameters)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Search for inferred DEM journeys by status. Returns candidates (status=candidate, the default)
+ * or ignored journeys (status=ignored). Supports optional fuzzy name filtering and app ID
+ * filtering.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return ApiResponse<DemSearchInferredJourneysResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse searchInferredJourneysWithHttpInfo(
+ SearchInferredJourneysOptionalParameters parameters) throws ApiException {
+ Object localVarPostBody = null;
+ DemInferredJourneyStatus status = parameters.status;
+ String q = parameters.q;
+ String appId = parameters.appId;
+ // create path and map variables
+ String localVarPath = "/api/v2/dem/journeys/inferred/search";
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "status", status));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "q", q));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "app_id", appId));
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.DemApi.searchInferredJourneys",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Search inferred DEM journeys.
+ *
+ * See {@link #searchInferredJourneysWithHttpInfo}.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<ApiResponse<DemSearchInferredJourneysResponse>>
+ */
+ public CompletableFuture>
+ searchInferredJourneysWithHttpInfoAsync(SearchInferredJourneysOptionalParameters parameters) {
+ Object localVarPostBody = null;
+ DemInferredJourneyStatus status = parameters.status;
+ String q = parameters.q;
+ String appId = parameters.appId;
+ // create path and map variables
+ String localVarPath = "/api/v2/dem/journeys/inferred/search";
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "status", status));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "q", q));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "app_id", appId));
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.DemApi.searchInferredJourneys",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /** Manage optional parameters to searchJourneys. */
+ public static class SearchJourneysOptionalParameters {
+ private String query;
+ private Long pageOffset;
+ private Long pageLimit;
+ private String creator;
+ private String team;
+ private String appId;
+
+ /**
+ * Set query.
+ *
+ * @param query A search query string to filter journeys by name. (optional)
+ * @return SearchJourneysOptionalParameters
+ */
+ public SearchJourneysOptionalParameters query(String query) {
+ this.query = query;
+ return this;
+ }
+
+ /**
+ * Set pageOffset.
+ *
+ * @param pageOffset The offset for pagination. (optional)
+ * @return SearchJourneysOptionalParameters
+ */
+ public SearchJourneysOptionalParameters pageOffset(Long pageOffset) {
+ this.pageOffset = pageOffset;
+ return this;
+ }
+
+ /**
+ * Set pageLimit.
+ *
+ * @param pageLimit The maximum number of results to return. (optional)
+ * @return SearchJourneysOptionalParameters
+ */
+ public SearchJourneysOptionalParameters pageLimit(Long pageLimit) {
+ this.pageLimit = pageLimit;
+ return this;
+ }
+
+ /**
+ * Set creator.
+ *
+ * @param creator Filter journeys by creator handle. (optional)
+ * @return SearchJourneysOptionalParameters
+ */
+ public SearchJourneysOptionalParameters creator(String creator) {
+ this.creator = creator;
+ return this;
+ }
+
+ /**
+ * Set team.
+ *
+ * @param team Filter journeys by team tag. (optional)
+ * @return SearchJourneysOptionalParameters
+ */
+ public SearchJourneysOptionalParameters team(String team) {
+ this.team = team;
+ return this;
+ }
+
+ /**
+ * Set appId.
+ *
+ * @param appId Filter journeys by application ID. (optional)
+ * @return SearchJourneysOptionalParameters
+ */
+ public SearchJourneysOptionalParameters appId(String appId) {
+ this.appId = appId;
+ return this;
+ }
+ }
+
+ /**
+ * Search DEM journeys.
+ *
+ * See {@link #searchJourneysWithHttpInfo}.
+ *
+ * @return DemJourneysListResponse
+ * @throws ApiException if fails to make API call
+ */
+ public DemJourneysListResponse searchJourneys() throws ApiException {
+ return searchJourneysWithHttpInfo(new SearchJourneysOptionalParameters()).getData();
+ }
+
+ /**
+ * Search DEM journeys.
+ *
+ *
See {@link #searchJourneysWithHttpInfoAsync}.
+ *
+ * @return CompletableFuture<DemJourneysListResponse>
+ */
+ public CompletableFuture searchJourneysAsync() {
+ return searchJourneysWithHttpInfoAsync(new SearchJourneysOptionalParameters())
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Search DEM journeys.
+ *
+ * See {@link #searchJourneysWithHttpInfo}.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return DemJourneysListResponse
+ * @throws ApiException if fails to make API call
+ */
+ public DemJourneysListResponse searchJourneys(SearchJourneysOptionalParameters parameters)
+ throws ApiException {
+ return searchJourneysWithHttpInfo(parameters).getData();
+ }
+
+ /**
+ * Search DEM journeys.
+ *
+ *
See {@link #searchJourneysWithHttpInfoAsync}.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<DemJourneysListResponse>
+ */
+ public CompletableFuture searchJourneysAsync(
+ SearchJourneysOptionalParameters parameters) {
+ return searchJourneysWithHttpInfoAsync(parameters)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Search for DEM journeys with optional filtering by query, creator, team, and app.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return ApiResponse<DemJourneysListResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse searchJourneysWithHttpInfo(
+ SearchJourneysOptionalParameters parameters) throws ApiException {
+ Object localVarPostBody = null;
+ String query = parameters.query;
+ Long pageOffset = parameters.pageOffset;
+ Long pageLimit = parameters.pageLimit;
+ String creator = parameters.creator;
+ String team = parameters.team;
+ String appId = parameters.appId;
+ // create path and map variables
+ String localVarPath = "/api/v2/dem/journeys/search";
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "creator", creator));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "team", team));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "app_id", appId));
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.DemApi.searchJourneys",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Search DEM journeys.
+ *
+ * See {@link #searchJourneysWithHttpInfo}.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<ApiResponse<DemJourneysListResponse>>
+ */
+ public CompletableFuture> searchJourneysWithHttpInfoAsync(
+ SearchJourneysOptionalParameters parameters) {
+ Object localVarPostBody = null;
+ String query = parameters.query;
+ Long pageOffset = parameters.pageOffset;
+ Long pageLimit = parameters.pageLimit;
+ String creator = parameters.creator;
+ String team = parameters.team;
+ String appId = parameters.appId;
+ // create path and map variables
+ String localVarPath = "/api/v2/dem/journeys/search";
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "creator", creator));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "team", team));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "app_id", appId));
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.DemApi.searchJourneys",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Update a DEM journey.
+ *
+ * See {@link #updateJourneyWithHttpInfo}.
+ *
+ * @param journeyId The unique identifier of the DEM journey to update. (required)
+ * @param body (required)
+ * @return DemJourneyResponse
+ * @throws ApiException if fails to make API call
+ */
+ public DemJourneyResponse updateJourney(String journeyId, DemJourneyCreateRequest body)
+ throws ApiException {
+ return updateJourneyWithHttpInfo(journeyId, body).getData();
+ }
+
+ /**
+ * Update a DEM journey.
+ *
+ *
See {@link #updateJourneyWithHttpInfoAsync}.
+ *
+ * @param journeyId The unique identifier of the DEM journey to update. (required)
+ * @param body (required)
+ * @return CompletableFuture<DemJourneyResponse>
+ */
+ public CompletableFuture updateJourneyAsync(
+ String journeyId, DemJourneyCreateRequest body) {
+ return updateJourneyWithHttpInfoAsync(journeyId, body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Update an existing DEM journey by its ID.
+ *
+ * @param journeyId The unique identifier of the DEM journey to update. (required)
+ * @param body (required)
+ * @return ApiResponse<DemJourneyResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse updateJourneyWithHttpInfo(
+ String journeyId, DemJourneyCreateRequest body) throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'journeyId' is set
+ if (journeyId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'journeyId' when calling updateJourney");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling updateJourney");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/dem/journeys/{journey_id}"
+ .replaceAll("\\{" + "journey_id" + "\\}", apiClient.escapeString(journeyId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.DemApi.updateJourney",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "PUT",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Update a DEM journey.
+ *
+ * See {@link #updateJourneyWithHttpInfo}.
+ *
+ * @param journeyId The unique identifier of the DEM journey to update. (required)
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<DemJourneyResponse>>
+ */
+ public CompletableFuture> updateJourneyWithHttpInfoAsync(
+ String journeyId, DemJourneyCreateRequest body) {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'journeyId' is set
+ if (journeyId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'journeyId' when calling updateJourney"));
+ return result;
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'body' when calling updateJourney"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/dem/journeys/{journey_id}"
+ .replaceAll("\\{" + "journey_id" + "\\}", apiClient.escapeString(journeyId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.DemApi.updateJourney",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "PUT",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Update a DEM journey variant.
+ *
+ * See {@link #updateJourneyVariantWithHttpInfo}.
+ *
+ * @param variantId The unique identifier of the variant to update. (required)
+ * @param body (required)
+ * @return DemVariantResponse
+ * @throws ApiException if fails to make API call
+ */
+ public DemVariantResponse updateJourneyVariant(String variantId, DemVariantRequest body)
+ throws ApiException {
+ return updateJourneyVariantWithHttpInfo(variantId, body).getData();
+ }
+
+ /**
+ * Update a DEM journey variant.
+ *
+ *
See {@link #updateJourneyVariantWithHttpInfoAsync}.
+ *
+ * @param variantId The unique identifier of the variant to update. (required)
+ * @param body (required)
+ * @return CompletableFuture<DemVariantResponse>
+ */
+ public CompletableFuture updateJourneyVariantAsync(
+ String variantId, DemVariantRequest body) {
+ return updateJourneyVariantWithHttpInfoAsync(variantId, body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Update an existing variant of a DEM journey.
+ *
+ * @param variantId The unique identifier of the variant to update. (required)
+ * @param body (required)
+ * @return ApiResponse<DemVariantResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse updateJourneyVariantWithHttpInfo(
+ String variantId, DemVariantRequest body) throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'variantId' is set
+ if (variantId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'variantId' when calling updateJourneyVariant");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling updateJourneyVariant");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/dem/journeys/variants/{variant_id}"
+ .replaceAll("\\{" + "variant_id" + "\\}", apiClient.escapeString(variantId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.DemApi.updateJourneyVariant",
+ localVarPath,
+ new ArrayList