We are happy to announce, that our beta API was released today!
The main goals to release an API was:
- you want to integrate your custom tools and
- to handle other popular integrations we are not supporting yet.
At the moment we support one GET and one POST method, format for all endpoints is JSON. It’s currently in beta, so our version is locked at 0 🙂
Setup
Sign in to your GetBadges account and go to projects:
Add a new integration on your project list:
Next, click on Webhooks integration:
Your API url for POST request appears below:
List available event types
To lists all available GetBadges event types, call a GET request:
GET https://getbadges.getbadges.io/api/v0/event-types
And the result is:
[ { "source": "issueTracker", // source of the events "type": "task", // type of affected item "action": "reopen" // action taken }, { "source": "ci", "type": "build", "action": "failed" }, { "source": "crm", "type": "call", "action": "undo" } // ... ]
All of them you’ll find here (authentication is not required).
Add event
Creates events, this is usually the one you’re looking for. The request url depends on your integration and can look like:
POST https://getbadges.getbadges.io/v0/event/log/7d871a13f-af5f-4b11-86bb-72fcd55f0061
An example:
// API version, locked to 0 during beta "version": 0,
// Event Type can be found in list event-types "eventType": { "source": "issueTracker", "type": "task", "action": "close" },
// Integration-wide unique id for this ticket "id": "OMG-123",
// Action's author email "email": "",
// Optional, shows in activity "preview": "A short description of the ticket",
// Optional, links event to an external system "permalink": "http://example.com/not-jira/OMG-123"
Raw JSON Payload example:
{ "version": 0, "eventType": { "source": "issueTracker", "type": "task", "action": "close" }, "id": "OMG-123", "email": "", "preview": "A short description of the ticket", "permalink": "http://example.com/not-jira/OMG-123" }
And the response:
{ "status": "ok", "message": "Event enqueued for processing" }
Thanks all for suggestions about our API! Get in touch, also we are happy to get info about using this API at .
I’m trying to integrate gitlab merge requests with getbadges. I was able to convert the gitlab merge request webhook into a payload that looks like this:
“`[
{
“version”: 0,
“eventType”: {
“source”: “codeRepository”,
“type”: “pullRequest”,
“action”: “add”
},
“id”: 123, // the merge request id
“email”: “”,
“preview”: “Merge Request message”,
“permalink”: “https://gitlab.com/group/repository/merge_requests/123”
}
]“`
I get a 200 with the expected body when posting this data, but the merge requests don’t show up in the activity stream. Any hints what I’m doing wrong?
Hey, can you check it again?
If the problem persists drop us a line and we’ll surely figure it out.