I’m using a canister to act as a “database” for my podcast-serving app. While building, I’ve been running a local instance (
dfx start) and have been manually adding some test data via the candid UI. For larger test data sets, I have a script which generates a candid string and uses the command line interface to get the data into the canister.
Now I’m ready to deploy the canister and make it available to the world. Once deployed, there isn’t a candid interface for me to use to insert data (and that’s not scalable anyway…) so that’s not an option. Using the CLI won’t work either, because I’d need to be running the command from the same machine that’s running the IC network. This works locally, but I can’t run all my data-processing scripts on the IC, so I’m not sure how to get data into a canister running anywhere other than my local machine.
For reference, I have scripts that collect videos from various sources (with permission from the owners) and add them to podcast feeds. These scripts need to be able to modify the state in my canister as it runs on the network.
I could make a frontend that allows users to add data manually, but I’m looking for a way to do it automatically using scripts written in Python or Dart, for instance.
The only way I’ve thought to do this is to expose the add functions through http access using @nomeata’s ic-http-bridge. Is this the only way to go about doing this? Or is there a better way to allow adding data via scripts, either my own or other “admin” users?