All user-specified searches in the API are done with a simple search syntax where comparison expressions may be joined together with logical operators. See below for some quick tips and examples.
Syntax
Logical Operators
AND takes precedence over OR, but parentheses may be used to change precedence.
- AND :
;
- OR:
,
Comparison Operators
For comparison operators, the first operand should be a searchable field. The searchable fields are listed in the description of the search parameter for each searchable endpoint. The second operand (for binary operators) will be interpreted as a literal.
- Equal to :
==
- Not equal to :
!=
- Less than :
<
- Less than or equal to :
<=
- Greater than operator :
>
- Greater than or equal to :
>=
- In :
=in=
- The second operand for this operator is a set. Sets can be defined with parentheses with elements separated using commas, such as
(A,B,C)
- This is shorthand for many equality expressions OR'd together
- The second operand for this operator is a set. Sets can be defined with parentheses with elements separated using commas, such as
- Not in :
=out=
- The second operand for this operator is a set. Sets can be defined with parentheses with elements separated using commas, such as
(A,B,C)
- This is shorthand for many inequality expressions AND'd together
- The second operand for this operator is a set. Sets can be defined with parentheses with elements separated using commas, such as
- Null :
=isnull=true
- Note: this is a unary operator and changing
true
to something else will have no effect
- Note: this is a unary operator and changing
- Not null:
=notnull=true
- Note: this is a unary operator and changing
true
to something else will have no effect
- Note: this is a unary operator and changing
Examples
You can use
*
as a wildcard at the end of a search string literal!
Be sure to URL encode the searches or it may not work as you intend
Providers starting with "Georgia"
https://api.arcadia.com/plug/providers?search=providerName==Georgia*
Searching for enabled accounts with a specific account number
https://api.arcadia.com/plug/accounts?search=enabled==true;normalizedAccountNumber==123
Searching for meters within a specified list
https://api.arcadia.com/plug/meters?search=meterNumber=in=(123,456,789)
Searching for a provider by exact name
When searching for a term with a space in it, use quotes around the string
https://api.arcadia.com/plug/providers?search=providerName=="Georgia Power"
Searching for webhooks that have succeeded OR are scheduled to retry
https://api.arcadia.com/plug/webhooks?search=status==SUCCESS,nextScheduledSend=notnull=true
Global Search
Global searches search across all searchable text fields for an endpoint. All entities that have a field that matches the provided globalSearch
parameter will be returned. This field does not support any operators.
For example, the search https://api.arcadia.com/plug/credentials?globalSearch=Georgia
will return all Credentials with a field containing the word "Georgia."
Global searches can be combined with regular searches, with both searches being matched.
For example, the search https://api.arcadia.com/plug/credentials?globalSearch=Georgia&search=isActive==true
will return all active Credentials with a field containing the word "Georgia."