Skip to main content

Queries

You can query sources, sessions, and videos based on a title and description (or HotMark title and description, where applicable) by adding the "q" query parameter to the collection URL.

Queries are case-insensitive and search title, description, calypso:creator, and HotMarks. For example: GET /apis/assets?q="My Search Term"

You can add filters for filtering categories. The filter format is as follows:

category::"label1" IN ("value1", "value2", ..., "valueN") & category::"label2" IN ("value1", "value2", ..., "valueM") & ...

Example:
category::"Patient ID" IN ("123", "456", "First", "Second") & category::"Doctor" IN ("john", "Bob")
category::"label1" NOT IN ("value1", "value2", ..., "valueN") & ...

Example:
category::"Patient ID" NOT IN ("123", "456", "First", "Second") & category::"Doctor" IN ("john", "Bob")
category::"label1" IN ("") & ...

Example:
category::"Patient ID" IN ("")
category::"label1" NOT IN ("") & ...

Example:
category::"Patient ID" NOT IN ("")

Operators:

  • IN ("value1", "value2", ..., "valueN") – case-insensitive values in the set are ORed and the results are returned.
  • NOT IN ("value1", "value2", ..., "valueN") – case-insensitive values in the set are ORed and the negated results are returned.
  • "category" IN ("") – returns all results that have this category regardless of value.
  • "category" NOT IN ("") – returns all results that do not have this category.
  • & – Binary operand values are ANDed.

Label and value must be quoted. Label and value string must have special characters escaped (based on ECMA 262, 5th edition, Section 7.8.4 "String Literals").

The following special characters must be escaped:

CharacterEscaped CharacterCharacterEscaped Character
"\\"\n\\n
\\\\\\\v\\v
\b\\b\f\\f
\t\\t\r\\r

For example, you can use JSON.stringify() to do the escaping. You need to encode the filter string with urlencode and append the encoded string after the "filter" parameter in the URL. For example:

TEXT
GET /apis/assets?q="My Search Term"&filter=category%3A%3A%22Patient+ID%22+IN+ 
%28%22123%22%2C+%22456%22%2C+%22First%22%2C+%22Second%22%29+%26+ 
category%3A%3A%22Doctor%22+IN+%28%22john%22%2C+%22Bob%22%29


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.