diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 2f8393d08b..5221d14e9f 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.py b/examples/v2/dem/BatchGetJourneysByTestSuiteIDs.py new file mode 100644 index 0000000000..ef0fd0bac2 --- /dev/null +++ b/examples/v2/dem/BatchGetJourneysByTestSuiteIDs.py @@ -0,0 +1,29 @@ +""" +Batch get DEM journeys by test suite IDs returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.dem_api import DEMApi +from datadog_api_client.v2.model.dem_batch_get_journeys_attributes import DemBatchGetJourneysAttributes +from datadog_api_client.v2.model.dem_batch_get_journeys_data import DemBatchGetJourneysData +from datadog_api_client.v2.model.dem_batch_get_journeys_request import DemBatchGetJourneysRequest +from datadog_api_client.v2.model.dem_batch_get_journeys_request_type import DemBatchGetJourneysRequestType + +body = DemBatchGetJourneysRequest( + data=DemBatchGetJourneysData( + attributes=DemBatchGetJourneysAttributes( + test_suite_ids=[ + "suite-abc123", + "suite-def456", + ], + ), + type=DemBatchGetJourneysRequestType.BATCH_GET_JOURNEYS_BY_TEST_SUITE_IDS_REQUEST, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = DEMApi(api_client) + response = api_instance.batch_get_journeys_by_test_suite_i_ds(body=body) + + print(response) diff --git a/examples/v2/dem/CreateJourney.py b/examples/v2/dem/CreateJourney.py new file mode 100644 index 0000000000..1cf97c4ab7 --- /dev/null +++ b/examples/v2/dem/CreateJourney.py @@ -0,0 +1,103 @@ +""" +Create a DEM journey returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.dem_api import DEMApi +from datadog_api_client.v2.model.dem_journey_create_attributes import DemJourneyCreateAttributes +from datadog_api_client.v2.model.dem_journey_create_data import DemJourneyCreateData +from datadog_api_client.v2.model.dem_journey_create_request import DemJourneyCreateRequest +from datadog_api_client.v2.model.dem_journey_rum import DemJourneyRum +from datadog_api_client.v2.model.dem_journey_type import DemJourneyType +from datadog_api_client.v2.model.dem_rum_node import DemRumNode +from datadog_api_client.v2.model.dem_rum_step import DemRumStep +from datadog_api_client.v2.model.dem_rum_step_type import DemRumStepType +from datadog_api_client.v2.model.dem_variant import DemVariant + +body = DemJourneyCreateRequest( + data=DemJourneyCreateData( + attributes=DemJourneyCreateAttributes( + description="Tracks the user checkout flow from cart to confirmation.", + journey_rum=DemJourneyRum( + filter="env:prod", + rum_steps=[ + DemRumStep( + nodes=[ + DemRumNode( + query="action.name:'checkout'", + ), + ], + type=DemRumStepType.START, + ), + DemRumStep( + nodes=[ + DemRumNode( + query="action.name:'confirmation'", + ), + ], + type=DemRumStepType.STOP, + ), + ], + variants=[ + DemVariant( + name="Mobile checkout", + rum_steps=[ + DemRumStep( + nodes=[ + DemRumNode( + query="action.name:'checkout'", + ), + ], + type=DemRumStepType.START, + ), + DemRumStep( + nodes=[ + DemRumNode( + query="action.name:'confirmation'", + ), + ], + type=DemRumStepType.STOP, + ), + ], + ), + ], + ), + name="Checkout Flow", + tags=[ + "team:synthetics", + "env:prod", + ], + variants=[ + DemVariant( + name="Mobile checkout", + rum_steps=[ + DemRumStep( + nodes=[ + DemRumNode( + query="action.name:'checkout'", + ), + ], + type=DemRumStepType.START, + ), + DemRumStep( + nodes=[ + DemRumNode( + query="action.name:'confirmation'", + ), + ], + type=DemRumStepType.STOP, + ), + ], + ), + ], + ), + type=DemJourneyType.JOURNEYS, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = DEMApi(api_client) + response = api_instance.create_journey(body=body) + + print(response) diff --git a/examples/v2/dem/CreateJourneyVariant.py b/examples/v2/dem/CreateJourneyVariant.py new file mode 100644 index 0000000000..d2d0824a3e --- /dev/null +++ b/examples/v2/dem/CreateJourneyVariant.py @@ -0,0 +1,48 @@ +""" +Create a DEM journey variant returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.dem_api import DEMApi +from datadog_api_client.v2.model.dem_rum_node import DemRumNode +from datadog_api_client.v2.model.dem_rum_step import DemRumStep +from datadog_api_client.v2.model.dem_rum_step_type import DemRumStepType +from datadog_api_client.v2.model.dem_variant_attributes import DemVariantAttributes +from datadog_api_client.v2.model.dem_variant_request import DemVariantRequest +from datadog_api_client.v2.model.dem_variant_request_data import DemVariantRequestData +from datadog_api_client.v2.model.dem_variant_type import DemVariantType + +body = DemVariantRequest( + data=DemVariantRequestData( + attributes=DemVariantAttributes( + filter="device.type:mobile", + name="Mobile checkout", + rum_steps=[ + DemRumStep( + nodes=[ + DemRumNode( + query="action.name:'checkout'", + ), + ], + type=DemRumStepType.START, + ), + DemRumStep( + nodes=[ + DemRumNode( + query="action.name:'confirmation'", + ), + ], + type=DemRumStepType.STOP, + ), + ], + ), + type=DemVariantType.VARIANTS, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = DEMApi(api_client) + response = api_instance.create_journey_variant(journey_id="journey_id", body=body) + + print(response) diff --git a/examples/v2/dem/CreateTestSuiteForJourney.py b/examples/v2/dem/CreateTestSuiteForJourney.py new file mode 100644 index 0000000000..1fb4fa28cf --- /dev/null +++ b/examples/v2/dem/CreateTestSuiteForJourney.py @@ -0,0 +1,27 @@ +""" +Create a test suite for a DEM journey returns "Created" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.dem_api import DEMApi +from datadog_api_client.v2.model.dem_create_journey_test_suite_attributes import DemCreateJourneyTestSuiteAttributes +from datadog_api_client.v2.model.dem_create_journey_test_suite_data import DemCreateJourneyTestSuiteData +from datadog_api_client.v2.model.dem_create_journey_test_suite_request import DemCreateJourneyTestSuiteRequest +from datadog_api_client.v2.model.dem_create_journey_test_suite_request_type import DemCreateJourneyTestSuiteRequestType + +body = DemCreateJourneyTestSuiteRequest( + data=DemCreateJourneyTestSuiteData( + attributes=DemCreateJourneyTestSuiteAttributes( + include_tests_from_journey_coverage=True, + test_suite_name="My Custom Suite", + ), + type=DemCreateJourneyTestSuiteRequestType.CREATE_TEST_SUITE_FOR_JOURNEY_REQUEST, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = DEMApi(api_client) + response = api_instance.create_test_suite_for_journey(public_journey_id="public_journey_id", body=body) + + print(response) diff --git a/examples/v2/dem/DeleteIgnoredInferredJourney.py b/examples/v2/dem/DeleteIgnoredInferredJourney.py new file mode 100644 index 0000000000..9d76b36b23 --- /dev/null +++ b/examples/v2/dem/DeleteIgnoredInferredJourney.py @@ -0,0 +1,13 @@ +""" +Delete an ignored inferred DEM journey returns "No Content" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.dem_api import DEMApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = DEMApi(api_client) + api_instance.delete_ignored_inferred_journey( + journey_id="journey_id", + ) diff --git a/examples/v2/dem/DeleteJourney.py b/examples/v2/dem/DeleteJourney.py new file mode 100644 index 0000000000..96e3c44972 --- /dev/null +++ b/examples/v2/dem/DeleteJourney.py @@ -0,0 +1,13 @@ +""" +Delete a DEM journey returns "No Content" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.dem_api import DEMApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = DEMApi(api_client) + api_instance.delete_journey( + journey_id="journey_id", + ) diff --git a/examples/v2/dem/DeleteJourneyVariant.py b/examples/v2/dem/DeleteJourneyVariant.py new file mode 100644 index 0000000000..1d13c83570 --- /dev/null +++ b/examples/v2/dem/DeleteJourneyVariant.py @@ -0,0 +1,13 @@ +""" +Delete a DEM journey variant returns "No Content" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.dem_api import DEMApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = DEMApi(api_client) + api_instance.delete_journey_variant( + variant_id="variant_id", + ) diff --git a/examples/v2/dem/GetJourney.py b/examples/v2/dem/GetJourney.py new file mode 100644 index 0000000000..56d7a2080d --- /dev/null +++ b/examples/v2/dem/GetJourney.py @@ -0,0 +1,15 @@ +""" +Get a DEM journey returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.dem_api import DEMApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = DEMApi(api_client) + response = api_instance.get_journey( + journey_id="journey_id", + ) + + print(response) diff --git a/examples/v2/dem/GetJourneyRecommendedTests.py b/examples/v2/dem/GetJourneyRecommendedTests.py new file mode 100644 index 0000000000..ca19b57b34 --- /dev/null +++ b/examples/v2/dem/GetJourneyRecommendedTests.py @@ -0,0 +1,15 @@ +""" +Get recommended tests for a DEM journey returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.dem_api import DEMApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = DEMApi(api_client) + response = api_instance.get_journey_recommended_tests( + journey_id="journey_id", + ) + + print(response) diff --git a/examples/v2/dem/IgnoreInferredJourney.py b/examples/v2/dem/IgnoreInferredJourney.py new file mode 100644 index 0000000000..07e267fc69 --- /dev/null +++ b/examples/v2/dem/IgnoreInferredJourney.py @@ -0,0 +1,13 @@ +""" +Ignore an inferred DEM journey returns "No Content" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.dem_api import DEMApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = DEMApi(api_client) + api_instance.ignore_inferred_journey( + journey_id="journey_id", + ) diff --git a/examples/v2/dem/SearchInferredJourneys.py b/examples/v2/dem/SearchInferredJourneys.py new file mode 100644 index 0000000000..9e25700945 --- /dev/null +++ b/examples/v2/dem/SearchInferredJourneys.py @@ -0,0 +1,13 @@ +""" +Search inferred DEM journeys returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.dem_api import DEMApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = DEMApi(api_client) + response = api_instance.search_inferred_journeys() + + print(response) diff --git a/examples/v2/dem/SearchJourneys.py b/examples/v2/dem/SearchJourneys.py new file mode 100644 index 0000000000..4c3c6acf05 --- /dev/null +++ b/examples/v2/dem/SearchJourneys.py @@ -0,0 +1,13 @@ +""" +Search DEM journeys returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.dem_api import DEMApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = DEMApi(api_client) + response = api_instance.search_journeys() + + print(response) diff --git a/examples/v2/dem/UpdateJourney.py b/examples/v2/dem/UpdateJourney.py new file mode 100644 index 0000000000..5150824842 --- /dev/null +++ b/examples/v2/dem/UpdateJourney.py @@ -0,0 +1,103 @@ +""" +Update a DEM journey returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.dem_api import DEMApi +from datadog_api_client.v2.model.dem_journey_create_attributes import DemJourneyCreateAttributes +from datadog_api_client.v2.model.dem_journey_create_data import DemJourneyCreateData +from datadog_api_client.v2.model.dem_journey_create_request import DemJourneyCreateRequest +from datadog_api_client.v2.model.dem_journey_rum import DemJourneyRum +from datadog_api_client.v2.model.dem_journey_type import DemJourneyType +from datadog_api_client.v2.model.dem_rum_node import DemRumNode +from datadog_api_client.v2.model.dem_rum_step import DemRumStep +from datadog_api_client.v2.model.dem_rum_step_type import DemRumStepType +from datadog_api_client.v2.model.dem_variant import DemVariant + +body = DemJourneyCreateRequest( + data=DemJourneyCreateData( + attributes=DemJourneyCreateAttributes( + description="Tracks the user checkout flow from cart to confirmation.", + journey_rum=DemJourneyRum( + filter="env:prod", + rum_steps=[ + DemRumStep( + nodes=[ + DemRumNode( + query="action.name:'checkout'", + ), + ], + type=DemRumStepType.START, + ), + DemRumStep( + nodes=[ + DemRumNode( + query="action.name:'confirmation'", + ), + ], + type=DemRumStepType.STOP, + ), + ], + variants=[ + DemVariant( + name="Mobile checkout", + rum_steps=[ + DemRumStep( + nodes=[ + DemRumNode( + query="action.name:'checkout'", + ), + ], + type=DemRumStepType.START, + ), + DemRumStep( + nodes=[ + DemRumNode( + query="action.name:'confirmation'", + ), + ], + type=DemRumStepType.STOP, + ), + ], + ), + ], + ), + name="Checkout Flow", + tags=[ + "team:synthetics", + "env:prod", + ], + variants=[ + DemVariant( + name="Mobile checkout", + rum_steps=[ + DemRumStep( + nodes=[ + DemRumNode( + query="action.name:'checkout'", + ), + ], + type=DemRumStepType.START, + ), + DemRumStep( + nodes=[ + DemRumNode( + query="action.name:'confirmation'", + ), + ], + type=DemRumStepType.STOP, + ), + ], + ), + ], + ), + type=DemJourneyType.JOURNEYS, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = DEMApi(api_client) + response = api_instance.update_journey(journey_id="journey_id", body=body) + + print(response) diff --git a/examples/v2/dem/UpdateJourneyVariant.py b/examples/v2/dem/UpdateJourneyVariant.py new file mode 100644 index 0000000000..5eeb1d6c3b --- /dev/null +++ b/examples/v2/dem/UpdateJourneyVariant.py @@ -0,0 +1,48 @@ +""" +Update a DEM journey variant returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.dem_api import DEMApi +from datadog_api_client.v2.model.dem_rum_node import DemRumNode +from datadog_api_client.v2.model.dem_rum_step import DemRumStep +from datadog_api_client.v2.model.dem_rum_step_type import DemRumStepType +from datadog_api_client.v2.model.dem_variant_attributes import DemVariantAttributes +from datadog_api_client.v2.model.dem_variant_request import DemVariantRequest +from datadog_api_client.v2.model.dem_variant_request_data import DemVariantRequestData +from datadog_api_client.v2.model.dem_variant_type import DemVariantType + +body = DemVariantRequest( + data=DemVariantRequestData( + attributes=DemVariantAttributes( + filter="device.type:mobile", + name="Mobile checkout", + rum_steps=[ + DemRumStep( + nodes=[ + DemRumNode( + query="action.name:'checkout'", + ), + ], + type=DemRumStepType.START, + ), + DemRumStep( + nodes=[ + DemRumNode( + query="action.name:'confirmation'", + ), + ], + type=DemRumStepType.STOP, + ), + ], + ), + type=DemVariantType.VARIANTS, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = DEMApi(api_client) + response = api_instance.update_journey_variant(variant_id="variant_id", body=body) + + print(response) diff --git a/src/datadog_api_client/v2/api/dem_api.py b/src/datadog_api_client/v2/api/dem_api.py new file mode 100644 index 0000000000..bb67c8d6e5 --- /dev/null +++ b/src/datadog_api_client/v2/api/dem_api.py @@ -0,0 +1,694 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Any, Dict, Union + +from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint +from datadog_api_client.configuration import Configuration +from datadog_api_client.model_utils import ( + UnsetType, + unset, +) +from datadog_api_client.v2.model.dem_journey_response import DemJourneyResponse +from datadog_api_client.v2.model.dem_journey_create_request import DemJourneyCreateRequest +from datadog_api_client.v2.model.dem_search_inferred_journeys_response import DemSearchInferredJourneysResponse +from datadog_api_client.v2.model.dem_inferred_journey_status import DemInferredJourneyStatus +from datadog_api_client.v2.model.dem_journeys_list_response import DemJourneysListResponse +from datadog_api_client.v2.model.dem_batch_get_journeys_request import DemBatchGetJourneysRequest +from datadog_api_client.v2.model.dem_variant_response import DemVariantResponse +from datadog_api_client.v2.model.dem_variant_request import DemVariantRequest +from datadog_api_client.v2.model.dem_recommended_tests_response import DemRecommendedTestsResponse +from datadog_api_client.v2.model.dem_journey_test_suite_response import DemJourneyTestSuiteResponse +from datadog_api_client.v2.model.dem_create_journey_test_suite_request import DemCreateJourneyTestSuiteRequest + + +class DEMApi: + """ + Manage Digital Experience Monitoring journeys. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient(Configuration()) + self.api_client = api_client + + self._batch_get_journeys_by_test_suite_i_ds_endpoint = _Endpoint( + settings={ + "response_type": (DemJourneysListResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/dem/journeys/suites/batch", + "operation_id": "batch_get_journeys_by_test_suite_i_ds", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (DemBatchGetJourneysRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._create_journey_endpoint = _Endpoint( + settings={ + "response_type": (DemJourneyResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/dem/journeys", + "operation_id": "create_journey", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (DemJourneyCreateRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._create_journey_variant_endpoint = _Endpoint( + settings={ + "response_type": (DemVariantResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/dem/journeys/{journey_id}/variants", + "operation_id": "create_journey_variant", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "journey_id": { + "required": True, + "openapi_types": (str,), + "attribute": "journey_id", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (DemVariantRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._create_test_suite_for_journey_endpoint = _Endpoint( + settings={ + "response_type": (DemJourneyTestSuiteResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/dem/journeys/{public_journey_id}/suite", + "operation_id": "create_test_suite_for_journey", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "public_journey_id": { + "required": True, + "openapi_types": (str,), + "attribute": "public_journey_id", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (DemCreateJourneyTestSuiteRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._delete_ignored_inferred_journey_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/dem/journeys/inferred/ignored/{journey_id}", + "operation_id": "delete_ignored_inferred_journey", + "http_method": "DELETE", + "version": "v2", + }, + params_map={ + "journey_id": { + "required": True, + "openapi_types": (str,), + "attribute": "journey_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["*/*"], + }, + api_client=api_client, + ) + + self._delete_journey_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/dem/journeys/{journey_id}", + "operation_id": "delete_journey", + "http_method": "DELETE", + "version": "v2", + }, + params_map={ + "journey_id": { + "required": True, + "openapi_types": (str,), + "attribute": "journey_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["*/*"], + }, + api_client=api_client, + ) + + self._delete_journey_variant_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/dem/journeys/variants/{variant_id}", + "operation_id": "delete_journey_variant", + "http_method": "DELETE", + "version": "v2", + }, + params_map={ + "variant_id": { + "required": True, + "openapi_types": (str,), + "attribute": "variant_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["*/*"], + }, + api_client=api_client, + ) + + self._get_journey_endpoint = _Endpoint( + settings={ + "response_type": (DemJourneyResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/dem/journeys/{journey_id}", + "operation_id": "get_journey", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "journey_id": { + "required": True, + "openapi_types": (str,), + "attribute": "journey_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._get_journey_recommended_tests_endpoint = _Endpoint( + settings={ + "response_type": (DemRecommendedTestsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/dem/journeys/{journey_id}/recommended-tests", + "operation_id": "get_journey_recommended_tests", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "journey_id": { + "required": True, + "openapi_types": (str,), + "attribute": "journey_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._ignore_inferred_journey_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/dem/journeys/inferred/{journey_id}/ignore", + "operation_id": "ignore_inferred_journey", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "journey_id": { + "required": True, + "openapi_types": (str,), + "attribute": "journey_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["*/*"], + }, + api_client=api_client, + ) + + self._search_inferred_journeys_endpoint = _Endpoint( + settings={ + "response_type": (DemSearchInferredJourneysResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/dem/journeys/inferred/search", + "operation_id": "search_inferred_journeys", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "status": { + "openapi_types": (DemInferredJourneyStatus,), + "attribute": "status", + "location": "query", + }, + "q": { + "openapi_types": (str,), + "attribute": "q", + "location": "query", + }, + "app_id": { + "openapi_types": (str,), + "attribute": "app_id", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._search_journeys_endpoint = _Endpoint( + settings={ + "response_type": (DemJourneysListResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/dem/journeys/search", + "operation_id": "search_journeys", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "query": { + "openapi_types": (str,), + "attribute": "query", + "location": "query", + }, + "page_offset": { + "openapi_types": (int,), + "attribute": "page[offset]", + "location": "query", + }, + "page_limit": { + "openapi_types": (int,), + "attribute": "page[limit]", + "location": "query", + }, + "creator": { + "openapi_types": (str,), + "attribute": "creator", + "location": "query", + }, + "team": { + "openapi_types": (str,), + "attribute": "team", + "location": "query", + }, + "app_id": { + "openapi_types": (str,), + "attribute": "app_id", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._update_journey_endpoint = _Endpoint( + settings={ + "response_type": (DemJourneyResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/dem/journeys/{journey_id}", + "operation_id": "update_journey", + "http_method": "PUT", + "version": "v2", + }, + params_map={ + "journey_id": { + "required": True, + "openapi_types": (str,), + "attribute": "journey_id", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (DemJourneyCreateRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._update_journey_variant_endpoint = _Endpoint( + settings={ + "response_type": (DemVariantResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/dem/journeys/variants/{variant_id}", + "operation_id": "update_journey_variant", + "http_method": "PUT", + "version": "v2", + }, + params_map={ + "variant_id": { + "required": True, + "openapi_types": (str,), + "attribute": "variant_id", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (DemVariantRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + def batch_get_journeys_by_test_suite_i_ds( + self, + body: DemBatchGetJourneysRequest, + ) -> DemJourneysListResponse: + """Batch get DEM journeys by test suite IDs. + + Return DEM journeys associated with multiple given test suite IDs. + + :type body: DemBatchGetJourneysRequest + :rtype: DemJourneysListResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._batch_get_journeys_by_test_suite_i_ds_endpoint.call_with_http_info(**kwargs) + + def create_journey( + self, + body: DemJourneyCreateRequest, + ) -> DemJourneyResponse: + """Create a DEM journey. + + Create a DEM journey. + + :type body: DemJourneyCreateRequest + :rtype: DemJourneyResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._create_journey_endpoint.call_with_http_info(**kwargs) + + def create_journey_variant( + self, + journey_id: str, + body: DemVariantRequest, + ) -> DemVariantResponse: + """Create a DEM journey variant. + + Create a variant for a DEM journey. + + :param journey_id: The unique identifier of the journey that owns the variant. + :type journey_id: str + :type body: DemVariantRequest + :rtype: DemVariantResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["journey_id"] = journey_id + + kwargs["body"] = body + + return self._create_journey_variant_endpoint.call_with_http_info(**kwargs) + + def create_test_suite_for_journey( + self, + public_journey_id: str, + body: DemCreateJourneyTestSuiteRequest, + ) -> DemJourneyTestSuiteResponse: + """Create a test suite for a DEM journey. + + Trigger test suite creation for a given DEM journey. + + :param public_journey_id: The public identifier of the DEM journey for which to create a test suite. + :type public_journey_id: str + :type body: DemCreateJourneyTestSuiteRequest + :rtype: DemJourneyTestSuiteResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["public_journey_id"] = public_journey_id + + kwargs["body"] = body + + return self._create_test_suite_for_journey_endpoint.call_with_http_info(**kwargs) + + def delete_ignored_inferred_journey( + self, + journey_id: str, + ) -> None: + """Delete an ignored inferred DEM journey. + + Remove an ignored inferred DEM journey, making it eligible to appear as a candidate again. + + :param journey_id: The unique identifier of the ignored inferred journey to delete. + :type journey_id: str + :rtype: None + """ + kwargs: Dict[str, Any] = {} + kwargs["journey_id"] = journey_id + + return self._delete_ignored_inferred_journey_endpoint.call_with_http_info(**kwargs) + + def delete_journey( + self, + journey_id: str, + ) -> None: + """Delete a DEM journey. + + Delete a DEM journey by its ID. + + :param journey_id: The unique identifier of the DEM journey to delete. + :type journey_id: str + :rtype: None + """ + kwargs: Dict[str, Any] = {} + kwargs["journey_id"] = journey_id + + return self._delete_journey_endpoint.call_with_http_info(**kwargs) + + def delete_journey_variant( + self, + variant_id: str, + ) -> None: + """Delete a DEM journey variant. + + Delete a variant from a DEM journey. + + :param variant_id: The unique identifier of the variant to delete. + :type variant_id: str + :rtype: None + """ + kwargs: Dict[str, Any] = {} + kwargs["variant_id"] = variant_id + + return self._delete_journey_variant_endpoint.call_with_http_info(**kwargs) + + def get_journey( + self, + journey_id: str, + ) -> DemJourneyResponse: + """Get a DEM journey. + + Retrieve a single DEM journey by its ID. + + :param journey_id: The unique identifier of the DEM journey. + :type journey_id: str + :rtype: DemJourneyResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["journey_id"] = journey_id + + return self._get_journey_endpoint.call_with_http_info(**kwargs) + + def get_journey_recommended_tests( + self, + journey_id: str, + ) -> DemRecommendedTestsResponse: + """Get recommended tests for a DEM journey. + + Retrieve AI-recommended synthetic tests for a DEM journey. Returns an empty list when no recommendation is available. + + :param journey_id: The unique identifier of the journey. + :type journey_id: str + :rtype: DemRecommendedTestsResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["journey_id"] = journey_id + + return self._get_journey_recommended_tests_endpoint.call_with_http_info(**kwargs) + + def ignore_inferred_journey( + self, + journey_id: str, + ) -> None: + """Ignore an inferred DEM journey. + + Mark an inferred DEM journey as ignored so it no longer appears in the candidate list. + + :param journey_id: The unique identifier of the inferred journey to ignore. + :type journey_id: str + :rtype: None + """ + kwargs: Dict[str, Any] = {} + kwargs["journey_id"] = journey_id + + return self._ignore_inferred_journey_endpoint.call_with_http_info(**kwargs) + + def search_inferred_journeys( + self, + *, + status: Union[DemInferredJourneyStatus, UnsetType] = unset, + q: Union[str, UnsetType] = unset, + app_id: Union[str, UnsetType] = unset, + ) -> DemSearchInferredJourneysResponse: + """Search inferred DEM journeys. + + 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 status: Filter by inferred journey status. Use ``candidate`` (default) to retrieve journeys suggested for promotion, or ``ignored`` to retrieve journeys that have been dismissed. + :type status: DemInferredJourneyStatus, optional + :param q: Fuzzy search query to filter inferred journeys by name. + :type q: str, optional + :param app_id: Filter inferred journeys by application ID. + :type app_id: str, optional + :rtype: DemSearchInferredJourneysResponse + """ + kwargs: Dict[str, Any] = {} + if status is not unset: + kwargs["status"] = status + + if q is not unset: + kwargs["q"] = q + + if app_id is not unset: + kwargs["app_id"] = app_id + + return self._search_inferred_journeys_endpoint.call_with_http_info(**kwargs) + + def search_journeys( + self, + *, + query: Union[str, UnsetType] = unset, + page_offset: Union[int, UnsetType] = unset, + page_limit: Union[int, UnsetType] = unset, + creator: Union[str, UnsetType] = unset, + team: Union[str, UnsetType] = unset, + app_id: Union[str, UnsetType] = unset, + ) -> DemJourneysListResponse: + """Search DEM journeys. + + Search for DEM journeys with optional filtering by query, creator, team, and app. + + :param query: A search query string to filter journeys by name. + :type query: str, optional + :param page_offset: The offset for pagination. + :type page_offset: int, optional + :param page_limit: The maximum number of results to return. + :type page_limit: int, optional + :param creator: Filter journeys by creator handle. + :type creator: str, optional + :param team: Filter journeys by team tag. + :type team: str, optional + :param app_id: Filter journeys by application ID. + :type app_id: str, optional + :rtype: DemJourneysListResponse + """ + kwargs: Dict[str, Any] = {} + if query is not unset: + kwargs["query"] = query + + if page_offset is not unset: + kwargs["page_offset"] = page_offset + + if page_limit is not unset: + kwargs["page_limit"] = page_limit + + if creator is not unset: + kwargs["creator"] = creator + + if team is not unset: + kwargs["team"] = team + + if app_id is not unset: + kwargs["app_id"] = app_id + + return self._search_journeys_endpoint.call_with_http_info(**kwargs) + + def update_journey( + self, + journey_id: str, + body: DemJourneyCreateRequest, + ) -> DemJourneyResponse: + """Update a DEM journey. + + Update an existing DEM journey by its ID. + + :param journey_id: The unique identifier of the DEM journey to update. + :type journey_id: str + :type body: DemJourneyCreateRequest + :rtype: DemJourneyResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["journey_id"] = journey_id + + kwargs["body"] = body + + return self._update_journey_endpoint.call_with_http_info(**kwargs) + + def update_journey_variant( + self, + variant_id: str, + body: DemVariantRequest, + ) -> DemVariantResponse: + """Update a DEM journey variant. + + Update an existing variant of a DEM journey. + + :param variant_id: The unique identifier of the variant to update. + :type variant_id: str + :type body: DemVariantRequest + :rtype: DemVariantResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["variant_id"] = variant_id + + kwargs["body"] = body + + return self._update_journey_variant_endpoint.call_with_http_info(**kwargs) diff --git a/src/datadog_api_client/v2/apis/__init__.py b/src/datadog_api_client/v2/apis/__init__.py index d27b2ec854..33f8eae9ea 100644 --- a/src/datadog_api_client/v2/apis/__init__.py +++ b/src/datadog_api_client/v2/apis/__init__.py @@ -37,6 +37,7 @@ from datadog_api_client.v2.api.containers_api import ContainersApi from datadog_api_client.v2.api.customer_org_api import CustomerOrgApi from datadog_api_client.v2.api.ddsql_api import DDSQLApi +from datadog_api_client.v2.api.dem_api import DEMApi from datadog_api_client.v2.api.dora_metrics_api import DORAMetricsApi from datadog_api_client.v2.api.dashboard_lists_api import DashboardListsApi from datadog_api_client.v2.api.dashboard_secure_embed_api import DashboardSecureEmbedApi @@ -187,6 +188,7 @@ "ContainersApi", "CustomerOrgApi", "DDSQLApi", + "DEMApi", "DORAMetricsApi", "DashboardListsApi", "DashboardSecureEmbedApi", diff --git a/src/datadog_api_client/v2/model/dem_batch_get_journeys_attributes.py b/src/datadog_api_client/v2/model/dem_batch_get_journeys_attributes.py new file mode 100644 index 0000000000..63424215e8 --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_batch_get_journeys_attributes.py @@ -0,0 +1,34 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class DemBatchGetJourneysAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "test_suite_ids": ([str],), + } + + attribute_map = { + "test_suite_ids": "test_suite_ids", + } + + def __init__(self_, test_suite_ids: List[str], **kwargs): + """ + Attributes for a batch get journeys request. + + :param test_suite_ids: List of test suite IDs. + :type test_suite_ids: [str] + """ + super().__init__(kwargs) + + self_.test_suite_ids = test_suite_ids diff --git a/src/datadog_api_client/v2/model/dem_batch_get_journeys_data.py b/src/datadog_api_client/v2/model/dem_batch_get_journeys_data.py new file mode 100644 index 0000000000..1a75da762f --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_batch_get_journeys_data.py @@ -0,0 +1,48 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dem_batch_get_journeys_attributes import DemBatchGetJourneysAttributes + from datadog_api_client.v2.model.dem_batch_get_journeys_request_type import DemBatchGetJourneysRequestType + + +class DemBatchGetJourneysData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dem_batch_get_journeys_attributes import DemBatchGetJourneysAttributes + from datadog_api_client.v2.model.dem_batch_get_journeys_request_type import DemBatchGetJourneysRequestType + + return { + "attributes": (DemBatchGetJourneysAttributes,), + "type": (DemBatchGetJourneysRequestType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__(self_, attributes: DemBatchGetJourneysAttributes, type: DemBatchGetJourneysRequestType, **kwargs): + """ + Data object for a batch get journeys request. + + :param attributes: Attributes for a batch get journeys request. + :type attributes: DemBatchGetJourneysAttributes + + :param type: The resource type for a request to retrieve DEM journeys by test suite IDs. + :type type: DemBatchGetJourneysRequestType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/dem_batch_get_journeys_request.py b/src/datadog_api_client/v2/model/dem_batch_get_journeys_request.py new file mode 100644 index 0000000000..0a4de2d850 --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_batch_get_journeys_request.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dem_batch_get_journeys_data import DemBatchGetJourneysData + + +class DemBatchGetJourneysRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dem_batch_get_journeys_data import DemBatchGetJourneysData + + return { + "data": (DemBatchGetJourneysData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: DemBatchGetJourneysData, **kwargs): + """ + Request body for retrieving DEM journeys by test suite IDs. + + :param data: Data object for a batch get journeys request. + :type data: DemBatchGetJourneysData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/dem_batch_get_journeys_request_type.py b/src/datadog_api_client/v2/model/dem_batch_get_journeys_request_type.py new file mode 100644 index 0000000000..599f9d40b5 --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_batch_get_journeys_request_type.py @@ -0,0 +1,37 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class DemBatchGetJourneysRequestType(ModelSimple): + """ + The resource type for a request to retrieve DEM journeys by test suite IDs. + + :param value: If omitted defaults to "batch_get_journeys_by_test_suite_ids_request". Must be one of ["batch_get_journeys_by_test_suite_ids_request"]. + :type value: str + """ + + allowed_values = { + "batch_get_journeys_by_test_suite_ids_request", + } + BATCH_GET_JOURNEYS_BY_TEST_SUITE_IDS_REQUEST: ClassVar["DemBatchGetJourneysRequestType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +DemBatchGetJourneysRequestType.BATCH_GET_JOURNEYS_BY_TEST_SUITE_IDS_REQUEST = DemBatchGetJourneysRequestType( + "batch_get_journeys_by_test_suite_ids_request" +) diff --git a/src/datadog_api_client/v2/model/dem_create_journey_test_suite_attributes.py b/src/datadog_api_client/v2/model/dem_create_journey_test_suite_attributes.py new file mode 100644 index 0000000000..38d2a694c0 --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_create_journey_test_suite_attributes.py @@ -0,0 +1,49 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + none_type, + unset, + UnsetType, +) + + +class DemCreateJourneyTestSuiteAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "include_tests_from_journey_coverage": (bool, none_type), + "test_suite_name": (str, none_type), + } + + attribute_map = { + "include_tests_from_journey_coverage": "include_tests_from_journey_coverage", + "test_suite_name": "test_suite_name", + } + + def __init__( + self_, + include_tests_from_journey_coverage: Union[bool, none_type, UnsetType] = unset, + test_suite_name: Union[str, none_type, UnsetType] = unset, + **kwargs, + ): + """ + Attributes for creating a test suite for a DEM journey. + + :param include_tests_from_journey_coverage: Whether to populate the test suite based on journey coverage data. + :type include_tests_from_journey_coverage: bool, none_type, optional + + :param test_suite_name: An optional custom name for the auto-created test suite. + :type test_suite_name: str, none_type, optional + """ + if include_tests_from_journey_coverage is not unset: + kwargs["include_tests_from_journey_coverage"] = include_tests_from_journey_coverage + if test_suite_name is not unset: + kwargs["test_suite_name"] = test_suite_name + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/dem_create_journey_test_suite_data.py b/src/datadog_api_client/v2/model/dem_create_journey_test_suite_data.py new file mode 100644 index 0000000000..94b54ebcbb --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_create_journey_test_suite_data.py @@ -0,0 +1,62 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dem_create_journey_test_suite_attributes import DemCreateJourneyTestSuiteAttributes + from datadog_api_client.v2.model.dem_create_journey_test_suite_request_type import ( + DemCreateJourneyTestSuiteRequestType, + ) + + +class DemCreateJourneyTestSuiteData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dem_create_journey_test_suite_attributes import ( + DemCreateJourneyTestSuiteAttributes, + ) + from datadog_api_client.v2.model.dem_create_journey_test_suite_request_type import ( + DemCreateJourneyTestSuiteRequestType, + ) + + return { + "attributes": (DemCreateJourneyTestSuiteAttributes,), + "type": (DemCreateJourneyTestSuiteRequestType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, + type: DemCreateJourneyTestSuiteRequestType, + attributes: Union[DemCreateJourneyTestSuiteAttributes, UnsetType] = unset, + **kwargs, + ): + """ + Data object for a create test suite request. + + :param attributes: Attributes for creating a test suite for a DEM journey. + :type attributes: DemCreateJourneyTestSuiteAttributes, optional + + :param type: The resource type for a request to create a DEM journey test suite. + :type type: DemCreateJourneyTestSuiteRequestType + """ + if attributes is not unset: + kwargs["attributes"] = attributes + super().__init__(kwargs) + + self_.type = type diff --git a/src/datadog_api_client/v2/model/dem_create_journey_test_suite_request.py b/src/datadog_api_client/v2/model/dem_create_journey_test_suite_request.py new file mode 100644 index 0000000000..ce7ffc83c8 --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_create_journey_test_suite_request.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dem_create_journey_test_suite_data import DemCreateJourneyTestSuiteData + + +class DemCreateJourneyTestSuiteRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dem_create_journey_test_suite_data import DemCreateJourneyTestSuiteData + + return { + "data": (DemCreateJourneyTestSuiteData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: DemCreateJourneyTestSuiteData, **kwargs): + """ + Request body for creating a test suite for a DEM journey. + + :param data: Data object for a create test suite request. + :type data: DemCreateJourneyTestSuiteData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/dem_create_journey_test_suite_request_type.py b/src/datadog_api_client/v2/model/dem_create_journey_test_suite_request_type.py new file mode 100644 index 0000000000..cd956a7794 --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_create_journey_test_suite_request_type.py @@ -0,0 +1,37 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class DemCreateJourneyTestSuiteRequestType(ModelSimple): + """ + The resource type for a request to create a DEM journey test suite. + + :param value: If omitted defaults to "create_test_suite_for_journey_request". Must be one of ["create_test_suite_for_journey_request"]. + :type value: str + """ + + allowed_values = { + "create_test_suite_for_journey_request", + } + CREATE_TEST_SUITE_FOR_JOURNEY_REQUEST: ClassVar["DemCreateJourneyTestSuiteRequestType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +DemCreateJourneyTestSuiteRequestType.CREATE_TEST_SUITE_FOR_JOURNEY_REQUEST = DemCreateJourneyTestSuiteRequestType( + "create_test_suite_for_journey_request" +) diff --git a/src/datadog_api_client/v2/model/dem_inferred_journey_status.py b/src/datadog_api_client/v2/model/dem_inferred_journey_status.py new file mode 100644 index 0000000000..8df3f93f79 --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_inferred_journey_status.py @@ -0,0 +1,38 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class DemInferredJourneyStatus(ModelSimple): + """ + The status of an inferred DEM journey. + + :param value: If omitted defaults to "candidate". Must be one of ["candidate", "ignored"]. + :type value: str + """ + + allowed_values = { + "candidate", + "ignored", + } + CANDIDATE: ClassVar["DemInferredJourneyStatus"] + IGNORED: ClassVar["DemInferredJourneyStatus"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +DemInferredJourneyStatus.CANDIDATE = DemInferredJourneyStatus("candidate") +DemInferredJourneyStatus.IGNORED = DemInferredJourneyStatus("ignored") diff --git a/src/datadog_api_client/v2/model/dem_journey_create_attributes.py b/src/datadog_api_client/v2/model/dem_journey_create_attributes.py new file mode 100644 index 0000000000..93106cdabb --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_journey_create_attributes.py @@ -0,0 +1,78 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dem_journey_rum import DemJourneyRum + from datadog_api_client.v2.model.dem_variant import DemVariant + + +class DemJourneyCreateAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dem_journey_rum import DemJourneyRum + from datadog_api_client.v2.model.dem_variant import DemVariant + + return { + "description": (str,), + "journey_rum": (DemJourneyRum,), + "name": (str,), + "tags": ([str],), + "variants": ([DemVariant],), + } + + attribute_map = { + "description": "description", + "journey_rum": "journey_rum", + "name": "name", + "tags": "tags", + "variants": "variants", + } + + def __init__( + self_, + journey_rum: DemJourneyRum, + name: str, + tags: List[str], + description: Union[str, UnsetType] = unset, + variants: Union[List[DemVariant], UnsetType] = unset, + **kwargs, + ): + """ + Attributes for creating or updating a DEM journey. + + :param description: An optional human-readable description of the journey. + :type description: str, optional + + :param journey_rum: The RUM definition for a DEM journey. + :type journey_rum: DemJourneyRum + + :param name: The name of the DEM journey. + :type name: str + + :param tags: List of tags associated with a DEM resource. + :type tags: [str] + + :param variants: List of variants associated with a DEM journey. + :type variants: [DemVariant], optional + """ + if description is not unset: + kwargs["description"] = description + if variants is not unset: + kwargs["variants"] = variants + super().__init__(kwargs) + + self_.journey_rum = journey_rum + self_.name = name + self_.tags = tags diff --git a/src/datadog_api_client/v2/model/dem_journey_create_data.py b/src/datadog_api_client/v2/model/dem_journey_create_data.py new file mode 100644 index 0000000000..00acabeea3 --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_journey_create_data.py @@ -0,0 +1,48 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dem_journey_create_attributes import DemJourneyCreateAttributes + from datadog_api_client.v2.model.dem_journey_type import DemJourneyType + + +class DemJourneyCreateData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dem_journey_create_attributes import DemJourneyCreateAttributes + from datadog_api_client.v2.model.dem_journey_type import DemJourneyType + + return { + "attributes": (DemJourneyCreateAttributes,), + "type": (DemJourneyType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__(self_, attributes: DemJourneyCreateAttributes, type: DemJourneyType, **kwargs): + """ + Data object for a DEM journey create or update request. + + :param attributes: Attributes for creating or updating a DEM journey. + :type attributes: DemJourneyCreateAttributes + + :param type: The type identifier for DEM journeys. + :type type: DemJourneyType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/dem_journey_create_request.py b/src/datadog_api_client/v2/model/dem_journey_create_request.py new file mode 100644 index 0000000000..aee40adaad --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_journey_create_request.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dem_journey_create_data import DemJourneyCreateData + + +class DemJourneyCreateRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dem_journey_create_data import DemJourneyCreateData + + return { + "data": (DemJourneyCreateData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: DemJourneyCreateData, **kwargs): + """ + Request body for creating or updating a DEM journey. + + :param data: Data object for a DEM journey create or update request. + :type data: DemJourneyCreateData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/dem_journey_response.py b/src/datadog_api_client/v2/model/dem_journey_response.py new file mode 100644 index 0000000000..afe696e6c6 --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_journey_response.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dem_journey_response_data import DemJourneyResponseData + + +class DemJourneyResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dem_journey_response_data import DemJourneyResponseData + + return { + "data": (DemJourneyResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: DemJourneyResponseData, **kwargs): + """ + Response body for a single DEM journey. + + :param data: Data object in a DEM journey response. + :type data: DemJourneyResponseData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/dem_journey_response_attributes.py b/src/datadog_api_client/v2/model/dem_journey_response_attributes.py new file mode 100644 index 0000000000..564f536071 --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_journey_response_attributes.py @@ -0,0 +1,127 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, + none_type, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dem_user import DemUser + from datadog_api_client.v2.model.dem_journey_rum import DemJourneyRum + from datadog_api_client.v2.model.dem_test_suite_nested import DemTestSuiteNested + from datadog_api_client.v2.model.dem_variant import DemVariant + + +class DemJourneyResponseAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dem_user import DemUser + from datadog_api_client.v2.model.dem_journey_rum import DemJourneyRum + from datadog_api_client.v2.model.dem_test_suite_nested import DemTestSuiteNested + from datadog_api_client.v2.model.dem_variant import DemVariant + + return { + "created_at": (datetime,), + "created_by": (DemUser,), + "description": (str, none_type), + "journey_rum": (DemJourneyRum,), + "name": (str,), + "org_id": (int,), + "tags": ([str],), + "test_suite": (DemTestSuiteNested,), + "updated_at": (datetime, none_type), + "updated_by": (DemUser,), + "variants": ([DemVariant],), + } + + attribute_map = { + "created_at": "created_at", + "created_by": "created_by", + "description": "description", + "journey_rum": "journey_rum", + "name": "name", + "org_id": "org_id", + "tags": "tags", + "test_suite": "test_suite", + "updated_at": "updated_at", + "updated_by": "updated_by", + "variants": "variants", + } + read_only_vars = { + "created_at", + "org_id", + "updated_at", + } + + def __init__( + self_, + created_at: datetime, + created_by: DemUser, + description: Union[str, none_type], + journey_rum: DemJourneyRum, + name: str, + org_id: int, + tags: List[str], + test_suite: DemTestSuiteNested, + updated_at: Union[datetime, none_type], + updated_by: DemUser, + variants: List[DemVariant], + **kwargs, + ): + """ + Attributes returned in a DEM journey response. + + :param created_at: The timestamp when the journey was created. + :type created_at: datetime + + :param created_by: A Datadog user associated with a DEM operation. + :type created_by: DemUser + + :param description: An optional human-readable description of the journey. + :type description: str, none_type + + :param journey_rum: The RUM definition for a DEM journey. + :type journey_rum: DemJourneyRum + + :param name: The name of the DEM journey. + :type name: str + + :param org_id: The organization ID that owns this journey. + :type org_id: int + + :param tags: List of tags associated with a DEM resource. + :type tags: [str] + + :param test_suite: A test suite associated with a DEM resource. + :type test_suite: DemTestSuiteNested + + :param updated_at: The timestamp when the journey was last updated. + :type updated_at: datetime, none_type + + :param updated_by: A Datadog user associated with a DEM operation. + :type updated_by: DemUser + + :param variants: List of variants associated with a DEM journey. + :type variants: [DemVariant] + """ + super().__init__(kwargs) + + self_.created_at = created_at + self_.created_by = created_by + self_.description = description + self_.journey_rum = journey_rum + self_.name = name + self_.org_id = org_id + self_.tags = tags + self_.test_suite = test_suite + self_.updated_at = updated_at + self_.updated_by = updated_by + self_.variants = variants diff --git a/src/datadog_api_client/v2/model/dem_journey_response_data.py b/src/datadog_api_client/v2/model/dem_journey_response_data.py new file mode 100644 index 0000000000..270165ab00 --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_journey_response_data.py @@ -0,0 +1,54 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dem_journey_response_attributes import DemJourneyResponseAttributes + from datadog_api_client.v2.model.dem_journey_type import DemJourneyType + + +class DemJourneyResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dem_journey_response_attributes import DemJourneyResponseAttributes + from datadog_api_client.v2.model.dem_journey_type import DemJourneyType + + return { + "attributes": (DemJourneyResponseAttributes,), + "id": (str,), + "type": (DemJourneyType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__(self_, attributes: DemJourneyResponseAttributes, id: str, type: DemJourneyType, **kwargs): + """ + Data object in a DEM journey response. + + :param attributes: Attributes returned in a DEM journey response. + :type attributes: DemJourneyResponseAttributes + + :param id: The unique identifier of the DEM journey. + :type id: str + + :param type: The type identifier for DEM journeys. + :type type: DemJourneyType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/dem_journey_rum.py b/src/datadog_api_client/v2/model/dem_journey_rum.py new file mode 100644 index 0000000000..6078f3f22c --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_journey_rum.py @@ -0,0 +1,64 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dem_rum_step import DemRumStep + from datadog_api_client.v2.model.dem_variant import DemVariant + + +class DemJourneyRum(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dem_rum_step import DemRumStep + from datadog_api_client.v2.model.dem_variant import DemVariant + + return { + "filter": (str,), + "rum_steps": ([DemRumStep],), + "variants": ([DemVariant],), + } + + attribute_map = { + "filter": "filter", + "rum_steps": "rum_steps", + "variants": "variants", + } + + def __init__( + self_, + rum_steps: List[DemRumStep], + filter: Union[str, UnsetType] = unset, + variants: Union[List[DemVariant], UnsetType] = unset, + **kwargs, + ): + """ + The RUM definition for a DEM journey. + + :param filter: An optional RUM query filter applied to the entire journey. + :type filter: str, optional + + :param rum_steps: List of RUM journey steps. + :type rum_steps: [DemRumStep] + + :param variants: List of variants associated with a DEM journey. + :type variants: [DemVariant], optional + """ + if filter is not unset: + kwargs["filter"] = filter + if variants is not unset: + kwargs["variants"] = variants + super().__init__(kwargs) + + self_.rum_steps = rum_steps diff --git a/src/datadog_api_client/v2/model/dem_journey_test_suite_response.py b/src/datadog_api_client/v2/model/dem_journey_test_suite_response.py new file mode 100644 index 0000000000..7b7a69efe9 --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_journey_test_suite_response.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dem_journey_test_suite_response_data import DemJourneyTestSuiteResponseData + + +class DemJourneyTestSuiteResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dem_journey_test_suite_response_data import DemJourneyTestSuiteResponseData + + return { + "data": (DemJourneyTestSuiteResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: DemJourneyTestSuiteResponseData, **kwargs): + """ + Response body for a DEM journey test suite. + + :param data: Data object in a DEM test suite response. + :type data: DemJourneyTestSuiteResponseData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/dem_journey_test_suite_response_attributes.py b/src/datadog_api_client/v2/model/dem_journey_test_suite_response_attributes.py new file mode 100644 index 0000000000..ec722070b1 --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_journey_test_suite_response_attributes.py @@ -0,0 +1,55 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, + unset, + UnsetType, +) + + +class DemJourneyTestSuiteResponseAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "created_at": (datetime,), + "dropped_test_ids": ([str],), + "name": (str,), + } + + attribute_map = { + "created_at": "created_at", + "dropped_test_ids": "dropped_test_ids", + "name": "name", + } + read_only_vars = { + "created_at", + } + + def __init__( + self_, created_at: datetime, name: str, dropped_test_ids: Union[List[str], UnsetType] = unset, **kwargs + ): + """ + Attributes of a DEM journey test suite response. + + :param created_at: The timestamp when the test suite was created. + :type created_at: datetime + + :param dropped_test_ids: Test IDs omitted because the caller lacks read access. + :type dropped_test_ids: [str], optional + + :param name: The name of the test suite. + :type name: str + """ + if dropped_test_ids is not unset: + kwargs["dropped_test_ids"] = dropped_test_ids + super().__init__(kwargs) + + self_.created_at = created_at + self_.name = name diff --git a/src/datadog_api_client/v2/model/dem_journey_test_suite_response_data.py b/src/datadog_api_client/v2/model/dem_journey_test_suite_response_data.py new file mode 100644 index 0000000000..bd0fcc40e4 --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_journey_test_suite_response_data.py @@ -0,0 +1,60 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dem_journey_test_suite_response_attributes import ( + DemJourneyTestSuiteResponseAttributes, + ) + from datadog_api_client.v2.model.dem_journey_test_suite_type import DemJourneyTestSuiteType + + +class DemJourneyTestSuiteResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dem_journey_test_suite_response_attributes import ( + DemJourneyTestSuiteResponseAttributes, + ) + from datadog_api_client.v2.model.dem_journey_test_suite_type import DemJourneyTestSuiteType + + return { + "attributes": (DemJourneyTestSuiteResponseAttributes,), + "id": (str,), + "type": (DemJourneyTestSuiteType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, attributes: DemJourneyTestSuiteResponseAttributes, id: str, type: DemJourneyTestSuiteType, **kwargs + ): + """ + Data object in a DEM test suite response. + + :param attributes: Attributes of a DEM journey test suite response. + :type attributes: DemJourneyTestSuiteResponseAttributes + + :param id: The public ID of the test suite. + :type id: str + + :param type: The type identifier for DEM journey test suites. + :type type: DemJourneyTestSuiteType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/dem_journey_test_suite_type.py b/src/datadog_api_client/v2/model/dem_journey_test_suite_type.py new file mode 100644 index 0000000000..fa55432727 --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_journey_test_suite_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class DemJourneyTestSuiteType(ModelSimple): + """ + The type identifier for DEM journey test suites. + + :param value: If omitted defaults to "journey_test_suite". Must be one of ["journey_test_suite"]. + :type value: str + """ + + allowed_values = { + "journey_test_suite", + } + JOURNEY_TEST_SUITE: ClassVar["DemJourneyTestSuiteType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +DemJourneyTestSuiteType.JOURNEY_TEST_SUITE = DemJourneyTestSuiteType("journey_test_suite") diff --git a/src/datadog_api_client/v2/model/dem_journey_type.py b/src/datadog_api_client/v2/model/dem_journey_type.py new file mode 100644 index 0000000000..fdc06ff70a --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_journey_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class DemJourneyType(ModelSimple): + """ + The type identifier for DEM journeys. + + :param value: If omitted defaults to "journeys". Must be one of ["journeys"]. + :type value: str + """ + + allowed_values = { + "journeys", + } + JOURNEYS: ClassVar["DemJourneyType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +DemJourneyType.JOURNEYS = DemJourneyType("journeys") diff --git a/src/datadog_api_client/v2/model/dem_journeys_list_response.py b/src/datadog_api_client/v2/model/dem_journeys_list_response.py new file mode 100644 index 0000000000..fa5722b9a3 --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_journeys_list_response.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dem_journey_response_data import DemJourneyResponseData + + +class DemJourneysListResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dem_journey_response_data import DemJourneyResponseData + + return { + "data": ([DemJourneyResponseData],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: List[DemJourneyResponseData], **kwargs): + """ + Response body for a list of DEM journeys. + + :param data: List of DEM journey data objects. + :type data: [DemJourneyResponseData] + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/dem_recommended_test_attributes.py b/src/datadog_api_client/v2/model/dem_recommended_test_attributes.py new file mode 100644 index 0000000000..7c00c80e71 --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_recommended_test_attributes.py @@ -0,0 +1,99 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dem_recommended_test_config import DemRecommendedTestConfig + + +class DemRecommendedTestAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dem_recommended_test_config import DemRecommendedTestConfig + + return { + "config": (DemRecommendedTestConfig,), + "created_at": (datetime,), + "name": (str,), + "result_id": (str,), + "session_id": (str,), + "source": (str,), + "type": (str,), + "variant_id": (str,), + } + + attribute_map = { + "config": "config", + "created_at": "created_at", + "name": "name", + "result_id": "result_id", + "session_id": "session_id", + "source": "source", + "type": "type", + "variant_id": "variant_id", + } + + def __init__( + self_, + config: DemRecommendedTestConfig, + created_at: datetime, + name: str, + source: str, + type: str, + result_id: Union[str, UnsetType] = unset, + session_id: Union[str, UnsetType] = unset, + variant_id: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Attributes of an AI-recommended synthetic test for a DEM journey. + + :param config: The browser test configuration that can be used to create the recommended test. + :type config: DemRecommendedTestConfig + + :param created_at: The time when the recommendation was generated. + :type created_at: datetime + + :param name: The display name of the recommended test. + :type name: str + + :param result_id: The identifier of the validating sample run, when available. + :type result_id: str, optional + + :param session_id: The RUM session identifier for the validating sample run, when available. + :type session_id: str, optional + + :param source: The pipeline that produced the recommendation. + :type source: str + + :param type: The type of synthetic test. + :type type: str + + :param variant_id: The variant associated with the recommendation, when applicable. + :type variant_id: str, optional + """ + if result_id is not unset: + kwargs["result_id"] = result_id + if session_id is not unset: + kwargs["session_id"] = session_id + if variant_id is not unset: + kwargs["variant_id"] = variant_id + super().__init__(kwargs) + + self_.config = config + self_.created_at = created_at + self_.name = name + self_.source = source + self_.type = type diff --git a/src/datadog_api_client/v2/model/dem_recommended_test_config.py b/src/datadog_api_client/v2/model/dem_recommended_test_config.py new file mode 100644 index 0000000000..a003b6f3a5 --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_recommended_test_config.py @@ -0,0 +1,17 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, +) + + +class DemRecommendedTestConfig(ModelNormal): + def __init__(self_, **kwargs): + """ + The browser test configuration that can be used to create the recommended test. + """ + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/dem_recommended_test_data.py b/src/datadog_api_client/v2/model/dem_recommended_test_data.py new file mode 100644 index 0000000000..31ca8efb30 --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_recommended_test_data.py @@ -0,0 +1,54 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dem_recommended_test_attributes import DemRecommendedTestAttributes + from datadog_api_client.v2.model.dem_recommended_test_type import DemRecommendedTestType + + +class DemRecommendedTestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dem_recommended_test_attributes import DemRecommendedTestAttributes + from datadog_api_client.v2.model.dem_recommended_test_type import DemRecommendedTestType + + return { + "attributes": (DemRecommendedTestAttributes,), + "id": (str,), + "type": (DemRecommendedTestType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__(self_, attributes: DemRecommendedTestAttributes, id: str, type: DemRecommendedTestType, **kwargs): + """ + Data object for a recommended synthetic test. + + :param attributes: Attributes of an AI-recommended synthetic test for a DEM journey. + :type attributes: DemRecommendedTestAttributes + + :param id: The identifier of the journey associated with the recommendation. + :type id: str + + :param type: The type identifier for a recommended synthetic test. + :type type: DemRecommendedTestType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/dem_recommended_test_type.py b/src/datadog_api_client/v2/model/dem_recommended_test_type.py new file mode 100644 index 0000000000..c1c6f5e3f0 --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_recommended_test_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class DemRecommendedTestType(ModelSimple): + """ + The type identifier for a recommended synthetic test. + + :param value: If omitted defaults to "recommended_tests". Must be one of ["recommended_tests"]. + :type value: str + """ + + allowed_values = { + "recommended_tests", + } + RECOMMENDED_TESTS: ClassVar["DemRecommendedTestType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +DemRecommendedTestType.RECOMMENDED_TESTS = DemRecommendedTestType("recommended_tests") diff --git a/src/datadog_api_client/v2/model/dem_recommended_tests_response.py b/src/datadog_api_client/v2/model/dem_recommended_tests_response.py new file mode 100644 index 0000000000..48995bf5df --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_recommended_tests_response.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dem_recommended_test_data import DemRecommendedTestData + + +class DemRecommendedTestsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dem_recommended_test_data import DemRecommendedTestData + + return { + "data": ([DemRecommendedTestData],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: List[DemRecommendedTestData], **kwargs): + """ + Response containing recommended synthetic tests for a DEM journey. + + :param data: Recommended synthetic tests for a DEM journey. + :type data: [DemRecommendedTestData] + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/dem_rum_node.py b/src/datadog_api_client/v2/model/dem_rum_node.py new file mode 100644 index 0000000000..887c494bf6 --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_rum_node.py @@ -0,0 +1,50 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class DemRumNode(ModelNormal): + @cached_property + def openapi_types(_): + return { + "app_id": (str,), + "id": (str,), + "query": (str,), + } + + attribute_map = { + "app_id": "app_id", + "id": "id", + "query": "query", + } + + def __init__(self_, query: str, app_id: Union[str, UnsetType] = unset, id: Union[str, UnsetType] = unset, **kwargs): + """ + A RUM node within a journey step. + + :param app_id: The application ID associated with this node. + :type app_id: str, optional + + :param id: The ID of the RUM node element. + :type id: str, optional + + :param query: The RUM query for matching this node. + :type query: str + """ + if app_id is not unset: + kwargs["app_id"] = app_id + if id is not unset: + kwargs["id"] = id + super().__init__(kwargs) + + self_.query = query diff --git a/src/datadog_api_client/v2/model/dem_rum_step.py b/src/datadog_api_client/v2/model/dem_rum_step.py new file mode 100644 index 0000000000..e29000371f --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_rum_step.py @@ -0,0 +1,48 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dem_rum_node import DemRumNode + from datadog_api_client.v2.model.dem_rum_step_type import DemRumStepType + + +class DemRumStep(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dem_rum_node import DemRumNode + from datadog_api_client.v2.model.dem_rum_step_type import DemRumStepType + + return { + "nodes": ([DemRumNode],), + "type": (DemRumStepType,), + } + + attribute_map = { + "nodes": "nodes", + "type": "type", + } + + def __init__(self_, nodes: List[DemRumNode], type: DemRumStepType, **kwargs): + """ + A single step in a RUM journey definition. + + :param nodes: List of RUM nodes within a journey step. + :type nodes: [DemRumNode] + + :param type: The type of a RUM journey step. + :type type: DemRumStepType + """ + super().__init__(kwargs) + + self_.nodes = nodes + self_.type = type diff --git a/src/datadog_api_client/v2/model/dem_rum_step_type.py b/src/datadog_api_client/v2/model/dem_rum_step_type.py new file mode 100644 index 0000000000..3012b95956 --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_rum_step_type.py @@ -0,0 +1,41 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class DemRumStepType(ModelSimple): + """ + The type of a RUM journey step. + + :param value: Must be one of ["start", "stop", "step"]. + :type value: str + """ + + allowed_values = { + "start", + "stop", + "step", + } + START: ClassVar["DemRumStepType"] + STOP: ClassVar["DemRumStepType"] + STEP: ClassVar["DemRumStepType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +DemRumStepType.START = DemRumStepType("start") +DemRumStepType.STOP = DemRumStepType("stop") +DemRumStepType.STEP = DemRumStepType("step") diff --git a/src/datadog_api_client/v2/model/dem_search_inferred_journeys_response.py b/src/datadog_api_client/v2/model/dem_search_inferred_journeys_response.py new file mode 100644 index 0000000000..1c56e938ba --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_search_inferred_journeys_response.py @@ -0,0 +1,38 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Any, List + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + date, + datetime, + none_type, + UUID, +) + + +class DemSearchInferredJourneysResponse(ModelNormal): + @cached_property + def openapi_types(_): + return { + "data": ([bool, date, datetime, dict, float, int, list, str, UUID, none_type],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: List[Any], **kwargs): + """ + Response body for searching inferred journeys. Contains either candidate or ignored items depending on the ``status`` query parameter. + + :param data: List of inferred journey items matching the search criteria. + :type data: [bool, date, datetime, dict, float, int, list, str, UUID, none_type] + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/dem_search_inferred_journeys_response_data_item.py b/src/datadog_api_client/v2/model/dem_search_inferred_journeys_response_data_item.py new file mode 100644 index 0000000000..37fcb1e304 --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_search_inferred_journeys_response_data_item.py @@ -0,0 +1,17 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, +) + + +class DemSearchInferredJourneysResponse_dataItem(ModelNormal): + def __init__(self_, **kwargs): + """ + A single inferred journey item, either a candidate or an ignored journey. + """ + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/dem_test_suite_nested.py b/src/datadog_api_client/v2/model/dem_test_suite_nested.py new file mode 100644 index 0000000000..80653cb552 --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_test_suite_nested.py @@ -0,0 +1,39 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class DemTestSuiteNested(ModelNormal): + @cached_property + def openapi_types(_): + return { + "id": (str,), + "name": (str,), + } + + attribute_map = { + "id": "id", + "name": "name", + } + + def __init__(self_, id: str, name: str, **kwargs): + """ + A test suite associated with a DEM resource. + + :param id: The ID of the test suite. + :type id: str + + :param name: The name of the test suite. + :type name: str + """ + super().__init__(kwargs) + + self_.id = id + self_.name = name diff --git a/src/datadog_api_client/v2/model/dem_user.py b/src/datadog_api_client/v2/model/dem_user.py new file mode 100644 index 0000000000..be422de592 --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_user.py @@ -0,0 +1,51 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class DemUser(ModelNormal): + @cached_property + def openapi_types(_): + return { + "email": (str,), + "handle": (str,), + "name": (str,), + "uuid": (str,), + } + + attribute_map = { + "email": "email", + "handle": "handle", + "name": "name", + "uuid": "uuid", + } + + def __init__(self_, email: str, handle: str, name: str, uuid: str, **kwargs): + """ + A Datadog user associated with a DEM operation. + + :param email: The email address of the user. + :type email: str + + :param handle: The handle of the user. + :type handle: str + + :param name: The display name of the user. + :type name: str + + :param uuid: The UUID of the user. + :type uuid: str + """ + super().__init__(kwargs) + + self_.email = email + self_.handle = handle + self_.name = name + self_.uuid = uuid diff --git a/src/datadog_api_client/v2/model/dem_variant.py b/src/datadog_api_client/v2/model/dem_variant.py new file mode 100644 index 0000000000..fe43cb9692 --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_variant.py @@ -0,0 +1,72 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dem_rum_step import DemRumStep + + +class DemVariant(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dem_rum_step import DemRumStep + + return { + "filter": (str,), + "id": (str,), + "name": (str,), + "rum_steps": ([DemRumStep],), + } + + attribute_map = { + "filter": "filter", + "id": "id", + "name": "name", + "rum_steps": "rum_steps", + } + read_only_vars = { + "id", + } + + def __init__( + self_, + name: str, + rum_steps: List[DemRumStep], + filter: Union[str, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + A variant (sub-funnel) of a DEM journey with its own steps. + + :param filter: An optional RUM query filter to scope this variant. + :type filter: str, optional + + :param id: The unique identifier of the variant. + :type id: str, optional + + :param name: The name of the variant. + :type name: str + + :param rum_steps: List of RUM journey steps. + :type rum_steps: [DemRumStep] + """ + if filter is not unset: + kwargs["filter"] = filter + if id is not unset: + kwargs["id"] = id + super().__init__(kwargs) + + self_.name = name + self_.rum_steps = rum_steps diff --git a/src/datadog_api_client/v2/model/dem_variant_attributes.py b/src/datadog_api_client/v2/model/dem_variant_attributes.py new file mode 100644 index 0000000000..877043c8ee --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_variant_attributes.py @@ -0,0 +1,55 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dem_rum_step import DemRumStep + + +class DemVariantAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dem_rum_step import DemRumStep + + return { + "filter": (str,), + "name": (str,), + "rum_steps": ([DemRumStep],), + } + + attribute_map = { + "filter": "filter", + "name": "name", + "rum_steps": "rum_steps", + } + + def __init__(self_, name: str, rum_steps: List[DemRumStep], filter: Union[str, UnsetType] = unset, **kwargs): + """ + Attributes of a DEM journey variant. + + :param filter: An optional RUM query filter to scope this variant. + :type filter: str, optional + + :param name: The name of the variant. + :type name: str + + :param rum_steps: List of RUM journey steps. + :type rum_steps: [DemRumStep] + """ + if filter is not unset: + kwargs["filter"] = filter + super().__init__(kwargs) + + self_.name = name + self_.rum_steps = rum_steps diff --git a/src/datadog_api_client/v2/model/dem_variant_request.py b/src/datadog_api_client/v2/model/dem_variant_request.py new file mode 100644 index 0000000000..acbf9b0cef --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_variant_request.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dem_variant_request_data import DemVariantRequestData + + +class DemVariantRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dem_variant_request_data import DemVariantRequestData + + return { + "data": (DemVariantRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: DemVariantRequestData, **kwargs): + """ + Request to create or update a DEM journey variant. + + :param data: Data object for a DEM journey variant request. + :type data: DemVariantRequestData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/dem_variant_request_data.py b/src/datadog_api_client/v2/model/dem_variant_request_data.py new file mode 100644 index 0000000000..a73bde4674 --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_variant_request_data.py @@ -0,0 +1,48 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dem_variant_attributes import DemVariantAttributes + from datadog_api_client.v2.model.dem_variant_type import DemVariantType + + +class DemVariantRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dem_variant_attributes import DemVariantAttributes + from datadog_api_client.v2.model.dem_variant_type import DemVariantType + + return { + "attributes": (DemVariantAttributes,), + "type": (DemVariantType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__(self_, attributes: DemVariantAttributes, type: DemVariantType, **kwargs): + """ + Data object for a DEM journey variant request. + + :param attributes: Attributes of a DEM journey variant. + :type attributes: DemVariantAttributes + + :param type: The type identifier for DEM journey variants. + :type type: DemVariantType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/dem_variant_response.py b/src/datadog_api_client/v2/model/dem_variant_response.py new file mode 100644 index 0000000000..26eb7318e6 --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_variant_response.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dem_variant_response_data import DemVariantResponseData + + +class DemVariantResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dem_variant_response_data import DemVariantResponseData + + return { + "data": (DemVariantResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: DemVariantResponseData, **kwargs): + """ + Response containing a DEM journey variant. + + :param data: Data object returned for a DEM journey variant. + :type data: DemVariantResponseData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/dem_variant_response_data.py b/src/datadog_api_client/v2/model/dem_variant_response_data.py new file mode 100644 index 0000000000..d01c0e106c --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_variant_response_data.py @@ -0,0 +1,54 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dem_variant_attributes import DemVariantAttributes + from datadog_api_client.v2.model.dem_variant_type import DemVariantType + + +class DemVariantResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dem_variant_attributes import DemVariantAttributes + from datadog_api_client.v2.model.dem_variant_type import DemVariantType + + return { + "attributes": (DemVariantAttributes,), + "id": (str,), + "type": (DemVariantType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__(self_, attributes: DemVariantAttributes, id: str, type: DemVariantType, **kwargs): + """ + Data object returned for a DEM journey variant. + + :param attributes: Attributes of a DEM journey variant. + :type attributes: DemVariantAttributes + + :param id: The unique identifier of the variant. + :type id: str + + :param type: The type identifier for DEM journey variants. + :type type: DemVariantType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/dem_variant_type.py b/src/datadog_api_client/v2/model/dem_variant_type.py new file mode 100644 index 0000000000..4ff31397ca --- /dev/null +++ b/src/datadog_api_client/v2/model/dem_variant_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class DemVariantType(ModelSimple): + """ + The type identifier for DEM journey variants. + + :param value: If omitted defaults to "variants". Must be one of ["variants"]. + :type value: str + """ + + allowed_values = { + "variants", + } + VARIANTS: ClassVar["DemVariantType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +DemVariantType.VARIANTS = DemVariantType("variants") diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 6e882ce1c4..d203176eda 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -2510,6 +2510,49 @@ from datadog_api_client.v2.model.deleted_tests_request_type import DeletedTestsRequestType from datadog_api_client.v2.model.deleted_tests_response import DeletedTestsResponse from datadog_api_client.v2.model.deleted_tests_response_type import DeletedTestsResponseType +from datadog_api_client.v2.model.dem_batch_get_journeys_attributes import DemBatchGetJourneysAttributes +from datadog_api_client.v2.model.dem_batch_get_journeys_data import DemBatchGetJourneysData +from datadog_api_client.v2.model.dem_batch_get_journeys_request import DemBatchGetJourneysRequest +from datadog_api_client.v2.model.dem_batch_get_journeys_request_type import DemBatchGetJourneysRequestType +from datadog_api_client.v2.model.dem_create_journey_test_suite_attributes import DemCreateJourneyTestSuiteAttributes +from datadog_api_client.v2.model.dem_create_journey_test_suite_data import DemCreateJourneyTestSuiteData +from datadog_api_client.v2.model.dem_create_journey_test_suite_request import DemCreateJourneyTestSuiteRequest +from datadog_api_client.v2.model.dem_create_journey_test_suite_request_type import DemCreateJourneyTestSuiteRequestType +from datadog_api_client.v2.model.dem_inferred_journey_status import DemInferredJourneyStatus +from datadog_api_client.v2.model.dem_journey_create_attributes import DemJourneyCreateAttributes +from datadog_api_client.v2.model.dem_journey_create_data import DemJourneyCreateData +from datadog_api_client.v2.model.dem_journey_create_request import DemJourneyCreateRequest +from datadog_api_client.v2.model.dem_journey_response import DemJourneyResponse +from datadog_api_client.v2.model.dem_journey_response_attributes import DemJourneyResponseAttributes +from datadog_api_client.v2.model.dem_journey_response_data import DemJourneyResponseData +from datadog_api_client.v2.model.dem_journey_rum import DemJourneyRum +from datadog_api_client.v2.model.dem_journey_test_suite_response import DemJourneyTestSuiteResponse +from datadog_api_client.v2.model.dem_journey_test_suite_response_attributes import DemJourneyTestSuiteResponseAttributes +from datadog_api_client.v2.model.dem_journey_test_suite_response_data import DemJourneyTestSuiteResponseData +from datadog_api_client.v2.model.dem_journey_test_suite_type import DemJourneyTestSuiteType +from datadog_api_client.v2.model.dem_journey_type import DemJourneyType +from datadog_api_client.v2.model.dem_journeys_list_response import DemJourneysListResponse +from datadog_api_client.v2.model.dem_recommended_test_attributes import DemRecommendedTestAttributes +from datadog_api_client.v2.model.dem_recommended_test_config import DemRecommendedTestConfig +from datadog_api_client.v2.model.dem_recommended_test_data import DemRecommendedTestData +from datadog_api_client.v2.model.dem_recommended_test_type import DemRecommendedTestType +from datadog_api_client.v2.model.dem_recommended_tests_response import DemRecommendedTestsResponse +from datadog_api_client.v2.model.dem_rum_node import DemRumNode +from datadog_api_client.v2.model.dem_rum_step import DemRumStep +from datadog_api_client.v2.model.dem_rum_step_type import DemRumStepType +from datadog_api_client.v2.model.dem_search_inferred_journeys_response import DemSearchInferredJourneysResponse +from datadog_api_client.v2.model.dem_search_inferred_journeys_response_data_item import ( + DemSearchInferredJourneysResponse_dataItem, +) +from datadog_api_client.v2.model.dem_test_suite_nested import DemTestSuiteNested +from datadog_api_client.v2.model.dem_user import DemUser +from datadog_api_client.v2.model.dem_variant import DemVariant +from datadog_api_client.v2.model.dem_variant_attributes import DemVariantAttributes +from datadog_api_client.v2.model.dem_variant_request import DemVariantRequest +from datadog_api_client.v2.model.dem_variant_request_data import DemVariantRequestData +from datadog_api_client.v2.model.dem_variant_response import DemVariantResponse +from datadog_api_client.v2.model.dem_variant_response_data import DemVariantResponseData +from datadog_api_client.v2.model.dem_variant_type import DemVariantType from datadog_api_client.v2.model.dependency_location import DependencyLocation from datadog_api_client.v2.model.deployment import Deployment from datadog_api_client.v2.model.deployment_attributes import DeploymentAttributes @@ -13195,6 +13238,47 @@ "DeletedTestsRequestType", "DeletedTestsResponse", "DeletedTestsResponseType", + "DemBatchGetJourneysAttributes", + "DemBatchGetJourneysData", + "DemBatchGetJourneysRequest", + "DemBatchGetJourneysRequestType", + "DemCreateJourneyTestSuiteAttributes", + "DemCreateJourneyTestSuiteData", + "DemCreateJourneyTestSuiteRequest", + "DemCreateJourneyTestSuiteRequestType", + "DemInferredJourneyStatus", + "DemJourneyCreateAttributes", + "DemJourneyCreateData", + "DemJourneyCreateRequest", + "DemJourneyResponse", + "DemJourneyResponseAttributes", + "DemJourneyResponseData", + "DemJourneyRum", + "DemJourneyTestSuiteResponse", + "DemJourneyTestSuiteResponseAttributes", + "DemJourneyTestSuiteResponseData", + "DemJourneyTestSuiteType", + "DemJourneyType", + "DemJourneysListResponse", + "DemRecommendedTestAttributes", + "DemRecommendedTestConfig", + "DemRecommendedTestData", + "DemRecommendedTestType", + "DemRecommendedTestsResponse", + "DemRumNode", + "DemRumStep", + "DemRumStepType", + "DemSearchInferredJourneysResponse", + "DemSearchInferredJourneysResponse_dataItem", + "DemTestSuiteNested", + "DemUser", + "DemVariant", + "DemVariantAttributes", + "DemVariantRequest", + "DemVariantRequestData", + "DemVariantResponse", + "DemVariantResponseData", + "DemVariantType", "DependencyLocation", "Deployment", "DeploymentAttributes", diff --git a/tests/v2/features/dem.feature b/tests/v2/features/dem.feature new file mode 100644 index 0000000000..c596de0c34 --- /dev/null +++ b/tests/v2/features/dem.feature @@ -0,0 +1,236 @@ +@endpoint(dem) @endpoint(dem-v2) +Feature: DEM + Manage Digital Experience Monitoring journeys. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "DEM" API + + @generated @skip @team:DataDog/dem-features + Scenario: Batch get DEM journeys by test suite IDs returns "Bad Request" response + Given new "BatchGetJourneysByTestSuiteIDs" request + And body with value {"data": {"attributes": {"test_suite_ids": ["suite-abc123", "suite-def456"]}, "type": "batch_get_journeys_by_test_suite_ids_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/dem-features + Scenario: Batch get DEM journeys by test suite IDs returns "Not Found" response + Given new "BatchGetJourneysByTestSuiteIDs" request + And body with value {"data": {"attributes": {"test_suite_ids": ["suite-abc123", "suite-def456"]}, "type": "batch_get_journeys_by_test_suite_ids_request"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/dem-features + Scenario: Batch get DEM journeys by test suite IDs returns "OK" response + Given new "BatchGetJourneysByTestSuiteIDs" request + And body with value {"data": {"attributes": {"test_suite_ids": ["suite-abc123", "suite-def456"]}, "type": "batch_get_journeys_by_test_suite_ids_request"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/dem-features + Scenario: Create a DEM journey returns "OK" response + Given new "CreateJourney" request + And body with value {"data": {"attributes": {"description": "Tracks the user checkout flow from cart to confirmation.", "journey_rum": {"filter": "env:prod", "rum_steps": [{"nodes": [{"query": "action.name:'checkout'"}], "type": "start"}, {"nodes": [{"query": "action.name:'confirmation'"}], "type": "stop"}], "variants": [{"name": "Mobile checkout", "rum_steps": [{"nodes": [{"query": "action.name:'checkout'"}], "type": "start"}, {"nodes": [{"query": "action.name:'confirmation'"}], "type": "stop"}]}]}, "name": "Checkout Flow", "tags": ["team:synthetics", "env:prod"], "variants": [{"name": "Mobile checkout", "rum_steps": [{"nodes": [{"query": "action.name:'checkout'"}], "type": "start"}, {"nodes": [{"query": "action.name:'confirmation'"}], "type": "stop"}]}]}, "type": "journeys"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/dem-features + Scenario: Create a DEM journey variant returns "Bad Request" response + Given new "CreateJourneyVariant" request + And request contains "journey_id" parameter from "REPLACE.ME" + And body with 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"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/dem-features + Scenario: Create a DEM journey variant returns "Not Found" response + Given new "CreateJourneyVariant" request + And request contains "journey_id" parameter from "REPLACE.ME" + And body with 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"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/dem-features + Scenario: Create a DEM journey variant returns "OK" response + Given new "CreateJourneyVariant" request + And request contains "journey_id" parameter from "REPLACE.ME" + And body with 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"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/dem-features + Scenario: Create a test suite for a DEM journey returns "Created" response + Given new "CreateTestSuiteForJourney" request + And request contains "public_journey_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"include_tests_from_journey_coverage": true, "test_suite_name": "My Custom Suite"}, "type": "create_test_suite_for_journey_request"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/dem-features + Scenario: Create a test suite for a DEM journey returns "Not Found" response + Given new "CreateTestSuiteForJourney" request + And request contains "public_journey_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"include_tests_from_journey_coverage": true, "test_suite_name": "My Custom Suite"}, "type": "create_test_suite_for_journey_request"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/dem-features + Scenario: Delete a DEM journey returns "No Content" response + Given new "DeleteJourney" request + And request contains "journey_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/dem-features + Scenario: Delete a DEM journey returns "Not Found" response + Given new "DeleteJourney" request + And request contains "journey_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/dem-features + Scenario: Delete a DEM journey variant returns "No Content" response + Given new "DeleteJourneyVariant" request + And request contains "variant_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/dem-features + Scenario: Delete a DEM journey variant returns "Not Found" response + Given new "DeleteJourneyVariant" request + And request contains "variant_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/dem-features + Scenario: Delete an ignored inferred DEM journey returns "No Content" response + Given new "DeleteIgnoredInferredJourney" request + And request contains "journey_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/dem-features + Scenario: Delete an ignored inferred DEM journey returns "Not Found" response + Given new "DeleteIgnoredInferredJourney" request + And request contains "journey_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/dem-features + Scenario: Get a DEM journey returns "Not Found" response + Given new "GetJourney" request + And request contains "journey_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/dem-features + Scenario: Get a DEM journey returns "OK" response + Given new "GetJourney" request + And request contains "journey_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/dem-features + Scenario: Get recommended tests for a DEM journey returns "Not Found" response + Given new "GetJourneyRecommendedTests" request + And request contains "journey_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/dem-features + Scenario: Get recommended tests for a DEM journey returns "OK" response + Given new "GetJourneyRecommendedTests" request + And request contains "journey_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/dem-features + Scenario: Ignore an inferred DEM journey returns "No Content" response + Given new "IgnoreInferredJourney" request + And request contains "journey_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/dem-features + Scenario: Ignore an inferred DEM journey returns "Not Found" response + Given new "IgnoreInferredJourney" request + And request contains "journey_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/dem-features + Scenario: Search DEM journeys returns "Bad Request" response + Given new "SearchJourneys" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/dem-features + Scenario: Search DEM journeys returns "Not Found" response + Given new "SearchJourneys" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/dem-features + Scenario: Search DEM journeys returns "OK" response + Given new "SearchJourneys" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/dem-features + Scenario: Search inferred DEM journeys returns "Bad Request" response + Given new "SearchInferredJourneys" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/dem-features + Scenario: Search inferred DEM journeys returns "Not Found" response + Given new "SearchInferredJourneys" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/dem-features + Scenario: Search inferred DEM journeys returns "OK" response + Given new "SearchInferredJourneys" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/dem-features + Scenario: Update a DEM journey returns "Not Found" response + Given new "UpdateJourney" request + And request contains "journey_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"description": "Tracks the user checkout flow from cart to confirmation.", "journey_rum": {"filter": "env:prod", "rum_steps": [{"nodes": [{"query": "action.name:'checkout'"}], "type": "start"}, {"nodes": [{"query": "action.name:'confirmation'"}], "type": "stop"}], "variants": [{"name": "Mobile checkout", "rum_steps": [{"nodes": [{"query": "action.name:'checkout'"}], "type": "start"}, {"nodes": [{"query": "action.name:'confirmation'"}], "type": "stop"}]}]}, "name": "Checkout Flow", "tags": ["team:synthetics", "env:prod"], "variants": [{"name": "Mobile checkout", "rum_steps": [{"nodes": [{"query": "action.name:'checkout'"}], "type": "start"}, {"nodes": [{"query": "action.name:'confirmation'"}], "type": "stop"}]}]}, "type": "journeys"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/dem-features + Scenario: Update a DEM journey returns "OK" response + Given new "UpdateJourney" request + And request contains "journey_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"description": "Tracks the user checkout flow from cart to confirmation.", "journey_rum": {"filter": "env:prod", "rum_steps": [{"nodes": [{"query": "action.name:'checkout'"}], "type": "start"}, {"nodes": [{"query": "action.name:'confirmation'"}], "type": "stop"}], "variants": [{"name": "Mobile checkout", "rum_steps": [{"nodes": [{"query": "action.name:'checkout'"}], "type": "start"}, {"nodes": [{"query": "action.name:'confirmation'"}], "type": "stop"}]}]}, "name": "Checkout Flow", "tags": ["team:synthetics", "env:prod"], "variants": [{"name": "Mobile checkout", "rum_steps": [{"nodes": [{"query": "action.name:'checkout'"}], "type": "start"}, {"nodes": [{"query": "action.name:'confirmation'"}], "type": "stop"}]}]}, "type": "journeys"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/dem-features + Scenario: Update a DEM journey variant returns "Bad Request" response + Given new "UpdateJourneyVariant" request + And request contains "variant_id" parameter from "REPLACE.ME" + And body with 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"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/dem-features + Scenario: Update a DEM journey variant returns "Not Found" response + Given new "UpdateJourneyVariant" request + And request contains "variant_id" parameter from "REPLACE.ME" + And body with 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"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/dem-features + Scenario: Update a DEM journey variant returns "OK" response + Given new "UpdateJourneyVariant" request + And request contains "variant_id" parameter from "REPLACE.ME" + And body with 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"}} + When the request is sent + Then the response status is 200 OK diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index 960023eb2f..be4ddd2f98 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -2309,6 +2309,112 @@ "type": "idempotent" } }, + "CreateJourney": { + "tag": "DEM", + "undo": { + "operationId": "DeleteJourney", + "parameters": [ + { + "name": "journey_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteIgnoredInferredJourney": { + "tag": "DEM", + "undo": { + "type": "idempotent" + } + }, + "SearchInferredJourneys": { + "tag": "DEM", + "undo": { + "type": "safe" + } + }, + "IgnoreInferredJourney": { + "tag": "DEM", + "undo": { + "operationId": "DeleteIgnoredInferredJourney", + "parameters": [ + { + "name": "journey_id", + "origin": "path", + "source": "journey_id" + } + ], + "type": "unsafe" + } + }, + "SearchJourneys": { + "tag": "DEM", + "undo": { + "type": "safe" + } + }, + "BatchGetJourneysByTestSuiteIDs": { + "tag": "DEM", + "undo": { + "type": "safe" + } + }, + "DeleteJourneyVariant": { + "tag": "DEM", + "undo": { + "type": "idempotent" + } + }, + "UpdateJourneyVariant": { + "tag": "DEM", + "undo": { + "type": "idempotent" + } + }, + "DeleteJourney": { + "tag": "DEM", + "undo": { + "type": "idempotent" + } + }, + "GetJourney": { + "tag": "DEM", + "undo": { + "type": "safe" + } + }, + "UpdateJourney": { + "tag": "DEM", + "undo": { + "type": "idempotent" + } + }, + "GetJourneyRecommendedTests": { + "tag": "DEM", + "undo": { + "type": "safe" + } + }, + "CreateJourneyVariant": { + "tag": "DEM", + "undo": { + "operationId": "DeleteJourneyVariant", + "parameters": [ + { + "name": "variant_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "CreateTestSuiteForJourney": { + "tag": "DEM", + "undo": { + "type": "safe" + } + }, "ListDeploymentGates": { "tag": "Deployment Gates", "undo": {