Pagination & filtering
Pagination
Section titled “Pagination”Unless an operation says otherwise, lists are ordered by ascending id, journals (history, activity, deliveries) by creation time (order=oldest, the default); order=newest gives the newest first. limit is 1 to 100, 50 by default. Pass the response’s next_cursor as cursor to get the next page; next_cursor is null on the last one. A cursor is opaque: a damaged one is 422 invalid_cursor.
With fields, each list item carries only the asked fields and id, even fields the item schema marks as required.
Time filters are named <field>_since and <field>_before: the lower bound is inclusive, the upper bound exclusive. They take an ISO 8601 date-time or a plain YYYY-MM-DD date (its midnight UTC); a date-time without an offset is UTC.
A boolean that states what an object is is named is_<state> (is_active, is_secret); a flag named after a feature (features.captcha) or a verb (changed) keeps that name.
Folders
Section titled “Folders”Widgets, segments, broadcasts and automations carry the admin folder they are in as folder with id and name. Items outside any folder are in General, id 0, under the name the site gave it. folder_id on their lists filters by folder, 0 for General. list_folders with the item type names the folders, General first; create_folder and update_folder create and rename them. Widgets are moved with update_widgets (folder_id); other items are moved in the admin. A move may leave updated_at as it was, so updated_since does not reliably notice one.
Source: OpenAPI specification. Paths that start with /v1 are on https://api.getsitecontrol.com.