On-Premises
The Deployment Events API lets you track deployment activity (started and completed) for your organization. These events are used to calculate DORA metrics such as deployment frequency and change failure rate.
1. Base URL
Port 8113 is fixed, not configurable. This is the on-premises deployment of hivel-agent's webhook gateway, running on your own infrastructure. Unlike the cloud version, it does not use app.hivel.ai or app.hivel.in.
A public, unauthenticated health check is also available at GET http://<client-host-or-domain>:8113/insightlyapi/webhook/health, useful for container/orchestration monitoring.
2. Authentication
All API requests require an Organization API Key.
Headers:
X-API-Token: YOUR_API_KEY Content-Type: application/json
How to Retrieve Your API Key:
Open your organization's on-prem Hivel instance and navigate to Integrations under Settings.

Click on Connect on Deployment API card.

Follow steps to Generate API key.

3. API Overview
v2 – Single Event Workflow
POST /api/hooks/v2/deployment
CI/CD sends one event after finishing, containing both start and end timestamps.
v2 emits a single event after finishing your CI/CD job.
4. Required Fields
v2 (Single event: completed)
deployment_id
Yes
Must be unique.
event_type
Yes
Must be "completed".
status
Yes
"success", "failed", "canceled", "unknown"
start_time
Yes
Deployment start timestamp.
end_time
Yes
Deployment end timestamp.
repo_url
Yes
Git repo URL.
e.g Web URL (or HTML URL): https://github.com/hivelai/webhook-logger
Git Clone URL: https://github.com/hivelai/webhook-logger.git
environment
Yes
production / staging / dev / etc (string value).
branch
Yes
Branch name on which CI/CD is running.
commit_hash
No
Yes, if available.
pr_number
No
Optional.
pr_numbers
No
Optional.
build_number
No
Optional metadata.
image
No
Optional metadata.
logs_url
No
Optional metadata.
5. Accepted Timestamp Formats
Hivel accepts all common timestamp formats:
ISO / RFC 3339
2025-11-19T10:20:32Z
2025-11-19T10:20:32.846Z
Epoch
Seconds: 1700385632
Milliseconds: 1700385632846
6. Status Normalization
Hivel simplifies pipeline status tracking by automatically mapping your custom status strings into four standardized values (success, failed, canceled, unknown).
Mapping Reference
Provider
Status Mapping Logic
Jenkins
• SUCCESS → success
• FAILURE, UNSTABLE → failed
• ABORTED → canceled
• NOT_BUILT → unknown
GitHub Actions
• success → success
• failure, timed_out → failed
• canceled → canceled
• neutral, skipped, stale, action_required (or other non-terminal statuses) → unknown
GitLab CI
• success → success
• failed → failed
• canceled → canceled
• manual, skipped, pending, running → unknown
CircleCI
• success → success
• failed, timedout, infrastructure_fail → failed
• canceled → canceled
• not_run, on_hold, queued, running → unknown
Argo Workflows
• Succeeded → success
• Failed, Error → failed
• Skipped, Omitted (or non-terminal like Pending, Running) → unknown
Azure DevOps
• succeeded → success
• failed → failed
• canceled → canceled
• partiallySucceeded, succeededWithIssues → unknown
ArgoCD
• operationState.phase = Succeeded, health.status = Healthy → success
• phase = Failed or Error, or health = Degraded → failed
• Running / Progressing / Missing / Suspended → unknown
Any other provider
• Default → unknown
7. Common CI/CD Field Mapping
Use the following variables to populate the Deployment Events API payload in your CI/CD workflow.
Values may differ depending on your tool version, runner type, or plugin, so always verify using your platform's official documentation.
repo_url
${{ github.repository }}
$CI_PROJECT_URL
$GIT_URL
$(Build.Repository.Uri)
spec.source.repoURL
commit_hash
${{ github.sha }}
$CI_COMMIT_SHA
$GIT_COMMIT
$(Build.SourceVersion)
status.sync.revision
environment
${{ github.environment }}
$CI_ENVIRONMENT_NAME
$ENVIRONMENT
$(Release.EnvironmentName)
You define this, typically spec.destination.name or spec.destination.namespace
start_time
Step output (e.g. steps.start.outputs.time)
$CI_JOB_STARTED_AT
$BUILD_ID / plugin timestamps
$(Build.StartTime)
status.operationState.startedAt
end_time
Workflow end timestamp
$CI_JOB_FINISHED_AT
Timestamp + duration
$(Build.FinishTime)
status.operationState.finishedAt
deployment_id
-
-
-
-
metadata.name or metadata.uid
status
-
-
-
-
Computed from status.operationState.phase + status.health.status
event_type
-
-
-
-
completed
logs_url
-
-
-
-
Optional: Argo CD UI link, e.g. https://argocd.example.com/applications/<app-name>
8. How to Send Events
You can send the event using:
Inline Script: curl from shell, or PowerShell Invoke-RestMethod.
Platform Webhooks: GitLab Integrations, GitHub Webhooks, or Argo Notifications.
Security Note: Store the API token in your CI/CD secrets manager. Do not hardcode it in plain text.
9. Example Requests
v2 – Single Completed Event
10. Example Responses
Success:
Validation Error:
Conflict (409):
correlation_id is either the client's own X-Correlation-Id request header, if sent, or a server-generated UUID.
A request body that fails to parse as valid JSON, or has a field of the wrong type (e.g. a number where a string is expected), returns a `400 Bad Request` with the specific parse error in `error`:
11. Recommended Usage Flow
Generate API token in Hivel Settings.
Extract fields (repo, commit, timestamp) from your CI/CD environment variables.
Send POST request via your pipeline configuration.
Hivel processes the data to update DORA metrics automatically.
Last updated