Chuyển tới nội dung chính

Trigger automation webhook

POST/webhooks/automation/{webhookId}
Request có chữ ký

Được chứng minh bằng X-ReleaseFlow-Signature-256, không phải bằng phiên đăng nhập.

Đọc hướng dẫnMã nguồn: AutomationWebhookController#trigger(mở trong thẻ mới)

Tham số đường dẫn​

TênKiểuBắt buộcGhi chú
webhookIdstringBắt buộc

Header​

TênKiểuBắt buộcGhi chú
X-ReleaseFlow-TimestampstringTùy chọn
X-ReleaseFlow-DeliverystringTùy chọn
X-ReleaseFlow-Signature-256stringTùy chọn

Request body​

application/json · Body là tùy chọn.

Payload JSON của nhà cung cấp, đúng như khi được ký.

Response​

Thành công: 202

TrườngKiểuBắt buộcGhi chú
runIdstring (uuid)Tùy chọn
statusenum ExecutionStatusTùy chọnPENDINGRUNNINGSUCCEEDEDFAILEDUNKNOWNCANCELLEDSKIPPED
statusPathstringTùy chọn

Lỗi​

Trạng tháiMãÁp dụng cho
400invalid_parametermột tham số trên đường dẫn hoặc query bị thiếu hoặc không chuyển đổi được, chẳng hạn một ID không phải UUIDMọi endpoint
404not_foundkhông có địa chỉ đóMọi endpoint
405method_not_allowedđịa chỉ không nhận phương thức đóMọi endpoint
415unsupported_media_typeđịa chỉ không đọc body thuộc kiểu đóMọi endpoint
500internal_errormột lỗi ReleaseFlow không lường trước; body không bao giờ chứa exception gây ra nóMọi endpoint
400webhook_payload_malformedKhu vực Webhooks
401webhook_signature_invalidKhu vực Webhooks
413webhook_payload_too_largeKhu vực Webhooks
422webhook_repository_mismatchKhu vực Webhooks

Request

bash
# Sign the exact bytes of payload.json with the webhook secret (see the guide).
curl -X POST "http://localhost:8080/webhooks/automation/$WEBHOOK_ID" \
-H "X-ReleaseFlow-Timestamp: $X_RELEASEFLOW_TIMESTAMP" \
-H "X-ReleaseFlow-Delivery: $X_RELEASEFLOW_DELIVERY" \
-H "X-ReleaseFlow-Signature-256: $X_RELEASEFLOW_SIGNATURE_256" \
-H "Content-Type: application/json" \
--data-binary @payload.json

Response

202

Ví dụ

{
  "runId": "<uuid>",
  "status": "PENDING",
  "statusPath": "<string>"
}