Adobe 65029902 User Guide - Page 23

Send a search query to RoboHelp server, your search query

Page 23 highlights

USING ROBOHELP SERVER 8 20 Managing the server RoboHelp Server provides sample files in four languages: Visual Basic, VC++, C#, and JavaScript. All the sample files in different languages, other than JavaScript, are stored in different folders. For example, a Visual Basic folder is named Sample_RoboHelp_CSH_VB. All the language-specific sample folders also contain solution files (.sln files) to open and run them in Visual Studio. Using these samples, you can perform search and Robowindow service from REST services on the projects published on the RoboHelp Server. The result of the query is responded in XML format. You can use the results to be displayed in different formats or for scripting purposes. In the samples, the search results are displayed in a table format. The columns display rank, title, the URL, and the summary links to the relevant topics of the specified project. To get a RoboWindow using the REST web services, select one of the following options: • To get the window properties and Help URL for a context ID, use the HTTP GET method and send the query in the following format: URL: http:////rest/robowindow?wtype=ctx&project=&context=&area=[&type=flashhelp] • To get the window properties and Help URL for a given window name, use the HTTP GET method and send your query in the following format: URL: http:////rest/robowindow?wtype=prj&project=&wnd=&area=[&type=flashhelp] Note: The method to get the Robowindow is same for both public and protected areas. The RoboHelp Server sends the response for both public and private areas in the same format: Send a search query to RoboHelp server • Public area When you send a search request to a public area, use the HTTP GET method. You can use the following format for your search query: URL : http://[:port-num]//rest/search?project=&area=&quesn=[&type=flashhelp] The server sends the response in the following XML format: • Protected area To send a query request to a protected area, use the HTTP POST method. Use the following format for your search query: URL : http://[:port-num]//rest/search For the query request to a protected area, enter a Request body. [] The RoboHelp server sends the response in the following format:

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26

20
USING ROBOHELP SERVER 8
Managing the server
RoboHelp Server provides sample files in four languages: Visual Basic, VC++, C#, and JavaScript. All the sample files
in different languages, other than JavaScript, are stored in different folders. For example, a Visual Basic folder is named
Sample_RoboHelp_CSH_VB
. All the language-specific sample folders also contain solution files (.sln files) to open and
run them in Visual Studio. Using these samples, you can perform search and Robowindow service from REST services
on the projects published on the RoboHelp Server. The result of the query is responded in XML format. You can use
the results to be displayed in different formats or for scripting purposes. In the samples, the search results are displayed
in a table format. The columns display rank, title, the URL, and the summary links to the relevant topics of the specified
project.
To get a RoboWindow using the REST web services, select one of the following options:
To get the window properties and Help URL for a context ID, use the HTTP GET method and send the query in
the following format:
URL: http://<server-name>/<context-name>/rest/robowindow?wtype=ctx&project=<project-
name>&context=<context-id>&area=<area-name>[&type=flashhelp]
To get the window properties and Help URL for a given window name, use the HTTP GET method and send your
query in the following format:
URL: http://<server-name>/<context-name>/rest/robowindow?wtype=prj&project=<project-
name>&wnd=<window-name>&area=<area-name>[&type=flashhelp]
Note:
The method to get the Robowindow is same for both public and protected areas.
The RoboHelp Server sends the response for both public and private areas in the same format:
<Window Name="{wnd-name}" UseProp="{0/1}" URL="string"> <Style Toolbar="{0/1}"
Location="{0/1}" Status="{0/1}" Menubar="{0/1}" Resizable="{0/1}"/> <Location Left="{int}"
Top="{int}" Width="{int}" Height="{int}" LeftType="{0/1}" TopType="{0/1}" WidthType="{0/1}"
HeightType="{0/1}"/> </Window>
Send a search query to RoboHelp server
Public area
When you send a search request to a public area, use the HTTP GET method. You can use the following format for
your search query:
URL : http://<server-name>[:port-num]/<context-name>/rest/search?project=<project-
name>&area=<area-name>&quesn=<search-query>[&type=flashhelp]
The server sends the response in the following XML format:
<?xml version="1.0" encoding="utf-8" ?> <ftstdata> <topic name="{topic-name}" url="{url of
topic}" summary="{summary}" rank="{rank}" /> </ftstdata>
Protected area
To send a query request to a protected area, use the HTTP POST method. Use the following format for your search
query:
URL : http://<server-name>[:port-num]/<context-name>/rest/search
For the query request to a protected area, enter a Request body.
<?xml version="1.0" encoding="utf-8" ?> <rest> <UID name="{User ID}" /> <PWD
name="{Password}" /> <PRJ name="{ProjectName}" /> <AREA name="{AreaName}" /> <QUESN
name="{Search Query}" /> [<TYPE name="flashhelp" />] </rest>
The RoboHelp server sends the response in the following format: