Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audit Logs (HTTP Webhooks) #753

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

wowi42
Copy link
Contributor

@wowi42 wowi42 commented Oct 3, 2021

The idea behind this feature is to have more notifications to 3rd party services!

Instead of writing one connector to each service, we can easily send an HTTP POST with the following body:

{
                "start":      t.task.Start,
                "end":        t.task.End,
                "status":     t.task.Status,
                "task_id":    t.task.ID,
                "project_id": t.projectID,
                "task_url":   util.Config.WebHost + "/project/" + strconv.Itoa(t.template.ProjectID)
}

Based on this post, you could easily parse it and plug it inside IFTTT, n8n, or Zapier.

It's directly integrated inside the updateStatus() function. so we should not miss any events

Feedbacks most welcome!.

@wowi42 wowi42 changed the title [Work in Progress] Audit Logs [Work in Progress] Audit Logs (HTTP Webhooks) Oct 3, 2021
@wowi42 wowi42 changed the title [Work in Progress] Audit Logs (HTTP Webhooks) Audit Logs (HTTP Webhooks) Oct 4, 2021
@wowi42
Copy link
Contributor Author

wowi42 commented Oct 4, 2021

More fields have been added, and I have build the complete task execution URL inside the answer:

{
    "end": null,
    "environment": "",
    "playbook": "",
    "project_id": 1,
    "start": "2021-10-05T00:19:49.557209331+04:00",
    "status": "running",
    "task_id": 2147483638,
    "task_url": "/project/1/history/?t=2147483638",
    "template_id": 1
}

@wowi42
Copy link
Contributor Author

wowi42 commented Oct 4, 2021

@fiftin Any feedback?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant