Commit 39031982 authored by Dan Jensen's avatar Dan Jensen

Add timestamp to API deployments responses

Adds the updated_at attribute to responses from the API deployments
endpoints.
parent ed3d787e
---
title: Added timestamp (updated_at) to API deployments response
merge_request: 17913
author:
type: added
......@@ -24,6 +24,7 @@ Example of response
[
{
"created_at": "2016-08-11T07:36:40.222Z",
"updated_at": "2016-08-11T07:38:12.414Z",
"deployable": {
"commit": {
"author_email": "admin@example.com",
......@@ -83,6 +84,7 @@ Example of response
},
{
"created_at": "2016-08-11T11:32:35.444Z",
"updated_at": "2016-08-11T11:34:01.123Z",
"deployable": {
"commit": {
"author_email": "admin@example.com",
......@@ -167,6 +169,7 @@ Example of response
"ref": "master",
"sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a",
"created_at": "2016-08-11T11:32:35.444Z",
"updated_at": "2016-08-11T11:34:01.123Z",
"user": {
"name": "Administrator",
"username": "root",
......
......@@ -1474,7 +1474,7 @@ module API
end
class Deployment < Grape::Entity
expose :id, :iid, :ref, :sha, :created_at
expose :id, :iid, :ref, :sha, :created_at, :updated_at
expose :user, using: Entities::UserBasic
expose :environment, using: Entities::EnvironmentBasic
expose :deployable, using: Entities::Job
......
......@@ -6,6 +6,7 @@
"ref",
"sha",
"created_at",
"updated_at",
"user",
"deployable"
],
......@@ -15,6 +16,7 @@
"ref": { "type": "string" },
"sha": { "type": "string" },
"created_at": { "type": "string" },
"updated_at": { "type": "string" },
"user": {
"oneOf": [
{ "type": "null" },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment