Run the example using the Swagger interface
To run the example, deploy to tx-rest and run it using the Swagger interface.
- Create a Web type server definition where the runtime tx-rest is installed, if you do not have a server definition to deploy in Design Server.
- If not running, start tx-rest on the server: <DTX_HOME>/restapi/tomcat/dtxtomcat start tx-rest.
- Deploy the created package to the server definition in Design Server.
- Bring up the tx-rest Swagger UI: <DTX_HOME>/restapi/tomcat/dtxtomcat showdocs tx-rest.
-
In the Swagger Explore window, enter /tx-rest/v2/docs
and click on the Explore button to view the deployed package.
You can see the cbpr_pacs008_mt103stp section having two actions: A PUT /v2/run/cbpr_pacs008_mt103stp and a POST /v2/run/cbpr_pacs008_mt103stp.
-
In the PUT action:
- Expand the PUT action and select the Try it out button.
- Provide input and output files in its respective section.
- Under flow_vars section, delete the entire content.
- Click Execute blue bar for running the flow. When flow completes execution, 200 response code is shown in the Server Response section. You can see information about the process flow in the Response body.
-
Refresh the browser to delete the deployed package and get the Swagger
Explore back to /tx-rest/openapi.json.
There will be a DELETE /v2/packages/{name} action.
- Expand the DELETE /v2/packages/{name} action and select the Try it out.
- In the Name field, enter the name you gave it to the created package.
-
Select the true option from the stop query drop down,
select the blue Execute bar.
You can see a response of 204 with a timestamp, if it is successful.