Api socket binding config

Add configuration parameters for the api socket instead of hardcoded values.