BookmarkSubscribeRSS Feed
Ankur_151987
Calcite | Level 5

Hello, 

 

We are calling a SAS job using a Rest API.  This SAS job is saved as Job definition so we get such URL to use for executing a job using REST API

 https://hostname/SASJobExecution/?_program=/Public/jobname

So when we execute this job we would like to get the status of this in front end. So wondering how to get status of job that was submitted using REST API. 

 

Any link to white paper or blog is also helpful. 

1 REPLY 1
AllanBowe
Barite | Level 11

To poll the status you would need to use the REST APIs (/compute), not the Web interface (/SASJobExecution).

 

If you're looking to run jobs from a web frontend, you could look at SASjs - this will automatically handle the polling for you with a very simple javascript method ( sasjs.request(/job/name,dataPayload) ).

 

If you are looking to do this from commandline, you can also use the CLI (`sasjs job execute /some/job`) - https://cli.sasjs.io/job/

 

These are open source tools built and maintained by my team (not SAS).  They are free for commercial use.

/Allan
SAS Challenges - SASensei
MacroCore library for app developers
SAS networking events (BeLux, Germany, UK&I)

Data Workflows, Data Contracts, Data Lineage, Drag & drop excel EUCs to SAS 9 & Viya - Data Controller
DevOps and AppDev on SAS 9 / Viya / Base SAS - SASjs

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Discussion stats
  • 1 reply
  • 824 views
  • 0 likes
  • 2 in conversation