This guide will explain how to use the Swagger endpoint to access Decision Model and Notation (DMN) services deployed in a serverless environment. Swagger Endpoints allow you to explore, test, document, and integrate DMN services effectively.
Retrieve Information on Service Parameters for Swagger Endpoints
In the previous article, we learned that we can retrieve the information about parameters using the Service Version URL when you deploy your DMN model via FlexRule Designer. Then in this article we going to use the same URL to get the Swagger Specification.

Get the Swagger Specification
To get the Swagger specification for a service, append /swagger.json to the Service Version URL, maintaining the original access code.
Example:
/Prod/Services/LoanOrigination/1/DRD_for_Decide_routing_decision_point/1/swagger.json?code=XXXXThen, you can use Postman, set up a GET request, and paste the above URL.

Understand the Swagger Output
The Swagger JSON will include:
- Execution URL: The endpoint for invoking the DMN service.
- Request/Response Example Formats: Sample payloads for correct request and expected response.
- Schemas: Data structures for input and output.
Visualize and Test with Swagger UI
If you are not familiar with Swagger, copy the JSON output from the previous step(Postman) and then paste it into Swagger Editor for a user-friendly interface.
Then, you can:
- Browse available endpoints.
- See detailed input/output parameters and schema information.
- Test the API interactively.
Request Body of Swagger

Response Body of Swagger

Schemas of Swagger

Summary
This guide provides a step-by-step guide for accessing Decision Model and Notation (DMN) services using Swagger endpoints in a serverless environment. By appending /swagger.json to your DMN service version URL, you can retrieve the Swagger specification, which details the execution endpoint, request and response formats, and data schemas for the service. The Swagger output can be visualized and tested interactively using Swagger Editor, enabling you to explore, document, and integrate DMN services efficiently.

