From 50846eb6822ba64a1fbb5ccb56e5772b4ec60691 Mon Sep 17 00:00:00 2001 From: Marti Raudsepp Date: Fri, 18 Aug 2017 15:13:27 +0300 Subject: [PATCH] Expose certificate dateCreated via API --- lemur/certificates/schemas.py | 1 + lemur/certificates/views.py | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/lemur/certificates/schemas.py b/lemur/certificates/schemas.py index 99e520c4..72b42fb9 100644 --- a/lemur/certificates/schemas.py +++ b/lemur/certificates/schemas.py @@ -187,6 +187,7 @@ class CertificateOutputSchema(LemurOutputSchema): issuer = fields.String() name = fields.String() dns_provider_id = fields.Integer(required=False, allow_none=True) + date_created = ArrowDateTime() rotation = fields.Boolean() diff --git a/lemur/certificates/views.py b/lemur/certificates/views.py index 72cb3b5a..cdfd06a3 100644 --- a/lemur/certificates/views.py +++ b/lemur/certificates/views.py @@ -83,6 +83,7 @@ class CertificatesList(AuthenticatedResource): "serial": "82311058732025924142789179368889309156", "id": 2288, "issuer": "SymantecCorporation", + "dateCreated": "2016-06-03T06:09:42.133769+00:00", "notBefore": "2016-06-03T00:00:00+00:00", "notAfter": "2018-01-12T23:59:59+00:00", "destinations": [], @@ -214,6 +215,7 @@ class CertificatesList(AuthenticatedResource): "serial": "82311058732025924142789179368889309156", "id": 2288, "issuer": "SymantecCorporation", + "dateCreated": "2016-06-03T06:09:42.133769+00:00", "notBefore": "2016-06-03T00:00:00+00:00", "notAfter": "2018-01-12T23:59:59+00:00", "destinations": [], @@ -334,6 +336,7 @@ class CertificatesUpload(AuthenticatedResource): "serial": "82311058732025924142789179368889309156", "id": 2288, "issuer": "SymantecCorporation", + "dateCreated": "2016-06-03T06:09:42.133769+00:00", "notBefore": "2016-06-03T00:00:00+00:00", "notAfter": "2018-01-12T23:59:59+00:00", "destinations": [], @@ -498,6 +501,7 @@ class Certificates(AuthenticatedResource): "serial": "82311058732025924142789179368889309156", "id": 2288, "issuer": "SymantecCorporation", + "dateCreated": "2016-06-03T06:09:42.133769+00:00", "notBefore": "2016-06-03T00:00:00+00:00", "notAfter": "2018-01-12T23:59:59+00:00", "destinations": [], @@ -587,6 +591,7 @@ class Certificates(AuthenticatedResource): "serial": "82311058732025924142789179368889309156", "id": 2288, "issuer": "SymantecCorporation", + "dateCreated": "2016-06-03T06:09:42.133769+00:00", "notBefore": "2016-06-03T00:00:00+00:00", "notAfter": "2018-01-12T23:59:59+00:00", "destinations": [], @@ -700,6 +705,7 @@ class NotificationCertificatesList(AuthenticatedResource): "serial": "82311058732025924142789179368889309156", "id": 2288, "issuer": "SymantecCorporation", + "dateCreated": "2016-06-03T06:09:42.133769+00:00", "notBefore": "2016-06-03T00:00:00+00:00", "notAfter": "2018-01-12T23:59:59+00:00", "destinations": [], @@ -807,6 +813,7 @@ class CertificatesReplacementsList(AuthenticatedResource): "serial": "82311058732025924142789179368889309156", "id": 2288, "issuer": "SymantecCorporation", + "dateCreated": "2016-06-03T06:09:42.133769+00:00", "notBefore": "2016-06-03T00:00:00+00:00", "notAfter": "2018-01-12T23:59:59+00:00", "destinations": [],