Jump to content
We have recently updated our Privacy Statement, available here ×
  • BW6.X - How to use the bwagent REST API in BusinessWorks


    This article is to explain how to use the bwagent REST API in BusinessWorks 6.X.

    It is important to secure the bwagent REST API and this is explained in this other article:

    https://community.tibco.com/articles/tibco-activematrix-businessworks/bw6x-security-how-to-secure-the-bwagent-rest-api-r3417/

    API documentation

    The API is documented in the form of an interactive Swagger UI.

    The Swagger UI can be used with the following:

    # Start the bwagent with the apiserver option

    . Note that this can be done even if the ‘real’ bwagent is running on the server

    . go to the <TIBCO_HOME>/bw/6.X/bin directory

    . Launch the bwagent with the ‘apiserver’ option, like this

    ./bwagent apiserver (Linux)

    bwagent apiserver (Windows)

    1*rPUH9IriltNchbI4gUl5GA.png

    # Navigate to the Swagger page

    . By default it is available on the 5555 port

    http://localhost:5555/index.html

    1*u6pDNTrHgYTwwO40iLhF5Q.png

    Using the API

    The swagger UI doesn’t allow to directly use the API but it provide all details needed to call the API.

    For example in the Swagger UI it is possible to get details on the /browse/appnodes method and to try it:

    1*tzBqoxqCsf4s-IU5my1ytw.png

    Note that the methods are not really called from the Swagger UI, but in the results section you get the URL to use to call this method:

    1*Fdnr7AfwvQFc8i0vN5kGgw.png

    This URL then need to be updated to be able to call the ‘real’ API exposed by the bwagent:

    . The /api part should be replaced by /bw/v1/

    . The hostname refer to the host where the target bwagent is running

    . By default bwagents expose the REST API on the 8079 port

    So to call the /browse/appnodes method on my ‘TESTEM’ domain I have to use the following URL:

    GET http://localhost:8079/bw/v1/browse/appnodes?domain=TESTEM

    Then this URL can be used in a tool like Postman:

    1*56eniy893M7xOrTda_6gcw.png

    Note that the bwagent port used to expose the REST API can be configured by adjusting the following property in the bwagent.ini file:

    bw.agent.http.port

    Reference elements

    https://docs.tibco.com/pub/activematrix_businessworks/6.9.1/doc/html/Default.htm#administration/accessing-the-bwagen.htm


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...