Este conteúdo não está disponível no idioma selecionado.

Chapter 29. trigger


Create, list and manage build triggers.

29.1. activateBuildTrigger

Activate the specified build trigger.

29.1.1. POST /api/v1/repository/{repository}/trigger/{trigger_uuid}/activate

Authorizations: oauth2_implicit (repo:admin)

29.1.2. Path parameters

Expand
TypeNameDescriptionSchema

path

trigger_uuid

required

The UUID of the build trigger

string

path

repository

required

The full path of the repository. e.g. namespace/name

string

29.1.3. Request body schema (application/json)

Expand
NameDescriptionSchema

config

required

Arbitrary json.

object

pull_robot

optional

The name of the robot that will be used to pull images.

string

29.1.4. Responses

Expand
HTTP CodeDescriptionSchema

201

Successful creation

 

400

Bad Request

ApiError

401

Session required

ApiError

403

Unauthorized access

ApiError

404

Not found

ApiError

29.1.5. Example command

$ curl -X POST "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/trigger/example-trigger-uuid/activate" \
  -H "Authorization: Bearer <your_access_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "config": {
      "branch": "main"
    },
    "pull_robot": "example+robot"
  }'

29.2. listTriggerRecentBuilds

List the builds started by the specified trigger.

29.2.1. GET /api/v1/repository/{repository}/trigger/{trigger_uuid}/builds

Authorizations: oauth2_implicit (repo:admin)

29.2.2. Path parameters

Expand
TypeNameDescriptionSchema

path

trigger_uuid

required

The UUID of the build trigger

string

path

repository

required

The full path of the repository. e.g. namespace/name

string

29.2.3. Query parameters

Expand
TypeNameDescriptionSchema

query

limit

optional

The maximum number of builds to return

integer

29.2.4. Responses

Expand
HTTP CodeDescriptionSchema

200

Successful invocation

 

400

Bad Request

ApiError

401

Session required

ApiError

403

Unauthorized access

ApiError

404

Not found

ApiError

29.2.5. Example command

$ curl -X GET "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/trigger/example-trigger-uuid/builds?limit=10" \
  -H "Authorization: Bearer <your_access_token>"

29.3. manuallyStartBuildTrigger

Manually start a build from the specified trigger.

29.3.1. POST /api/v1/repository/{repository}/trigger/{trigger_uuid}/start

Authorizations: oauth2_implicit (repo:admin)

29.3.2. Path parameters

Expand
TypeNameDescriptionSchema

path

trigger_uuid

required

The UUID of the build trigger

string

path

repository

required

The full path of the repository. e.g. namespace/name

string

29.3.3. Request body schema (application/json)

Optional run parameters for activating the build trigger

Expand
NameDescriptionSchema

branch_name

optional

(SCM only) If specified, the name of the branch to build.

string

commit_sha

optional

(Custom Only) If specified, the ref/SHA1 used to checkout a git repository.

string

refs

optional

(SCM Only) If specified, the ref to build.

 

29.3.4. Responses

Expand
HTTP CodeDescriptionSchema

201

Successful creation

 

400

Bad Request

ApiError

401

Session required

ApiError

403

Unauthorized access

ApiError

404

Not found

ApiError

29.3.5. Example command

$ curl -X POST "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/trigger/example-trigger-uuid/start" \
  -H "Authorization: Bearer <your_access_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "branch_name": "main",
    "commit_sha": "abcdef1234567890",
    "refs": "refs/heads/main"
  }'

29.4. getBuildTrigger

Get information for the specified build trigger.

29.4.1. GET /api/v1/repository/{repository}/trigger/{trigger_uuid}

Authorizations: oauth2_implicit (repo:admin)

29.4.2. Path parameters

Expand
TypeNameDescriptionSchema

path

trigger_uuid

required

The UUID of the build trigger

string

path

repository

required

The full path of the repository. e.g. namespace/name

string

29.4.3. Responses

Expand
HTTP CodeDescriptionSchema

200

Successful invocation

 

400

Bad Request

ApiError

401

Session required

ApiError

403

Unauthorized access

ApiError

404

Not found

ApiError

29.4.4. Example command

$ curl -X GET "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/trigger/example-trigger-uuid" \
  -H "Authorization: Bearer <your_access_token>"

29.5. updateBuildTrigger

Updates the specified build trigger.

29.5.1. PUT /api/v1/repository/{repository}/trigger/{trigger_uuid}

Authorizations: oauth2_implicit (repo:admin)

29.5.2. Path parameters

Expand
TypeNameDescriptionSchema

path

trigger_uuid

required

The UUID of the build trigger

string

path

repository

required

The full path of the repository. e.g. namespace/name

string

29.5.3. Request body schema (application/json)

Options for updating a build trigger

Expand
NameDescriptionSchema

enabled

required

Whether the build trigger is enabled

boolean

29.5.4. Responses

Expand
HTTP CodeDescriptionSchema

200

Successful invocation

 

400

Bad Request

ApiError

401

Session required

ApiError

403

Unauthorized access

ApiError

404

Not found

ApiError

29.5.5. Example command

$ curl -X PUT "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/trigger/example-trigger-uuid" \
  -H "Authorization: Bearer <your_access_token>" \
  -H "Content-Type: application/json" \
  -d '{"enabled": true}'

29.6. deleteBuildTrigger

Delete the specified build trigger.

29.6.1. DELETE /api/v1/repository/{repository}/trigger/{trigger_uuid}

Authorizations: oauth2_implicit (repo:admin)

29.6.2. Path parameters

Expand
TypeNameDescriptionSchema

path

trigger_uuid

required

The UUID of the build trigger

string

path

repository

required

The full path of the repository. e.g. namespace/name

string

29.6.3. Responses

Expand
HTTP CodeDescriptionSchema

204

Deleted

 

400

Bad Request

ApiError

401

Session required

ApiError

403

Unauthorized access

ApiError

404

Not found

ApiError

29.6.4. Example command

$ curl -X DELETE "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/trigger/example-trigger-uuid" \
  -H "Authorization: Bearer <your_access_token>"

29.7. listBuildTriggers

List the triggers for the specified repository.

29.7.1. GET /api/v1/repository/{repository}/trigger/

Authorizations: oauth2_implicit (repo:admin)

29.7.2. Path parameters

Expand
TypeNameDescriptionSchema

path

repository

required

The full path of the repository. e.g. namespace/name

string

29.7.3. Responses

Expand
HTTP CodeDescriptionSchema

200

Successful invocation

 

400

Bad Request

ApiError

401

Session required

ApiError

403

Unauthorized access

ApiError

404

Not found

ApiError

29.7.4. Example command

$ curl -X GET "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/trigger/" \
  -H "Authorization: Bearer <your_access_token>"
Red Hat logoGithubredditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a documentação da Red Hat

Legal Notice

Theme

© 2026 Red Hat
Voltar ao topo