flowthings.io Data Types

To set the value of a boolean in a Drop

elems: {
  is_the_sky_blue: {
    type: "boolean",
    value: true
  }
}

Filter examples:

HTTP 1.1 GET https://<base_url>/drop/flowId?filter=is_the_sky_blue==true
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=is_the_sky_blue==false`
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=is_the_sky_blue==some_other_boolean
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=EXISTS is_the_sky_blue
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=HAS boolean

date


To set the value of a date in a Drop:

elems: {
  birthday: {
    type: "date"
    value: 1302547651168
  }
}

Filter examples:

HTTP 1.1 GET https://<base_url>/drop/flowId?filter=birthday>Date(1342404840000)
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=EXISTS birthday
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=HAS date

dropRef


To set the value of a dropRef in a Drop:

elems: {
  anotherDrop: {
    type: "dropRef",
    value: {
      flowId: {
        "type": "id",
        "value": "0987654321ABCDEF12345678"
      },
      dropId: {
        "type": "id",
        "value": "1234567890ABCDEF12345678"
      }
    }
  }
}

Filter examples:

HTTP 1.1 GET https://<base_url>/drop/flowId?filter=dropreference==ObjectId(<flowId or dropId>')
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=dropreference=='<flowId or dropId>'
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=EXISTS dropreference
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=HAS dropRef

email


To set the value of an email address in a Drop:

elems: {
  reply_email: {
    type: "email",
    value: "[email protected]"
  }
}

Filter examples:

HTTP 1.1 GET https://<base_url>/drop/flowId?filter=reply_email==Email('[email protected]')
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=reply_email!='[email protected]'
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=reply_email=~/somebody@*/
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=EXISTS reply_email
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=HAS email

float


To set the value of a float in a Drop:

elems: {
  miles_per_gallon: {
    type: "float",
    value: 720.232
  }
}

Filter examples:

HTTP 1.1 GET https://<base_url>/drop/flowId?filter=miles_per_gallon>=43.5
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=EXISTS miles_per_gallon
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=HAS float

flowRef


To set the value of a flowRef in a Drop:

elems: {
  aFlow: {
    type: "flowRef",
    value: "f0123456789ABCDEF01234567"
  }
}

Filter examples:

HTTP 1.1 GET https://<base_url>/drop/flowId?filter=source_ref=='<flowId>'
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=source_ref==ObjectId('<flowId>')
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=EXISTS source_ref
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=HAS flowRef

id


To set the value of an id in a Drop:

elems: {
  aTrack: {
    type: "id",
    value: "t0123456789ABCDEF01234567"
  }
}

Filter examples:

HTTP 1.1 GET https://<base_url>/drop/flowId?filter=aTrack==ObjectId('<id>')
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=aTrack=='<id>'
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=EXISTS aTrack
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=HAS id

integer


To set the value of an integer in a Drop:

elems: {
  how_many_fingers_am_i_holding_up: {
    type: "integer",
    value: 0
  }
}

Filter examples:

HTTP 1.1 GET https://<base_url>/drop/flowId?filter=how_many_fingers_am_i_holding_up<=10
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=how_many_fingers_am_i_holding_up IN [0,1,2,3]
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=EXISTS how_many_fingers_am_i_holding_up
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=HAS integer

list


To set the value of a list in a Drop:

elems: {
  shopping_list: {
    type: "list",
    value: [
      {
        type: "string",
        value: "milk"
      },{
        type: "string",
        value: "eggs"
      },{
        type: "string",
        value: "bread"
      },{
        type: "string",
        value: "prozac"
      },{
        type: "integer",
        value: 42
      }
    ]
  }
}

Filter examples:

HTTP 1.1 GET https://<base_url>/drop/flowId?filter=shopping_list CONTAINS ['milk']
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=shopping_list CONTAINS ['milk','eggs']
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=EXISTS shopping_list
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=HAS list

map


To set the value of a map in a Drop:

elems: {
  some_map_of_things: {
    type: "map",
    value: {"key" : "value", "key2" : 112 }
  }
}

Filter examples:

HTTP 1.1 GET https://<base_url>/drop/flowId?filter=some_map_of_things.key=='value'
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=some_map_of_things.key2==112
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=EXISTS some_map_of_things
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=EXISTS some_map_of_things.key2
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=HAS map

media


To set the value of a media type in a Drop:

elems: {
  some_media: {
    type: "media",
    value: {
      url: "http://bit.ly/1234567890ABCDEF",
      mime_type: "image/png",
      title:  "Puppy vs.Kitten",
      description: "Chairman Meow shows that Pit Bull who's boss" }
  }
}

Filter examples:

HTTP 1.1 GET https://<base_url>/drop/flowId?filter=some_media.$url == 'http://www.example.com/puppyvskitten'
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=some_media.$description != ''
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=some_media.$title =~ /[Pp]uppies/
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=some_media.$type == 'video'
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=EXISTS some_media
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=HAS media

set


Sets can contain anything other types such as strings, integers, floats, etc. You can mix different types into a set.

To set the value of a set in a Drop:

elems: {
  some_set_of_things: {
    type: "set",
    value: [  //be sure to provide a type/value pair for each list item
      {
        type: "string",
        value: "Manimal"
      },{
        type: "string",
        value: "StreetHawk"
      },{
        type: "string",
        value: "Airwolf"
      },{
        type: "string",
        value: "MacGuyver"
      },{
        type: "integer",
        value: 42
      }
    ]
  }
}

Filter examples:

HTTP 1.1 GET https://<base_url>/drop/flowId?filter=some_set_of_things CONTAINS ['Manimal']
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=some_set_of_things CONTAINS ['StreetHawk',42]
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=EXISTS some_set_of_things
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=HAS set

sortedMap


A map which will be sorted by key in alphabetical order

To set the value of a sortedMap in a Drop:

elems: {
  some_sorted_map: {
    type: "sortedMap",
    value: {
      four: { type: "string", value: "boom" },
      one: { type: "string", value: "moo" },
      three: { type: "string", value: "meow" },
      two: { type: "string", value: "arf?" },
    }
  }
}

Filter examples:

HTTP 1.1 GET https://<base_url>/drop/flowId?filter=some_sorted_map.four=='boom'
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=some_sorted_map.one=~/^[Mm]/
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=EXISTS some_sorted_map
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=EXISTS some_sorted_map.two
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=HAS sortedMap

sortedSet


Sets can contain anything other types such as strings, integers, floats, etc. You can mix different types into a set.

To set the value of a sortedSet in a Drop:

elems: {
  some_sorted_set: {
    type: "sortedSet",
    value: [
      {
        type: "string",
        value: "Manimal"
      },{
        type: "string",
        value: "StreetHawk"
      },{
        type: "string",
        value: "Airwolf"
      },{
        type: "string",
        value: "MacGuyver"
      },{
        type: "integer",
        value: 42
      }
    ]
  }
}

Filter examples:

HTTP 1.1 GET https://<base_url>/drop/flowId?filter=some_sorted_set CONTAINS ['Manimal']
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=some_sorted_set CONTAINS ['StreetHawk',42]
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=EXISTS some_sorted_set
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=HAS sortedSet

string


To set the value of a string in a Drop:

elems: {
  firstName: {
    type: "string"
    value: "Archibald"
  }
}

Filter examples:

HTTP 1.1 GET https://<base_url>/drop/flowId?filter=firstName == "Archibald"
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=firstName IN ["Archibald","Archie","Arch","A-Dog"]
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=EXISTS firstName
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=HAS string

text


The text type support formats Text, Textile, HTML, and markdown. For the html format, if the "safe" specifier is set to true, the data in the "content" field will be sent through an html sanitizer and any even potentially dangerous html or javascript will be removed.

To set the value of a text type in a Drop:

elems: {
  some_text: {
    type: "text"
    value: {
      format: "text/html",
      content: "<blink>Wheee!</blink>",
      safe: true
  }
}

Filter examples:

HTTP 1.1 GET https://<base_url>/drop/flowId?filter=some_text=~/kitten/
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=EXISTS some_text
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=HAS text

url


To set the value of a url in a Drop:

elems: {
  website_address: {
    type: "url",
    value: "http://flowthings.io"
  }
}

Filter examples:

HTTP 1.1 GET https://<base_url>/drop/flowId?filter=website_address=='http://flow.net'
HTTP 1.1 GET https://<base_url>/drop/flowId?filter=EXISTS website_address