## Commands for working with server resources via URL

With the commands below, you can directly type the whole URL in a web browser or create it in your web application to access the destination. The HTTP methods GET and POST are available for almost all of the commands.

- jrs.get_cat_rpts_new/jrs.get_subnodes

  Description: Gets all resource nodes (folder, catalog, report and result) of a folder.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver?jrs.cmd=jrs.get_cat_rpts_new&jrs.path=RESOURCENODE`
  URL Example: `http://localhost:8888/jrserver?jrs.cmd=jrs.get_cat_rpts_new&jrs.path=/`SampleReports
  Response: Resource nodes list.

- jrs. get_node_prop

  Description: Gets the properties of a resource node.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver?jrs.cmd=jrs.get_node_prop&jrs.path=RESOURCENODE`
  URL Example: `http://localhost:8888/jrserver?jrs.cmd=jrs.get_node_prop&jrs.path=/SampleReports/SampleReports.cat`
  Response: Resource node properties.

- jrs.delete_resource

  Description: Deletes the resource node from the resource tree.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver?jrs.cmd=jrs.delete_resource&jrs.path=RESOURCENODE`
  URL Example: `http://localhost:8888/jrserver?jrs.cmd=jrs.delete_resource&jrs.path=/SampleReports/Employee Information.cls`

- jrs.get_rst_vers

  Description: Gets a result version list of a report.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver?jrs.cmd=jrs.get_rst_vers&jrs.catalog=CATALOG&jrs.report=REPORT_SET`
  URL Example: `http://localhost:8888/jrserver?jrs.cmd=jrs.get_rst_vers&jrs.catalog=/SampleReports/SampleReports.cat&jrs.report=/SampleReports/Employee Information.cls`
  Response: Result versions list.

- jrs.get_rpt_vers

  Description: Gets a report version list of a report.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver?jrs.cmd=jrs.get_rpt_vers&jrs.report=REPORT`
  URL Example: `http://localhost:8888/jrserver?jrs.cmd=jrs.get_rpt_vers&jrs.report=/SampleReports/Employee Information.cls`
  Response: Report version list.

- jrs.get_cat_vers

  Description: Gets a catalog versions list of a catalog.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver?jrs.cmd=jrs.get_cat_vers&jrs.catalog=CATALOG`
  URL Example: `http://localhost:8888/jrserver?jrs.cmd=jrs.get_cat_vers&jrs.catalog=/SampleReports/SampleReports.cat`
  Response: Catalog versions list.

- jrs.get_rst_doc_vers

  Description: Gets a result versions list of a result document. The result document can be generated by advanced running or scheduling a report.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver?jrs.cmd=jrs.get_rst_doc_vers&jrs.result=RESULT`
  URL Example: `http://localhost:8888/jrserver?jrs.cmd=jrs.get_rst_doc_vers&jrs.result=/SampleReports/Employee Information`
  Response: Result versions list.

- jrs.get_ver_rst_page

  Description: Gets a result version of the report from the version manager.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver?jrs.cmd=jrs.get_ver_rst_page&jrs.file=FILE_NAME`
  URL Example: `http://localhost:8888/jrserver?jrs.cmd=jrs.get_ver_rst_page&jrs.file=1%5cJReport_System_User327406359%5cInvoiceReport.rst`
  Response: The result file from the version manager.

- jrs.get_ver_rst

  Description: Gets an HTML page for viewing a result version of a report with the ViewerApplet.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver/REPORT?jrs.cmd=jrs.get_ver_rst&jrs.file=FILE_NAME`
  URL Example: `http://localhost:8888/jrserver/SampleReports/SampleReports.cat/InvoiceReport.cls?jrs.cmd=jrs.get_ver_rst&jrs.file=1%5cJReport_System_User327406359%5cInvoiceReport.rst`
  Response: HTML page for viewing the result file with the ViewerApplet.

- jrs.get_ondemands

  Description: Gets a list of reports running in background.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver?jrs.cmd=jrs.get_ondemands`
  URL Example: `http://localhost:8888/jrserver?jrs.cmd=jrs.get_ondemands`
  Response: Background run report list.

- jrs.view_ver_rst

  Description: Views a result version of a report.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver/REPORT?jrs.cmd=jrs.view_ver_rst&jrs.hist_file=RESULT_VERSION_FILE_NAME&jrs.result_type=RESULT_TYPE&jrs.applet_type=APPLET_TYPE[&jrs.isjrsapltpg=TRUE/FALSE][&jrs.is_multi_files=TRUE/FALSE][&jrs.is_applet_chart=TRUE/FALSE][&jrs.has_hyperlink=TRUE/FALSE][&jrs.has_page_number=TRUE/FALSE][&jrs.use_table=TRUE/FALSE][&jrs.drilldown=TRUE/FALSE][&jrs.relative_font_size=TRUE/FALSE][&jrs.no_margin_html=TRUE/FALSE][&jrs.web_browser=BROWSER_TYPE][&jrs.no_margin_pdf=TRUE/FALSE][&jrs.is_norm_txt=TRUE/FALSE][&jrs.delimiter=DELIMITER][&jrs.udchar_width=NUMBER][&jrs.udchar_height=NUMBER][&jrs.no_margin_ps=TRUE/FALSE][&jrs.no_margin_rtf=TRUE/FALSE]`

  URL Example: `http://localhost:8888/jrserver/SampleReports/SampleReports.cat/Employee Information.cls?jrs.cmd=jrs.view_ver_rst&jrs.hist_file=1%5cJReport_System_User327406359%5cEmployee Information.rst&jrs.result_type=1`

  Notes:

  - RESULT_TYPE:
    0 - To Applet
    1 - To HTML
    2 - To PDF
    3 - To TEXT
    4 - To Excel
    5 - To PostScript
    6 - To Rich Text Format
    7 - To XML
    8 - To Page Report Result
  - APPLET_TYPE:
    2 - Java Plug-In 1.2 for Windows
    3 - Java Plug-In 1.3 for Windows
  - BROWSER_TYPE:
    0 - IE or Chrome
    1 - Firefox
- jrs.get_rpt_desc_page

  Description: Gets an HTML page for entering parameter values and choosing the result type of a report.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver?jrs.cmd=jrs.get_rpt_desc_page&jrs.catalog=CATALOG&jrs.report=REPORT`
  URL Example: `http://localhost:8888/jrserver?jrs.cmd=jrs.get_rpt_desc_page&jrs.catalog=/SampleReports/SampleReports.cat&jrs.report=/SampleReports/InvoiceReport.cls`

- jrs.get_rpt_param_page

  Description: Gets an HTML page for entering parameter values of a report.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver?jrs.cmd=jrs.get_rpt_param_page&jrs.catalog=CATALOG&jrs.report=REPORT`
  URL Example: `http://localhost:8888/jrserver?jrs.cmd=jrs.get_rpt_param_page&jrs.catalog=/SampleReports/SampleReports.cat&jrs.report=/SampleReports/InvoiceReport.cls`

- jrs.del_rpt_ver

  Description: Deletes a version of a report.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver/REPORT?jrs.cmd=jrs.del_rpt_ver&jrs.version_id=VERSION_ID`
  URL Example: `http://localhost:8888/jrserver/SampleReports/SampleReports.cat/InvoiceReport.cls?jrs.cmd=jrs.del_rpt_ver&jrs.version_id=103`

- jrs.del_rst_ver

  Description: Deletes a result version of a report.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver/REPORT?jrs.cmd=jrs.del_rst_ver&jrs.version_id=VERSION_ID`
  URL Example: `http://localhost:8888/jrserver/SampleReports/SampleReports.cat/InvoiceReport.cls?jrs.cmd=jrs.del_rst_ver&jrs.version_id=106`

- jrs.del_rstdoc_ver

  Description: Deletes a version of a result document.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver?jrs.result=RESULT&jrs.cmd=jrs.del_rstdoc_ver&jrs.version_id=VERSION_ID`
  URL Example: `http://localhost:8888/jrserver?jrs.result=/SampleReports/InvoiceReport&jrs.cmd=jrs.del_rstdoc_ver&jrs.version_id=108`

- jrs.get_ver_param

  Description: Gets the parameter file of a report's result version.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver/REPORT?jrs.cmd=jrs.get_ver_param&jrs.version_id=VERSION_ID`
  URL Example: `http://localhost:8888/jrserver/SampleReports/SampleReports.cat/InvoiceReport.cls?jrs.cmd=jrs.get_ver_param&jrs.version_id=103`

- jrs.get_schedules

  Description: Gets the schedules list.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver?jrs.cmd=jrs.get_schedules`
  URL Example: `http://localhost:8888/jrserver?jrs.cmd=jrs.get_schedules`

- jrs.del_schedule

  Description: Deletes a schedule.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver?jrs.cmd=jrs.del_schedule&jrs.task_id=TASK_ID`
  URL Example: `http://localhost:8888/jrserver?jrs.cmd=jrs.del_schedule&jrs.task_id=2003-12-11 11:09:16.455`

- jrs.enable_schedule

  Description: Enables a schedule.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver?jrs.cmd=jrs.enable_schedule&jrs.task_id=TASK_ID`
  URL Example: `http://localhost:8888/jrserver?jrs.cmd=jrs.enable_schedule&jrs.task_id=2003-12-11 11:09:16.455`

- jrs.disable_schedule

  Description: Disables a schedule.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver?jrs.cmd=jrs.disable_schedule&jrs.task_id=TASK_ID`
  URL Example:`http://localhost:8888/jrserver?jrs.cmd=jrs.disable_schedule&jrs.task_id=2003-12-11 11:09:16.455`

- jrs.get_new_schd_page

  Description: Gets an HTML page in order to create a new schedule for the report with a web browser.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver?jrs.cmd=jrs.get_new_schd_page&jrs.catalog=CATALOG&jrs.report=REPORT`
  URL Example: `http://localhost:8888/jrserver?jrs.cmd=jrs.get_new_schd_page&jrs.catalog=/SampleReports/SampleReports.cat&jrs.report=/SampleReports/Employee Information.cls`

- jrs.get_edit_schd_page

  Description: Gets an HTML page to edit the schedule with a web browser.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver?jrs.cmd=jrs.get_edit_schd_page&jrs.task_id=TASK_ID`
  URL Example: `http://localhost:8888/jrserver?jrs.cmd=jrs.get_edit_schd_page&jrs.task_id=2003-12-11 11:13:23.02`

- jrs.get_completed

  Description: Gets the completed tasks list.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver?jrs.cmd=jrs.get_completed`
  URL Example: `http://localhost:8888/jrserver?jrs.cmd=jrs.get_completed`

- jrs.del_completed

  Description: Deletes a completed task.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver?jrs.cmd=jrs.del_completed&jrs.id=RECORD_ID`
  URL Example: `http://localhost:8888/jrserver?jrs.cmd=jrs.del_completed&jrs.id=1071119897006-154848108`
  You need to invoke API to get RECORD_ID. A demo called APIDemoPublishRpt.java in `<install_root>\help\samples\APIServer` shows how to get completed task record including RECORD_ID.

- jrs.del_all_completed

  Description: Deletes all completed tasks.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver?jrs.cmd=jrs.del_all_completed`
  URL Example: `http://localhost:8888/jrserver?jrs.cmd=jrs.del_all_completed`

- jrs.get_active

  Description: Gets the active tasks list.
  HTTP Method: GET/POST
  URL Format:`http://HOST:PORT/jrserver?jrs.cmd=jrs.get_active`
  URL Example: `http://localhost:8888/jrserver?jrs.cmd=jrs.get_active`

- jrs.stop_task

  Description: Stops an active task.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver?jrs.cmd=jrs.stop_task&jrs.task_id=TASK_ID`
  URL Example: `http://localhost:8888/jrserver?jrs.cmd=jrs.stop_task&jrs.task_id= 2003-12-11 11:13:23.02`

- jrs.get_change_password_page

  Description: Gets an HTML page in order to change the password with a web browser.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver?jrs.cmd=jrs.get_change_password_page`
  URL Example: `http://localhost:8888/jrserver?jrs.cmd=jrs.get_change_password_page`

- jrs.change_password

  Description: Changes the password for a user.
  HTTP Method: POST
  Form Action: `http://HOST:PORT/jrserver?jrs.cmd=jrs.change_password`
  Content Type: application/x-www-form-urlencoded
  Content: `jrs.cmd=jrs.change_password&jrs.uid=admin&jrs.password=CURRENT_PASSWORD&jrs.new_password=NEW_PASSWORD&jrs.confirm_new_password=NEW_PASSWORD`
  Content Example: `jrs.cmd=jrs.change_password&jrs.uid=admin&jrs.password=ad&jrs.new_password=1234&jrs.confirm_new_password=1234`

- jrs.get_preference_page

  Description: Gets an HTML page in order to change the user preference settings with a web browser.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver?jrs.cmd=jrs.get_preference_page`
  URL Example:`http://localhost:8888/jrserver?jrs.cmd=jrs.get_preference_page`

- jrs.logout

  Description: Logs out from the JRServlet.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver?jrs.cmd=jrs.logout`
  URL Example: `http://localhost:8888/jrserver?jrs.cmd=jrs.logout`

- jrs.login

  Description: Logs into the JRServlet from a login dialog with web browsers or the JRViewer.
  HTTP Method: GET/POST
  URL Format: `http://HOST:PORT/jrserver?jrs.cmd=jrs.login`
  URL Example: `http://localhost:8888/jrserver?jrs.cmd=jrs.login`