Do not hardcode API port when registering endpoint

We have an attribute to set it.