Webhooks
Nullstone supports sending webhooks to a URL when workspace events occur in Nullstone.
Configure
You can set up notifications in one of two ways: Environment Events in the Nullstone UI or via GitOps. To configure a webhook in the Nullstone UI, navigate to the "Events" tab for an environment. Refer to Event Targets for GitOps configuration.
When configuring an event, you can provide an optional URL to call when the event occurs. This must be a properly formed URL. Nullstone will send a POST
request to the URL specified.
Payload
To receive the request, you must handle a POST
request. This has the following payload:
json
{
"action": "string: enum(launch-failed, launched, destroy-failed, destroyed, update-failed, updated, first-deployed, first-deploy-failed, deployed, deploy-failed)",
"eventAction": "string: enum(app-deployed, app-first-deployed, block-launched, block-updated, block-destroyed, block-needs-approval, env-launched, env-destroyed)",
"eventStatus": "string: enum(failed, completed, cancelled, disapproved)",
"message": "string",
"workspace": {
"uid": "string (uuid)",
"createdAt": "string (timestamp)",
"createdBy": "string",
"status": "string",
"statusAt": "string (timestamp)",
"orgName": "string",
"stackId": "integer",
"blockId": "integer",
"envId": "integer",
"provisionedAt": "string (timestamp)",
"currentActivity": "string",
"hasPartialChanges": "boolean",
"provisionStartedAt": "string (timestamp)"
},
"stack": {
"id": "integer",
"name": "string",
"orgName": "string",
"description": "string",
"createdAt": "string (timestamp)",
"updatedAt": "string (timestamp)",
"providerType": "string",
"status": "string"
},
"block": {
"id": "integer",
"name": "string",
"orgName": "string",
"moduleSource": "string",
"createdAt": "string (timestamp)",
"updatedAt": "string (timestamp)",
"moduleSourceVersion": "string",
"type": "string",
"repo": "string",
"framework": "string",
"dnsName": "string",
"registrar": "string",
"reference": "string",
"stackId": "integer",
"isVerified": "boolean",
"status": "string",
"isShared": "boolean",
"owningRepo": "string"
},
"environment": {
"id": "integer",
"name": "string",
"orgName": "string",
"providerConfig": "object",
"pipelineOrder": "integer (nullable)",
"createdAt": "string (timestamp)",
"updatedAt": "string (timestamp)",
"stackId": "integer",
"type": "string",
"status": "string",
"contextKey": "string",
"isProd": "boolean",
"createdBy": "string"
},
"appVersion": "string",
"module": "string",
"moduleVersion": "string",
"initiator": {
"trigger": {
"source": "string: enum(manual, github)",
"event": "string: enum(user, automation, vcs-push, vcs-pull-request-opened, vcs-pull-request-labelled, gitops-enable, gitops-change-branch, env-create)",
},
"repoInfo": {},
"commitInfo": {}
},
"targetUrl": "string"
}