Using Postman to access DCR Active Repository
We'll provide four examples
- Get a list of your graphs in DCRGraphs.net
- Start simulation of a specific graph
- Get a list of enabled or pending events in the simulation
- Execute an event in a simulation
Download and install Postman and start the application.
Get a list of your graphs in DCRGraphs.netEnter the URL http://www.dcrgraphs.net/api/graphs in the URL line and set the action to GET. Then click Send.
You'll then get a 403, access denied, back.
Click on "No Auth" and select "Basic Auth", enter username and password and click Update Request:
<graph id="1234" title="My first graph" />
Start simulation of a specific graphStart a simulation by a POST to the following URL: http://www.dcrgraphs.net/api/graphs/<graphid>/sims
As above, ensure username and password are provided.
Clicking SEND will give returncode 201 and the simulation id
The returncode is 201 on success.
Get a list of enabled or pending events in the simulationTo get a list of enabled or pending events for a simulation you must do a GET to the following URL: http://www.dcrgraphs.net/api/graphs/<graphid>/sims/<simid>//events?filter=enabled-or-pending
<events isAccepting="true|false" nextDeadline="..." nextDelay="...">
<event id="Activity0" included="true" enabled="true" pending="false" executed="false" fullPath="Activity0" roles="" groups="" description="" label="Do some work" eventType="" /> </events>
The returncode is 200 on success.