Starting, stopping, and deleting a recording by using RESTful commands

Use the RESTful commands to start a recording and to stop recording a solution.

About this task

Instead of adding the startRecording method to a test driver to start a recording, you can use a RESTful command to start and stop a recording.

Start and stop a recording by using RESTful commands

The RESTful commands for starting, stopping, and deleting a recording are implemented by using the GET command. You do not need to include GET in the URL when you enter it in a browser, as shown in the following examples.

Procedure

  1. In your browser address field, enter a recording/start URL to start the recording. For example:
    http://localhost:9080/ibm/insights/rest/recording/start/Airport
    where Airport is the solution you want to record.
    Optional parameters include author and overwrite.
    • The default author name for a recording is derived from the user name of the person who started the recording. To assign a different author, include the author parameter in the URL. For example:
      http://localhost:9080/ibm/insights/rest/recording/start/Airport/author/Administrator
    • If a recording is already in progress for the solution, you cannot start a new recording for the same solution by using the RESTful command. You can override this default behavior by adding the overwrite parameter to the URL. For example:
      http://localhost:9080/ibm/insights/rest/recording/start/Airport/overwrite/true
    The trace log includes a message to indicate that the recording is started. For example:
    Recording started. [SolutionVersion: Airport, Author: tester, Recording id: Airport-0.1|2014-08-06T12:30:26.043-0400]
  2. Run a JUnit test for the solution that you want to record.
  3. Stop the recording by entering the recording/stop URL in your browser. For example:
    http://localhost:9080/ibm/insights/rest/recording/stop/Airport
    where Airport is the solution you want to stop recording.
  4. Optional: Delete the current recording. By default, the current recording is not overwritten when a new recording starts for the same solution. You can manually delete a recording by using the recording/delete URL. For example:
    http://localhost:9080/ibm/insights/rest/recording/delete/Airport-0.1|2014-08-06T12:30:26.043-0400 
    where Airport-0.1|2014-08-06T12:30:26.043-0400 is the identifier of the recording that you want to delete. The recording ID is displayed in your browser when you start a recording.