Configuration API v1: SP support

Adding the first version of the configuration API to get SP configuration to the Gateway
@rjkip to prevent issues with the migrations, I copied this one from your PR. Might result in conflict...