Webhooks allow you to integrate with Djinn CI based on the events that happen within Djinn CI. When one of these events is triggered, an HTTP POST request is sent to the webhook's URL. What happens to these events when received is up to the server that receives it. It could be used to notify people through various communication channels, to update an issue tracker, or to kick off another automated process.
Navigate to the namespace you want to configure the webhook for. From the Webhooks tab, you will be able to create a new webhook via the Create webhook button. Webhooks can also be created via the REST API.
Secrets can be set on a webhook that is used for signing the payload of the delivered event. Webhooks with secrets will include the signature in the request headers,
X-Djinn-CI-Signature sha256=6a7f769...
the secret should be used from your end to compute the hash using an HMAC digest, then compare that with what's in the header.
This event is emitted whenever a new build is submitted to the webhook's namespace for running.
This is event is emitted when a build begins being run, this shares the same payload as the build.submitted
event, only the started_at
field will not be null.
This is event is emitted when a build begins being run, this shares the same payload as the build.submitted
event, only the finished_at
field will not be null.
NAME | TYPE | DESCRIPTION |
---|---|---|
|
| Unique ID for the build. |
|
| ID of the user who submitted the build. |
|
| ID of the namespace the build belongs to, if any. |
|
| Number of the build for the user who submitted it. |
|
| The status of the build, will be one of:
|
|
| The output of the build, if any. |
|
| The list of tags on the build. |
|
| Whether or not the build has been pinned. |
|
| The RFC3339 formatted string at which the build was created. |
|
| The RFC3339 formatted string at which the build started. |
|
| The RFC3339 formatted string at which the build finished. |
|
| The API URL to the build entity itself. |
|
| The API URL to the build's objects. |
|
| The API URL to the build's variables. |
|
| The API URL to the build's jobs. |
|
| The API URL to the build's artifacts. |
|
| The API URL to the build's tags. |
|
| The user the build belongs to. |
|
| The namespace of the build, if any. |
|
| The trigger of the build, if any. |
{ "id": 3, "user_id": 1, "namespace_id": 3, "manifest": "namespace: djinn\ndriver:\n image: centos/7\n type: qemu\nenv:\n- LOCALE=en_GB.UTF-8\nobjects:\n- data => data\nstages:\n- clean\njobs:\n- stage: clean\n commands:\n - tr -d '0-9' data > data.cleaned\n artifacts:\n - data.cleaned => data.cleaned", "status": "queued", "output": null, "created_at": "2006-01-02T15:04:05Z", "started_at": null, "finished_at": null, "url": "https://api.djinn-ci.com/b/me/3", "objects_url": "https://api.djinn-ci.com/b/me/3/objects", "variables_url": "https://api.djinn-ci.com/b/me/3/variables", "jobs_url": "https://api.djinn-ci.com/b/me/3/jobs", "artifacts_url": "https://api.djinn-ci.com/b/me/3/artifacts", "tags_url": "https://api.djinn-ci.com/b/me/3/tags", "user": { "id": 1, "email": "me@example.com", "username": "me", "created_at": "2006-01-02T15:04:05Z" }, "namespace": { "id": 3, "user_id": 1, "root_id": 3, "parent_id": null, "name": "djinn", "path": "djinn", "description": "", "visibility": "private", "created_at": "2006-01-02T15:04:05Z", "url": "https://api.djinn-ci.com/n/me/djinn", "builds_url": "https://api.djinn-ci.com/n/me/djinn/-/builds", "namespaces_url": "https://api.djinn-ci.com/n/me/djinn/-/namespaces", "images_url": "https://api.djinn-ci.com/n/me/djinn/-/images", "objects_url": "https://api.djinn-ci.com/n/me/djinn/-/objects", "variables_url": "https://api.djinn-ci.com/n/me/djinn/-/variables", "keys_url": "https://api.djinn-ci.com/n/me/djinn/-/keys", "collaborators_url": "https://api.djinn-ci.com/n/me/djinn/-/collaborators", "user": { "id": 1, "email": "me@example.com", "username": "me", "created_at": "2006-01-02T15:04:05Z" } }, "trigger": { "type": "manual", "comment": "", "data": { "email": "me@example.com", "username": "me" } }, "tags": [ "anon", "golang" ] }
This event is emitted whenever a new tag is added to a build. This will not be emitted for tags that are added to a build at the time the build is submitted.
{ "build": { "artifacts_url": "https://api.djinn-ci.com/b/wallace.breen/1/artifacts", "created_at": "2021-10-02T15:50:40Z", "finished_at": null, "id": 4, "jobs_url": "https://api.djinn-ci.com/b/wallace.breen/1/jobs", "manifest": "namespace: blackmesa@wallace.breen\ndriver:\n image: golang\n type: docker\n workspace: /go", "namespace_id": 4, "number": 1, "objects_url": "https://api.djinn-ci.com/b/wallace.breen/1/objects", "output": null, "started_at": null, "status": "queued", "tags": [ "docker", "golang" ], "tags_url": "https://api.djinn-ci.com/b/wallace.breen/1/tags", "url": "https://api.djinn-ci.com/b/wallace.breen/1", "user": { "created_at": "2021-10-02T15:50:38Z", "email": "wallace.breen@black-mesa.com", "id": 3, "username": "wallace.breen" }, "user_id": 3, "variables_url": "https://api.djinn-ci.com/b/wallace.breen/1/variables" }, "tags": [{ "name": "docker", "url": "https://api.djinn-ci.com/b/wallace.breen/1/tags/docker" }, { "name": "golang", "url": "https://api.djinn-ci.com/b/wallace.breen/1/tags/golang" }], "url": "https://api.djinn-ci.com/b/wallace.breen/1/tags", "user": { "created_at": "2021-10-02T15:50:38Z", "email": "gordon.freeman@black-mesa.com", "id":1, "username": "gordon.freeman" } }
This event is emitted when an invite is sent to a user.
{ "invitee": { "id": 1, "email": "gordon.freeman@black-mesa.com", "username": "gordon.freeman", "created_at": "2021-10-02T13:32:09Z" }, "inviter": { "id": 3, "email": "wallace.breen@black-mesa.com", "username": "wallace.breen", "created_at": "2021-10-02T13:32:09Z" }, "namespace": { "id": 4, "user_id": 3, "root_id": 4, "parent_id": null, "name": "blackmesa", "path": "blackmesa", "description": "Black Mesa", "visibility": "private", "created_at": "2021-10-02T13:10:15Z", "url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa", "builds_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/builds", "namespaces_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/namespaces", "images_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/images", "invites_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/invites", "objects_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/objects", "keys_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/keys", "variables_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/variables", "collaborators_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/collaborators", "webhooks_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/webhooks", "user": { "id": 3, "email": "wallace.breen@black-mesa.com", "username": "wallace.breen", "created_at": "2021-10-02T13:10:14Z" } } }
This event is emitted when an invite is accepted by a user.
This event is emitted when an invite is rejected by a user.
{ "invitee": { "id": 1, "email": "gordon.freeman@black-mesa.com", "username": "gordon.freeman", "created_at": "2021-10-02T13:32:09Z" }, "namespace": { "id": 4, "user_id": 3, "root_id": 4, "parent_id": null, "name": "blackmesa", "path": "blackmesa", "description": "Black Mesa", "visibility": "private", "created_at": "2021-10-02T13:10:15Z", "url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa", "builds_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/builds", "namespaces_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/namespaces", "images_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/images", "invites_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/invites", "objects_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/objects", "keys_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/keys", "variables_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/variables", "collaborators_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/collaborators", "webhooks_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/webhooks", "user": { "id": 3, "email": "wallace.breen@black-mesa.com", "username": "wallace.breen", "created_at": "2021-10-02T13:10:14Z" } } }
This event is emitted whenever a namespace is created, updated, or deleted. Creation events for namespaces will only be emitted for child namespaces. The action
field will either be created
, updated
, or deleted
.
NAME | TYPE | DESCRIPTION |
---|---|---|
|
| The action performed on the namespace, will be one of:
|
|
| The namespace the action was performed on. |
{ "action": "updated", "namespace": { "id": 4, "user_id": 3, "root_id": 4, "parent_id": null, "name": "blackmesa", "path": "blackmesa", "description": "Black Mesa", "visibility": "private", "created_at": "2021-10-02T13:10:15Z", "url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa", "builds_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/builds", "namespaces_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/namespaces", "images_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/images", "invites_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/invites", "objects_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/objects", "keys_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/keys", "variables_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/variables", "collaborators_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/collaborators", "webhooks_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/webhooks", "user": { "id": 3, "email": "wallace.breen@black-mesa.com", "username": "wallace.breen", "created_at": "2021-10-02T13:10:14Z" } } }
This event is emitted whenever a cron job is created, updated, or deleted within a namespace. The action
field will either be created
, updated
, or deleted
.
NAME | TYPE | DESCRIPTION |
---|---|---|
|
| The action performed on the cron, will be one of:
|
|
| The cron the action was performed on. |
{ "action": "created", "cron": { "id": 4, "user_id": 3, "author_id": 3, "namespace_id": 4, "name": "nightly", "schedule": "daily", "manifest": "namespace: blackmesa@wallace.breen\ndriver:\n image: golang\n type: docker\n workspace: /go", "created_at": "0001-01-01T00:00:00Z", "next_run": "2021-10-07T00:00:00Z", "url": "https://api.djinn-ci.com/cron/4", "author": { "id": 3, "email": "wallace.breen@black-mesa.com", "username": "wallace.breen", "created_at": "2021-10-06T18:32:33Z" }, "user": { "id": 3, "email": "wallace.breen@black-mesa.com", "username": "wallace.breen", "created_at": "2021-10-06T18:32:33Z" }, "namespace": { "id": 4, "user_id": 3, "root_id": 4, "parent_id": null, "name": "blackmesa", "path": "blackmesa", "description": "Black Mesa", "visibility": "private", "created_at": "2021-10-02T13:10:15Z", "url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa", "builds_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/builds", "namespaces_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/namespaces", "images_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/images", "invites_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/invites", "objects_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/objects", "keys_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/keys", "variables_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/variables", "collaborators_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/collaborators", "webhooks_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/webhooks", "user": { "id": 3, "email": "wallace.breen@black-mesa.com", "username": "wallace.breen", "created_at": "2021-10-02T13:10:14Z" } } } }
This event is emitted whenever an image is created, or deleted within a namespace. The action
field will either be created
, updated
, or deleted
.
NAME | TYPE | DESCRIPTION |
---|---|---|
|
| The action performed on the image, will be one of:
|
|
| The image the action was performed on. |
{ "action": "created", "image": { "id": 1, "author_id": 3, "user_id": 3, "namespace_id": 4, "driver": "qemu", "name": "resonance", "created_at": "2021-10-06T19:02:58Z", "url": "https://api.djinn-ci.com/images/1", "author": { "id": 3, "email": "wallace.breen@black-mesa.com", "username": "wallace.breen", "created_at": "2021-10-06T19:01:36Z" }, "user": { "id": 3, "email": "wallace.breen@black-mesa.com", "username": "wallace.breen", "created_at": "2021-10-06T19:01:36Z" }, "namespace": { "id": 4, "user_id": 3, "root_id": 4, "parent_id": null, "name": "blackmesa", "path": "blackmesa", "description": "Black Mesa", "visibility": "private", "created_at": "2021-10-06T19:01:36Z", "url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa", "builds_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/builds", "namespaces_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/namespaces", "images_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/images", "objects_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/objects", "variables_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/variables", "keys_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/keys", "invites_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/invites", "collaborators_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/collaborators", "webhooks_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/webhooks", "user": { "created_at": "2021-10-06T19:01:36Z", "email": "wallace.breen@black-mesa.com", "id": 3, "username": "wallace.breen" } } } }
This event is emitted whenever an object is created, or deleted within a namespace. The action
field will either be created
, updated
, or deleted
.
NAME | TYPE | DESCRIPTION |
---|---|---|
|
| The action performed on the object, will be one of:
|
|
| The object the action was performed on. |
{ "action": "created", "object": { "id": 1, "author_id": 1, "user_id": 3, "namespace_id": 4, "name": "crowbar", "type": "image/png", "size": 319, "md5": "156dd0abff851609fb5aa6f3b0294d12", "sha256": "a05299b5741aad88839cd9916cd5647caa1c992247ac13dd48e230b7ca335979", "created_at": "2021-10-07T20:21:28Z", "url": "https://api.djinn-ci.com/objects/1", "author": { "id": 1, "email": "gordon.freeman@black-mesa.com", "username": "gordon.freeman", "created_at": "2021-10-07T20:20:04Z" }, "user": { "id": 3, "email": "wallace.breen@black-mesa.com", "username": "wallace.breen", "created_at": "2021-10-07T20:20:04Z" }, "namespace": { "id": 4, "user_id": 3, "root_id": 4, "parent_id": null, "name": "blackmesa", "path": "blackmesa", "description": "Black Mesa", "visibility": "private", "created_at": "2021-10-06T19:01:36Z", "url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa", "builds_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/builds", "namespaces_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/namespaces", "images_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/images", "objects_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/objects", "variables_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/variables", "keys_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/keys", "invites_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/invites", "collaborators_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/collaborators", "webhooks_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/webhooks", "user": { "created_at": "2021-10-06T19:01:36Z", "email": "wallace.breen@black-mesa.com", "id": 3, "username": "wallace.breen" } } } }
This event is emitted whenever a variable is created, or deleted within a namespace. The action
field will either be created
, updated
, or deleted
.
NAME | TYPE | DESCRIPTION |
---|---|---|
|
| The action performed on the variable, will be one of:
|
|
| The variable the action was performed on. |
{ "action": "created", "variable": { "id": 1, "author_id": 1, "user_id": 3, "namespace_id": 4, "key": "PGADDR", "value": "host=localhost port=5432", "url": "https://api.djinn-ci.com/variables/1", "created_at": "2021-10-07T20:21:27Z", "author": { "id": 1, "email": "gordon.freeman@black-mesa.com", "username": "gordon.freeman", "created_at": "2021-10-07T20:20:04Z" }, "user": { "id": 3, "email": "wallace.breen@black-mesa.com", "username": "wallace.breen", "created_at": "2021-10-07T20:20:04Z" }, "namespace": { "id": 4, "user_id": 3, "root_id": 4, "parent_id": null, "name": "blackmesa", "path": "blackmesa", "description": "Black Mesa", "visibility": "private", "created_at": "2021-10-06T19:01:36Z", "url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa", "builds_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/builds", "namespaces_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/namespaces", "images_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/images", "objects_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/objects", "variables_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/variables", "keys_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/keys", "invites_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/invites", "collaborators_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/collaborators", "webhooks_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/webhooks", "user": { "created_at": "2021-10-06T19:01:36Z", "email": "wallace.breen@black-mesa.com", "id": 3, "username": "wallace.breen" } } } }
This event is emitted whenever an SSH key is created, updated, or deleted within a namespace. The action
field will either be created
, updated
, or deleted
.
NAME | TYPE | DESCRIPTION |
---|---|---|
|
| The action performed on the SSH key, will be one of:
|
|
| The SSH key the action was performed on. |
{ "action": "created", "key": { "id": 1, "author_id": 1, "user_id": 3, "namespace_id": 4, "name": "id_ed25519", "config": "", "created_at": "2021-10-07T20:21:28Z", "updated_at": "2021-10-07T20:21:28Z", "url": "https://api.djinn-ci.com/keys/1", "author": { "id": 1, "email": "gordon.freeman@black-mesa.com", "username": "gordon.freeman", "created_at": "2021-10-07T20:20:04Z" }, "user": { "created_at": "2021-10-07T20:20:04Z", "email": "wallace.breen@black-mesa.com", "id": 3, "username": "wallace.breen" }, "namespace": { "id": 4, "user_id": 3, "root_id": 4, "parent_id": null, "name": "blackmesa", "path": "blackmesa", "description": "Black Mesa", "visibility": "private", "created_at": "2021-10-06T19:01:36Z", "url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa", "builds_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/builds", "namespaces_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/namespaces", "images_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/images", "objects_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/objects", "variables_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/variables", "keys_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/keys", "invites_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/invites", "collaborators_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/collaborators", "webhooks_url": "https://api.djinn-ci.com/n/wallace.breen/blackmesa/-/webhooks", "user": { "created_at": "2021-10-06T19:01:36Z", "email": "wallace.breen@black-mesa.com", "id": 3, "username": "wallace.breen" } } } }