How can get data with other field?

I
I have a collection that has a field “code_name”. Strapi help me to get data by /api/lap/:id but i want to get data by /api/lap/code_name