You're reading "Content Management API"

Deploy activity

Represents an event occurred during the deploy process of your administrative area.

The Deploy activity object

A Deploy activity object is returned as part of the response body of each successful Index or Show API call. The following table contains the list of all its fields along with their type, description and example values.

Object fields:
created_atstring

The moment the activity occurred

This attribute is required
dataobject

Any details regarding the event

This attribute is required
event_typestring

The type of activity

This attribute is required

List all deploy events

To list all deploy events, send a GET request to the /deploy-events endpoint. The following table contains the list of all the possible arguments, along with their type, description and examples values. All the arguments marked as required must be present in the request.

Example request
GET https://site-api.datocms.com/deploy-events HTTP/1.1
X-Api-Version2
AuthorizationBearer YOUR-API-KEY
Acceptapplication/json
Example response
HTTP/1.1 200 OK
Content-Typeapplication/json; charset=utf-8
Cache-Controlcache-control: max-age=0, private, must-revalidate
X-RateLimit-Limit30
X-RateLimit-Remaining28
{ "data": [ { "type": "deploy_event", "id": "34", "attributes": { "event_type": "response_success", "created_at": "2016-09-20T18:50:24.914Z", "data": { "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_name\":\"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}}", "request_headers": { "Via": "1.1 vegur", "Host": "webhooks.datocms.com", "Origin": null, "Version": "HTTP/1.1", "Connection": "close", "Connect-Time": "0", "X-Request-Id": "5c1beced-0fe3-4c5b-b45d-68ba4a15b5f3", "X-Gitlab-Event": "Build Hook", "X-Forwarded-For": "46.101.135.219", "X-Request-Start": "1474397424903", "Total-Route-Time": "0", "X-Forwarded-Port": "443", "X-Forwarded-Proto": "https" } } }, "relationships": { "deployment_environment": { "data": { "type": "deployment_environment", "id": "1822" } } } } ] }

Retrieve a deploy event

To retrieve a deploy event, send a GET request to the /deploy-events/:deploy_event_id endpoint. The following table contains the list of all the possible arguments, along with their type, description and examples values. All the arguments marked as required must be present in the request.

Example request
GET https://site-api.datocms.com/deploy-events/:deploy_event_id HTTP/1.1
X-Api-Version2
AuthorizationBearer YOUR-API-KEY
Acceptapplication/json
Example response
HTTP/1.1 200 OK
Content-Typeapplication/json; charset=utf-8
Cache-Controlcache-control: max-age=0, private, must-revalidate
X-RateLimit-Limit30
X-RateLimit-Remaining28
{ "data": { "type": "deploy_event", "id": "34", "attributes": { "event_type": "response_success", "created_at": "2016-09-20T18:50:24.914Z", "data": { "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_name\":\"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}}", "request_headers": { "Via": "1.1 vegur", "Host": "webhooks.datocms.com", "Origin": null, "Version": "HTTP/1.1", "Connection": "close", "Connect-Time": "0", "X-Request-Id": "5c1beced-0fe3-4c5b-b45d-68ba4a15b5f3", "X-Gitlab-Event": "Build Hook", "X-Forwarded-For": "46.101.135.219", "X-Request-Start": "1474397424903", "Total-Route-Time": "0", "X-Forwarded-Port": "443", "X-Forwarded-Proto": "https" } } }, "relationships": { "deployment_environment": { "data": { "type": "deployment_environment", "id": "1822" } } } } }