Get a score execution
get/executions/{executionId}
Returns the representation of the specified score execution.
1{2 "codeFileUri": "/files/files/a26709f1-efec-4eb8-a5eb-a9b3fe7715c2",3 "createdBy": "sasuser",4 "creationTimeStamp": "2021-12-22T22:01:24.90638Z",5 "id": "feed27ef-988f-4b6e-ba84-aa399c786253",6 "links": [7 {8 "method": "GET",9 "rel": "up",10 "href": "/scoreExecution/executions",11 "uri": "/scoreExecution/executions",12 "type": "application/vnd.sas.collection"13 },14 {15 "method": "GET",16 "rel": "self",17 "href": "/scoreExecution/executions/feed27ef-988f-4b6e-ba84-aa399c786253",18 "uri": "/scoreExecution/executions/feed27ef-988f-4b6e-ba84-aa399c786253",19 "type": "application/vnd.sas.score.execution"20 },21 {22 "method": "GET",23 "rel": "alternate",24 "href": "/scoreExecution/executions/feed27ef-988f-4b6e-ba84-aa399c786253",25 "uri": "/scoreExecution/executions/feed27ef-988f-4b6e-ba84-aa399c786253",26 "type": "application/vnd.sas.summary"27 },28 {29 "method": "DELETE",30 "rel": "delete",31 "href": "/scoreExecution/executions/feed27ef-988f-4b6e-ba84-aa399c786253",32 "uri": "/scoreExecution/executions/feed27ef-988f-4b6e-ba84-aa399c786253"33 },34 {35 "method": "GET",36 "rel": "analyses",37 "href": "/scoreExecution/executions/feed27ef-988f-4b6e-ba84-aa399c786253/analyses",38 "uri": "/scoreExecution/executions/feed27ef-988f-4b6e-ba84-aa399c786253/analyses"39 },40 {41 "method": "GET",42 "rel": "state",43 "href": "/scoreExecution/executions/feed27ef-988f-4b6e-ba84-aa399c786253/state",44 "uri": "/scoreExecution/executions/feed27ef-988f-4b6e-ba84-aa399c786253/state",45 "type": "text/plain"46 },47 {48 "method": "POST",49 "rel": "analysisCode",50 "href": "/scoreExecution/executions/feed27ef-988f-4b6e-ba84-aa399c786253/analysisCode",51 "uri": "/scoreExecution/executions/feed27ef-988f-4b6e-ba84-aa399c786253/analysisCode",52 "type": "application/vnd.sas.score.analysis.code.generation.request",53 "responseType": "application/vnd.sas.score.analysis.code"54 }55 ],56 "logFileUri": "/files/files/d56daac3-5411-4a8f-949c-f5a7cad4a643",57 "modifiedBy": "sasuser",58 "modifiedTimeStamp": "2021-12-22T22:01:31.360206Z",59 "outputTable": {60 "tableName": "Decision_Scenario_2021-12-22_22-01-24_output",61 "libraryName": "Public",62 "serverName": "cas-shared-default"63 },64 "results": {65 "debuginfo_1": "",66 "elapsedTime": "2574",67 "executedCode": "outputLibraryName=\"Public\";\noutputTableName=\"Decision_Scenario_2021-12-22_22-01-24_output\";\nmappedCode=\"http://sas-files/files/files/7d613eca-cad2-487e-bf12-22add29c59f5\";\ninputLibraryName=\"CASUSER(sasuser)\";\ninputTableName=\"Scenario_8fc3a739_55a8_4057_9e0d_b5148dafa32a\";\npreprocessingCode=\"null\";\ninlineCode=\"data \"\"CASUSER(sasuser)\"\".\"\"Scenario_8fc3a739_55a8_4057_9e0d_b5148dafa32a\"\"; dcl double foo; enddata;\";\nfmtLibNames=\"userformats3\";\nastoreNames=\"null\";\ncode = '';\nmappedCodeFromRestAPI = '';\nmodelLibName = outputLibraryName;\nmodelTableName = 'TempModel_' || uuidgen();\nmodelName = modelTableName;\nstoreTables = {};\n\nloadActionSet \"modelPublishing\";\nloadActionSet \"ds2\";\nloadActionSet \"table\";\n\naction dropTable / caslib=outputLibraryName, name=outputTableName, quiet=true;\n\nif(astoreNames != \"null\") then do;\n count=0;\n t='x';\n do until (t = ' ');\n count=count+1;\n t=scan(astoreNames, count, ' ');\n if (length(t)>3) then do;\n table.tableExists result=e / caslib='ModelStore' name=t;\n haveTable = dictionary(e, 'exists');\n storeTables = storeTables + {{ caslib='ModelStore', name=t }};\n if haveTable < 1 then do;\n rr = reverse(t);\n pp = index(rr, '/');\n if pp = 0 then do;\n mn = t;\n end;\n else do;\n ll = length(t);\n mn = substr(t, ll-pp+2);\n end;\n table.loadTable result=r / caslib='ModelStore' casOut={caslib='ModelStore', name=mn} path=mn||'.sashdat';\n end;\n end;\n end;\nend;\n\nif(fmtLibNames != \"null\") then action setFmtSearch status=status / fmtLibNames=fmtLibNames;\n\nif(inlineCode != \"null\") then action runDS2 / program=inlineCode;\n\nif(preprocessingCode != \"null\") then action runDS2 / program=preprocessingCode;\n\nif(find(mappedCode, 'http') == 1) then do;\n code = '';\n code = code || 'data xyz;';\n code = code || ' declare int size;';\n code = code || ' method init();';\n code = code || ' declare package http h();';\n code = code || ' declare package json j();';\n code = code || ' declare varchar(10485760) character set utf8 body;';\n code = code || ' dcl int internalTokenType internalParseFlags;';\n code = code || ' dcl varchar(4000) internalToken;';\n code = code || ' declare int rc;';\n code = code || ' h.createGetMethod(''' || mappedCode || ''');';\n code = code || ' h.addSASOauthToken();';\n code = code || ' h.executeMethod();';\n code = code || ' h.getResponseBodyAsString(body, rc);';\n code = code || ' rc = j.createParser(body);';\n code = code || ' do while (rc = 0);';\n code = code || ' j.getNextToken(rc, internalToken, internalTokenType, internalParseFlags);';\n code = code || ' if (internalToken eq ''size'') then do;';\n code = code || ' j.getNextToken(rc, internalToken, internalTokenType, internalParseFlags);';\n code = code || ' size = internalToken;';\n code = code || ' end;';\n code = code || ' end;';\n code = code || ' end;';\n code = code || 'enddata;';\n action runDS2 / program=code;\n table.fetch result=e index=FALSE sasTypes=FALSE table='xyz';\n mappedCodeContentLength = (INT64)e['Fetch'][1]['size'];\n table.dropTable name='xyz';\n\n chunkSize = 10485760;\n from = 0;\n to = chunkSize-1;\n do while (from < mappedCodeContentLength);\n if to >= mappedCodeContentLength then\n to = mappedCodeContentLength-1;\n\n code = '';\n code = code || 'data xyz;';\n code = code || ' declare VARCHAR(' || chunkSize || ') character set utf8 body;';\n code = code || ' method init();';\n code = code || ' declare package http h();';\n code = code || ' declare int rc;';\n code = code || ' h.createGetMethod(''' || mappedCode || '/content'');';\n code = code || ' h.addRequestHeader(''Range'', ''bytes=' || from || '-' || to || ''');';\n code = code || ' h.addSASOauthToken();';\n code = code || ' h.executeMethod();';\n code = code || ' h.getResponseBodyAsString(body, rc);';\n code = code || ' end;';\n code = code || 'enddata;';\n action runDS2 / program=code;\n table.fetch result=e index=FALSE sasTypes=FALSE table='xyz';\n mappedCodeFromRestAPI = mappedCodeFromRestAPI || e['Fetch'][1]['body'];\n table.dropTable name='xyz';\n\n from = to + 1;\n to = to + chunkSize;\n end;\n mappedCode = mappedCodeFromRestAPI;\nend;\n\n\nif(astoreNames != \"null\") then action publishModel submit / modelTable={name=modelTableName, caslib=modelLibName} modelName=modelName program=mappedCode storeTables=storeTables;\nelse action publishModel submit / modelTable={name=modelTableName, caslib=modelLibName} modelName=modelName program=mappedCode;\n\nparmlist={\n modelTable={\n name=modelTableName,\n caslib=modelLibName\n },\n modelName=modelName,\n inTable={\n name=inputTableName,\n caslib=inputLibraryName\n },\n outTable={\n name=outputTableName,\n caslib=outputLibraryName\n }\n};\naction runModelLocal submit / parmlist;\nrun;\n\naction promote / caslib=outputLibraryName, name=outputTableName, targetLib=outputLibraryName;\n\naction dropTable / caslib=outputLibraryName, name=modelTableName;\naction endSession;\n",68 "jobId": "58c39c14-2b35-4589-88c1-a10c3ad309ad",69 "jobRequestId": "ebbf704f-59f0-4f1a-8603-3d83574f15c0",70 "mappedCodeJobId": "e3c51767-9e11-4e8d-968b-432560b7e6bc",71 "reason_1": "ok",72 "severity_1": "error",73 "statusCode_1": "0",74 "status_1": ""75 },76 "scoreExecutionRequest": {77 "version": 1,78 "name": "Execution for Decision_Scenario",79 "hints": {80 "asyncMappedCode": "true",81 "inputLibraryName": "CASUSER(sasuser)",82 "inputTableName": "Scenario_8fc3a739_55a8_4057_9e0d_b5148dafa32a",83 "modelLib": "public",84 "modelTable": "4485f766-b13f-44b5-6a3b-a605e06a9eb3",85 "objectURI": "/decisions/flows/4672704b-aad4-4e2f-8b8e-64fd89fbe0ff/revisions/56b8939b-4224-425d-8211-0206188b4d60",86 "scoreRequestGuid": "2489a059-7564-400e-1f89-3f72721772f1",87 "useGlobalVariableCurrentValues": "true"88 },89 "type": "scoreDefinition",90 "scoreDefinitionId": "8fc3a739-55a8-4057-9e0d-b5148dafa32a"91 },92 "state": "failed",93 "version": 194}