How to get field structure for a custom content type?
I have to say sorry, I made a mistake in my other part of code.

$fields = \Drupal::service('entity_field.manager')-&gt;getFieldDefinitions('node', 'mytest');


is correct, it returns all fields belongs to "mytest"