Follow

Create jobs from JSON

Note: You can see a higher resolution image for the screenprints by Right Click -> Open in New Tab

Two buttons on to the job details page, Show parameters and Download parameters, allow the user to view and download the parameters associated with a workflow job.

Show parameters displays a popup window showing the workflow parameters for each step in the workflow plus some job level details such as JobID, environment etc.

Download parameters allows the user to save this data to a file in JSON format.

A new emdash feature, CreateJobFromJson, has been added to allow this JSON data to be posted to the web API to recreate an exact copy of the job downloaded.  This can then be run as normal by the workflow service.  This is intended to be used only in a test scenario e.g. running automated regression tests.

The URL for the Web API call is:

http://localhost/emDashWebApi/api/DeploymentJob/CreateJobFromJson

A tool like Postman ( https://www.getpostman.com ) can be used to POST data to the Web API.

 NOTE: No validation of the JSON data is performed. It is parsed to create the job but no validation of server names, file paths etc is performed by this Web API method.

 

Postman Settings

Once Postman is downloaded on to the emdash application server (from the link above) you can configure as follows:

Create a new job (called emdashJSONJob in the below example) and configure it as a POST with the URL from above.  Note you need to include a user/password for an emdash Administrator.

Screen_Shot_2018-10-18_at_16.48.40.png

 

Now you can paste in the contents of the JSON file to submit the emdash Job:

Screen_Shot_2018-10-18_at_16.47.00.png

Now you can check the Job Log in emdash for a newly created item!

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk