Proper way to define API endpoint

I am writing an API method to retrieve a list of objects, and I want to add pagination and a Contains property as filters. I do not want to use AutoQuery.

What would be the best practice for implementing this functionality for long-term use?

  1. Should I define the filter properties directly in the request DTO?
  2. Should I create a class and add that class, like:
    public class ListObjects : FilterRequest { }
  3. Should I use an interface and implement it?

The concern is that, at some point, there might be a need to separate the pagination logic and the Contains field into different structure.

This is an application and API design question which is up to you how you want to implement it.

ServiceStack lets you use easily develop message-based APIs using typed Request and Response DTOs with typed client integrations, we have docs on Designing Message-based APIs and docs on background concepts which we recommend reading if you haven’t already, but ultimately how you want to design your APIs and structure your Application logic is largely up to you.

Thanks @mythz I did check the docs you mentioned.