Hi, I am trying to programmatically create experim...
# ask-questions
a
Hi, I am trying to programmatically create experiments and have successfully done so using the REST API. However, when I view my published experiment dashboard, it shows
Experiment snapshot error
. This goes away if I manually push the
Update
button on the experiment. Is there a way to get this to update regularly or automatically? I configured my experiments to update automatically every 30 seconds using a crontab setting. But it doesn't update the way that I expected. Is there any way to check that the experiment update is actually working? EDIT: SOLVED -- See thread
Looks like I need access to the
/experiments/:id/snapshot
API. I tried hitting it from my
admin
role API key, but I get a
401 jwt malformed
error.
This worked!
Copy code
curl -v -X POST \
  -H "Authorization: Bearer [obfuscated]" \
  -H "Content-Type: application/json" \
  -d '{"triggeredBy": "manual"}' \
  <https://api.growthbook.io/api/v1/experiments/:id/snapshot>
f
cool
it should automatically update too when the cron job kicks in
a
I set the cron job to run every 30s, but it didn't seem to work. Is there any audit information for the cron job?
👀 1
f
30sec if far too short
the errors will be in the docker logs
👍 1