findHash()

Finds an Event on the specified Stream that matches the specified hash.

Octave.Event.findHash(streamId, hashValue)

Allows for referencing a particular Event by a unique hash value. See hash documentation for further detail. - todo - need to link to a topic with Event object definition for hash field.

Parameters

ParameterTypeRequiredDescription
streamIdStringYesValue of the Stream's ID.
hashValueStringYesHash value of an Event in the specified Stream.

Returns

Returns a json representation of a single Event.

Example

Request

//find the most recent events where x > 1:
var event = Octave.Event.findHash("s5b7c2258c4eaa25486be2ed1", "someUniqueHashValue");

Response

// event now contains the matching event
{
  elems:
  {
    x:1
  },
  hash:"someUniqueHashValue", 
  creationDate: 1534865286261,
  ...
}