Prerequisites
Before reading this article, you should be familiar with:
- Typefi workflows, workflow plug-ins, and workflow actions. Typefi workflows are made up of one or more workflow actions, which perform a single task (such as exporting a PDF). Workflow actions are packaged inside workflow plug-ins. A workflow plug-in is a Java (Apache Tomcat) webapp.
- The Typefi 8 Server API. The Typefi Server 8 API is based on the REST (Representational State Transfer) web service architecture. All access is via HTTP, and JSON is used for all data transfer.
GET /descriptor
Each workflow plug-in implements the following endpoint: GET /descriptor
.
This endpoint returns JSON that describes all the actions (and their user interfaces) offered by the plug-in.
Access descriptor.json
To access descriptor.json for a specific workflow plug-in:
- Sign in to your Typefi server web interface → https://demos.typefi.com
- Go to Actions and select an action for the desired plug-in → https://demos.typefi.com/actions
- Copy the URL → https://demos.typefi.com/actions/typefi-plugin-id/Create InDesign document
- Remove the '/actions' segment from the URL and replace the trailing action name (for example, 'Create InDesign document') with the string 'descriptor' → https://demos.typefi.com/typefi-plugin-id/descriptor
Example
This is an example descriptor.json file for a demo plug-in:
For each action input, the user interface control is determined by the input type. The following servlet returns the contents of this file:
Descriptor.json reference
displayName
The display name of the workflow plug-in.
description
A short description of the plug-in.
developers
The names of the developers who developed the plug-in.
vendor
The name of the vendor who developed the plug-in.
namespace
The scope of the workflow plug-in code.
descriptorVersion
The version of the descriptor.json file. We increment descriptorVersion
when we modify the definition of plug-in properties.
minServerVersion
The minimum version of Typefi Server required with the plug-in.
actions
An object representing each action in the plug-in. Each action contains the following attributes:
type
: An abbreviation for the workflow action type. For example, cxml-to-indd is an abbreviation for Create InDesign document, which converts a Content XML file to an Adobe InDesign file.uiVersion
: Required. The action version number. We incrementuiVerison
when we modify the definition of action-type properties. For more information, see How workflow actions are updated. To access descriptor.json for alluiVersion
s of a specific plug-in:- Sign in to your Typefi server web interface → https://demos.typefi.com
- Go to Actions and select an action for the desired plug-in → https://demos.typefi.com/actions
- Copy the URL → https://demos.typefi.com/actions/typefi-plugin-id/Create InDesign document
- Remove the '/actions' segment from the URL and replace the trailing action name (for example, 'Create InDesign document') with the string 'descriptor'. → https://demos.typefi.com/typefi-plugin-id/descriptor
- Add the string '?returnAllActions=true' → https://demos.typefi.com/typefi-plugin-id/descriptor?returnAllActions=true
displayName
: The display name of the action.inputs
: Each input field in the action.inputs
is an array representing each input field and contains the following key:value pairs:name
: The name of the input field.label
: The user interface label of the input field.type
: The type of input accepted.value
: The default value for the input.extension
: The expected file type extension of the input.required
: Specifies whether the input field is required.
Comments
0 comments
Please sign in to leave a comment.