Business Rules - Priorities

Get

GET /api/repositories/(string: repository)/priorities

Get a list of business rule priorities in the Repository

GET /api/repositories/test/priorities HTTP/1.1
Accept: application/json
Response Code Reason
200 No error
500 Server error

The response contains a JSON list containing all the priorities in the Repository, each one containing the numeric ID (the priority value), the name of the priority, the description of the priority, and a flag indicating if the priority is used in a Business Rule

For example, the request above would result in the following response:

[
    [
        1,
        "Priority 1",
        "",
        "Y"
    ],
    [
        2,
        "Priority 2",
        "",
        "N"
    ],
    [
        3,
        "Priority 3",
        "",
        "Y"
    ],
    [
        4,
        "Priority 4",
        "",
        "Y"
    ],
    [
        5,
        "Priority 5",
        "",
        "N"
    ],
    [
        6,
        "Priority 6",
        "",
        "N"
        ],
    [
        7,
        "Priority 7",
        "",
        "Y"
    ],
    [
        8,
        "Priority 8",
        "",
        "Y"
    ],
    [
        9,
        "Priority 9",
        "",
        "N"
    ],
    [
        10,
        "Priority 10",
        "",
        "N"
    ]
]

Add

POST /api/repositories/(string: repository)/priorities

Adds a priority to the repository. Note: will overwrite any existing priority with the same id.

JSON Parameters:
 
  • body – The request body

The request requires a Standard Request packet.

POST /api/repositories/test/priorities HTTP/1.1
Content-Type: application/json

{
    "command": "add",
    "data": {
        "priority": "15",
        "name": "new priority",
        "description": "a new priority"
    }
}
Response Code Reason
201 Success
500 Server error

Edit

POST /api/repositories/(string: repository)/priorities/(number: priority)

Edits a priority. If you change the PRIORITY field, this operation will overwrite any existing priority with this value.

JSON Parameters:
 
  • body – The request body

The request requires a Standard Request packet.

Parameter Type Purpose
repository string The name of the Repository to access
priority number The id number of the priority
POST /api/repositories/test/priorities/15 HTTP/1.1
Content-Type: application/json

{
    "command": "edit",
    "data": {
        "priority": "19",
        "name": "changed priority",
        "description": "a changed priority"
    }
}
Response Code Reason
201 Success
500 Server error

Delete

DELETE /api/repositories/(string: repository)/priorities/(number: priority)
Parameter Type Purpose
repository string The name of the Repository to access
priority number The id number of the priority
DELETE /api/repositories/test/priorities/15 HTTP/1.1
Response Code Reason
204 Success
500 Server error