Create a new revision

post/ruleSets/{ruleSetId}/revisions
Internal-Use Only

Creates a new revision for the rule set. With this request, you supply the content that you want to initialize for a new revision.

Request Samples

1

Response Samples

1{
2 "name": "Loan Score Approval",
3 "signature": [
4 {
5 "name": "customerName",
6 "dataType": "string",
7 "direction": "input"
8 },
9 {
10 "name": "creditScore",
11 "dataType": "decimal",
12 "direction": "input"
13 },
14 {
15 "name": "approved",
16 "dataType": "boolean",
17 "direction": "output"
18 }
19 ]
20}

Path Parameters

NameTypeRequiredDescription
ruleSetId
string
true

The rule set ID.

Query Parameters

NameTypeRequiredDescription
revisionType
string
false

Valid values are major or minor. This value determines how the server generates the major and minor numbers. If a major number is provided, the next available major version number is started. For example, if the rule set has revisions 1.0, 1.1, 1.2, 2.0, and 2.1, creating a new major revision results in 3.0. If a minor number is provided, then the next available minor revision number is reserved based on the existing revisions. For example, if the existing revisions have major and minor numbers of 1.1, 1.2, 1.3, 2.1, 2.2, and a user requests a new minor revision, then 2.3 is assigned. This parameter defaults to minor if not supplied.

Allowed values:
majorminor
fromRevisionUri
string</businessRules/ruleSets/{rulesetId}/revisions/{revisionId}>
false

This value specifies the URI of the rule set revision from which the new rule set revision is created. This property enables you to trace the lineage of a rule set. The valid format for this parameter is '/businessRules/ruleSets/${rulesetId}/revisions/${revisionId}'

Request Body

New content with which to create a rule set revision.

The definition of a set of rules and the associated signature for them. This represents the application/vnd.sas.business.rule.set media type (version 10).

Example:
{"name":"Loan Score Approval","signature":[{"name":"customerName","dataType":"string","direction":"input"},{"name":"creditScore","dataType":"decimal","direction":"input"},{"name":"approved","dataType":"boolean","direction":"output"}]}
NameTypeRequiredDescription
id
string
false

The system-assigned unique ID for this object.

name
string
true

The name of the rule set.

ruleSetType
string<enumeration>
false

The type of rule set. Assignment rule sets enable users to specify variable assignment actions within business rules. Filtering rule sets contain business rules that are only conditions that must be matched for the data to be retained within the resulting output. Assignment is the default if not specified.

Allowed values:
assignmentfiltering
description
string
false

The rule set description

createdBy
string
false

The user who created the rule set.

creationTimeStamp
string<date-time>
false

The date and time that the rule set was created.

modifiedBy
string
false

The user ID of the authenticated user who last updated the rule set.

modifiedTimeStamp
string<date-time>
false

The date and time that the rule set was last modified.

majorRevision
integer
false

Major version number of the revision being viewed of the rule set. This value is assigned by the service, the user only has control on whether the major number or minor number is incremented when creating a new revision. This is a derived field that is generated on PUT/POST.

minorRevision
integer
false

Minor version number of the current revision of the rule set. This value is assigned by the service. The user only has control on whether the major number or minor number is incremented when creating a new revision. This is a derived field that is generated on PUT/POST.

checkout
boolean
false

Flag that indicates that the rule set is a user's working copy of another rule set.

locked
boolean
false

Flag that indicates if the content of the revision being viewed is locked or editable.

signature
array [Signature Term]
true

The set of terms local to this rule set with input and output behavior.

folderType
string
false

Indicates the type of folder where the rule set is housed.

sourceRevisionUri
string
false

The URI of the rule set revision this rule set is being created from.

copyTimeStamp
string<date-time>
false

The time stamp when the ruleset revision was copied.

testCustomContextUri
string
false

The URI of a Custom Context DS2 code file that provides a custom context to this rule set. The ruleset's custom context is usually provided by the decision that uses it. For syntax validation of rule expressions and for testing purposes, you can specify a testing-only custom context.

links
array [Link]
false

Zero or more links to related resources or operations.

version
integer
false

This media type's schema version number. This representation is version 10.

Responses

StatusMeaningDescription
201CreatedA rule set revision was created.HeadersSchema
400Bad RequestThe request was invalid.Schema
404Not FoundNo resource exists at the requested path.Schema
428Precondition RequiredThe request headers did not include a `If-Unmodified-Since` precondition.Schema