Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > Deploy activity

List all deploy events

Returns

Returns an array of resource objects of type build_event.

Examples

1
GET https://site-api.datocms.com/build-events HTTP/1.1
2
Authorization: Bearer YOUR-API-TOKEN
3
Accept: application/json
4
X-Api-Version: 3
Terminal window
1
curl -g 'https://site-api.datocms.com/build-events' \
2
\
3
-H "Authorization: Bearer YOUR-API-TOKEN" \
4
-H "Accept: application/json" \
5
-H "X-Api-Version: 3"
1
await fetch("https://site-api.datocms.com/build-events", {
2
headers: {
3
Authorization: "Bearer YOUR-API-TOKEN",
4
Accept: "application/json",
5
"X-Api-Version": "3",
6
},
7
});
1
HTTP/1.1 200 OK
2
Content-Type: application/json
3
Cache-Control: cache-control: max-age=0, private, must-revalidate
4
X-RateLimit-Limit: 30
5
X-RateLimit-Remaining: 28
6
7
{
8
"data": [
9
{
10
"type": "build_event",
11
"id": "34",
12
"attributes": {
13
"event_type": "response_success",
14
"data": {
15
"request_body": "{\"object_kind\":\"build\",\"ref\":\"master\",\"tag\":false,\"before_sha\":\"0000000000000000000000000000000000000000\",\"sha\":\"ecfccf5ea28af900c14b499a2b762e029c7492\",\"build_id\":10495,\"build_name\":\"build\",\"build_stage\":\"test\",\"build_status\":\"success\",\"build_started_at\":\"2016-09-20 18:49:22 UTC\",\"build_finished_at\":\"2016-09-20 18:50:24 UTC\",\"build_duration\":62.279854524,\"build_allow_failure\":false,\"project_id\":195,\"project_id\":\"Stefano Verna / awesome-website\",\"user\":{\"id\":null,\"name\":null,\"email\":null},\"commit\":{\"id\":6754,\"sha\":\"ecfccf5ea28af900c6614b499a2b762e029c7492\",\"message\":\"Update gems\\n\",\"author_name\":\"Stefano Verna\",\"author_email\":\"s.verna@datocms.com\",\"status\":\"success\",\"duration\":62,\"started_at\":\"2016-09-20 18:49:22 UTC\",\"finished_at\":\"2016-09-20 18:50:24 UTC\"},\"repository\":{\"name\":\"awesome-website\",\"url\":\"git@gitlab.com:stefanoverna/awesome-website.git\",\"description\":\"\",\"visibility_level\":0}}",
16
"request_headers": {
17
"Via": "1.1 vegur",
18
"Host": "webhooks.datocms.com",
19
"Origin": null,
20
"Version": "HTTP/1.1",
21
"Connection": "close",
22
"Connect-Time": "0",
23
"X-Request-Id": "5c1beced-0fe3-4c5b-b45d-68ba4a15b5f3",
24
"X-Gitlab-Event": "Build Hook",
25
"X-Forwarded-For": "46.101.135.219",
26
"X-Request-Start": "1474397424903",
27
"Total-Route-Time": "0",
28
"X-Forwarded-Port": "443",
29
"X-Forwarded-Proto": "https"
30
}
31
},
32
"created_at": "2016-09-20T18:50:24.914Z"
33
},
34
"relationships": {
35
"build_trigger": {
36
"data": {
37
"type": "build_trigger",
38
"id": "1822"
39
}
40
}
41
}
42
}
43
]
44
}