Adobe Creative Cloud · Arazzo Workflow

Adobe Creative Cloud Stock Quota-Aware License

Version 1.0.0

Check the member's Stock quota, search for an asset, then license it when quota remains.

1 workflow 1 source API 1 provider
View Spec View on GitHub AI/MLCloudCreativeDesignDocumentsPhotographySaaSVideoArazzoWorkflows

Provider

adobe-creative-cloud

Workflows

stock-quota-aware-license
Read quota, search Stock, and license an asset only when quota remains.
Reads the member's available quota, searches the catalog, and licenses the first result for download when there is remaining quota.
3 steps inputs: accessToken, apiKey, license, words outputs: firstAssetId, licensedContents, quota
1
getProfile
getMemberProfile
Read the member's Stock profile to learn the remaining download quota before searching and licensing.
2
searchStock
searchFiles
Search the Stock catalog for an asset matching the keywords and capture the first result's asset ID.
3
licenseAsset
licenseContent
License the first matched asset for the requested license type to obtain a full-resolution download URL.

Source API Descriptions

Arazzo Workflow Specification

adobe-creative-cloud-stock-quota-aware-license-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Adobe Creative Cloud Stock Quota-Aware License
  summary: Check the member's Stock quota, search for an asset, then license it when quota remains.
  description: >-
    A quota-aware Adobe Stock licensing flow. The workflow first reads the
    member profile to learn the remaining download quota, then searches the
    Stock catalog for an asset matching the keywords. It branches on the quota:
    when quota remains it licenses the first matched asset for download, and
    when no quota remains it ends without licensing. Every step spells out its
    request inline, including the bearer token and x-api-key, so the flow can
    be read and run without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: stockApi
  url: ../openapi/adobe-stock-api-openapi-original.yml
  type: openapi
workflows:
- workflowId: stock-quota-aware-license
  summary: Read quota, search Stock, and license an asset only when quota remains.
  description: >-
    Reads the member's available quota, searches the catalog, and licenses the
    first result for download when there is remaining quota.
  inputs:
    type: object
    required:
    - accessToken
    - apiKey
    - words
    properties:
      accessToken:
        type: string
        description: OAuth 2.0 bearer access token from the Adobe IMS token endpoint.
      apiKey:
        type: string
        description: Client ID (x-api-key) from the Adobe Developer Console.
      words:
        type: string
        description: Search keywords for the Stock catalog.
      license:
        type: string
        description: License type to acquire (Standard, Extended, Video_HD, Video_4K).
        default: Standard
  steps:
  - stepId: getProfile
    description: >-
      Read the member's Stock profile to learn the remaining download quota
      before searching and licensing.
    operationId: getMemberProfile
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    - name: x-api-key
      in: header
      value: $inputs.apiKey
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      quota: $response.body#/available_entitlement/quota
    onSuccess:
    - name: hasQuota
      type: goto
      stepId: searchStock
      criteria:
      - context: $response.body
        condition: $.available_entitlement.quota > 0
        type: jsonpath
    - name: noQuota
      type: end
      criteria:
      - context: $response.body
        condition: $.available_entitlement.quota == 0
        type: jsonpath
  - stepId: searchStock
    description: >-
      Search the Stock catalog for an asset matching the keywords and capture
      the first result's asset ID.
    operationId: searchFiles
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    - name: x-api-key
      in: header
      value: $inputs.apiKey
    - name: search_parameters[words]
      in: query
      value: $inputs.words
    - name: search_parameters[limit]
      in: query
      value: 1
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      firstAssetId: $response.body#/files/0/id
  - stepId: licenseAsset
    description: >-
      License the first matched asset for the requested license type to obtain
      a full-resolution download URL.
    operationId: licenseContent
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    - name: x-api-key
      in: header
      value: $inputs.apiKey
    - name: content_id
      in: query
      value: $steps.searchStock.outputs.firstAssetId
    - name: license
      in: query
      value: $inputs.license
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      contents: $response.body#/contents
  outputs:
    quota: $steps.getProfile.outputs.quota
    firstAssetId: $steps.searchStock.outputs.firstAssetId
    licensedContents: $steps.licenseAsset.outputs.contents