Dev-BLOG: How to inject a redline into Dekho 4.1.9 using REST


This blog post is  aimed at developers wishing create a 3rd party tool that programatically injects redlines into a map.  This tutorial contains 3 excercises. The excercises rely on a unique dekho user identification called “session id”.

1. How do I detect your session id?

2. Draw red lines and read the contents as json format

3. Inject a red line into your Dekho client using your sessionId and a redline json drawing


Exercise 1: How to detect what your sessionId is?

  1. In Dekho Admin, toggle the log to “debug” so we can see the sessionid
  2. Start your Dekho map with ?debug=y at the end opf the url
  3. Copy the trace window to clipboard
  4. Do not close the browser tab running Dekho (!)
  5. Paste in notepad and look for SessionIDblog1_sessionid
Exercise 2: Draw red lines and read the contents as json format.
  1. Start a new Dekho and write down what the sessionId is (see exercise above).
  2. Use the redline tool to draw some redline (just like a normal client would)
  3. Start a new Chrome tab and paste the following URL:
    Note that you need to substitute your dekho server name (and port), and replace the sessionId with whatever is recorded in step 1.
  4. Copy all the resulting json text and save it in Notepad; We will need this script for the next exercise.


Exercise 3: Inject a red line into your Dekho client using your sessionId and a redline json drawing.

  1. Go to your Dekho client Tab and clear the redlines – NO NOT REFRESH the browser ; we need to keep our sessionId active.
  2. Start Chrome Postman ( new tab, click [ ] Apps ; click on Postman)
  3. In Postman: enter your REST URL
  4. You will need to look at the Dekho log and extract your SessionID and substitute in URL above. (see previous exercise)
  5. Toggle to POST
  6. Click [Hearders]
  7. Add a header entry called Content-Type    application/json blog1_5saessionid
  8. Select RAW
  9. Paste the script (see below)
  10. Click [SEND]
  11. You should not get any error in the bottom frame
  12. We have now successfully injected a red line into Dekho, using a JSON script (captured earlier)
  13. DO NOT REFRESH OR PAN DEKHO YET – We cannot see the result on Dekho because we need to send a final “refresh” command


  1. Create a new Postman tab and send a refresh command as a GET:
    You will need to replace your Dekho host name and your sessionId.




This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *