As already mentioned, Sling Servlets are mounted to a single path, and even that does not fit into the "resource first" approach of Sling.
But you can register your servlet to /api and then read the remaining "parameters" via suffixes. Check the documentation at https://sling.apache.org/documentat...