The CM API does not currently support wildcard searches or logical operators such as NOT. Additionally, comparison operators like GT, GTE, LT, and LTE cannot be used on fields such as dateEnd because these fields are stored as string values, not timestamps.
You can use those comparison operators on fields that are stored in timestamp format, such as created and updated. For example, filtering by updated=gt(2024-01-01) would work as expected in a string like this: /api/cm/programs/queryAll?dateEnd=1900-01-01
This would retrieve any items with this date, but we're not able to use any additional filtering on it as it is stored a string of text and not as a number.
You could also try to use sorting methods to return items, such as /api/cm/courses/queryAll?subjectCode=&number=limit=1&sort=number,-dateStart which would return a list of courses based on a specific subject code and number, sorted by the date start starting from the most recent date.
Comments
0 comments
Article is closed for comments.