1. Help Center Home
  2. API
  3. Using the API
  4. GET Requests – Searchstrings on Complex Resource Types

GET Requests – Searchstrings on Complex Resource Types

Complex resource types allow highly customizable queries to manipulate records within the Worker Portal -> Resources Add-Edit page.

To allow searchstrings when the Resource Type is set to “Complex”, any of the following syntax should be included in your GET Query Settings > Query:

  • {{searchstring(where)}}
    • Appends a searchstring to your custom GET query (without the WHERE clause defined)
    • Example Query: Returns all products where you can append filters within your API calls
      • select * from products {{searchstring(where)}}
  • {{searchstring(and)}}
    • Uses the WHERE clause in your custom GET query and appends optional searchstrings in your API calls
    • Example Query: Returns only enabled products, allowing additiional filtering with an AND searchstring
      • select * from products where isnull(status, ‘1’) = ‘1’ {{searchstring(and)}}
  • {{searchstring(or)}}
    • Allows you to override the WHERE clause in your custom GET query.
    • Example Query: Allows you to override the filter on the query to GET enabled products with an OR searchstring in your API Call
      • select * from products where isnull(status, ‘1’) = ‘1’ {{searchstring(or)}

Was this article helpful

Related Articles

Subscribe to receive email updates of what's new in the CIMcloud Help Center.