Decision Server REST API - ruleapps Resource - POST (application/octet-stream) Method
Deploys a RuleApp archive in the repository, based on the merging and versioning policies passed as parameters. The RuleApp archive is passed in the request body.
Sample Method Invocation
POST /api/v1/ruleapps[?merging={string}][&version={string}][&resVersion={string}][&libVersion={string}]
Parameters
- The method has the following parameters:
-
| Name |
Value Type |
Use |
Description |
| merging |
string |
optional |
The merging policy to use during the deployment. By default, the ADD_AT_END_MERGING_POLICY is used.
| Value |
Description |
| ADD_AT_END_MERGING_POLICY |
If a conflict occurs, use the latest version of the RuleApp that exists to calculate the next version to be used. |
| REPLACE_MERGING_POLICY |
If a conflict occurs, replace the existing RuleApp. |
| ADD_AT_END_RULESET_MERGING_POLICY |
If a conflict occurs, use the latest version of the ruleset that exists to calculate the next version to be used. |
| REPLACE_RULESET_MERGING_POLICY |
If a conflict occurs, replace the existing ruleset. |
|
| version |
string |
optional |
The version policy to use during the deployment. By default, the MAJOR_VERSION_POLICY is used.
| Value |
Description |
| MAJOR_VERSION_POLICY |
Increments the major version when a version conflict occurs. |
| MINOR_VERSION_POLICY |
Increments the minor version when a version conflict occurs. |
|
| resVersion |
string |
optional |
The version policy to use during the deployment of resources. By default, MAJOR_VERSION_POLICY is used.
| Value |
Description |
| MAJOR_VERSION_POLICY |
Increments the major version when a version conflict occurs. |
| MINOR_VERSION_POLICY |
Increments the minor version when a version conflict occurs. |
|
| libVersion |
string |
optional |
The version policy to use during the deployment of libraries. By default, MAJOR_VERSION_POLICY is used.
| Value |
Description |
| MAJOR_VERSION_POLICY |
Increments the major version when a version conflict occurs. |
| MINOR_VERSION_POLICY |
Increments the minor version when a version conflict occurs. |
|
Request Content
The default content-type is application/octet-stream.
MIME Type: application/octet-stream
(Schema to go here)
(Schema to go here)
Response Content
The default content-type is application/xml.
MIME Type: application/json
(Schema to go here)
{
"succeeded" : true,
"resource" : [ {
"initialPath" : "{The initial path}",
"operationType" : "{The kind of operation finally applied: UPDATE, ADD, CHANGE_VERSION_AND_ADD, REPLACE}",
"resultPath" : "{The final computed path}",
"managedXomGeneratedProperty" : "{The resulting managed XOM property, if any}",
"type" : "{The target type of this operation: URI (resource), LIB (library), otherwise (ruleset)}"
} ]
}
MIME Type: application/xml
<?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="" version="1.0">
<xs:element name="operation" type="deploymentOperation"/>
<xs:element name="report" type="deploymentReport"/>
<xs:element name="result" type="restActionResult"/>
<xs:complexType name="restActionResult">
<xs:sequence>
<xs:element minOccurs="0" name="code" type="xs:string"/>
<xs:element minOccurs="0" name="message" type="xs:string"/>
<xs:element minOccurs="0" name="resource" type="xs:anyType"/>
<xs:element name="succeeded" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="deploymentReport">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="operation"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="deploymentOperation">
<xs:sequence>
<xs:element minOccurs="0" name="type" type="xs:string"/>
<xs:element minOccurs="0" name="initialPath" type="xs:string"/>
<xs:element minOccurs="0" name="resultPath" type="xs:string"/>
<xs:element minOccurs="0" name="operationType" type="xs:string"/>
<xs:element minOccurs="0" name="managedXomGeneratedProperty" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<result>
<resource xsi:type="deploymentReport" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<succeeded>true</succeeded>
</result>
Status Codes
- The method returns one of the following status codes:
-
| Code |
Description |
| 200 |
Successful completion. |
| 201 |
Successful completion, new resource created. |
| 400 |
The parameters are not valid or they are missing. |
| 401 |
The caller is not authorized for this request. |
| 403 |
The caller is not allowed to complete this request. |
| 404 |
The resource does not exist. |
| 406 |
The requested content type or content encoding is not supported. |
| 500 |
A severe problem has occurred, programmer's details are provided. |
Available Since
8.0.1.0
Parent Topic: ruleapps Resource