This method returns a list of subjects owned by the current user.
This method was added in Cortex 2.1
Parameters
Name
Type
Depending on the query, this method may return a lot of subjects. To avoid performance issues, you should always set an offset and a limit.
query
The query object can contain one or more of these fields:
orderBy
The orderBy parameters is an array of objects, similar to the orderBy clause of a SQL request.
Each object must have a single attribute. The key of the attribute is the name of subject's field you want to order by. The value of the attribute must be "ASC" or "DESC", to order is ascending or descending order.
For example, to order the subjects by their names, in alphabetical order, you must use the object {"subjectName":"ASC"}.
You can order the subjects by these fields: subjectName, dateOfBirth.
limit and offset
These parameters are to implement pagination. It useful if you want to display the subjects in a UI. You must order the results to use these parameters.
First you should call this method with a offset of zero, and a limit of X. In the response, check the value of count. If count is greater than the limit, then you should call this method again with an offset of X. And then with an offset of 2*X, 3*X... until you get all the subjects for your query.
Result
The result is an object that includes these fields:
Examples
Find the 10 first female subjects born in 1979 or 1980.
Set this parameters to filter the subjects by their country.
dateOfBirth
object
An object with fields "from" and "to" to filter the subjects by their date of birth.
keyword
object
An object with the fields as the keyword to search and values are the list of fields to search. The list of fields to search can contains "subjectName", "lastName", "email"