how to restrict access in routing.yml based on roles I know how I to restrict access in the routing.yml file based on permissions, but how can I do it based on roles? This is how to do it by permissions: 

requirements:
  _permission: 'access administration pages'


How to do it based on roles?
This should work

requirements:
  _role: 'administrator'


See more details here https://www.drupal.org/docs/8/api/routing-system/structure-of-routes