Query Request

Django-Ninja assumes function parameters that are not among path parameters as query parameters.

For example:

from ninja import constants
from ninja_extra import api_controller, route

@api_controller('', tags=['My Operations'], auth=constants.NOT_SET, permissions=[])
class MyAPIController:
    weapons = ["Ninjato", "Shuriken", "Katana", "Kama", "Kunai", "Naginata", "Yari"]

    def list_weapons(self, limit: int = 10, offset: int = 0):
        return self.weapons[offset: offset + limit]

To query this operation, you use a URL like:



Read more