Skip to content

Get All Versions of Decision Rule

Endpoint: GET /api/business-rules/{name}/versions

Retrieves all versions of a decision rule by its name, with the newest version first.

Path parameters

Parameter Description Type Required/ Optional
name The name of the decision rule to retrieve. string Required.

Response

  • Returns 200 OK with a list of all versions of the decision rule, newest first. Each version includes its name, version, decision table in CSV format, create and update times in epoch milliseconds, and the users who created and last updated it.
  • Returns 403 Forbidden if you do not have access to the decision rule.
  • Returns 401 Unauthorized if the token is missing or invalid.

Examples

Get all versions of a decision rule

Request

curl -X 'GET' \
  'https://<YOUR-SERVER-URL>/api/business-rules/shipping-rules-api-test/versions' \
  -H 'accept: application/json' \
  -H 'X-Authorization: <TOKEN>'

Response

[
  {
    "name": "shipping-rules-api-test",
    "version": 2,
    "csvData": "shippingMethod,containerSize,shippingCharge\nmail,Any,77\nmail,small,15\nAny,small,20",
    "createTime": 1793949447712,
    "updateTime": 1793949903387,
    "createdBy": "john.doe@acme.com",
    "updatedBy": "john.doe@acme.com"
  },
  {
    "name": "shipping-rules-api-test",
    "version": 1,
    "csvData": "shippingMethod,containerSize,shippingCharge\nmail,Any,10\nmail,small,15\nAny,small,20",
    "createTime": 1793949407317,
    "updateTime": 1793949407317,
    "createdBy": "john.doe@acme.com",
    "updatedBy": "john.doe@acme.com"
  }
]