-
Notifications
You must be signed in to change notification settings - Fork 33
pman command: get
Rudolph Pienaar edited this page Mar 9, 2017
·
13 revisions
This page describes the get
command to pman
. It is used to simply get
information from the pman
database / datatree.
- This page assumes that
pman
is listening on:172.17.0.2:5010
. - Make sure that
pman
has been started (see here for more info):
pman --raw 1 --http --port 5010 --listeners 12
- This page assumes that a previous run has been managed with parameters
{ "action": "run",
"meta": {
"cmd": "cal 7 1970",
"auid": "rudolphpienaar",
"jid": "cal-job-1234",
"threaded": true
}
}
The msg
payload of the REST interaction with pman
is:
{ "action": "get",
"meta": {
"path": "/"
}
}
Start the purl
command with
purl --content-type application/vnd.collection+json --content-type application/vnd.collection+json --verb POST --raw --http 172.17.0.2:5010/api/v1/cmd --jsonwrapper 'payload' --msg \
simple copy/paste the above line into a terminal. Do not press enter!
Assuming satisfied preconditions, let's simply get
some elements directly from the pman
database/datatree. The representation of data in the pman
database is directly equivalent also to how data is saved to the pman
database on the host machine running the pman
service.
'{ "action": "get",
"meta": {
"path": "/"
}
}
' --quiet --jsonpprintindent 4
Append the above to the purl
prefix.
The above returns a JSON string
--30--