ocket8888 commented on a change in pull request #4444: Document undocumented 
Traffic Ops routes
URL: https://github.com/apache/trafficcontrol/pull/4444#discussion_r384056025
 
 

 ##########
 File path: docs/source/api/v2/deliveryservice_request_comments.rst
 ##########
 @@ -0,0 +1,296 @@
+..
+..
+.. 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-deliveryservice_request_comments:
+
+************************************
+``deliveryservice_request_comments``
+************************************
+
+``GET``
+=======
+Gets delivery service request comments.
+
+:Auth. Required: Yes
+:Roles Required: "read-only"
+:Response Type:  Array
+
+Request Structure
+-----------------
+
+.. table:: Request Query Parameters
+
+       
+--------------------------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
+       | Name                     | Required | Description                     
                                                                                
                                    |
+       
+==========================+==========+=====================================================================================================================================================+
+       | author                   | no       | Filter for :ref:`Delivery 
Service Request <ds_requests>` comments submitted by the user identified by 
this username                                 |
+       
+--------------------------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
+       | authorId                 | no       | Filter for :ref:`Delivery 
Service Request <ds_requests>` comments submitted by the user identified by 
this integral, unique identifier              |
+       
+--------------------------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
+       | deliveryServiceRequestId | no       | Filter for :ref:`Delivery 
Service Request <ds_requests>` comments submitted for the delivery service 
identified by this integral, unique identifier |
+       
+--------------------------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
+       | id                       | no       | Filter for the :ref:`Delivery 
Service Request <ds_requests>` comment identified by this integral, unique 
identifier                                 |
+       
+--------------------------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
+
+.. code-block:: http
+       :caption: Request Example
+
+       GET /api/2.0/deliveryservice_request_comments HTTP/1.1
+       User-Agent: python-requests/2.22.0
+       Accept-Encoding: gzip, deflate
+       Accept: */*
+       Connection: keep-alive
+       Cookie: mojolicious=...
+
+Response Structure
+------------------
+
+.. 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
+       Set-Cookie: mojolicious=...; Path=/; Expires=Mon, 24 Feb 2020 21:00:26 
GMT; Max-Age=3600; HttpOnly
+       Whole-Content-Sha512: 
RaJZS1XFJ4oIxVKyyDjTuoQY7gPOmm5EuIL4AgHpyQpuaaNviw0XhGC4V/AKf/Ws6zXLgIUc4OyvMsTxnrilww==
+       X-Server-Name: traffic_ops_golang/
+       Date: Mon, 24 Feb 2020 20:00:26 GMT
+       Content-Length: 207
+
+       {
+               "response": [
+                       {
+                               "authorId": 2,
+                               "author": "admin",
+                               "deliveryServiceRequestId": 2,
+                               "id": 3,
+                               "lastUpdated": "2020-02-24 19:59:46+00",
+                               "value": "Changing to a different origin for 
now.",
+                               "xmlId": "demo1"
+                       },
+                       {
+                               "authorId": 2,
+                               "author": "admin",
+                               "deliveryServiceRequestId": 2,
+                               "id": 4,
+                               "lastUpdated": "2020-02-24 19:59:55+00",
+                               "value": "Using HTTPS.",
+                               "xmlId": "demo1"
+                       }
+               ]
+       }
+
+``POST``
+========
+Allows user to create a :term:`Delivery Service Request` comment.
+
+:Auth. Required: Yes
+:Roles Required: "admin", "Federation", "operations", "Portal", or "Steering"
+:Response Type:  Object
+
+Request Structure
+-----------------
+
+.. code-block:: http
+       :caption: Request Example
+
+       POST /api/2.0/deliveryservice_request_comments HTTP/1.1
+       User-Agent: python-requests/2.22.0
+       Accept-Encoding: gzip, deflate
+       Accept: */*
+       Connection: keep-alive
+       Cookie: mojolicious=...
+       Content-Length: 111
+
+       {
+               "deliveryServiceRequestId": 2,
+               "value": "Does anyone have time to review my delivery service 
request?"
+       }
+
+Response Structure
+------------------
+
+.. 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
+       Set-Cookie: mojolicious=...; Path=/; Expires=Mon, 24 Feb 2020 21:02:20 
GMT; Max-Age=3600; HttpOnly
+       Whole-Content-Sha512: 
LiakFP6L7PrnFO5kLXftx7WQoKn3bGpIJT5N15PvNG2sHridRMV3k23eRJM66ET0LcRfMOrQgRiydE+XgA8h0A==
+       X-Server-Name: traffic_ops_golang/
+       Date: Mon, 24 Feb 2020 20:02:20 GMT
+       Content-Length: 223
+
+       {
+               "alerts": [
+                       {
+                               "text": "deliveryservice_request_comment was 
created.",
+                               "level": "success"
+                       }
+               ],
+               "response": {
+                       "authorId": 2,
+                       "author": null,
+                       "deliveryServiceRequestId": 2,
+                       "id": 6,
+                       "lastUpdated": "2020-02-24 20:02:20+00",
+                       "value": "Does anyone have time to review my delivery 
service request?",
+                       "xmlId": null
+               }
+       }
+
+``PUT``
+=======
+
+Updates a delivery service request comment.
+
+:Auth. Required: Yes
+:Roles Required: "admin", "Federation", "operations", "Portal", or "Steering"
+:Response Type:  Object
+
+
+Request Structure
+-----------------
+
+.. table:: Request Query Parameters
+
+       
+-----------+----------+-----------------------------------------------------------------------------------+
+       | Parameter | Required | Description                                    
                                   |
+       
+===========+==========+===================================================================================+
+       | id        | yes      | The integral, unique identifier of the 
delivery service comment that you wish to  |
+       |           |          | update.                                        
                                   |
+       
+-----------+----------+-----------------------------------------------------------------------------------+
+
+.. code-block:: http
+       :caption: Request Example
+
+       PUT /api/2.0/deliveryservice_request_comments?id=6 HTTP/1.1
+       User-Agent: python-requests/2.22.0
+       Accept-Encoding: gzip, deflate
+       Accept: */*
+       Connection: keep-alive
+       Cookie: mojolicious=...
+       Content-Length: 166
+
+       {
+               "deliveryServiceRequestId": 2,
+               "value": "Update: We no longer need this, feel free to 
reject.\n\nDoes anyone have time to review my delivery service request?"
+       }
+
+Response Structure
+------------------
+
 
 Review comment:
   response field definitions?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to