1. Tasks
  2. Get Stubs

Tasks

Get Stubs

Task to retrieve a multiple matching Stubs' Data

Basic usage

Task to find all Stubs with "VIP" in the subject.

{
get_stubs
:
{
tasktype
:
get_stubs
params
:
{
fieldname
:
VIP_stubs
query
:
{'subject': { '$regex': '/vip/', '$options': 'i' }}

Parameters

fieldname
required
string

Name of the field to save the result data to : VIP_stubs

query
required
string

MongoDB formatted query string used to find all matching Stubs

projection
optional
string

MongoDB formatted projection string used to return the Stubs' data

Default: {'stubref':1,'subject':1}

Result

{
success
:
true
payload
:
{
fieldname
:
VIP_stubs
stubs
:
[
2 items  
0
:
{
stubref
:
1970-01-01-XXXX-1234
subject
:
This is one VIP Stub
1
:
{
stubref
:
1970-02-01-XXXX-5678
subject
:
This is also an important vip Stub

Properties

fieldname

Name of the field created : VIP_stubs


stubs

An array of Stub data objects retrieved for all matching Stubs, the projection parameter determines the results displayed here.