RSS Connector 23.2

# get-lines

Returns the content of a Lua script source file, or the content of the file between the specified lines.

NOTE: For security reasons, you can not get the content of a script unless the script has been loaded by the server. If you attempt to get the content of a script that has not been loaded, the server returns the error "Source file ... has not been loaded".

    /action=luaDebug&command=get-lines[&file=File]
                                      [&first=First_Line]
                                      [&last=Last_Line]
                                      [&session=SessionID]

Type: Synchronous

Parameter Name | Description | Required
--- | --- | ---
`File` | The name of the file that you want to view. You can use an absolute or relative path. Relative paths are relative to the RSS Connector installation folder. | Required if the `Session` argument is not set.
`First` | The line number of the first line to view. | No
`Last` | The line number of the last line to view. | No
`Session` | Instead of specifying the `File` argument, you can specify a session ID. In this case, the `get-lines` command returns the content of the file that contains the current function. If you set this parameter and do not specify the `First` and `Last` arguments, the server returns the section of code immediately around the current line (7 lines before the current line, and 7 lines after the current line). | Required if the `File` argument is not set.

## Example

    http://localhost:7000/action=LuaDebug&command=get-lines&file=scripts/script.lua&first=1&last=4

## Response

    <autnresponse xmlns:autn="http://schemas.autonomy.com/aci/">
      <action>LUADEBUG</action>
      <response>SUCCESS</response>
      <responsedata>
        <data>
          <command>get-lines</command>
          <file>scripts\script.lua</file>
          <lines first="1" last="4">
            <line-1>function handler (document)</line-1>
            <line-2>-- A Lua script that adds a field to a document</line-2>
            <line-3>document:addField("A_FIELD","A_VALUE")</line-3>
            <line-4>return true</line-4>
          </lines>
        </data>
      </responsedata>
    </autnresponse>

Copyright 2023 Open Text
Version 23.2 | Last updated March 2023

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL RSS Connector 23.2

Topic Title: get-lines