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