api/pool.go
func poolConstraintList(w http.ResponseWriter, r *http.Request, t auth.Token) error {
	if !permission.Check(t, permission.PermPoolReadConstraints) {
		return permission.ErrUnauthorized
	}
	constraints, err := pool.ListPoolsConstraints(nil)
	if err != nil {
		return err
	}
	if len(constraints) == 0 {
		w.WriteHeader(http.StatusNoContent)
		return nil
	}
	w.Header().Set("Content-Type", "application/json")
	return json.NewEncoder(w).Encode(constraints)
}
func poolConstraintList(w http.ResponseWriter, r *http.Request, t auth.Token) error {
	if !permission.Check(t, permission.PermPoolReadConstraints) {
		return permission.ErrUnauthorized
	}
	constraints, err := pool.ListPoolsConstraints(nil)
	if err != nil {
		return err
	}
	if len(constraints) == 0 {
		w.WriteHeader(http.StatusNoContent)
		return nil
	}
	w.Header().Set("Content-Type", "application/json")
	return json.NewEncoder(w).Encode(constraints)
}
// title: pool constraints list
// path: /constraints
// method: GET
// produce: application/json
// responses:
//   200: OK
//   204: No content
//   401: Unauthorized