arazzo: 1.0.1 info: title: Adobe Inspect PDF Properties summary: Upload a PDF, request its metadata properties, and poll the job until done or failed. description: >- Drives the Adobe PDF Services asynchronous PDF-properties pipeline that reports a PDF's metadata such as page count, page size, encryption state, and PDF/A compliance. The workflow registers the source PDF by requesting a pre-signed upload URI and asset ID, submits a getPDFProperties job requesting page-level detail, then polls the job and branches on the terminal status: a done result exposes the output properties asset, while a failed result surfaces the error. Each step spells out its request inline. The polling job identifier is supplied as a workflow input because the submit response exposes only an opaque Location header. version: 1.0.0 sourceDescriptions: - name: pdfServicesApi url: ../openapi/adobe-pdf-services-api-openapi.yml type: openapi workflows: - workflowId: inspect-pdf-properties summary: Retrieve metadata properties for an uploaded PDF. description: >- Requests an upload slot for the source PDF, submits a getPDFProperties job with page-level properties enabled, polls job status until it reaches a terminal state, and branches to report success or failure of the inspection. inputs: type: object required: - accessToken - jobID properties: accessToken: type: string description: OAuth 2.0 bearer access token from Adobe IMS. includePageLevelProperties: type: boolean description: Whether to include page-level property details. default: true jobID: type: string description: The job identifier taken from the getPDFProperties response Location header, used to poll status. steps: - stepId: requestUpload description: >- Request a pre-signed upload URI and asset ID for the source PDF, which is then PUT to the returned uploadUri out of band. operationId: uploadAsset parameters: - name: Authorization in: header value: "Bearer $inputs.accessToken" requestBody: contentType: application/json payload: mediaType: application/pdf successCriteria: - condition: $statusCode == 200 outputs: assetID: $response.body#/assetID uploadUri: $response.body#/uploadUri - stepId: submitProperties description: >- Submit an asynchronous getPDFProperties job that inspects the uploaded PDF's metadata. Returns 201 with an in-progress job status. operationId: getPDFProperties parameters: - name: Authorization in: header value: "Bearer $inputs.accessToken" requestBody: contentType: application/json payload: assetID: $steps.requestUpload.outputs.assetID includePageLevelProperties: $inputs.includePageLevelProperties successCriteria: - condition: $statusCode == 201 outputs: status: $response.body#/status - stepId: pollStatus description: >- Poll the getPDFProperties job until it reaches a terminal state. Loops back while the status is "in progress", branches to a success report when "done", and to a failure report when "failed". operationId: getJobStatus parameters: - name: Authorization in: header value: "Bearer $inputs.accessToken" - name: operationType in: path value: pdfproperties - name: jobID in: path value: $inputs.jobID successCriteria: - condition: $statusCode == 200 outputs: status: $response.body#/status outputAssetID: $response.body#/asset/assetID errorMessage: $response.body#/error/message onSuccess: - name: stillRunning type: goto stepId: pollStatus criteria: - context: $response.body condition: $.status == "in progress" type: jsonpath - name: succeeded type: goto stepId: reportSuccess criteria: - context: $response.body condition: $.status == "done" type: jsonpath - name: failed type: goto stepId: reportFailure criteria: - context: $response.body condition: $.status == "failed" type: jsonpath - stepId: reportSuccess description: >- Resolve a download URI for the properties output asset produced by a successful inspection job. operationId: getAsset parameters: - name: Authorization in: header value: "Bearer $inputs.accessToken" - name: assetID in: path value: $steps.pollStatus.outputs.outputAssetID successCriteria: - condition: $statusCode == 200 outputs: downloadUri: $response.body#/downloadUri onSuccess: - name: done type: end - stepId: reportFailure description: >- Re-read the job status to capture the error code and message when the inspection job failed, ending the workflow with the failure recorded. operationId: getJobStatus parameters: - name: Authorization in: header value: "Bearer $inputs.accessToken" - name: operationType in: path value: pdfproperties - name: jobID in: path value: $inputs.jobID successCriteria: - condition: $statusCode == 200 outputs: errorCode: $response.body#/error/code errorMessage: $response.body#/error/message outputs: sourceAssetID: $steps.requestUpload.outputs.assetID propertiesAssetID: $steps.pollStatus.outputs.outputAssetID downloadUri: $steps.reportSuccess.outputs.downloadUri failureMessage: $steps.reportFailure.outputs.errorMessage