This document describes how to use the CIS (Cisco Information Server) WebAPI to start a session, execute transactions within the newly created session, and see the sessions.
Invoke the Admin API
This example shows how to invoke the Admin API in Studio.
Run Studio as an admin (or any user with administrative rights).
From the main menu, choose Administration > Configuration.
Choose Server > Web Service Interface > Log Request and Response Messages and set it to True.
Close the server configuration dialog box.
From the main menu, choose File > Switch User in order to close and reopen the session. You can log in as the same user. You just want to 1) force the web service log files to get created and 2) show an example of how to start a session.
Open a terminal (bash) window.
CD to the product install directory.
CD into the logs directory.
Run .cat cs_server_ws_request.log in order to get an initial dump.
Run tail -f cs_server_ws_request.log in order to keep a running dump.
Keep this window open as you perform operations in Studio in order to see how it communicates with the server.
Note: This only shows the Admin API (public) interactions. It will not show the private WebAPI interactions as they occur on a different channel.
You should see entries for closeSession and beginSession after you Switch User and turn on logging.
Create and Close a Session
These instructions show you how to create a session, translate, perform some work, and then close the transaction and session. Not all operations that occur within Studio use explicit transactions (many use implicit transactions). Additionally, you want to isolate noise as much as possible in order to highlight the desired example.
Go back to Studio.
Open /Shared/examples/productCatalog_xform (any-any transformation).
In order to edit the transformation drag a "Query" node into the graph, but do not hook it up.
Save the transformation. You will see these steps in the cs_server_ws_request.log:
beginTransaction (prepare the transaction)
updateTransformProcedure (the core work)
In order to make the example slightly more interesting:
Copy/paste the transformation resource (called productCatalog_xform_Copy_1).
Modify both, but do not save them.
Run Save All in Studio. You will see two calls to updateTransformProcedure within the transaction.
These steps help you to see the Simple Object Access Protocol (SOAP) invocations.