How do I find out which base fields are available for an entity type?
How to get the base fields for an entity type id:

$base_fields = \Drupal::entityManager()-&gt;getBaseFieldDefinitions($entity_type_id);


You get an array. The keys are the field names. Example how to loop through this array:

foreach ( $base_fields as $field_name =&gt; $definition ) {
  echo "$field_name: ", $definition-&gt;getDescription(), "\n";
}


Edit:

The method has moved to the service EntityFieldManager:

$base_fields = \Drupal::service('entity_field.manager')
  -&gt;getBaseFieldDefinitions($entity_type_id);