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:
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)
# Navigate to the Swagger page
. By default it is available on the 5555 port
http://localhost:5555/index.html
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:
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:
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:
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
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 accountSign in
Already have an account? Sign in here.
Sign In Now