Create a decision revision

post/flows/{decisionId}/revisions
Internal-Use Only

Creates a new revision for the decision.

Request Samples

1

Response Samples

1{
2 "creationTimeStamp": "2021-05-07T16:06:05.631Z",
3 "modifiedTimeStamp": "2021-05-07T16:06:22.755Z",
4 "createdBy": "sasdemo",
5 "modifiedBy": "sasdemo",
6 "id": "77cfc1c3-f050-4169-939a-941e7c664215",
7 "name": "add_dec",
8 "majorRevision": 1,
9 "minorRevision": 2,
10 "signature": [
11 {
12 "creationTimeStamp": "2021-05-07T16:04:52.928Z",
13 "modifiedTimeStamp": "2021-05-07T16:06:56.330Z",
14 "createdBy": "sasdemo",
15 "modifiedBy": "sasdemo",
16 "id": "ab71e7ea-abe8-4a69-afd5-4a2ba65ef5c8",
17 "direction": "input",
18 "name": "a",
19 "dataType": "decimal"
20 },
21 {
22 "creationTimeStamp": "2021-05-07T16:04:52.929Z",
23 "modifiedTimeStamp": "2021-05-07T16:06:56.330Z",
24 "createdBy": "sasdemo",
25 "modifiedBy": "sasdemo",
26 "id": "d6b357c6-e798-48b1-ad42-bb3db4cfa774",
27 "direction": "input",
28 "name": "b",
29 "dataType": "decimal"
30 },
31 {
32 "creationTimeStamp": "2021-05-07T16:04:52.929Z",
33 "modifiedTimeStamp": "2021-05-07T16:06:56.330Z",
34 "createdBy": "sasdemo",
35 "modifiedBy": "sasdemo",
36 "id": "8de5614b-48c2-4631-b819-ecc3e63ee0a6",
37 "direction": "output",
38 "name": "c",
39 "dataType": "decimal"
40 }
41 ],
42 "flow": {
43 "creationTimeStamp": "2021-05-07T16:06:05.643Z",
44 "modifiedTimeStamp": "2021-05-07T16:06:05.643Z",
45 "createdBy": "sasdemo",
46 "modifiedBy": "sasdemo",
47 "id": "d246efaf-bd46-4437-8d66-2de3f012cce8",
48 "steps": [
49 {
50 "type": "application/vnd.sas.decision.step.custom.object",
51 "creationTimeStamp": "2021-05-07T16:06:05.646Z",
52 "modifiedTimeStamp": "2021-05-07T16:06:05.646Z",
53 "createdBy": "sasdemo",
54 "modifiedBy": "sasdemo",
55 "id": "34be776f-971c-4fcb-9a6d-30bbceec62d5",
56 "publishedModule": {},
57 "customObject": {
58 "uri": "/decisions/codeFiles/cd404a82-af5b-4835-9672-9730470a6be8/revisions/66c99a48-0903-44ea-948f-7c711fde4291",
59 "name": "add_cf",
60 "type": "decisionDS2CodeFile"
61 },
62 "mappings": [
63 {
64 "creationTimeStamp": "2021-05-07T16:06:05.646Z",
65 "modifiedTimeStamp": "2021-05-07T16:06:05.646Z",
66 "createdBy": "sasdemo",
67 "modifiedBy": "sasdemo",
68 "id": "2c6f4172-c189-4a59-bf43-92eba3bbe77c",
69 "targetDecisionTermName": "a",
70 "direction": "input",
71 "stepTermName": "a"
72 },
73 {
74 "creationTimeStamp": "2021-05-07T16:06:05.647Z",
75 "modifiedTimeStamp": "2021-05-07T16:06:05.647Z",
76 "createdBy": "sasdemo",
77 "modifiedBy": "sasdemo",
78 "id": "6110fe71-377a-4838-86e1-f12b70f42bba",
79 "targetDecisionTermName": "b",
80 "direction": "input",
81 "stepTermName": "b"
82 },
83 {
84 "creationTimeStamp": "2021-05-07T16:06:05.647Z",
85 "modifiedTimeStamp": "2021-05-07T16:06:05.647Z",
86 "createdBy": "sasdemo",
87 "modifiedBy": "sasdemo",
88 "id": "255b9815-a949-4c61-972f-d42f9002f1cb",
89 "targetDecisionTermName": "c",
90 "direction": "output",
91 "stepTermName": "c"
92 }
93 ],
94 "links": [
95 {
96 "method": "GET",
97 "rel": "customObjectCode",
98 "href": "/decisions/codeFiles/cd404a82-af5b-4835-9672-9730470a6be8/revisions/66c99a48-0903-44ea-948f-7c711fde4291",
99 "uri": "/decisions/codeFiles/cd404a82-af5b-4835-9672-9730470a6be8/revisions/66c99a48-0903-44ea-948f-7c711fde4291",
100 "responseType": "application/vnd.sas.decision.step.code"
101 }
102 ]
103 }
104 ]
105 },
106 "links": [
107 {
108 "method": "GET",
109 "rel": "self",
110 "href": "/decisions/flows/e2cf4209-2661-4ef1-b77f-10b91a6420e3/revisions/77cfc1c3-f050-4169-939a-941e7c664215",
111 "uri": "/decisions/flows/e2cf4209-2661-4ef1-b77f-10b91a6420e3/revisions/77cfc1c3-f050-4169-939a-941e7c664215",
112 "type": "application/vnd.sas.decision"
113 },
114 {
115 "method": "DELETE",
116 "rel": "delete",
117 "href": "/decisions/flows/e2cf4209-2661-4ef1-b77f-10b91a6420e3/revisions/77cfc1c3-f050-4169-939a-941e7c664215",
118 "uri": "/decisions/flows/e2cf4209-2661-4ef1-b77f-10b91a6420e3/revisions/77cfc1c3-f050-4169-939a-941e7c664215"
119 },
120 {
121 "method": "GET",
122 "rel": "code",
123 "href": "/decisions/flows/e2cf4209-2661-4ef1-b77f-10b91a6420e3/revisions/77cfc1c3-f050-4169-939a-941e7c664215/code",
124 "uri": "/decisions/flows/e2cf4209-2661-4ef1-b77f-10b91a6420e3/revisions/77cfc1c3-f050-4169-939a-941e7c664215/code",
125 "type": "text/vnd.sas.source.ds2"
126 },
127 {
128 "method": "POST",
129 "rel": "mappedCode",
130 "href": "/decisions/flows/e2cf4209-2661-4ef1-b77f-10b91a6420e3/revisions/77cfc1c3-f050-4169-939a-941e7c664215/mappedCode",
131 "uri": "/decisions/flows/e2cf4209-2661-4ef1-b77f-10b91a6420e3/revisions/77cfc1c3-f050-4169-939a-941e7c664215/mappedCode",
132 "type": "application/vnd.sas.score.code.generation.request",
133 "responseType": "application/vnd.sas.score.mapped.code"
134 },
135 {
136 "method": "GET",
137 "rel": "externalArtifacts",
138 "href": "/decisions/flows/e2cf4209-2661-4ef1-b77f-10b91a6420e3/revisions/77cfc1c3-f050-4169-939a-941e7c664215/externalArtifacts",
139 "uri": "/decisions/flows/e2cf4209-2661-4ef1-b77f-10b91a6420e3/revisions/77cfc1c3-f050-4169-939a-941e7c664215/externalArtifacts",
140 "type": "application/vnd.sas.collection",
141 "itemType": "application/vnd.sas.decision.external.artifact"
142 },
143 {
144 "method": "GET",
145 "rel": "decision",
146 "href": "/decisions/flows/e2cf4209-2661-4ef1-b77f-10b91a6420e3",
147 "uri": "/decisions/flows/e2cf4209-2661-4ef1-b77f-10b91a6420e3",
148 "type": "application/vnd.sas.decision"
149 }
150 ],
151 "decisionId": "e2cf4209-2661-4ef1-b77f-10b91a6420e3",
152 "nodeCount": 1,
153 "folderType": "userFolder",
154 "sourceRevisionUri": "/decisions/flows/ab9b6a31-7b81-4202-af3f-86be4b6a89ba/revisions/9aa1c575-76b6-4fbd-b865-eb7fb32065bf",
155 "copyTimeStamp": "2021-05-07T16:06:05.631Z",
156 "checkout": false,
157 "validationStatus": "none",
158 "version": 15
159}

Path Parameters

NameTypeRequiredDescription
decisionId
string
true

The identifier for a decision.

Examples:
"094078e7-278a-4719-a704-6e5e65af29ee"

Query Parameters

NameTypeRequiredDescription
fromRevisionUri
string
false

This value specifies the URI of the decision revision from which the new decision is created. This property enables you to trace the lineage of a decision. The valid format for this parameter is '/decisions/flows/${decisionId}/revisions/${revisionId}'

Examples:
"/decisions/flows/ef613bb5-d855-4227-97ac-9e9bfefe3e4a/revisions/ba14828c-b4b6-4a3a-9246-f51dd16ffcba"
revisionType
string
false

Valid Values are 'major' or 'minor'. This value determines how the server generates the major or minor revision numbers. If major is provided the next available major revision number is initiated. For example, if the decision has revisions 1.0, 1.1, 1.2, 2.0, 2.1, when you create a new major revision the result is 3.0. If minor is provided, then the next available minor revision number is reserved based on the existing revisions. This parameter is defaulted to 'minor', if not supplied.

Allowed values:
majorminor
Examples:
"major"

Request Body

The representation of a decision.

NameTypeRequiredDescription
name
string
true

The name for the decision.

type
string
false

The decision type.

description
string
false

The description for the decision.

flow
Decision Flow
false

The representation of a decision flow.

signature
array [Decision Condition Term]
true

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

subjectLevel
string
false

Indicates the type of subject ID.

subjectId
object
false

The reference for the term used to identify the subject.

properties
object
false

Properties associated with the decision.

customContextUri
string
false

The URI of a Custom Context DS2 code file that serves as the decision's custom context.

customContextMicroAnalyticServiceUri
string
false

The URI of a Custom Context DS2 code file that serves as the decision's custom context when it is published to a SAS Micro Analytic Service destination. If there is no distinction in functionality from other destinations, there is no need to provide an override.

Responses

StatusMeaningDescription
201CreatedA revision of the decision was created.HeadersSchema
400Bad RequestThe request was invalid.HeadersSchema
404Not FoundNo decision exists at the requested path.HeadersSchema