Confirm an existing segment and run a report filtered by it.
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.
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
x-realizes-capability-ids:
- BC-420.20
- BC-610.50
x-capability-derivation:
method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
min_confidence: 0.7
sources:
- capability_id: BC-420.20
capability_name: Customer Segmentation Management
spec: adobe-analytics-segments-api-openapi.yml
confidence: 0.75
- capability_id: BC-610.50
capability_name: Analytics & BI Management
spec: adobe-analytics-reports-api-openapi.yml
confidence: 0.8
model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: reportsApi
url: ../openapi/adobe-analytics-reports-api-openapi.yml
type: openapi
- name: segmentsApi
url: ../openapi/adobe-analytics-segments-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
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.