Endpoints resource [#78016138]

this procedure is doubled in `create` method. Maybe move to some helper?