Viaduct Runtime Management - Management REST Web Services
Viaduct Runtime Management - Management REST Web Services
MANAGEMENT
Management REST
Web Services
Contents
INDEX.......................................................................................................................................................... 2
1 Introduction ................................................................................................................................6
1.1 REST Web Services .......................................................................................................... 6
2 Viaduct Management REST Web Services Overview .................................... 7
3 Using the Viaduct Management REST Web Services ...................................9
3.1 HTTP Methods ..................................................................................................................... 9
3.2 URL ............................................................................................................................................... 9
3.3 Data ............................................................................................................................................. 9
3.4 HTTP Response Codes ................................................................................................ 10
4 Security ......................................................................................................................................... 11
5 Base URL ..................................................................................................................................... 12
5.1 Protocol ...................................................................................................................................12
5.2 Server Name/IP Address ............................................................................................12
5.3 Port Number .......................................................................................................................12
5.4 Management Path .........................................................................................................12
5.5 Examples ................................................................................................................................12
6 Browser Compatibility .......................................................................................................14
7 Viaduct Management REST Web Service Operations ................................ 15
7.1 View Runtime Overview .............................................................................................15
7.1.1 Runtime Information ........................................................................................................... 15
7.1.2 Example Output...................................................................................................................... 18
REST web services, due to the fact they can use the standard HTTP GET method, can, in
many cases, be accessed from a browser. Several of the Viaduct runtime management
functions are accessible in this way, although some will require an HTTP client that
supports other methods. For a basic introduction to REST web services, see
http://www.xfront.com/REST-Web-Services.html.
• Start Listener
• Stop Listener
• Add Listener
• Deploy Process
• Undeploy Process
• Flush Process
• End Process
• View Queue
• Browse Queue
• Flush Queue
• Remove Queue
• View Topic
• View Credentials
• Edit Credentials
HTTP Method
URL
Data
GET
POST
PUT
DELETE
3.2 URL
The URL is constructed to define the target runtime, the required operation and provide
any information that might be required for the specific operation.
3.3 Data
For some operations, the data is provided as part of the URL. For others it is sent as part of
the body of the request.
Each operation listed in this document will detail which HTTP method is required, whether
it can be executed from a browser with no additional work (e.g. generating a web page)
and whether data is required to be sent in the body of the request.
Below are the Response codes that are likely to be received for each of the Rest command
described in this document
Users for this authentication are managed using Viaduct Studio and the Credentials option
on the runtime. See the Viaduct Studio online help for more information on this topic.
Protocol
Port Number
Management path
5.1 Protocol
The Viaduct Management REST Web Services are secured via SSL using the default
Viaduct runtime certificate. Therefore, the protocol used is HTTPS.
This port can be defined in the runtime start up configuration file with the following
parameter:
-Dviaduct.management.rest.port=XXXX
where XXXX is the required port number. If this parameter is not present the default port
number of 8181 will apply.
5.5 Examples
Examples of possible base URLs are given below:
• Internet Explorer
• Firefox
• Chrome
• Safari
• Opera
Other browsers may be compatible but have not been tested with the Viaduct
Management REST Web Services. DXC strives to ensure the Web Services are compatible
with a range of browsers but cannot guarantee compatibility with any specific browser
other than those listed above.
Note that all browsers will warn if the self-signed certificate from the Viaduct runtime is
used as they are unable to validate the certificate chain of authenticity.
* Safari must have the “Show Develop menu in menu bar” option in Preferences |
Advanced selected to view the output of the functions that return XML data. Otherwise, a
blank page will be displayed. In this instance the XML is visible through the context option
of “View Source”
URL /viewprocess
Browser
Yes
accessible
Accept=application/json
LDAP
viewprocess
Permission
curl -X GET
Example CURL
"https://localhost:8181/management/viewprocess" --
command
basic --user admin:Abc123$$$ -k
The View Runtime Overview operation allows the user to view the details of the
Runtime.
-Dcom.csc.emms.runtime.
name
“name=<ProcessName>;active
= true|false;instanceId=<ID of
the active
Instance;age=<Duration of
the active instance in
milliseconds>”
“ProcessName\ModelName”
URL /viewprocess/details
Browser
Yes
accessible
Accept=application/json
LDAP
viewprocess
Permission
The View Process Details operation allows the user to view the details of the
processes.
URL /viewprocess/details/<ProcessName>
Browser
Yes
accessible
Returns Accept=application/xml
Accept=application/json
LDAP
viewprocess
Permission
Example
https://viaductserver:8181/management/viewprocess/details/MyProcess
URL
The View Process Details operation allows the user to view the details of the specified
process.
URL /viewprocess/diagram/<ProcessName>
Browser
Yes
accessible
LDAP
Permissio viewprocess
n
Example https://viaductserver:8181/management/viewprocess/diagram/ProcessN
URL ame
The View Process Diagram operation allows the user to view the image of the Process
Diagram.
When using CURL command, the output diagram is saved as a png file in the path
and file name specified in the command.
URL /editlistener/<ListenerName>
Browser
Yes
accessible
LDAP
editlistener
Permission
Example
https://viaductserver:8181/management/editlistener/MyListener
URL
The View Listener Configuration Properties operation allows the user to view the
properties of the specified Listener.
The properties for each listener type vary significantly. Therefore, this document will
not attempt to detail each specific listener property. For this information see other
documentation.
URL /editlistener/<ListenerName>/test
Browser
Yes
accessible
Returns Null
LDAP
editlistener
Permission
Example
https://viaductserver:8181/management/editlistener/MyListener/test
URL
The connection to the endpoint configured in the listener can be tested by adding
the parameter ‘test’ to the url. The output would return a success for an available
endpoint and would return a failure with appropriate error message for an
unavailable endpoint. This is applicable for File and FTP listeners only.
<testconnection>
<status>success</status>
</testconnection>
<testconnection>
<message>D:\Viaduct\ - is not a directory</message>
<status>failed</status>
</testconnection>
When the endpoint does not contain the files searched for:
<testconnection>
<message>No file(s) found</message>
<status>failed</status>
</testconnection>
URL /editconnector/<ProcessName>/<ConnectorName>
Browser
Yes
accessible
LDAP
editconnector
Permission
https://viaductserver:8181/management/editconnector/MyProcess/
Example URL
MyConnector
The View Connector Configuration Properties operation allows the user to view the
properties of the specified Connector.
The properties for each connector type vary significantly. Therefore, this document
will not attempt to detail each specific connector property. For this information see
other documentation.
URL /editconnector/<ProcessName>/<ConnectorName>/test
Data None
Browser
accessibl No
e
Returns Null
LDAP
Permissio editconnector
n
Example https://viaductserver:8181/management/editconnector/
URL MyProcess/MyConnector/test
Example
curl -X GET
CURL
"https://localhost:8181/management/editconnector/MyProcess/MyConne
comman
ctor/test" --basic --user admin:Abc123$$$ -k
d
The connection to the endpoint configured in the connector can be tested by adding
the parameter ‘test’ to the url. The output would return a success for an available
endpoint and would return a failure with appropriate error message for an
unavailable endpoint. This is applicable for File and FTP connectors only.
<testconnection>
<status>success</status>
</testconnection>
<testconnection>
<message>The system cannot find the directory specified
[D:\VIADUCT\Workspace\Queue_Process2\Output]</message>
<status>failed</status>
</testconnection>
URL /start/<ListenerName>
Browser
No
accessible
Returns Null
LDAP
start
Permission
The Start Listener operation allows the user to start the specified Listener. This
operation requires no input data and returns no data other than an HTTP/200 response
code.
URL /stop/<ListenerName>
Browser
No
accessible
Returns Null
LDAP
stop
Permission
The Stop Listener operation allows the user to stop the specified Listener. This
operation requires no input data and returns no data other than a HTTP/200 response
code.
URL /editlistener/<ListenerName>
Browser
No
accessible
Returns Null
LDAP
editlistener
Permission
Example
https://viaductserver:8181/management/editlistener/MyListener
URL
The Edit Listener Configuration Properties operation allows the user to change the
properties of the specified Listener.
It is suggested that the properties file is retrieved using the View Listener
Configuration Properties operation first, the returned properties edited as required,
and then the Edit Listener Configuration Properties operation executed.
The value of a single property or multiple properties of the listener can be edited by
passing the specific property and its value in the body of the request.
A specific property and its value when not found in the list of listener properties, it will
be added to the corresponding listener file.
URL /editconnector/<ProcessName>/<ConnectorName>
Browser
No
accessible
Returns Null
LDAP
Permissio editconnector
n
Example https://viaductserver:8181/management/editconnector/
URL MyProcess/MyConnector
The Edit Connector Configuration Properties operation allows the user to change the
properties of the specified Connector.
It is suggested that the properties file is retrieved using the View Connector
Configuration Properties operation first, the returned properties edited as required,
and then the Edit Connector Configuration Properties operation executed.
The value of a single property or multiple properties of the connector can be edited
by passing the specific property and its value in the body of the request.
A specific property and its value when not found in the list of connector properties, it
will be added to the corresponding connector file.
URL /newlistener/<ProcessName>/<ListenerType>
Browser
No
accessible
Returns Null
LDAP
newlistener
Permission
Example https://viaductserver:8181/management/newlistener/MyProcess
URL /scheduler
The Edit Listener Configuration Properties operation allows the user to change the
properties of the specified Listener.
The properties for each listener type vary significantly. Therefore this document will
not attempt to detail each specific listener property. For this information see other
documentation.
Note that a COMPLETE properties file is required when creating a listener. The
listener name is defined in the properties file as the value of the name property. For
example:
name=SchedulerTest
listener.base.processname=MyProcess
URL /listenerstatus
Browser
Yes
accessible
Accept=application/json
LDAP
viewprocess
Permission
curl -X GET
Example CURL
"https://localhost:8181/management/listenerstatus" --
command
basic --user admin:Abc123$$$ -k
The Listener Status operation allows the user to view the current status of all the
listeners in the Runtime that are mapped to the deployed processes. The status will
be one of the following – Starting, Running, Stopping, Stopped.
By passing the listener name in the request, the status of a specific listener can be
retrieved.
Example:
https://viaductserver:8181/management/listenerstatus/<listenername>
URL /deploy/<ProcessName>/<MaxInstance>/<flush>/<overwrite>
Browser
No
accessible
Body
Content-Type=Application/octet-stream; Accept-charset=UTF-8
Encoding
Returns Null
LDAP
deploy
Permission
Example
https://viaductserver:8181/management/deploy/MyProcess/5/true/true
URL
The Deploy Process operation allows the user to deploy the specified Process along
with setting a Maximum number of instances in which the process should be
deployed in Runtime.
The deployment package must be a VPKG file produced from the Deployment
Process in Viaduct Studio. This file must be Base64 encoded before transmission to
the REST management web service.
Viaduct contains functions to Base64 encode files such that a process to encode the
VPKG files can be created.
Alternatively, the VPKG file can be opened in an editor (Example – Notepad++) and
converted to Base64 Encoding. Select the contents of the file and click on the menu
<<Plugins -> MIME Tools – Base64 Encode>>.
Save the contents of the VPKG file after encoding and attach the file in the body of
the request.
URL /undeploy/<ProcessName>
Browser
No
accessible
Returns Null
LDAP
undeploy
Permission
Example
https://viaductserver:8181/management/undeploy/MyProcess
URL
The Undeploy Process operation allows the user to undeploy the specified Process.
This operation requires no input data and returns no data other than an HTTP/200
response code.
URL /flushprocess/<ProcessName>
Browser
No
accessible
Returns Null
LDAP
flushprocess
Permission
Example
https://viaductserver:8181/management/flushprocess/MyProcess
URL
The Flush Process operation allows the user to flush the specified Process. This
operation requires no input data and returns no data other than an HTTP/200
response code
“Flushing” a process performs a number of tasks. It resets the counts for listeners and
connectors and clears the process from the Process Cache.
URL /endprocess/<ProcessName>
Browser
No
accessible
Returns Null
LDAP
admin
Permission
Example
https://viaductserver:8181/management/endprocess/MyProcess
URL
The End Process operation allows the user to stop the process execution and stop the
listener in one action. This action results in an error in the process as “Process aborted
by the user”. This operation requires no input data and returns no data other than an
HTTP/200 response code.
URL /setprocessinstances/<ProcessName>/<InstanceNumber>
Browser
No
accessible
Returns Null
LDAP
Permissio viewprocess + flushprocess
n
Example https://viaductserver:8181/management/setprocessinstances/MyProcess
URL /5
Setting Maximum instances for a Process operation allows the user to set the
maximum instance number for an already deployed process. This operation requires
no input data and returns no data other than an HTTP/200 response code.
URL /viewlookup
Browser
Yes
accessible
Accept=application/json
LDAP
lookupmanagement
Permission
curl -X GET
Example CURL
"https://localhost:8181/management/viewlookup" --
command
basic --user admin:Abc123$$$ -k
The View Lookup data operation allows the user to view all the lookup data from the
Runtime. This command also allows the user to retrieve specific information when
used in the following formats
• Retrieve the value of a specific key that is associated with a specific config
code in the lookup database for the current Runtime
o https://viaductserver:8181/management/viewlookup/<Configcode>/<key>
• Retrieve the values of all keys associated with a specific config code in the
lookup database for the current Runtime
o https://viaductserver:8181/management/viewlookup/<Configcode>
URL /importlookupdata
Browser
No
accessible
Returns Null
LDAP
lookupmanagement
Permission
This operation allows the user to import lookup data from the attached text file into
the Runtime. When using CURL command, the path to the text file containing the
data to be imported should be passed as a parameter.
It is recommended to use the lookup data text file exported from the source Runtime
to be used for importing so that the format is not changed.
1. Config code
2. Key
3. Value
4. Config description
5. Process name for External config codes
Below is an example to insert an internal config code along with its associated key
value pairs.
"OUT_RY1_ENTYP",,,"External","TerminologyEngine"
"GLOBALS",,,”Internal”,
Import lookup data follows incremental update. Hence, when a key in the text file
already exist in the lookup database for the same associated config code, it will be
exempted from importing again. Updating a value for a key should be done using
the ‘Update Lookup Data’ operation.
URL /updatelookupdata
Browser
No
accessible
Example
https://viaductserver:8181/management/updatelookupdata
URL
Returns Null
LDAP
Lookupmanagement
Permission
The Update Lookup Data operation allows the user to insert or update a config code
as well as Key and Value for an existing config code in Runtime Lookup database.
Input should be given in the body of the request in the format similar to the input
data for the importlookupdata command.
When a specified config code already exists, the description can be modified using
this Rest call. If its an external config code, the Process name can also be modified.
When the specified config code does not exist in the lookup database, it will be
inserted as new.
Similarly, when the key in the input already exist for the config code, the value will be
updated. When the key does not exist for the config code, the key-value pair will be
added to the config code.
When value is not provided, it will be inserted as blank for the key specified.
Note: In case of any of the content containing special characters, the input data
should be enclosed within double quotes.
1. Config code
2. Key
3. Value
4. Config description
5. Process name for External config codes
Below is an example to insert an internal config code along with its associated key
value pairs.
"GLOBALS","MONGO_HOSTNAME","10.2.192.4",”Internal”,
"GLOBALS","MONGO_PORT","27011",”Internal”,
"OUT_RY1_ENTYP",,,"External","TerminologyEngine"
"GLOBALS",,,”Internal”,
URL /deletelookupdata/<ConfigCode>/<Key>
Browser
No
accessible
https://viaductserver:8181/management/deletelookupdata/GENDER/Ma
Example le
URL
https://viaductserver:8181/management/deletelookupdata/GENDER
Returns Null
LDAP
Permissio Lookupmanagement
n
The Delete lookup data operation allows the user to remove a config code as well as
key-value pair for a specific config code from Lookup Database of Runtime. This
operation requires no input data and returns no data other than a HTTP/200 response
code.
The below URL would delete an existing config code along with their respective Key-
Values from the lookup database.
https://viaductserver:8181/management/deletelookupdata/<ConfigCode>
The below URL would delete an existing Key-Value pair for the specified config code
from the lookup database.
https://viaductserver:8181/management/deletelookupdata/<ConfigCode>/<Key>
Note: The existing “deletelookup” Rest API command has been modified as
“deletelookupdata”.
URL /viewprocesscache
Browser
Yes
accessible
Accept=application/json
LDAP
lookupmanagement
Permission
curl -X GET
Example CURL
"https://localhost:8181/management/viewprocesscache" --
command
basic --user admin:Abc123$$$ -k
The View Process Cache operation allows the user to view the process cache from the
Runtime.
URL /exportfromdb
Browser
Yes
accessible
Accept=application/json
LDAP
lookupmanagement
Permission
curl -X GET
Example CURL
"https://localhost:8181/management/exportfromdb" --
command
basic --user admin:Abc123$$$ -k
The export from DB operation allows the user to export data from the specified derby
database in Runtime.
The data from the two derby databases (LookupDataDB and SequenceDB) used in
Runtime can be exported using this Rest call.
The output of the lookupdb export should be in the format that will be compatible to
import into Runtime.
URL /viewqueue
Browser
Yes
accessible
Accept=application/json
LDAP
Viewqueue
Permission
curl -X GET
Example CURL
"https://localhost:8181/management/viewqueue" --
command
basic --user admin:Abc123$$$ -k
The View Queue operation allows the user to view all the Queue names with the
count of each queue in the Runtime.
Browser
Yes
accessible
Example
https://viaductserver:8181/management/viewqueue/ADTQueue/browse
URL
Returns Accept=application/xml
Accept=application/json
LDAP
Viewqueue
Permission
The Browse Queue operation allows the user to view the contents of a specific Queue
in the Runtime.
The maximum number of messages returned by the Rest call is governed by the
ActiveMQ configuration in the runtime\metadata\activemq.xml
URL /flushqueue/<QueueName>
Browser
No
accessible
Example
https://viaductserver:8181/management/flushqueue/MyQueue
URL
Returns Null
LDAP
Viewqueue
Permission
The Flush Queue operation allows the user to flush the specified Queue. This
operation returns no data other than a HTTP/200 response code
URL /removequeue/<QueueName>
Browser
No
accessible
Example
https://viaductserver:8181/management/removequeue/MyQueue
URL
Returns Null
LDAP
Viewqueue
Permission
The Remove Queue operation allows the user to remove the specified Queue from
Runtime. This operation returns no data other than a HTTP/200 response code
“Removing” a Queue removes the queue along with the contents of the Queue
permanently.
URL /viewtopic
Browser
Yes
accessible
Accept=application/json
curl -X GET
Example CURL
"https://localhost:8181/management/viewtopic" --
command
basic --user admin:Abc123$$$ -k
The View Topic operation allows the user to view all the Topic names with the count
of each topic in the Runtime.
URL /removetopic/<TopicName>
Browser
No
accessible
Example
https://viaductserver:8181/management/removetopic/MyTopic
URL
Returns Null
LDAP
Viewtopic
Permission
The Remove Topic operation allows the user to remove the specified ActiveMQ topic
from Runtime. This operation returns no data other than a HTTP/200 response code
“Removing” a Topic deletes the topic and the contents of the Topic permanently.
URL /viewcredentials
Browser
Yes
accessible
Accept=application/json
LDAP
admin
Permission
curl -X GET
Example CURL
"https://localhost:8181/management/viewcredentials" --
command
basic --user admin:Abc123$$$ -k
The View Credentials operation allows the user to view all the Clients configured in
the Runtime along with the Process name, user login and user name associated with
the Client.
• Retrieve the value of a specific client and its details from the current Runtime
o https://viaductserver:8181/management/viewcredentials/<username>
URL /editcredentials
Browser
No
accessible
Returns Null
LDAP
admin
Permission
The edit Credentials operation allows the user to add new Clients in the Runtime with
the respective details.
When using CURL command, the path to the text file containing the data to be
updated should be passed as a parameter.
1. User name
2. Password
3. Role
4. Process name
5. User login
URL /ldapuser
Browser
Yes
accessible
Accept=application/json
LDAP
admin
Permission
curl -X GET
Example CURL
"https://localhost:8181/management/ldapuser" --
command
basic --user admin:Abc123$$$ -k
The LDAP user operation allows to view all the users and groups configured in the
Runtime’s LDAP server along with the permissions assigned.
Example:
https://localhost:8181/management/ldapuser/cn=System%20Administrator,
ou=users,ou=system
Browser
No
accessible
https://viaductserver:8181/management/ldapuser/
Example URL
cn=John,ou=users,ou=system/start
Returns Null
LDAP
admin
Permission
The LDAP user operation with PUT method allows to assign a specific permission to
the user or group. The full DN of the user or group along with the permission name
should be passed in the URL.
It is recommended that the DN of the user or group and the exact permission name
can be obtained from the output of the ldapuser GET command.
Browser
No
accessible
https://viaductserver:8181/management/ldapuser/
Example URL
cn=John,ou=users,ou=system/start
Returns Null
LDAP
admin
Permission
The LDAP user operation with DELETE method allows to unassign a specific
permission from the user or group. The full DN of the user or group along with the
permission name should be passed in the URL.
It is recommended that the DN of the user or group and the exact permission name
can be obtained from the output of the ldapuser GET command.
URL /viewsequencedata
Browser
Yes
accessible
Accept=application/json
LDAP
viewprocess
Permission
curl -X GET
Example CURL
"https://localhost:8181/management/viewsequencedata" --
command
basic --user admin:Abc123$$$ -k
The View sequence data operation allows the user to retrieve the sequence data from
the Runtime
URL /sequenceupdate
Browser
No
accessible
Returns Null
LDAP
viewprocess
Permission
The Sequence update operation allows the user to update the last sequence number
for an existing combination of Message direction and Sequence key in Runtime.
When the combination does not exist in the Sequence database in Runtime, the
entry will be inserted into the database.
• Sequence Key is the combination of MSH fields that are pipe separated
• Last Sequence number is the number that is required to be updated for the
Sequence key inorder to re-order the sequence of messages in Runtime.
Example - IN,PAP|ADT|NYP|LAB,23
8.2 URL
Enter the URL in the URL field.
8.3 Method
Select the method appropriate for the operation being performed (see the table for
each operation).
8.4 Body
Where the method is POST or PUT and input data is required, paste the appropriate
information in this field. Leave the encoding as text/xml and the charset as UTF-8
unless specified otherwise.
8.6 SSL
On the Etc. tab, select the Trust self-signed certificate and set the Hostname Verifier to
“Allow All” if using the default built in Viaduct certificate. If using a valid certificate with
an appropriate chain of authenticity, these settings should not require changing.