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 2020/04/06 18:05:26 UTC

[GitHub] [trafficcontrol] rob05c commented on a change in pull request #4599: Add Traffic Ops /server/update

rob05c commented on a change in pull request #4599: Add Traffic Ops /server/update
URL: https://github.com/apache/trafficcontrol/pull/4599#discussion_r404287261
 
 

 ##########
 File path: docs/source/api/v2/servers_hostname_update.rst
 ##########
 @@ -0,0 +1,81 @@
+..
+..
+.. 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-servers-id-queue_update:
+
+*******************************
+``servers/{{HostName-Or-ID}}/update``
+*******************************
+
+``POST``
+========
+:term:`Queue` or dequeue updates and revalidation updates for a specific server.
+
+:Auth. Required: Yes
+:Roles Required: "admin" or "operations"
+:Response Type:  Object
+
+Request Structure
+-----------------
+.. table:: Request Path Parameters
+
+	+------------------+---------------------------------------------------------------------------------------------------------+
+	| Name             | Description                                                                                             |
+	+==================+=========================================================================================================+
+	|  HostName-OR-ID  | The hostName or integral, unique identifier of the server on which updates are being queued or dequeued |
+	+------------------+---------------------------------------------------------------------------------------------------------+
+
+.. table:: Request Query Parameters
+
+	+---------------+----------+--------------------------------------------------------------------------------------+
+	| Name          | Required | Description                                                                          |
+	+===============+==========+======================================================================================+
+	| updated       | no       | The value to set for the queue update flag on this server. May be 'true' or 'false'. |
+	+---------------+----------+--------------------------------------------------------------------------------------+
+	| reval_updated | no       | The value to set for the queue update flag on this server. May be 'true' or 'false'. |
 
 Review comment:
   If you're ok with it, I'd prefer to document it as exactly `true` or `false`, even though the server supports more. I'm a big fan of the Robustness Principle ("Be liberal in what you accept, conservative in what you send"), I think it makes interfaces more robust and resilient, and easier to integrate with.
   
   Documenting exactly those case-sensitive values will encourage clients to be "conservative in what they send," even though our server will try to understand and accept more for robustness.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services