The following predefined API global variables are currently available in Jitterbit.
Looks at the parameters submitted to the API directly via the URL; i.e.jitterbit.api.request.parameters.name will be equal to EStore if the URL requested had &name=EStore
Variable array used to dynamically iterate through all of the submitted parameters (as opposed to checking each parameter specifically as jitterbit.api.request.parameters.name).
Below is a sample script implementation that appends all of the provided parameters to a new variable for later display back to the user:
$output = "URL Parameters: <br>\r\n";
jitterbit.api.request.body and jitterbit.api.request.body.*
Looks at the payload/payloads submitted to the API. Note that for the majority of the APIs, you would only expect one plain payload and, as such, jitterbit.api.request.body is the variable to use (aka content-type:text/plain).
If you expect multiple payloads to be submitted at once, using URL-encoded form (aka content-type:application/x-www-form-urlencoded) such as in the case of API being used as the backend of a submission form, see http://www.w3.org/TR/html401/interact/forms.html), then you should be using jitterbit.api.request.body.*. Much like the jitterbit.api.request.parameters.* above, jitterbit.api.request.body.name will be equal to EStore if the value of the form's field "name" was entered as EStore.
Variable array used to dynamically iterate through all of the submitted parts of the payload/body (versus checking a specific part as with jitterbit.api.request.body.* above). The usage is the same as with the jitterbit.api.request.enum.parameters.
Variable used to look at the request headers submitted to the API; i.e. $jitterbit.api.request.headers.x_forwarded_for is the public IP of the box/user accessing the URL.
Variable array used to dynamically iterate through all of the request headers (versus checking specific headers as with jitterbit.api.request.headers.* above). The usage is the same as with the jitterbit.api.request.enum.parameters and jitterbit.api.request.enum.body.
This variable needs to be set if you have set your API to use variable as the response versus final target.
Used to set the response headers of the API; i.e. $jitterbit.api.response.headers.access_control_allow_origin="*" to override default CORS behavior and allow the API to be accessed by any domain in a cross-site manner.