You could dynamically change the channel configuration whenever the bus id changed, using a rule.
Example in JRuby:
# Item that contains the bus id = BusID
# Item that contains the bus location = BusLocation
rule "Update Bus Location URL" do
changed BusID
run do |event|
next unless event.state?
state_extension = "?busId=#{event.state}"
# Prevent disabling/enabling the Thing when the config is already updated
next if BusLocation.channel.configuration["stateExtension"] == state_extension
BusLocation.channel.configuration["stateExtension"] = state_extension
# refresh config
BusID.thing.disable
BusID.thing.enable
end
end