Section 1231 loss from sale of rental property

I converted a residential property into a rental property which I have rented out for 3 years and reporting gain/ loss on Schedule E. When I rented out, I mainly collected rent and perhaps did some repairs for tenant but nothing major. I have claimed depreciation.
Now when I sold it at LOSS (already considered lesser or FMV or adjusted cost basis), am I qualify for section 1231 to report the LOSS as ordinary? Is my rental a trade or business to qualify for section 1231?
Sales, trades, exchanges 1 | Internal Revenue Service