add api id to endpoint model