Get a paginated list of containers with optional sorting and filtering.
This endpoint retrieves a list of containers, with the ability to sort the results by the specified column and apply various filters on the container attributes.
Arguments:
-
order_by: An optional object that specifies the sorting order. The object should have two attributes:name: The column name to sort the results by. Must be a valid column name in the Container model. (e.g.,id,vessel_atd_dt)dir: The direction of the sort.1for ascending order and-1for descending order.
-
filter_value: An optional list of filter objects to apply on the container attributes. Each filter object should have the following attributes:name: The column name to apply the filter on. Must be a valid column name in the Container model. (e.g.,id,vessel_atd_dt)operator: The filter operator to use. Must be one of the following values:eq,neq,gt,gte,lt,lte,contains,not_contains,starts_with,ends_with,is_null,is_not_null,in,not_in.
-
value: The value to compare against, if applicable (not required foris_nullandis_not_nulloperators).
Filter Operators:
eq: Equal toneq: Not equal togt: Greater thangte: Greater than or equal tolt: Less thanlte: Less than or equal tocontains: Contains substringnot_contains: Does not contain substringstarts_with: Starts with substringends_with: Ends with substringis_null: Is nullis_not_null: Is not nullin: Value is in a list of comma-separated valuesnot_in: Value is not in a list of comma-separated values
Example request body for sorting and filtering:
{
"order_by": {
"name": "vessel_atd_dt",
"dir": -1
},
"filter_value": [
{
"name": "name",
"operator": "contains",
"value": "example"
}
]
}
In the example above, the results will be sorted by the vessel_atd_dt column in descending order and filtered to only include containers whose name contains the substring "example".