InsionInsion
Ruby

List records

Retrieve records for the authenticated organization

page = client.list_records(
  limit: 20,
  entity: "post",
  status: Insion::Types::GetAPIV1RecordsRequestStatus::FLAGGED,
)

The optional filters are limit, starting_after, ending_before, client_id, user, entity, and status. starting_after and ending_before are mutually exclusive.

The response has data and has_more. For the next page, pass the final Insion record ID as starting_after.

Method shape

client.list_records(request_options: {}, **params)

Filters

KeywordTypeDescription
limitIntegerMaximum records to return.
starting_afterStringReturn records after this Insion ID.
ending_beforeStringReturn records before this Insion ID.
client_idStringFilter by your record identifier.
userStringFilter by Insion user ID.
entityStringFilter by record kind.
statusstatus enumFilter by moderation status.

Use Insion::Types::GetAPIV1RecordsRequestStatus::FLAGGED or ::COMPLIANT for status. Never send starting_after and ending_before together. To iterate safely, stop when has_more is false and use the last item’s Insion ID as the next cursor.

On this page