Restart a stopped Space from a Webhook?

Hi everyone,

Are webhooks capable of restarting a related Space if it is stopped?

Thanks in advance :slight_smile:

Hi @milyiyo, currently we don’t have a Webhook trigger event for when the Space is stopped or restarted. But it’s a good idea indeed.

You can restart a stopped Space programmatically via our API or using our huggingface_hub lib

Read more about our Webhooks events

  • "repo" - Global events on repos. Possible values for the associated action: "create", "delete", "update", "move".
  • "repo.content" - Events on the repo’s content, such as new commits or tags. It triggers on new Pull Requests as well due to the newly created reference/commit. The associated action is always "update".
  • "repo.config" - Events on the config: update Space secrets, update settings, update DOIs, disabled or not, etc. The associated action is always "update".
  • "discussion" - Creating a discussion or Pull Request, updating the title or status, and merging. Possible values for the associated action: "create", "delete", "update".
  • "discussion.comment" - Creating, updating, and hiding a comment. Possible values for the associated action: "create", "update".
1 Like

Thanks @radames :slightly_smiling_face: :+1: