Better approach for the API, receiving just a parameter or nothing