arazzo: 1.0.1 info: title: Adobe Analytics Report on an Existing Segment summary: List the company segments, fetch a chosen segment's details, then run a report filtered by it. description: >- Reports against a segment that already exists rather than creating a new one. The workflow lists the segments for the company, retrieves the full details of a chosen segment by ID to confirm its report suite, and then runs a date-ranged report whose global filters include that existing segment. Every step spells out its request inline, including the Adobe IMS bearer token and Developer Console API key headers. version: 1.0.0 sourceDescriptions: - name: analyticsApi url: ../openapi/adobe-analytics-api-openapi.yml type: openapi workflows: - workflowId: report-on-existing-segment summary: Confirm an existing segment and run a report filtered by it. description: >- Lists the company segments, fetches the chosen segment to read its report suite, and runs a date-ranged report scoped to that suite and filtered by the segment. inputs: type: object required: - accessToken - apiKey - segmentId - metricId - dateRange properties: accessToken: type: string description: Adobe IMS OAuth 2.0 access token (sent as a Bearer token). apiKey: type: string description: Adobe Developer Console API key (x-api-key header). segmentId: type: string description: The ID of the existing segment to report on. locale: type: string description: Locale for response labels (e.g. en_US). default: en_US metricId: type: string description: The metric ID to report on (e.g. metrics/visits). dimension: type: string description: The primary dimension ID for the report (e.g. variables/page). default: variables/page dateRange: type: string description: ISO 8601 date range for the global date filter. steps: - stepId: listSegments description: List the company segments to confirm the target segment is present. operationId: listSegments parameters: - name: Authorization in: header value: "Bearer $inputs.accessToken" - name: x-api-key in: header value: $inputs.apiKey - name: filterByIds in: query value: $inputs.segmentId - name: limit in: query value: 1 - name: page in: query value: 0 - name: expansion in: query value: definition successCriteria: - condition: $statusCode == 200 outputs: matchedSegmentId: $response.body#/content/0/id - stepId: getSegment description: Retrieve the chosen segment's details, including its report suite. operationId: getSegment parameters: - name: Authorization in: header value: "Bearer $inputs.accessToken" - name: x-api-key in: header value: $inputs.apiKey - name: segmentId in: path value: $inputs.segmentId - name: locale in: query value: $inputs.locale successCriteria: - condition: $statusCode == 200 outputs: segmentRsid: $response.body#/rsid segmentName: $response.body#/name - stepId: runReport description: Run a date-ranged report scoped to the segment's report suite and filtered by the segment. operationId: runReport parameters: - name: Authorization in: header value: "Bearer $inputs.accessToken" - name: x-api-key in: header value: $inputs.apiKey requestBody: contentType: application/json payload: rsid: $steps.getSegment.outputs.segmentRsid locale: $inputs.locale globalFilters: - type: dateRange dateRange: $inputs.dateRange - type: segment segmentId: $inputs.segmentId metricContainer: metrics: - id: $inputs.metricId columnId: "0" dimension: $inputs.dimension settings: limit: 50 page: 0 nonesBehavior: exclude-nones successCriteria: - condition: $statusCode == 200 outputs: rows: $response.body#/rows summaryData: $response.body#/summaryData outputs: segmentName: $steps.getSegment.outputs.segmentName rows: $steps.runReport.outputs.rows