Setting up InDesign APIs User Events Stream with Adobe I/O Events
These instructions describe how to set up and get started using Adobe I/O Events for InDesign APIs user driven job processing events. You can use Adobe I/O for streaming InDesign APIs job processing events such as the downloading of assets, engine processing, uploading of assets etc.
Introduction
InDesign APIs events provide all the job processing details, similar to those shown in the status calls of InDesign APIs. However, InDesign APIs events are more comprehensive and real-time, unlike the status calls which only include "not-started," "running," "completed," and "failed" statuses.
Setup Adobe I/O
See Getting Started with Adobe I/O Events
For basic instructions for this use case, starting from developer.adobe.com/console:
When prompted, click the designated button to proceed:
-
Select
Create new project
-
Select
Add event
-
Filter by
Creative Cloud
-
Select
Select InDesign APIs - Firefly Services
-
Subscribe to the user driven change events of your choosing
-
Set up OAuth Server-to-Server Credentials.
- The OAuth Server-to-Server credential relies on the OAuth 2.0 client_credentials grant type to generate access tokens.
-
Set up Event Registration
- Provide a name and description for this event subscription
-
Configure Event Registration
-
Optionally choose whether to enable Webhook or Runtime action
-
Enable Webhook
- We recommend batch over single webhooks
- For
Webhook URL
a public https endpoint must be provided - The endpoint must be able to handle get and post requests
- The get request must respond with the challenge query if it exists
- The post request must respond that it received the message or the webhook will re-attempt to send several times before giving up and automatically disabling the webhook sends
-
Enable Runtime action
- See Setting up your Runtime Environment
- Select a pre-made runtime action/runtime namespace
-
-
-
After Saving
- Verify that the Status is
Active
- If Webhook was selected, verify that it successfully passed the challenge without errors
- Verify that the Status is
Event Data Structure
Events are structured in JSON format using the CloudEvents spec
Example Event (batch):
[
{
"data": {
"key": "ec1b9eaf-a0b2-4bcf-9f6d-bd394e2586d7",
"source": "indesign",
"value": {
"jobId": "8b524c70-6779-47f1-ac2a-ce93c23b3f5f",
"eventId": "ec1b9eaf-a0b2-4bcf-9f6d-bd394e2586d7",
"state": "QUEUED",
"timestamp": 1720631447943
}
},
"id": "e414ef62-92f7-48f9-841b-b22d38f6141e",
"source": "urn:uuid:5c8f2d48-a2a7-4d0e-bb49-aabf9a72bd1e",
"specversion": "1.0",
"type": "QUEUED",
"datacontenttype": "application/json",
"time": "2024-07-10T17:10:48.985Z",
"eventid": "420c1092-a7fd-4132-9ee8-de7a41c01bcd",
"recipientclientid": "7af7ab96045640b5a6e4724810145eb9"
},
{
"data": {
"key": "f1dbc354-3878-4273-8a9e-c2a6b57543cc",
"source": "indesign",
"value": {
"jobId": "8b524c70-6779-47f1-ac2a-ce93c23b3f5f",
"eventId": "f1dbc354-3878-4273-8a9e-c2a6b57543cc",
"state": "ASSETS_DOWNLOAD_STARTED",
"timestamp": 1720631448826
}
},
"id": "70b8efcb-38f2-4781-84ee-036013d3f5bc",
"source": "urn:uuid:5c8f2d48-a2a7-4d0e-bb49-aabf9a72bd1e",
"specversion": "1.0",
"type": "ASSETS_DOWNLOAD_STARTED",
"datacontenttype": "application/json",
"time": "2024-07-10T17:10:49.165Z",
"eventid": "d1c47805-a971-4685-8e63-863ba4ecd325",
"recipientclientid": "7af7ab96045640b5a6e4724810145eb9"
}
,
{
"data": {
"key": "2196c45f-8721-4587-8136-b92147a5efa6",
"source": "indesign",
"value": {
"jobId": "8b524c70-6779-47f1-ac2a-ce93c23b3f5f",
"eventId": "2196c45f-8721-4587-8136-b92147a5efa6",
"state": "ASSET_DOWNLOAD_STARTED",
"timestamp": 1720631448998
}
},
"id": "740798e9-0827-4efd-a769-78b9a67c0ee8",
"source": "urn:uuid:5c8f2d48-a2a7-4d0e-bb49-aabf9a72bd1e",
"specversion": "1.0",
"type": "ASSET_DOWNLOAD_STARTED",
"datacontenttype": "application/json",
"time": "2024-07-10T17:10:49.238Z",
"eventid": "1bf6e136-967f-47c3-a64e-afe90f6656d0",
"recipientclientid": "7af7ab96045640b5a6e4724810145eb9"
}
]
Example Event (single):
{
"data": {
"key": "70db1be2-cdde-4a00-bc41-5acd33db3cc7",
"source": "indesign",
"value": {
"jobId": "8b524c70-6779-47f1-ac2a-ce93c23b3f5f",
"eventId": "70db1be2-cdde-4a00-bc41-5acd33db3cc7",
"state": "ASSET_DOWNLOAD_FAILED",
"timestamp": 1720631449367,
"data": {
"destination": "doc.indd",
"source": {
"url": "Presigned url",
"type": "AWS/Azure/Dropbox(Optional)"
}
}
}
},
"id": "7e3a89ce-d1f5-4b55-a9fc-682e3ac535e2",
"source": "urn:uuid:5c8f2d48-a2a7-4d0e-bb49-aabf9a72bd1e",
"specversion": "1.0",
"type": "ASSET_DOWNLOAD_FAILED",
"datacontenttype": "application/json",
"time": "2024-07-10T17:10:49.509Z",
"eventid": "f60a502e-c16b-49c6-b3c1-770666a1921f",
"recipientclientid": "7af7ab96045640b5a6e4724810145eb9"
}
Data Field Definitions:
Event List
Note - This is a snapshot listing of most available events. There may be some events that don't show up or no longer exist.