Accessing the bwagent REST API with the Swagger UI

Use the Swagger UI to access the bwagent REST API, where you can try out operations and see results using sample data.

Procedure

  1. Start the bwagent with the apiserver command:
    BW_HOME\bin>bwagent apiserver
    TIBCO ActiveMatrix BusinessWorks version 6.2.0, build V20, 2014-10-09
    Starting API server at http://localhost:5555
    Press any key to stop the server...

    The API server is started at: http://localhost:5555

  2. Open a web browser and go to the URL of the API server.
    The bwagent API documentation displays in the Swagger UI:

  3. View sample data in the browser. To obtain the URL, go to the URL returned by an operation. For example, clicking Try it out! for the GET/agents/info operation returns the Request URL of http://localhost:5555/api/agents/info. Pasting this URL into the browser returns information similar to:
    [{"name":"MACHINE_1","state":"Running","pid":"10052","tibcoHome":"C:\\BW620",
    "machineName":"MACHINE_1","configState":"InSync","adminMode":"enterprise",
    "version":"6.2","description":"TIBCO ActiveMatrix BusinessWorks version
    6.2.0, build V20, 2014-10-09","uptime":647986}]
    Note: To get actual data for the agent, go to the URL using the port 8079 instead of 5555. Change the api folder in the file path to bw and the version number into the path before the resource. (The bwagent must be running.) For example, the URL http://localhost:8079/bw/v1/agents/info returns the following information for an agent named MACHINE_1:
    [{"name":"MACHINE1","state":"Running","description":"TIBCO ActiveMatrix BusinessWorks version 6.2.0, build V20, 2014-10-09","machineName":"MACHINE1","configState":"InSync","tibcoHome":"C:\\BW_6.2.0","pid":"20528","adminMode":"enterprise","version":"6.2.0","configMap":{"bw.agent.tea.agent.port":"9091","bw.agent.technology.as.loglevel":"error","bw.agent.technology.as.replicationCount":"-1","bw.agent.tea.agent.host":"0.0.0.0","bw.agent.technology.as.listenURL":"tcp://MACHINE1:5050","bw.agent.technology.as.dataStoreLocation":"C:\\BW_6.2.0\\bw\\domains\\.datastore","bw.agent.technology.as.remoteListenURL":"tcp://MACHINE1:5075","bw.agent.technology.as.quorumSize":"1","bw.agent.appnode.password":"OBF:1sho1wgi1u9d1x1d1xfj1x191ua51wfg1shu","bw.agent.memberName":"MACHINE1","bw.agent.technology.as.minSeederCount":"1","bw.agent.http.host":"0.0.0.0","bw.agent.technology.as.discoveryURL":"tcp://MACHINE1:5050","bw.admin.mode":"enterprise","bw.agent.http.access.log.config":"bwagent-access.xml","bw.agent.technology.as.remoteDiscoveryURL":"tcp://MACHINE1:5075?remote=true","bw.agent.networkName":"bwmetaspace","bw.agent.technology.as.role":"server","bw.agent.technology.type":"ActiveSpaces","bw.agent.http.port":"8079"},"httpPort":8079,"httpHost":"0.0.0.0","uptime":1020824,"internalPort":63094}]

    To change the URL interface or port, edit the http.host or http.port settings in the bwagent.ini file.