code: func (s *Server) indexList(ctx *middleware.Context, req models.IndexList) {
  
  	// query nodes don't own any data.
  	if s.MetricIndex == nil {
  		response.Write(ctx, response.NewMsgpArray(200, nil))
  		return
  	}
  
  	defs := s.MetricIndex.List(req.OrgId)
  	resp := make([]msgp.Marshaler, len(defs))
  	for i := range defs {
  		d := defs[i]
  		resp[i] = &d
  	}
  	response.Write(ctx, response.NewMsgpArray(200, resp))
  }
docs: // IndexList returns msgp encoded schema.MetricDefinition's