REST Receiver
REST stands for Representational State Transfer. It is a software architecture style that you can use to design web services. REST as an architecture style does not require processing and is naturally more flexible. Unlike SOAP, REST does not have to use XML to provide the response. You can find REST-based Web services that output the data in Command Separated Value (CSV), JavaScript Object Notation (JSON), and Really Simple Syndication (RSS). Supported formats include XML files using STEPXML or Generic XML.
To learn more about REST, search for resources on the web.
For information about how to use the STEP REST API, access the STEP API Documentation button on the Start Page.
Prerequisites
The path used for the file upload is system specific, and is automatically used when new REST receivers are created. In the configured path, a folder named REST is created and files that are uploaded using REST API appear in this folder. Each REST IIEP has its own 'failed' and 'save' folder.
When an IIEP has been configured to use the REST Receiver, XML files can be posted the IIEP via HTTP POST to the following URL:
[Host]/restapi/integrationendpoints/[Endpoint ID]/upload?context=[Existing Context]&workspace=Main
The request header 'Content-Type' must have the value 'text/xml' and basic authorization must be used. For example, the 'Authorization' header must have the value 'Basic ' combined with a 64 bit encoding of [Username]:[Password]. For example, 'Basic c3RlcHN5czpzdGVwc3lz.'
Notice that in the URL shown above, the context and workspace qualifiers have no significance, but they are required for the REST API.
The POST will in itself invoke the endpoint, so there is no reason to schedule a REST-based endpoint. The resource for the REST POST invoke request is:
[Host]/restapi/integrationendpoints/[Endpoint ID]/invoke
Configuration
After completing the prerequisite steps, edit the receiver of the IIEP. Use the following parameters to configure the IIEP. For information on a parameter, hover over the parameter field to display help text.
- For Receiver, choose REST Receiver.
- For Keep file after load, specify if files dropped in the hotfolder should be removed after processing the files. This option is available because files posted via REST are temporarily stored in a directory on the application server (under Hotfolder root).
- Yes requires periodic manual cleanup on the server.
- No removes the files automatically. Common setup is to select 'No' to prevent the need for manual cleanup.
- For Number of files to keep in save, specifies the number of files to be saved in the save folder after automatic cleanup. Parameter can save up to 1,000 files.
- For Time to keep files in save (in days), specifies the number of days the files are saved in the save folder. Parameter can save files for up to 365 days.
- For Number of files to keep in failed, specifies the number of files to be saved in the failed folder. Parameter can save up to 1,000 files.
- Click the Next button to continue with the Configure Endpoint step (here), or the Finish button to close the wizard.