1{
2 "links": [
3 {
4 "method": "GET",
5 "rel": "collection",
6 "href": "/jobExecution/jobs",
7 "uri": "/jobExecution/jobs",
8 "type": "application/vnd.sas.collection",
9 "itemType": "application/vnd.sas.job.execution.job"
10 },
11 {
12 "method": "GET",
13 "rel": "self",
14 "href": "/jobExecution/jobs?sortBy=creationTimeStamp:descending&start=0&limit=10",
15 "uri": "/jobExecution/jobs?sortBy=creationTimeStamp:descending&start=0&limit=10",
16 "type": "application/vnd.sas.collection",
17 "itemType": "application/vnd.sas.job.execution.job"
18 },
19 {
20 "method": "GET",
21 "rel": "next",
22 "href": "/jobExecution/jobs?sortBy=creationTimeStamp:descending&start=10&limit=10",
23 "uri": "/jobExecution/jobs?sortBy=creationTimeStamp:descending&start=10&limit=10",
24 "type": "application/vnd.sas.collection"
25 },
26 {
27 "method": "GET",
28 "rel": "up",
29 "href": "/jobExecution/",
30 "uri": "/jobExecution/",
31 "type": "application/vnd.sas.job.execution.job"
32 },
33 {
34 "method": "POST",
35 "rel": "submitJob",
36 "href": "/jobExecution/jobs",
37 "uri": "/jobExecution/jobs",
38 "type": "application/vnd.sas.job.execution.job.request",
39 "responseType": "application/vnd.sas.job.execution.job"
40 },
41 {
42 "method": "POST",
43 "rel": "submitJobs",
44 "href": "/jobExecution/jobRequests/@selection/jobs",
45 "uri": "/jobExecution/jobRequests/@selection/jobs",
46 "type": "application/vnd.sas.selection",
47 "responseType": "application/vnd.sas.collection"
48 },
49 {
50 "method": "PUT",
51 "rel": "updateStates",
52 "href": "/jobExecution/jobs/@selection/state",
53 "uri": "/jobExecution/jobs/@selection/state",
54 "type": "application/vnd.sas.selection",
55 "responseType": "application/vnd.sas.collection"
56 }
57 ],
58 "name": "jobs",
59 "accept": "application/vnd.sas.job.execution.job",
60 "start": 0,
61 "count": 2,
62 "items": [
63 {
64 "creationTimeStamp": "2022-04-07T14:00:02.853Z",
65 "modifiedTimeStamp": "2022-04-07T14:00:05.389Z",
66 "createdBy": "sas.audit",
67 "modifiedBy": "sas.audit",
68 "version": 4,
69 "id": "f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
70 "jobRequest": {
71 "version": 3,
72 "name": "Update CAS Audit data",
73 "jobDefinitionUri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
74 "jobDefinition": {
75 "creationTimeStamp": "2022-04-06T22:08:06.127Z",
76 "modifiedTimeStamp": "2022-04-06T22:08:06.131Z",
77 "createdBy": "sas.audit",
78 "modifiedBy": "sas.audit",
79 "version": 2,
80 "id": "7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
81 "name": "CAS Audit table update",
82 "description": "After upload of new Audit data into a temporary CAS table, this job appends the new data to the existing Audit data",
83 "type": "casl",
84 "parameters": [
85 {
86 "version": 1,
87 "name": "%VAR-expireDate",
88 "type": "CHARACTER",
89 "required": true
90 },
91 {
92 "version": 1,
93 "name": "%VAR-tempTableName",
94 "type": "CHARACTER",
95 "required": true
96 },
97 {
98 "version": 1,
99 "name": "%VAR-targetCaslib",
100 "type": "CHARACTER",
101 "required": true
102 },
103 {
104 "version": 1,
105 "name": "serverId",
106 "defaultValue": "cas-shared-default",
107 "type": "CHARACTER",
108 "required": false
109 }
110 ],
111 "code": "whereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
112 "links": [
113 {
114 "method": "GET",
115 "rel": "self",
116 "href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
117 "uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
118 "type": "application/vnd.sas.job.definition"
119 },
120 {
121 "method": "GET",
122 "rel": "alternate",
123 "href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
124 "uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
125 "type": "application/vnd.sas.summary"
126 },
127 {
128 "method": "PUT",
129 "rel": "update",
130 "href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
131 "uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
132 "type": "application/vnd.sas.job.definition",
133 "responseType": "application/vnd.sas.job.definition"
134 },
135 {
136 "method": "DELETE",
137 "rel": "delete",
138 "href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
139 "uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309"
140 }
141 ],
142 "properties": []
143 },
144 "arguments": {
145 "%VAR-expireDate": "2022-03-31T14:00:02Z",
146 "%VAR-targetCaslib": "SystemData",
147 "%VAR-tempTableName": "audit_2869981866",
148 "serverID": "cas-shared-default"
149 },
150 "properties": [],
151 "createdByApplication": "jobExecution"
152 },
153 "state": "completed",
154 "endTimeStamp": "2022-04-07T14:00:05.387Z",
155 "heartbeatTimeStamp": "2022-04-07T14:00:03.119Z",
156 "submittedByApplication": "audit-service",
157 "heartbeatInterval": 300,
158 "elapsedTime": 2534,
159 "results": {
160 "debuginfo_1": "",
161 "severity_1": "normal",
162 "statusCode_1": "0",
163 "reason_1": "ok",
164 "executedCode": "expireDate=\"2022-03-31T14:00:02Z\";\ntempTableName=\"audit_2869981866\";\ntargetCaslib=\"SystemData\";\nwhereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
165 "status_1": ""
166 },
167 "logLocation": "/files/files/e96dd0d1-9158-4a09-9d55-eb56383d73cd",
168 "links": [
169 {
170 "method": "GET",
171 "rel": "self",
172 "href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
173 "uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
174 "type": "application/vnd.sas.job.execution.job"
175 },
176 {
177 "method": "GET",
178 "rel": "state",
179 "href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/state",
180 "uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/state",
181 "type": "text/plain"
182 },
183 {
184 "method": "PUT",
185 "rel": "update",
186 "href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
187 "uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
188 "type": "application/vnd.sas.job.execution.job",
189 "responseType": "application/vnd.sas.job.execution.job"
190 },
191 {
192 "method": "DELETE",
193 "rel": "delete",
194 "href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
195 "uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b"
196 },
197 {
198 "method": "PUT",
199 "rel": "updateState",
200 "href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/state",
201 "uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/state",
202 "type": "text/plain"
203 },
204 {
205 "method": "POST",
206 "rel": "updateHeartbeatTimeStamp",
207 "href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/heartbeatTimeStamp",
208 "uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/heartbeatTimeStamp",
209 "type": "text/plain"
210 },
211 {
212 "method": "GET",
213 "rel": "jobDefinition",
214 "href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
215 "uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
216 "type": "application/vnd.sas.job.definition"
217 },
218 {
219 "method": "GET",
220 "rel": "log",
221 "href": "/files/files/e96dd0d1-9158-4a09-9d55-eb56383d73cd",
222 "uri": "/files/files/e96dd0d1-9158-4a09-9d55-eb56383d73cd"
223 }
224 ]
225 },
226 {
227 "creationTimeStamp": "2022-04-07T12:00:03.166Z",
228 "modifiedTimeStamp": "2022-04-07T12:00:05.290Z",
229 "createdBy": "sas.audit",
230 "modifiedBy": "sas.audit",
231 "version": 4,
232 "id": "79d9a2e8-aa85-4e27-a249-8646e1323707",
233 "jobRequest": {
234 "version": 3,
235 "name": "Update CAS Audit data",
236 "jobDefinitionUri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
237 "jobDefinition": {
238 "creationTimeStamp": "2022-04-06T22:08:06.127Z",
239 "modifiedTimeStamp": "2022-04-06T22:08:06.131Z",
240 "createdBy": "sas.audit",
241 "modifiedBy": "sas.audit",
242 "version": 2,
243 "id": "7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
244 "name": "CAS Audit table update",
245 "description": "After upload of new Audit data into a temporary CAS table, this job appends the new data to the existing Audit data",
246 "type": "casl",
247 "parameters": [
248 {
249 "version": 1,
250 "name": "%VAR-expireDate",
251 "type": "CHARACTER",
252 "required": true
253 },
254 {
255 "version": 1,
256 "name": "%VAR-tempTableName",
257 "type": "CHARACTER",
258 "required": true
259 },
260 {
261 "version": 1,
262 "name": "%VAR-targetCaslib",
263 "type": "CHARACTER",
264 "required": true
265 },
266 {
267 "version": 1,
268 "name": "serverID",
269 "defaultValue": "cas-shared-default",
270 "type": "CHARACTER",
271 "required": false
272 }
273 ],
274 "code": "whereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
275 "links": [
276 {
277 "method": "GET",
278 "rel": "self",
279 "href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
280 "uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
281 "type": "application/vnd.sas.job.definition"
282 },
283 {
284 "method": "GET",
285 "rel": "alternate",
286 "href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
287 "uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
288 "type": "application/vnd.sas.summary"
289 },
290 {
291 "method": "PUT",
292 "rel": "update",
293 "href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
294 "uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
295 "type": "application/vnd.sas.job.definition",
296 "responseType": "application/vnd.sas.job.definition"
297 },
298 {
299 "method": "DELETE",
300 "rel": "delete",
301 "href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
302 "uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309"
303 }
304 ],
305 "properties": []
306 },
307 "arguments": {
308 "%VAR-expireDate": "2022-03-31T12:00:02Z",
309 "%VAR-targetCaslib": "SystemData",
310 "%VAR-tempTableName": "audit_4114136195",
311 "serverID": "cas-shared-default"
312 },
313 "properties": [],
314 "createdByApplication": "jobExecution"
315 },
316 "state": "completed",
317 "endTimeStamp": "2022-04-07T12:00:05.287Z",
318 "heartbeatTimeStamp": "2022-04-07T12:00:03.267Z",
319 "submittedByApplication": "audit-service",
320 "heartbeatInterval": 300,
321 "elapsedTime": 2121,
322 "results": {
323 "debuginfo_1": "",
324 "severity_1": "normal",
325 "statusCode_1": "0",
326 "reason_1": "ok",
327 "executedCode": "expireDate=\"2022-03-31T12:00:02Z\";\ntempTableName=\"audit_4114136195\";\ntargetCaslib=\"SystemData\";\nwhereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
328 "status_1": ""
329 },
330 "logLocation": "/files/files/9bc09fa1-2f94-4bec-9999-299401c6a472",
331 "links": [
332 {
333 "method": "GET",
334 "rel": "self",
335 "href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707",
336 "uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707",
337 "type": "application/vnd.sas.job.execution.job"
338 },
339 {
340 "method": "GET",
341 "rel": "state",
342 "href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/state",
343 "uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/state",
344 "type": "text/plain"
345 },
346 {
347 "method": "PUT",
348 "rel": "update",
349 "href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707",
350 "uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707",
351 "type": "application/vnd.sas.job.execution.job",
352 "responseType": "application/vnd.sas.job.execution.job"
353 },
354 {
355 "method": "DELETE",
356 "rel": "delete",
357 "href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707",
358 "uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707"
359 },
360 {
361 "method": "PUT",
362 "rel": "updateState",
363 "href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/state",
364 "uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/state",
365 "type": "text/plain"
366 },
367 {
368 "method": "POST",
369 "rel": "updateHeartbeatTimeStamp",
370 "href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/heartbeatTimeStamp",
371 "uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/heartbeatTimeStamp",
372 "type": "text/plain"
373 },
374 {
375 "method": "GET",
376 "rel": "jobDefinition",
377 "href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
378 "uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
379 "type": "application/vnd.sas.job.definition"
380 },
381 {
382 "method": "GET",
383 "rel": "log",
384 "href": "/files/files/9bc09fa1-2f94-4bec-9999-299401c6a472",
385 "uri": "/files/files/9bc09fa1-2f94-4bec-9999-299401c6a472"
386 }
387 ]
388 }
389 ],
390 "limit": 10,
391 "version": 2
392}