
MediaScript Objects and Methods 35
•
•
•
•
getQueryString()
Returns the query string portion of the MRL that originated the request (everything after
the “?”).
Syntax
var queryString = req.getQueryString();
Parameters
This function has no parameters.
getScriptPath()
Returns a string containing just the query component of the URL used to generate the
executing request.
Syntax
req.getScriptPath();
Parameters
This function has no parameters.
Example
If the original URL is,
http://MRserver/mgen/fotophix/photochange.ms?args=%22pic3.jpg%22&
is=80,50&p=4:1, then req.ScriptPath() returns
“/fotophix/photochange.ms”.
getJobId()
Returns an integer identifying the current job. Note that this identifier is unique only to a
specific MediaGenerator. It is reset to start at 0 when the MediaGenerator is started and is
incremented by 1 for each request processed. See the .NET or Java API documentation for
a description of the MediaRich batch interface.
Syntax
var id = req.getJobId();
Parameters
This function has no parameters.
getBatchId()
Returns an integer identifying the “Batch”. A batch is a collection of jobs sent to the Media
Generator through the .NET of Java APIs. Note that this identifier is unique only to a
specific MediaGenerator. It is reset to start at 0 when the MediaGenerator is started and is
incremented by 1 for each batch request. See the .NET or Java API documentation for a
description of the MediaRich batch interface. For non-batch requests, this identifier is
always 0.
Syntax
var batchId = req.getBatchId();