Adobe Premiere Pro · Arazzo Workflow

Adobe Premiere Purge Creative Cloud Library

Version 1.0.0

List a library's elements, delete the first one, then delete the library.

1 workflow 1 source API 1 provider
View Spec View on GitHub AdobeAutomationCreative CloudMediaPremiere ProVideo EditingVideo ProductionArazzoWorkflows

Provider

adobe-premiere

Workflows

purge-library
Remove an element from a library, then delete the library.
Lists the library's elements, branches on whether any element remains, and when one exists deletes that element before deleting the library; when the library is already empty it deletes the library directly.
3 steps inputs: accessToken, libraryId outputs: deletedElementId, deletedLibraryId
1
listElements
getLibraryElements
List the library's elements to determine whether an element must be removed before deleting the library.
2
deleteElement
deleteLibraryElement
Remove the first returned element from the library before deleting the library.
3
deleteLibrary
deleteLibrary
Delete the library itself.

Source API Descriptions

Arazzo Workflow Specification

adobe-premiere-purge-library-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Adobe Premiere Purge Creative Cloud Library
  summary: List a library's elements, delete the first one, then delete the library.
  description: >-
    A teardown flow for the Adobe Creative Cloud Libraries API used by Premiere
    Pro. The workflow lists the elements in a library, deletes the first
    returned element to demonstrate element removal, and then deletes the
    library itself. Because the API exposes element removal one id at a time and
    Arazzo step iteration is not modeled here, the flow deletes a single element
    before removing the parent library; callers needing a full purge re-run the
    flow until the element list is empty. Each step spells out its request inline
    so the flow can be read and executed without opening the underlying OpenAPI
    description.
  version: 1.0.0
sourceDescriptions:
- name: creativeCloudLibrariesApi
  url: ../openapi/adobe-premiere-creative-cloud-libraries-openapi.yml
  type: openapi
workflows:
- workflowId: purge-library
  summary: Remove an element from a library, then delete the library.
  description: >-
    Lists the library's elements, branches on whether any element remains, and
    when one exists deletes that element before deleting the library; when the
    library is already empty it deletes the library directly.
  inputs:
    type: object
    required:
    - accessToken
    - libraryId
    properties:
      accessToken:
        type: string
        description: OAuth 2.0 bearer access token for the Creative Cloud Libraries API.
      libraryId:
        type: string
        description: Identifier of the library to purge and delete.
  steps:
  - stepId: listElements
    description: >-
      List the library's elements to determine whether an element must be
      removed before deleting the library.
    operationId: getLibraryElements
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    - name: libraryId
      in: path
      value: $inputs.libraryId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      firstElementId: $response.body#/elements/0/id
      totalCount: $response.body#/total_count
    onSuccess:
    - name: hasElements
      type: goto
      stepId: deleteElement
      criteria:
      - context: $response.body
        condition: $.elements.length > 0
        type: jsonpath
    - name: noElements
      type: goto
      stepId: deleteLibrary
      criteria:
      - context: $response.body
        condition: $.elements.length == 0
        type: jsonpath
  - stepId: deleteElement
    description: >-
      Remove the first returned element from the library before deleting the
      library.
    operationId: deleteLibraryElement
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    - name: libraryId
      in: path
      value: $inputs.libraryId
    - name: elementId
      in: path
      value: $steps.listElements.outputs.firstElementId
    successCriteria:
    - condition: $statusCode == 204
    outputs:
      deletedElementId: $steps.listElements.outputs.firstElementId
  - stepId: deleteLibrary
    description: Delete the library itself.
    operationId: deleteLibrary
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    - name: libraryId
      in: path
      value: $inputs.libraryId
    successCriteria:
    - condition: $statusCode == 204
    outputs:
      deletedLibraryId: $inputs.libraryId
  outputs:
    deletedElementId: $steps.deleteElement.outputs.deletedElementId
    deletedLibraryId: $steps.deleteLibrary.outputs.deletedLibraryId