allow api protocol to be set with api-protocol.