Fix status_codes for datasets API

Ticket: #5681