Adobe Analytics · Arazzo Workflow

Adobe Analytics Clone a Segment

Version 1.0.0

Read an existing segment and create a copy of it under a new name.

1 workflow 1 source API 1 provider
View Spec View on GitHub AdobeAnalyticsBusiness IntelligenceCustomer IntelligenceDigital MarketingMarketingWeb AnalyticsArazzoWorkflows

Provider

adobe-analytics

Workflows

clone-segment
Read a source segment and create a copy of it.
Fetches the source segment by ID and creates a new segment that reuses the source definition and report suite under a new name.
2 steps inputs: accessToken, apiKey, locale, newSegmentName, sourceSegmentId outputs: clonedSegmentId, clonedSegmentName
1
getSourceSegment
getSegment
Retrieve the source segment, including its definition and report suite.
2
createClone
createSegment
Create a new segment that reuses the source definition under a new name.

Source API Descriptions

Arazzo Workflow Specification

adobe-analytics-clone-segment-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Adobe Analytics Clone a Segment
  summary: Read an existing segment and create a copy of it under a new name.
  description: >-
    Duplicates an Adobe Analytics segment so it can be modified independently of
    the original. The workflow retrieves the source segment by ID — including its
    definition and report suite — and then creates a new segment that reuses that
    definition under a caller-supplied name. 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: clone-segment
  summary: Read a source segment and create a copy of it.
  description: >-
    Fetches the source segment by ID and creates a new segment that reuses the
    source definition and report suite under a new name.
  inputs:
    type: object
    required:
    - accessToken
    - apiKey
    - sourceSegmentId
    - newSegmentName
    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).
      sourceSegmentId:
        type: string
        description: The ID of the segment to clone.
      newSegmentName:
        type: string
        description: Display name for the cloned segment.
      locale:
        type: string
        description: Locale for response labels (e.g. en_US).
        default: en_US
  steps:
  - stepId: getSourceSegment
    description: Retrieve the source segment, including its definition and 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.sourceSegmentId
    - name: locale
      in: query
      value: $inputs.locale
    - name: expansion
      in: query
      value: definition
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      sourceRsid: $response.body#/rsid
      sourceDefinition: $response.body#/definition
      sourceDescription: $response.body#/description
  - stepId: createClone
    description: Create a new segment that reuses the source definition under a new name.
    operationId: createSegment
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    - name: x-api-key
      in: header
      value: $inputs.apiKey
    requestBody:
      contentType: application/json
      payload:
        name: $inputs.newSegmentName
        description: $steps.getSourceSegment.outputs.sourceDescription
        rsid: $steps.getSourceSegment.outputs.sourceRsid
        definition: $steps.getSourceSegment.outputs.sourceDefinition
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      clonedSegmentId: $response.body#/id
      clonedSegmentName: $response.body#/name
  outputs:
    clonedSegmentId: $steps.createClone.outputs.clonedSegmentId
    clonedSegmentName: $steps.createClone.outputs.clonedSegmentName