Handling Session

About this task

As the picture shows, there are some parameters required for the process. Here lists all the parameters and the example values:
  • {Project Name}: TestRestChannel
  • {KColl Name}: OneKColl
  • {Data Name}: dataString
  • {IColl Name}: OneIColl
  • {Index}:0

Procedure

  1. Get sessionId. Access the following URL by method.For example,
    http://localhost:8080/TestRestChannel/rest/session/establish
    It would return the json string with dse_sessionId.
    Note: No matter handling session, operation or flow, we need to get sessionIdfirst.
  2. Get the value of data in session. Access the URL by method.
    • Field:
      http://localhost:8080/TestRestChannel/rest/session/ dataString
    • KColl:
      http://localhost:8080/TestRestChannel/rest/session/OneKColl/ dataString
    • IColl:
      http://localhost:8080/TestRestChannel/rest/session/OneIColl/0
      It would return the data with index 0 in IColl.
  3. Edit data value of session ( or method). Access the URL by . The input value should be json string. For example,{”dataString”:”hello”}.
    • Field:http://localhost:8080/TestRestChannel/rest/session
    • KColl:http://localhost:8080/TestRestChannel/rest/session/OneKColl
    • IColl:
      http://localhost:8080/TestRestChannel/rest/session/OneIColl/0
      It would return the data with index 0 in IColl.
  4. Delete elements in session () Access URL by method.
    • Field:
      http://localhost:8080/TestRestChannel/rest/session/ dataString
    • KColl:
      http://localhost:8080/TestRestChannel/rest/session/OneKColl/ dataString
    • IColl:http://localhost:8080/TestRestChannel/rest/session/OneIColl/0/ dataString