Specific method requests for Db2®

The File Manager Service Provider accepts the following JSON for specific method requests for Db2® data:

{
    "operation" : 
    {
        "numRows" : integer,
        "session" : Boolean,
        "token" : "string",
        "where" : "string",
        "maxRows" : integer
    },
    "position" : 
    {
        "row" : integer
    }  
} 

Key fields for specific method requests are explained in the following table:

Key Description
operation Operation parameters affect the behavior of the service provider. All operation parameters are optional, but for performance reasons it is helpful to understand the correct use of the session and token parameters.
numRows The number of table rows to retrieve. The acceptable range is 0 - 10000. The default is 1.
session Indicates whether to persist or end a File Manager/Db2 session. A value of true instructs the service provider to start the session (if it is not already started) and keep it active for subsequent API calls. A value of false instructs the service provider to end the session when the API call is complete.
token A session token, as returned in a previous API response. The token represents an active FM/Db2 session and can be used for subsequent reads following an initial read that sets "session" : true. A successful initial read request with "session" : true returns a token in the response.
where A valid Db2® WHERE clause that applies to the Db2® data resource on the initial API request when the Db2® session is started. The where clause can affect the result table for the session. This parameter is only valid on an initial API request, and is mutually exclusive with token.
maxRows The maximum number of rows in the result table for the Db2® session. A value of 0 requests all rows without a maximum.
Note: Reading all rows in a large table or expected result table may take a long time.

maxRows is mutually exclusive with token. The default is 10000.

position Position parameters affect the read position within the Db2® data resource. If requested, the service provider will position to the nominated row in the result table before reading the next rows. The default is 1 for an initial read, or the current row position for a subsequent read. A read is considered a subsequent read if a valid token is passed.
row A relative row position within the result table. For an initial request, this can be the starting row for the result set.