Accessing openhab.cfg items from rules?

This is probably a noob question, but is there a way to access openhab.cfg values from within rules/scripts, or within items?

Specifics: I’m looking to write a rule that will use a latitude, longitude, and API key from my weather configuration (to build a URL). Realistically I could do this either with an http binding in a .items file or with a rule action that does getHttpRequest and I’d be OK with either approach (it’ll end up in a rule anyway but if it’s an item I can query from there). I also wouldn’t mind if it was binding-specific, so maybe there’s something in the weather binding I can use. Mostly, I’d rather just not have to set those things in multiple files.

I do not believe there is any way in any of the bindings I’m familiar with to access the values in openhab.cfg.

You can set them in an Item and reference it that way. Just populate the Items in a System started rule and if you set up persistence on them, you can eliminate your System started rule once the Items have a value.

I’ve done it in JSR223 Jython rules but I don’t know how difficult it would be to do it from Xtend rules. A brute force way to do it would be read the openhab.cfg file and do some simple parsing from your rule implementation.