This documentation is for WSO2 Stream Processor 4.4.0 (the latest version of WSO2 SP. View documentation for the Streaming Integrator, the successor of WSO2 SP.

All docs This doc
                                                                                                                                                                                                                                                                                                                                       
||
Skip to end of metadata
Go to start of metadata

Lists available business rule instances

Overview

DescriptionReturns the list of business rule instances that are currently available.
API Context/business-rules/instances
HTTP MethodGET
Request/Response Format
AuthenticationBasic
Usernameadmin
Passwordadmin
RuntimeDashboard

curl command syntax

 


Sample curl command

curl -X GET "https://localhost:9643/business-rules/instances" -u admin:admin -k

Sample output

 

Response

HTTP Status Code

200 or 404

For descriptions of the HTTP status codes, see HTTP Status Codes.

Delete business rule with given UUID

Overview

DescriptionDeletes the business rule with the given UUID.
API Context/business-rules/instances/{businessRuleInstanceID}?force-delete=false
HTTP MethodDELETE
Request/Response Formatapplication/json
AuthenticationBasic
Usernameadmin
Passwordadmin
RuntimeDashboard

Parameter description

ParameterDescription
{businessRuleInstanceID}The UUID (Uniquely Identifiable ID) of the business rules instance to be deleted.

curl command syntax

 


Sample curl command

curl -X DELETE "https://localhost:9643/business-rules/instances/business-rule-1?force-delete=false" -H "accept: application/json" -u admin:adm

Sample output

 

Response

HTTP Status Code

200 or 404

For descriptions of the HTTP status codes, see HTTP Status Codes.

Fetch template group with the given UUID

Overview

DescriptionReturns the template group that has the given UUID.
API Context/business-rules/template-groups/{templateGroupID}
HTTP MethodGET
Request/Response Format
AuthenticationBasic
Usernameadmin
Passwordadmin
RuntimeDashboard

Parameter description

ParameterDescription
{templateGroupID} The UUID of the template group to be fetched.

curl command syntax

 


Sample curl command

curl -X GET "https://localhost:9643/business-rules/template-groups/sweet-factory" -u admin:admin -k

Sample output

 

Response

HTTP Status Code

200 or 404

For descriptions of the HTTP status codes, see HTTP Status Codes.

Fetch rule templates of the template group with given UUID

Overview

DescriptionReturns the rule templates of the template group with the given UUID.
API Context/business-rules/template-groups/{templateGroupID}/templates
HTTP MethodGET
Request/Response Format
AuthenticationBasic
Usernameadmin
Passwordadmin
RuntimeDashboard

Parameter description

ParameterDescription
{templateGroupID}The UUID of the template group of which the rule templates need to be fetched.

curl command syntax

 


Sample curl command

curl -X GET "https://localhost:9643/business-rules/template-groups/sweet-factory/templates" -u admin:admin -k

Sample output

 

Response

HTTP Status Code

200 or 404

For descriptions of the HTTP status codes, see HTTP Status Codes.

Fetch rule template of specific UUID available under a template group with specific UUID

Overview

DescriptionReturns the rule template with the specified UUID that is defined under the template group with the specified UUID.
API Context /business-rules /template-groups/{templateGroupID}/templates/{ruleTemplateID}
HTTP MethodGET
Request/Response Format
AuthenticationBasic
Usernameadmin
Passwordadmin
RuntimeDashboard

Parameter description

ParameterDescription
{templateGroupID} The UUID of the template group from which the specified rule template needs to be retrieved.
{ruleTemplateID} The UUID of the rule template that needs to be retrieved from the specified template group.

curl command syntax

 


Sample curl command

curl -X GET "https://localhost:9643/business-rules/template-groups/sweet-factory/templates/identifying-continuous-production-decrease" -u admin:admin -k

Sample output

 

Response

HTTP Status Code

200 or 404

For descriptions of the HTTP status codes, see HTTP Status Codes.

Fetch available template groups

Overview

DescriptionReturns all the template groups that are currently available in the SP setup.
API Context/business-rules/template-groups
HTTP MethodGET
Request/Response Format
AuthenticationBasic
Usernameadmin
Passwordadmin
RuntimeDashboard

curl command syntax

 


Sample curl command

curl -X GET "https://localhost:9643/business-rules/template-groups" -u admin:admin -k

Sample output

 

Response

HTTP Status Code

200 or 404

For descriptions of the HTTP status codes, see HTTP Status Codes.

Fetch business rule instance with given UUID

Overview

DescriptionReturns the business rule instance with the given UUID.
API Context/business-rules/instances/{businessRuleInstanceID}
HTTP MethodGET
Request/Response Formatapplication/json
AuthenticationBasic
Usernameadmin
Passwordadmin
RuntimeDashboard

Parameter description

ParameterDescription
{businessRuleInstanceID} The UUID of the business rules instance to be fetched.

curl command syntax

 


Sample curl command

curl -X GET "https://localhost:9643/business-rules/instances/business-rule-1" -H "accept: application/json" -u admin:admin -k

Sample output

 

Response

HTTP Status Code

200 or 404

For descriptions of the HTTP status codes, see HTTP Status Codes.


Create and save a business rule

Overview

DescriptionCreates and saves a business rule.
API Context /business-rules /instances?deploy={deploymentStatus}
HTTP MethodPOST
Request/Response Formatapplication/json
AuthenticationBasic
Usernameadmin
Passwordadmin
RuntimeDashboard

Parameter description

ParameterDescription
{deploymentStatus}

curl command syntax

 


Sample curl command

curl -X POST "https://localhost:9643/business-rules/instances?deploy=true" -H "accept: application/json" -H "content-type: multipart/form-data" -F 'businessRule={"name":"Business Rule 5","uuid":"business-rule-5","type":"template","templateGroupUUID":"sweet-factory","ruleTemplateUUID":"identifying-continuous-production-decrease","properties":{"timeInterval":"6","timeRangeInput":"5","email":"example@email.com"}}' -u admin:admin -k

Sample output

 

Response

HTTP Status Code

200 or 404

For descriptions of the HTTP status codes, see HTTP Status Codes.

Update business rules instance with given UUID

Overview

DescriptionUpdates the business rules instance with the given UUID.
API Context /business-rules /instances/{businessRuleInstanceID}?deploy={deploymentStatus}
HTTP MethodPUT
Request/Response Formatapplication/json
AuthenticationBasic
Usernameadmin
Passwordadmin
RuntimeDashboard

Parameter description

ParameterDescription
{businessRuleInstanceID} The UUID of the business rules instance to be updated.
{deploymentStatus}

curl command syntax

 


Sample curl command

curl -X PUT "https://localhost:9643/business-rules/instances/business-rule-5?deploy=true" -H "accept: application/json" -H "content-type: application/json" -d '{"name":"Business Rule 5","uuid":"business-rule-5","type":"template","templateGroupUUID":"sweet-factory","ruleTemplateUUID":"identifying-continuous-production-decrease","properties":{"timeInterval":"9","timeRangeInput":"8","email":"newexample@email.com"}}' -u admin:admin -k

Sample output

 

Response

HTTP Status Code

200 or 404

For descriptions of the HTTP status codes, see HTTP Status Codes.

  • No labels