code: def get(self):
          
          opts = current_app.config['RECORDS_REST_SORT_OPTIONS'].get(
              self.search_index)
  
          sort_fields = []
          if opts:
              for key, item in sorted(opts.items(), key=lambda x: x[1]['order']):
                  sort_fields.append(
                      {key: dict(
                          title=item['title'],
                          default_order=item.get('default_order', 'asc'))}
                  )
  
          return jsonify(dict(
              sort_fields=sort_fields,
              max_result_window=self.max_result_window,
              default_media_type=self.default_media_type,
              search_media_types=sorted(self.search_media_types),
              item_media_types=sorted(self.item_media_types),
          ))
docs: Get options.