It more depends on where you are getting this key from. If you are trying to get this key from something in the viz (like a parameter) or the username of the person accessing the viz, then what you say is true*. This is because the metadata written into the WDC (such as the username, password, connectionData, etc.) cannot be altered once the WDC is published.
However, since the the WDC is a web app you control, if the key is something you could dynamically read from a REST API or some other server side component, then you could just read that key from your WDC when it is doing the gather data phase, and use that key to adjust what data you bring back dynamically.
Hope that helps!
*Currently true, we do have plans to address these areas in the future.
Thanks for your input! But my idea hinges on the REST service getting the key from a URL parameter on the workbook. We use that all the time to embed dashboards where a filter is set to an initial value before it renders. It is that value that I would like to have input to the REST service so it can do a variety of different things before querying the database. Note, the return to the workbook would always be in the same exact format.