You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2021/12/03 21:39:12 UTC

[GitHub] [trafficcontrol] mattjackson220 commented on a change in pull request #6338: Cert Expirations Traffic Ops Endpoint

mattjackson220 commented on a change in pull request #6338:
URL: https://github.com/apache/trafficcontrol/pull/6338#discussion_r762302120



##########
File path: docs/source/api/v4/sslkey_expirations.rst
##########
@@ -0,0 +1,93 @@
+..
+..
+.. Licensed under the Apache License, Version 2.0 (the "License");
+.. you may not use this file except in compliance with the License.
+.. You may obtain a copy of the License at
+..
+..     http://www.apache.org/licenses/LICENSE-2.0
+..
+.. Unless required by applicable law or agreed to in writing, software
+.. distributed under the License is distributed on an "AS IS" BASIS,
+.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+.. See the License for the specific language governing permissions and
+.. limitations under the License.
+..
+
+.. _to-api-sslkey_expirations:
+
+**********************
+``sslkey_expirations``
+**********************
+
+``GET``
+=======
+Retrieves SSL certificate expiration information.
+
+:Auth. Required: Yes
+:Roles Required: "admin"
+:Permissions Required: ACME:READ
+:Response Type:  Array
+
+Request Structure
+-----------------
+.. table:: Request Query Parameters
+
+	+-------------------+----------+--------------------------------------------------------------------------------------------------------+
+	| Name              | Required | Description                                                                                            |
+	+===================+==========+========================================================================================================+
+	| days              | no       | Return only the expiration information for SSL certificates expiring in the next given number of days. |
+	+-------------------+----------+--------------------------------------------------------------------------------------------------------+
+
+.. code-block:: http
+	:caption: Request Example
+
+	GET /api/4.0/sslkey_expirations?days=30 HTTP/1.1
+	Host: trafficops.infra.ciab.test
+	Accept: */*
+	Connection: keep-alive
+	Cookie: mojolicious=...
+
+Response Structure
+------------------
+:deliveryservice:    The :ref:`ds-xmlid` for the :term:`Delivery Service` corresponding to this SSL certificate.
+:deliveryservice_id: The ID for the :term:`Delivery Service` corresponding to this SSL certificate.
+:cdn:                The ID for the :abbr:`CDN (Content Delivery Network)` corresponding to this SSL certificate.
+:provider:           The provider of this SSL certificate, generally the name of the Certificate Authority or the :abbr:`ACME (Automatic Certificate Management Environment)` account.
+:expiration:         The expiration date of this SSL certificate.
+:federated:          A boolean indicating if this SSL certificate is use in a federated :term:`Delivery Service`.
+
+.. code-block:: http
+	:caption: Response Example
+
+	HTTP/1.1 200 OK
+	Access-Control-Allow-Credentials: true
+	Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Set-Cookie, Cookie
+	Access-Control-Allow-Methods: POST,GET,OPTIONS,PUT,DELETE
+	Access-Control-Allow-Origin: *
+	Content-Encoding: gzip
+	Content-Type: application/json
+	Permissions-Policy: interest-cohort=()
+	Set-Cookie: mojolicious=...; Path=/; Expires=Mon, 07 Jun 2021 22:52:20 GMT; Max-Age=3600; HttpOnly
+	Vary: Accept-Encoding
+	X-Server-Name: traffic_ops_golang/
+	Date: Mon, 07 Jun 2021 21:52:20 GMT
+	Content-Length: 384
+
+	{ "response": [
+		{
+			"deliveryservice": "foo1",
+			"deliveryservice_id": 1,

Review comment:
       so i originally was only going to return the XMLID but in TP it needs the id to navigate to the SSL Key page when the row gets clicked so i returned both so TP can show the XMLID but navigate to the page




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org