Added server-side sorting to machine API