Pulse Ingestion API v0.1.0
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
API to push data to Pulse.
Base URLs:
Email: Pulse Support
Authentication
- API Key (APIKey)
- Parameter Name: api_key, in: query.
ingestion
Use the Pulse Ingestion API to push data about your software delivery workflow events to Pulse.
pushAccelerateData
Code samples
# You can also use wget
curl -X POST https://ingestion.pulse.codacy.com/v1/ingestion/cli?api_key=HqsnRvQD3af9Pm45BUALwZpnLKVBSQpQLGzCGU6McPlqsyHQZSV%2BsQ%3D%3D \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
const inputBody = '{
"deploy_id": "string",
"time_created": "2020-11-09T09:10:00Z",
"changes": [
"string"
],
"teams": [
"jupiter",
"mercury"
],
"source": "api",
"$type": "deployment"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://ingestion.pulse.codacy.com/v1/ingestion/cli?api_key=HqsnRvQD3af9Pm45BUALwZpnLKVBSQpQLGzCGU6McPlqsyHQZSV%2BsQ%3D%3D',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://ingestion.pulse.codacy.com/v1/ingestion/cli", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://ingestion.pulse.codacy.com/v1/ingestion/cli', params={
'api_key': 'HqsnRvQD3af9Pm45BUALwZpnLKVBSQpQLGzCGU6McPlqsyHQZSV+sQ=='
}, headers = headers)
print(r.json())
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post 'https://ingestion.pulse.codacy.com/v1/ingestion/cli',
params: {
'api_key' => 'string'
}, headers: headers
p JSON.parse(result)
URL obj = new URL("https://ingestion.pulse.codacy.com/v1/ingestion/cli?api_key=HqsnRvQD3af9Pm45BUALwZpnLKVBSQpQLGzCGU6McPlqsyHQZSV%2BsQ%3D%3D");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /ingestion/cli
Push data to Pulse about changes, deployments, and incidents for calculating the key metrics from Accelerate.
Body parameter
{
"deploy_id": "string",
"time_created": "2020-11-09T09:10:00Z",
"changes": [
"string"
],
"teams": [
"jupiter",
"mercury"
],
"source": "api",
"$type": "deployment"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
api_key | query | string | true | Pulse API key. |
system | query | string | false | System to associate with the data, limited to 256 characters. Check out what is a system |
body | body | Event | true | Payload for the new event. |
Example responses
400 Response
{
"message": "string",
"error": "OK"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Successfully read payload. Will be sent for processing. | None |
400 | Bad Request | The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). | ApiError |
401 | Unauthorized | Authentication is required and has failed or has not yet been provided. | ApiError |
500 | Internal Server Error | The server encountered an unexpected condition that prevented it from fulfilling the request. | ApiError |
pushData
Code samples
# You can also use wget
curl -X POST https://ingestion.pulse.codacy.com/v1/ingestion/{provider}?api_key=HqsnRvQD3af9Pm45BUALwZpnLKVBSQpQLGzCGU6McPlqsyHQZSV%2BsQ%3D%3D \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
const inputBody = '{}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://ingestion.pulse.codacy.com/v1/ingestion/{provider}?api_key=HqsnRvQD3af9Pm45BUALwZpnLKVBSQpQLGzCGU6McPlqsyHQZSV%2BsQ%3D%3D',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://ingestion.pulse.codacy.com/v1/ingestion/{provider}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://ingestion.pulse.codacy.com/v1/ingestion/{provider}', params={
'api_key': 'HqsnRvQD3af9Pm45BUALwZpnLKVBSQpQLGzCGU6McPlqsyHQZSV+sQ=='
}, headers = headers)
print(r.json())
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post 'https://ingestion.pulse.codacy.com/v1/ingestion/{provider}',
params: {
'api_key' => 'string'
}, headers: headers
p JSON.parse(result)
URL obj = new URL("https://ingestion.pulse.codacy.com/v1/ingestion/{provider}?api_key=HqsnRvQD3af9Pm45BUALwZpnLKVBSQpQLGzCGU6McPlqsyHQZSV%2BsQ%3D%3D");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /ingestion/{provider}
Push an event to Pulse from one of the supported integration providers. Currently, Pulse supports the providers GitHub and PagerDuty.
Body parameter
{}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
api_key | query | string | true | Pulse API key. |
provider | path | string | true | Integration provider. |
system | query | string | false | System to associate with the data, limited to 256 characters. Check out what is a system |
body | body | object | true | Provider payload for the new event. |
Enumerated Values
Parameter | Value |
---|---|
provider | github |
provider | pagerduty |
provider | jira |
provider | bitbucket |
Example responses
400 Response
{
"message": "string",
"error": "OK"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
202 | Accepted | Successfully received payload. Will be sent for processing. | None |
400 | Bad Request | The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). | ApiError |
401 | Unauthorized | Authentication is required and has failed or has not yet been provided. | ApiError |
500 | Internal Server Error | The server encountered an unexpected condition that prevented it from fulfilling the request. | ApiError |
Schemas
EventSource
"api"
Source of the event.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | string | false | none | Source of the event. |
Enumerated Values
Property | Value |
---|---|
anonymous | api |
anonymous | cli |
anonymous | git |
anonymous | appveyor |
anonymous | aws-codebuild |
anonymous | azure-pipelines |
anonymous | bitrise |
anonymous | buddy |
anonymous | buildkite |
anonymous | circleci |
anonymous | codefresh |
anonymous | codemagic |
anonymous | codeship |
anonymous | docker |
anonymous | drone |
anonymous | github-actions |
anonymous | gitlab-ci |
anonymous | gocd |
anonymous | google-cloud-build |
anonymous | greenhouse |
anonymous | heroku-ci |
anonymous | jenkins |
anonymous | jfrog-pipelines |
anonymous | magnum |
anonymous | semaphore |
anonymous | shippable |
anonymous | solano |
anonymous | teamcity |
anonymous | travis |
anonymous | wercker |
Deployment
{
"deploy_id": "string",
"time_created": "2020-11-09T09:10:00Z",
"changes": [
"string"
],
"teams": [
"jupiter",
"mercury"
],
"source": "api",
"$type": "deployment"
}
Details of a deployment.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
deploy_id | string | true | none | ID of the deployment, limited to 40 characters. |
time_created | string(date-time) | true | none | Date and time of the deployment, in RFC 3339 format. |
changes | [string] | true | none | List of IDs of all changes included in the deployment, limited to 40 changes. |
teams | [string] | false | none | List of teams that are responsible for the changes in this deployment. |
source | EventSource | false | none | Source of the event. |
$type | string | true | none | Type of event. |
Enumerated Values
Property | Value |
---|---|
$type | deployment |
Change
{
"change_id": "string",
"time_created": "2020-11-09T09:10:00Z",
"source": "api",
"$type": "change"
}
Details of a change.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
change_id | string | true | none | ID of the change, limited to 40 chars. |
time_created | string(date-time) | true | none | Date and time of the change, in RFC 3339 format. |
source | EventSource | false | none | Source of the event. |
$type | string | true | none | Type of event. |
Enumerated Values
Property | Value |
---|---|
$type | change |
Incident
{
"incident_id": "string",
"time_created": "2020-11-09T09:10:00Z",
"time_resolved": "2020-11-09T09:10:00Z",
"source": "api",
"$type": "incident"
}
Details of an incident.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
incident_id | string | true | none | ID of the incident, limited to 40 chars. |
time_created | string(date-time) | true | none | Date and time of the incident start, in RFC 3339 format. Must be a date before time_resolved. |
time_resolved | string(date-time) | true | none | Date and time of the incident resolution, in RFC 3339 format. Must be a date after time_created. |
source | EventSource | false | none | Source of the event. |
$type | string | true | none | Type of event. |
Enumerated Values
Property | Value |
---|---|
$type | incident |
Event
{
"deploy_id": "string",
"time_created": "2020-11-09T09:10:00Z",
"changes": [
"string"
],
"teams": [
"jupiter",
"mercury"
],
"source": "api",
"$type": "deployment"
}
Details of an event.
Properties
oneOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | Deployment | false | none | Details of a deployment. |
xor
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | Change | false | none | Details of a change. |
xor
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | Incident | false | none | Details of an incident. |
ApiError
{
"message": "string",
"error": "OK"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
message | string | true | none | Brief description of the error. |
error | string | true | none | Error corresponding to the HTTP status code. Useful for deserialization purposes. |
Enumerated Values
Property | Value |
---|---|
error | OK |
error | Created |
error | Accepted |
error | No Content |
error | Bad Request |
error | Unauthorized |
error | Forbidden |
error | Not Found |
error | Request Timeout |
error | Conflict |
error | Internal Server Error |