LogoFreestyle
API Reference/Git

Create a git trigger

Create a git trigger for the given repository.

POST/git/v1/repo/{repo}/trigger

Request Body

application/jsonRequired
triggerRequiredobject
actionRequiredobject

Path Parameters

repoRequiredstring

The repository id

curl -X POST "https://api.freestyle.sh/git/v1/repo/<string>/trigger" \
  -H "Content-Type: application/json" \
  -d '{
    "trigger": {
      "branches": [
        "string"
      ],
      "globs": [
        "string"
      ],
      "event": "push"
    },
    "action": {
      "endpoint": "string",
      "action": "webhook"
    }
  }'

Trigger created successfully

{
  "triggerId": "string"
}