API

Sync Git repository

Manually pull the latest Watch scripts from Git and reload them.

POST/git/sync

Use this endpoint to manually sync Watch scripts from the configured Git repository. When the remote commit changes, Watch reloads scripts from the updated repository in the background. This endpoint is only available when WATCH_SCRIPT_GIT_REPO is configured in your Watch configuration.

Request

This endpoint has no path, query, or body parameters.

Response

successboolean

Whether the sync operation completed successfully.

messagestring

Status message. When the commit changes, this includes confirmation that scripts were reloaded.

before_commitstring

Local commit hash before the sync started.

after_commitstring

Local commit hash after the sync completed.

errorstring

Error message when Git is not configured or the sync fails.