Your Corticon Server installation lets you implement Swagger so that you can open your browser at http://localhost:8850/axis/swagger/ (use your appropriate host name and port number), and then use Execute Decision Service to specify the dsname and a sample request's JSON Objects to run against a deployed Decision Service.
Note: Corticon has moved away from having Swagger pre-installed in every Corticon Server to minimize CVE vulnerabilities. You might need to take steps to enable Swagger on your server. See Test the installed Corticon Server on Java for more information.

Formats of requests

You can specify JSON requests in either of two formats:
  • Detailed with __metadata annotations—The default format allows detailed, unambiguous requests. This format is especially useful when associations are involved, or when the entities have attributes that are used in many entities.
  • Native with no annotations—Many applications produce requests in the minimal format, presenting compact and readable files for requests. The format requires that Corticon parse the incoming data to identify the root entities and the attributes of the associated entities.
Either format is accepted as tester input. The following example uses the Advanced Tutorial's Ruleflow, as shown:


Sample request with full __metadata annotations
{
    "__metadataRoot": {"#locale": ""},
    "Objects": [{
        "preferredCard": {
            "cumulativeCashBack": 9.24,
            "__metadata": {
                "#type": "PreferredAccount",
                "#id": "PreferredAccount_id_1"
            },
            "cardNumber": "12"
        },
        "ShoppingCart": {
            "totalAmount": null,
            "Item": [
                {
                    "price": 55,
                    "name": "Filet Mignon",
                    "__metadata": {
                        "#type": "Item",
                        "#id": "Item_id_1"
                    },
                    "department": null,
                    "barCode": "39-280-12345"
                },
                {
                    "price": 14.99,
                    "name": "Beach Towel",
                    "__metadata": {
                        "#type": "Item",
                        "#id": "Item_id_2"
                    },
                    "department": null,
                    "barCode": "32-300-23456"
                },
                {
                    "price": 12.5,
                    "name": "Ginger Ale Case",
                    "__metadata": {
                        "#type": "Item",
                        "#id": "Item_id_3"
                    },
                    "department": null,
                    "barCode": "32-285-34567"
                }
            ],
            "useCashBack": true,
            "savings": null,
            "__metadata": {
                "#type": "ShoppingCart",
                "#id": "ShoppingCart_id_1"
            }
        },
        "__metadata": {
            "#type": "Customer",
            "#id": "Customer_id_1"
        },
        "Name": ""
    }]
}