Create a decision

post/flows
Internal-Use Only

Creates a new decision based on the provided content.

Request Samples

1

Response Samples

1{
2 "creationTimeStamp": "2021-05-07T16:06:56.319Z",
3 "modifiedTimeStamp": "2021-05-07T16:06:56.319Z",
4 "createdBy": "sasdemo",
5 "modifiedBy": "sasdemo",
6 "id": "e2cf4209-2661-4ef1-b77f-10b91a6420e3",
7 "name": "add_dec",
8 "majorRevision": 1,
9 "minorRevision": 5,
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:56.326Z",
44 "modifiedTimeStamp": "2021-05-07T16:06:56.326Z",
45 "createdBy": "sasdemo",
46 "modifiedBy": "sasdemo",
47 "id": "0b77ae9e-dcc7-4c7f-91c4-e725cd30092e",
48 "steps": [
49 {
50 "type": "application/vnd.sas.decision.step.custom.object",
51 "creationTimeStamp": "2021-05-07T16:06:56.328Z",
52 "modifiedTimeStamp": "2021-05-07T16:06:56.328Z",
53 "createdBy": "sasdemo",
54 "modifiedBy": "sasdemo",
55 "id": "5da31100-8063-4dae-8b6d-dbc5965328d9",
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:56.329Z",
65 "modifiedTimeStamp": "2021-05-07T16:06:56.329Z",
66 "createdBy": "sasdemo",
67 "modifiedBy": "sasdemo",
68 "id": "6bdfc780-9183-4fce-bddf-74fa0be6edae",
69 "targetDecisionTermName": "a",
70 "direction": "input",
71 "stepTermName": "a"
72 },
73 {
74 "creationTimeStamp": "2021-05-07T16:06:56.329Z",
75 "modifiedTimeStamp": "2021-05-07T16:06:56.329Z",
76 "createdBy": "sasdemo",
77 "modifiedBy": "sasdemo",
78 "id": "8fa3a412-ed91-4560-8b9a-8311a9daab32",
79 "targetDecisionTermName": "b",
80 "direction": "input",
81 "stepTermName": "b"
82 },
83 {
84 "creationTimeStamp": "2021-05-07T16:06:56.329Z",
85 "modifiedTimeStamp": "2021-05-07T16:06:56.329Z",
86 "createdBy": "sasdemo",
87 "modifiedBy": "sasdemo",
88 "id": "c965a73c-97d6-4d5f-a2c4-dbf54c690144",
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",
111 "uri": "/decisions/flows/e2cf4209-2661-4ef1-b77f-10b91a6420e3",
112 "type": "application/vnd.sas.decision"
113 },
114 {
115 "method": "GET",
116 "rel": "revisions",
117 "href": "/decisions/flows/e2cf4209-2661-4ef1-b77f-10b91a6420e3/revisions",
118 "uri": "/decisions/flows/e2cf4209-2661-4ef1-b77f-10b91a6420e3/revisions",
119 "type": "application/vnd.sas.collection",
120 "itemType": "application/vnd.sas.decision"
121 },
122 {
123 "method": "GET",
124 "rel": "currentRevision",
125 "href": "/decisions/flows/e2cf4209-2661-4ef1-b77f-10b91a6420e3",
126 "uri": "/decisions/flows/e2cf4209-2661-4ef1-b77f-10b91a6420e3",
127 "type": "application/vnd.sas.decision"
128 },
129 {
130 "method": "GET",
131 "rel": "code",
132 "href": "/decisions/flows/e2cf4209-2661-4ef1-b77f-10b91a6420e3/code",
133 "uri": "/decisions/flows/e2cf4209-2661-4ef1-b77f-10b91a6420e3/code",
134 "type": "text/vnd.sas.source.ds2"
135 },
136 {
137 "method": "POST",
138 "rel": "mappedCode",
139 "href": "/decisions/flows/e2cf4209-2661-4ef1-b77f-10b91a6420e3/mappedCode",
140 "uri": "/decisions/flows/e2cf4209-2661-4ef1-b77f-10b91a6420e3/mappedCode",
141 "type": "application/vnd.sas.score.code.generation.request",
142 "responseType": "application/vnd.sas.score.mapped.code"
143 },
144 {
145 "method": "GET",
146 "rel": "externalArtifacts",
147 "href": "/decisions/flows/e2cf4209-2661-4ef1-b77f-10b91a6420e3/externalArtifacts",
148 "uri": "/decisions/flows/e2cf4209-2661-4ef1-b77f-10b91a6420e3/externalArtifacts",
149 "type": "application/vnd.sas.collection",
150 "itemType": "application/vnd.sas.decision.external.artifact"
151 },
152 {
153 "method": "DELETE",
154 "rel": "delete",
155 "href": "/decisions/flows/e2cf4209-2661-4ef1-b77f-10b91a6420e3",
156 "uri": "/decisions/flows/e2cf4209-2661-4ef1-b77f-10b91a6420e3"
157 },
158 {
159 "method": "PUT",
160 "rel": "update",
161 "href": "/decisions/flows/e2cf4209-2661-4ef1-b77f-10b91a6420e3",
162 "uri": "/decisions/flows/e2cf4209-2661-4ef1-b77f-10b91a6420e3",
163 "type": "application/vnd.sas.decision",
164 "responseType": "application/vnd.sas.decision"
165 }
166 ],
167 "nodeCount": 1,
168 "folderType": "userFolder",
169 "sourceRevisionUri": "/decisions/flows/ab9b6a31-7b81-4202-af3f-86be4b6a89ba/revisions/9aa1c575-76b6-4fbd-b865-eb7fb32065bf",
170 "copyTimeStamp": "2021-05-07T16:06:56.319Z",
171 "checkout": false,
172 "validationStatus": "none",
173 "version": 15
174}

Query Parameters

NameTypeRequiredDescription
parentFolderUri
string</folders/folders/{parentFolderId}>
false

The folder in which the new decision is placed.

Examples:
"/folders/folders/@public"
fromRevisionUri
string</decisions/flows/{decisionId}/revisions/{revisionId}>
false

This value specifies the URI of the decision revision from which the new decision is being created. This property enables you to trace the lineage of a decision.

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

Request Body

A decision summary to create a decision.

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
201CreatedThe decision was created.HeadersSchema
400Bad RequestThe request was invalid.HeadersSchema