Adds parameter validation for required fields to /spaces endpoint

[#74545626]