FME Flow REST API V3 is our stable REST API.
REST APIs allow you to interact with a server or another node on a web network using the simplicity of the HTTP protocol. The REST concept is not a standard, but rather a set of guidelines that promote simple, easy-to-use web APIs.
The guidelines include using:
The main difference between a REST API and a CGI or SOAP API are the simple, native HTTP methods for identifying resources and performing actions on them. In contrast, CGI and SOAP APIs reinvent these two key pieces, which adds complexity to implementation and usage. With a REST API, all you need to perform an action is a tool that can send an HTTP request, such as a web browser, JavaScript, all modern programming languages, and FME Transformers.
The FME Flow REST API provides methods to control a range of FME Flow functionality, including:
To get started:
When you submit requests, keep in mind the following:
When a request is processed, you receive a response according to these rules:
Header Key | Header Value |
---|---|
Authorization | fmetoken token=XXXXXXXXXX |
Form Parameter | Parameter Value |
---|---|
fmetoken | XXXXXXXXXX |
If it is not possible to manipulate request headers when requesting a file download, you can set the accept querystring parameter to value contents. The requested resource will be downloaded as is, which is equiavalent to setting the "Accept" header to application/octet-stream.
ExampleDownload the resource as is: | http://myhost.com/fmerest/some/api/call?accept=contents |
Some input parameters are required, while others are optional, according to the following notation in the API documentation:
The FME REST Service returns an HTTP status code for every request. For most GET requests, a response message is returned in your requested format, along with the status code. For most PUT and DELETE requests, only the status code is returned to indicate whether the operation is successful or not. Refer to the specifications reference for more details.
200 | OK | Success; the results are rendered in the response body. |
201 | Created | Success; the resource has been created. |
202 | Accepted | Success; the operation has been started. |
204 | No Content | Success; the response body contains no contents. |
207 | Multi-Status | Success; the response body contains the status of each sub-request. |
400 | Bad Request | The request was improperly formatted. Typically, this means that your JSON or XML is not well-formed. It may also mean that the URI is invalid; most path components can only contain alphanumeric characters. |
401 | Unauthorized | Authentication credentials are missing or incorrect. |
403 | Forbidden | The request is understood, but it was refused. An accompanying error message explains why. |
404 | Not Found | The URI requested is invalid, or the requested resource does not exist. |
409 | Conflict | You attempted to create a new resource that already exists, or made changes or created a resource that depends on another resource that does not exist. |
415 | Unacceptable Media Type | The content-type is not allowed. Typically, only "application/xml", "application/json", or "application/x-www-form-urlencoded" is permitted. |
422 | Unprocessable Entity | The request was well-formed, but cannot be performed due to semantic errors. |
503 | Server Unavailable | Part or all of FME Flow was temporarily unreachable. |
For all API operations that take a request entity (which includes all API operations that expect a JSON or XML request body, and all file-upload operations), the content-type character set encoding must be set to UTF-8. Otherwise, text data containing international (non-ASCII) characters will be mangled. This is accomplished by setting the charset attribute:
Content-Type: application/json; charset=UTF-8
Example for multiple file-upload requests:
Content-Type: multipart/form-data; boundary=< boundary >; charset=UTF-8
Some API operations depend on headers that do not easily support international encodings. The most common usage is the Content-Disposition header used by various single file-upload API operations. The filename attribute of the Content-Disposition header should be modified to reflect the following syntax, which conforms to RFC 5987:
Content-Disposition: attachment; filename*=< character encoding >'[ < language > ]'"< filename >"
The following example illustrates how to specify a Norwegian filename (Åraksbø.shp) encoded using UTF-8 character encoding:
Content-Disposition: attachment; filename*=UTF-8''"%C3%85raksb%C3%B8.shp"
Any date time in a request or response must conform to the ISO 8601 standard. This example shows a date and time with timezone:
2015-11-05T09:26:39+00:00
This example shows a date and time with timezone 'Z' for zero UTC offset:
2015-11-05T09:26:39Z
The Published Parameter Data Model is a generic data model that describes workspace published parameters and parameters in general in FME Flow. This data model is used in the response body from endpoints such as "GET /repositories/< repository >/items/< item >/parameters" to retrieve the published parameters for a workspace.
Basic Parameter takes a single value for user input. There are no options to choose from.
Below is the data model of a Basic Parameter:
defaultValue (string): Default value of the published parameter
description (string): A human-readable description of the published parameter
model (string): Data type, always 'string'
name (string): Unique name of the published parameter
optional (boolean): Whether the parameter is optional or not
type (string): Published parameter type
Basic Parameter can be of type:
Options Parameter takes a single value for user input, with a list of options to choose from.
Below is the data model of an Options Parameter:
defaultValue (string): Default value of the published parameter
description (string): A human-readable description of the published parameter
listOptions (array[option]): The list of values supported by this published parameter
model (string): Data type, always 'string'
name (string): Unique name of the published parameter
optional (boolean): Whether the parameter is optional or not
type (string): Published parameter type
Options Parameter can be of type:
Multiple Options Parameter takes multiple values for user input, with a list of options to choose from.
Below is the data model of a Multiple Options Parameter:
defaultValue (array): List of values that make up the default value of the published parameter
description (string): A human-readable description of the published parameter
featuregrouping (boolean, optional): Whether this published parameter uses feature grouping (each list option value yields a list of values instead of a single string value).
listOptions (array[option]): The list of values supported by this published parameter. This could potentially contain feature groups (option values that are themselves lists of values)
model (string): Data type, always 'list'
name (string): Unique name of the published parameter
optional (boolean): Whether the parameter is optional or not
type (string): Published parameter type
Multiple Options Parameter can be of type:
Multiple Files Parameter takes multiple values for user input. There are no options to choose from.
Below is the data model of a Multiple Files Parameter:
defaultValue (array): List of values that make up the default value of the published parameter
description (string): A human-readable description of the published parameter
featuregrouping (boolean, optional): Whether this published parameter uses feature grouping (each list option value yields a list of values instead of a single string value).
listOptions (array[option]): The list of values supported by this published parameter. This could potentially contain feature groups (option values that are themselves lists of values)
model (string): Data type, always 'list'
name (string): Unique name of the published parameter
optional (boolean): Whether the parameter is optional or not
type (string): Published parameter type
Multiple File Parameter can be of type:
Range Slider Parameter takes a single value for user input. The user can choose a value between a range, as specified by the maximum and minimum values in the data model.
Below is the data model of a Range Slider Parameter:
decimalPrecision (Object, optional): The number of decimals allowed
defaultValue (integer): Default value of the published parameter
description (string): A human-readable description of the published parameter
maximum (Object): Maximum permitted value of this published parameter
maximumExclusive (boolean, optional): Whether the input value must be strictly less than the maximum value or not
minimum (Object): Minimum permitted value of this published parameter
minimumExclusive (boolean, optional): Whether the input value must be strictly greater than the minimum value or not
model (string): Data type, always 'string'
name (string): Unique name of the published parameter
optional (boolean): Whether the parameter is optional or not
type (string): Published parameter type
Range Slider Parameter can be of type:
Database Connection Parameter takes a single value for user input. The user can choose a Database connection that is defined on FME Flow. You can use the databaseconnections API to query a list of database connections.
Below is the data model of a Database Connection Parameter:
connectionType (string): Connection type of this published parameter
defaultValue (string): Default value of the published parameter
description (string): A human-readable description of the published parameter
model (string): Data type, always 'string'
name (string): Unique name of the published parameter
optional (boolean): Whether the parameter is optional or not
type (string): Published parameter type
Database Connection Parameter can be of type:
Web Service Connection Parameter takes a single value for user input. The user can choose a Web Service connection that is defined on FME Flow. You can use the webserviceconnections API to query a list of web service connections.
Below is the data model of a Web Service Connection Parameter:
connectionTypes (array[string]): Connection types of this published parameter
excludeConnectionTypes (array[string]): Connection types to exclude for this published parameter
defaultValue (string): Default value of the published parameter
description (string): A human-readable description of the published parameter
model (string): Data type, always 'string'
name (string): Unique name of the published parameter
optional (boolean): Whether the parameter is optional or not
type (string): Published parameter type
Web Service Connection Parameter can be of type:
Object Parameter takes a JSON object for user input. There are no options to choose from.
Below is the data model of a Object Parameter:
defaultValue (string): Default value of the published parameter
description (string): A human-readable description of the published parameter
model (string): Data type, always 'object'
name (string): Unique name of the published parameter
optional (boolean): Whether the parameter is optional or not
type (string): Published parameter type
Object Parameter can be of type:
Object List Parameter takes a list of JSON objects for user input. There are no options to choose from.
Below is the data model of a Object List Parameter:
defaultValue (string): Default value of the published parameter
description (string): A human-readable description of the published parameter
model (string): Data type, always 'objectList'
name (string): Unique name of the published parameter
optional (boolean): Whether the parameter is optional or not
type (string): Published parameter type
Object List Parameter can be of type:
Date Parameter takes a single value for user input. The date is in yyyymmdd format.
Below is the data model of a Date Parameter:
defaultValue (string): Default value of the published parameter
description (string): A human-readable description of the published parameter
model (string): Data type, always 'string'
name (string): Unique name of the published parameter
optional (boolean): Whether the parameter is optional or not
type (string): Published parameter type
Date Parameter can be of type:
Date Time Parameter takes a single value for user input. The date time is in yyyymmddhhmmss.x(+/-)z format.
Below is the data model of a Date Time Parameter:
defaultValue (string): Default value of the published parameter
description (string): A human-readable description of the published parameter
model (string): Data type, always 'string'
name (string): Unique name of the published parameter
optional (boolean): Whether the parameter is optional or not
type (string): Published parameter type
milliseconds (boolean): Display the date time with millisecond granularity
saveInUTC (boolean): Save the date time in utc if true, or in the user's local time zone if false
Date Time Parameter can be of type:
A parameter can contain options for users to choose from. These options are listed in the listOptions field of a parameter.
An option can be a simple key/value option, which has data model:
caption (string): The display text of the option
value (string): The programmatic value for the option
An option can be a multi-dimensional option-set for feature grouping:
caption (string): The display text of the option
value (array[object]): The programmatic set of values for the option (feature grouping)
For ACTIVECHOICE parameter type, an option can be a simple key/value option that can include information about other published parameters that will be ignored and can be disabled in a client user interface:
caption (string): The display text of the option
disabledParameters (array[object]): The published parameters to disable for the option
value (string): The programmatic value for the option
Some parameters represent source or destination datasets. Below are different categories of dataset parameters.
Single source dataset folder:
Multiple source dataset folder:
Single source dataset file:
Multiple source dataset files:
Destination dataset folder:
Single destination dataset file:
While the Published Parameter Data Model describes parameters in FME Flow, a different data model specifies how to input or specify values for the parameter. This data model is used in the request body from endpoints such as "POST /transformations/submit/< repository >/< workspace >" to submit a job while specifying values for workspace published parameters.
If the model attribute in the Published Parameter Data Model is "string", the parameter takes a single value as input.
Below is the data model of a Single Input parameter:
name (string): Unique name of the published parameter
value (string): Primitive value (for example, text, number, true/false) of the published parameter
If the model attribute in the Published Parameter Data Model is "list", the parameter takes multiple values as input.
Below is the data model of a List Input parameter:
name (string): Unique name of the published parameter
value (array[CharSequence]): List of values for the published parameter
Endpoint "GET /repositories/< repository >/items/< item >/parameters" retrieves the parameters of a workspace (for example austinDownload.fmw). It returns a response such as:
[ { "featuregrouping": false, "listOptions": [ { "caption": "airports", "value": "airports" }, { "caption": "cenart", "value": "cenart" }, { "caption": "railroad", "value": "railroad" }, { "caption": "streetcl", "value": "streetcl" } ], "defaultValue": [ "airports" ], "name": "THEMES", "description": "Layers to Download:", "model": "list", "type": "LISTBOX" }, { "listOptions": [ { "caption": "UTM-WGS 1984 datum, Zone 14 North, Meter; Cent. Meridian 99d W [UTM84-14N]", "value": "EPSG:32614" }, { "caption": "WGS84 datum, Latitude-Longitude; Degrees [EPSG #4326]", "value": "LL84" }, { "caption": "NAD83 Texas State Planes, Central Zone, US Foot [EPSG #2277]", "value": "TX83-CF" } ], "defaultValue": "LL84", "name": "COORDSYS", "description": "Output Coordinate System:", "model": "string", "type": "LOOKUP_CHOICE" }, { "listOptions": [ { "caption": "Autodesk AutoCAD DWG/DXF", "value": "ACAD" }, { "caption": "MapInfo TAB (MFAL)", "value": "MAPINFO" }, { "caption": "Google Earth KML", "value": "OGCKML" }, { "caption": "Adobe Geospatial PDF", "value": "PDF2D" }, { "caption": "Esri Shape", "value": "SHAPE" } ], "defaultValue": "SHAPE", "name": "FORMAT_GENERIC", "description": "Output Format:", "model": "string", "type": "LOOKUP_CHOICE" }, { "defaultValue": "-100", "name": "MINX", "description": "Minimum X:", "model": "string", "type": "FLOAT" }, { "defaultValue": "25", "name": "MINY", "description": "Minimum Y:", "model": "string", "type": "FLOAT" }, { "defaultValue": "-90", "name": "MAXX", "description": "Maximum X:", "model": "string", "type": "FLOAT" }, { "defaultValue": "35", "name": "MAXY", "description": "Maximum Y:", "model": "string", "type": "FLOAT" }, { "defaultValue": "LL84", "name": "BBOX_COORDSYS", "description": "Search Envelope Coordinate System:", "model": "string", "type": "COORDSYS" } ]
From this response, we know there are eight published parameters with the workspace. All eight published parameters have default values, so you can use endpoint "POST /transformations/submit/< repository >/< workspace >" to run the workspace with a request body, such as:
{ "TMDirectives": { "rtc": false, "description": "This is my description", "tag": "linux", "priority": 5 }, "NMDirectives": { "successTopics": [], "failureTopics": [] } }
Or, specify values for the published parameters. First, look at the model attribute for each published parameter. The published parameters COORDSYS, FORMAT_GENERIC, MINX, MINY, MAXX, MAXY, and BBOX_COORDSYS all take a single value as input because they are of "string" model. Further, published parameters COORDSYS and FORMAT_GENERIC have a list of values for the user to choose from, as indicated by the listOptions attribute. Published parameter THEMES takes multiple values as input because it is of "list" model. Again, use endpoint "POST /transformations/submit/< repository >/< workspace >" to run the workspace with a request body, such as:
{ "publishedParameters": [ { "name": "MAXY", "value": "42" }, { "name": "THEMES", "value": [ "airports", "cenart" ] } ], "TMDirectives": { "rtc": false, "description": "This is my description", "tag": "linux", "priority": 5 }, "NMDirectives": { "successTopics": [], "failureTopics": [] } }
The Published Parameter Data Model is not just for workspace published parameters, but for other purposes, such as Resource Management. Endpoint "GET /resources/types" retrieves the types of resources. It returns a response such as:
{ "offset": -1, "limit": -1, "totalCount": 2, "items": [ { "description": "File based resource", "type": "FILE", "properties": [ { "defaultValue": "", "name": "DIR", "description": "Directory of a file based resource", "model": "string", "type": "TEXT" } ] }, { "description": "Amazon S3 bucket", "type": "AWS_S3", "properties": [ { "defaultValue": "", "name": "BUCKET", "description": "Amazon S3 bucket name", "model": "string", "type": "TEXT" }, { "defaultValue": "", "name": "FOLDER", "description": "Folder inside the Amazon S3 bucket", "model": "string", "type": "TEXT" }, { "defaultValue": "", "name": "ACCESS_KEY_ID", "description": "Access key for the Amazon S3 bucket", "model": "string", "type": "TEXT" }, { "defaultValue": "", "name": "SECRET_ACCESS_KEY", "description": "Secret key for the Amazon S3 bucket", "model": "string", "type": "PASSWORD" } ] } ] }
From this response, we know there are two types of resources. Use endpoint "POST /resources/connections" to create a resource connection with a request body, such as:
{ "type": "AWS_S3", "name": "TEST_AWS_RESOURCE", "displayName": "AWS S3 test resource name", "description": "AWS S3 test resource description", "properties": [ { "name": "BUCKET", "value": "test-bucket" }, { "name": "FOLDER", "value": "/" }, { "name": "ACCESS_KEY_ID", "value": "fill-in-access-key-id" }, { "name": "SECRET_ACCESS_KEY", "value": "fill-in-secret-access-key" } ] }
REST API V2 supported token querystring parameter for authorization. An example request to retrieve a list of available repositories would appear as:
http://myhost.com/fmerest/v3/repositories?token=XXXXXXXXXXXXXXXREST API V3 supports fmetoken querystring parameter for authorization. An example request to retrieve a list of available repositories would appear as:
http://myhost.com/fmerest/v3/repositories?fmetoken=XXXXXXXXXXXXXXXREST API V3 also supports fmetoken as a form parameter. For requests of content type "application/x-www-form-urlencoded", the token can be provided via a form parameter.
Form Parameter | Parameter Value |
---|---|
fmetoken | XXXXXXXXXX |
REST API V3 no longer supports application/xml MIME type, for both the HTTP "Accept" header or the accept querystring parameter
REST API V3 no longer supports the detail querystring parameter. The full object definition is always rendered in the response.
REST API V2-supported accept querystring parameter with MIME types application/xml, application/json, text/plain, and application/octet-stream. REST API V3 only supports the accept querystring parameter on certain endpoints requesting file download.
REST API V3 has adapted to the ISO 8601 standard.
Pagination of results is useful for endpoints that return a collection of objects, especially when the collection has large amounts of results. To help users work with pages of results, we improved the response body to be the following structure:
items (array[Object]): Items in this results page
limit (integer): Limit of this results page
offset (integer): Offset of this results page
totalCount (integer): Total amount if items available
For endpoints that support pagination, use the limit and offset querystring parameters to specify the range of objects to include in the response body. For endpoints that return a collection of objects but do not support pagination, the response body structure is still as shown above, but all objects are included in the response body.
The endpoints that support pagination are:
Description | Old location | New location |
---|---|---|
Test Publication | POST /notifications/publications/< publication >/test | POST /notifications/test/publications/< publication > |
Test Subscription | POST /notifications/subscriptions/< subscription >/test | POST /notifications/test/subscriptions/< subscription > |
Publish level one JSON to topic | POST /notifications/topics/< topic >/message/map | POST /notifications/topics/< topic >/message |
Publish to the subscriber_content message key | POST /notifications/topics/< topic >/message/raw | POST /notifications/topics/< topic >/message/subscribercontent |
Remove collection of jobs | POST /transformations/commands/remove/< section > | DELETE /transformations/jobs/< section > |
Submit transformation job (asynchronous) | POST /transformations/commands/submit/< repository >/< workspace > | POST /transformations/submit/< repository >/< workspace > |
Submit transformation job (synchronous) | POST /transformations/commands/transact/< repository >/< workspace > | POST /transformations/transact/< repository >/< workspace > |
Submit transformation job (query-based, synchronous) | POST /transformations/commands/transactdata/< repository >/< workspace > | POST /transformations/transactdata/< repository >/< workspace > |
Copy files in Resource | POST /resources/connections/< resource >/commands/copy/< srcpath > | POST /resources/connections/< resource >/copy/< srcpath > |
Move files in Resource | POST /resources/connections/< resource >/commands/move/< srcpath > | POST /resources/connections/< resource >/move/< srcpath > |
Generate download URL for AWS S3 Resource | POST /resources/connections/< resource >/commands/directdownloadurl/< path > | POST /resources/connections/< resource >/directdownloadurl/< path > |
Generate upload URL for AWS S3 Resource | POST /resources/connections/< resource >/commands/directuploadurl/< path > | POST /resources/connections/< resource >/directuploadurl/< path > |
Test an existing Resource | POST /resources/connections/< resource >/commands/test | POST /resources/test/connections/< resource > |
Test a new Resource | POST /resources/test | POST /resources/test/connections |
Description | Removed endpoint |
---|---|
Pause Status of Tranformation Manager | GET /transformations/commands/pause |
Pause/Unpause Transformation Manager | POST /transformations/commands/pause |
Enable or disable a scheduled task | PUT /schedules/< category >/< name >/enabled |
Description | Removed API |
---|---|
Manage FME Flow Services | /services/* |
Description | Removed API |
---|---|
FME Flow Licensing | /licensing/* |
Projects Manager | /projects/* |
User Settings | /user/* |
Each subscriber or publisher has properties that describe how to create the corresponding subscription or publication. In REST API V2, subscriber and publisher property data model contained properties with generic attributes that were hard to understand and consume. In REST API V3, subscriber and publisher property data model uses published parameter data model. The enhanced subscriber and publisher property data model affects the following endpoints:
Each subscriber or publisher has properties you can set when creating the subscription or publication. In REST API V2, subscription and publication property values are simple strings. In REST API V3, subscription and publication property values can be lists, published parameters, or other more complex data models. This enhancement enables important features such as the workspace subscriber. The enhanced subscription and publication property data model affects the following endpoints:
POST /notifications/test/publications and POST /notifications/test/subscriptions
Removed the feature to query the pause status of the Transformation Manager. Also removed the feature to pause/unpause the Transformation Manager.
The endpoint to download job log file (GET /transformations/jobs/id/< jobid >/log) now supports returning a response in "text/plain" or "application/octet-stream" MIME type. Previously, we only supported the "text/plain" type, which did not trigger file downloads. Set the MIME type in the HTTP "Accept" header.
The endpoint to get completed, running, or queued jobs (GET /transformations/jobs/< section >) supports a new userName querystring parameter.
There are a set of new endpoints (/transformations/jobroutes/*) for manage job routing. For details, see the documentation for each endpoint.
There are a set of new endpoints (/security/ldap/servers/*) for manage Active Directory server connections. For details, see the documentation for each endpoint.
The REST API V3 supports FME Flow licensing. For details, see the documentation for each endpoint.
The REST API V3 supports FME Flow Projects. For details, see the documentation for each endpoint.
The endpoint to get scheduled tasks (GET /schedules) supports a new userName querystring parameter.
Removed the feature to enable/disable a scheduled task. Instead, replace the existing scheduled task (PUT /schedules/< category >/< name >).
REST API V3 supports a user-centric API. Users can favorite/unfavorite a workspace, and get their recent published workspaces.
A new endpoint (PUT /repositories/< repository >) is available for updating the description of a repository.
New endpoints are available for managing cleanup configuration. These cleanup configuration settings used to be managed from fmeFlowConfig.txt.
All backup and restore endpoints now return an ID that identifies the single backup or restore task. The ID can be used with the following new endpoint for retrieving the result of the migration tasks.
Also enhanced the endpoint for retrieving all migration tasks. This endpoint used to return only the currently running migration task. This endpoint now returns all migration tasks that are running or have completed.