ocket8888 commented on a change in pull request #4444: Document undocumented
Traffic Ops routes
URL: https://github.com/apache/trafficcontrol/pull/4444#discussion_r384068816
##########
File path: docs/source/api/v2/types.rst
##########
@@ -82,3 +82,70 @@ Response Structure
"useInTable": "cachegroup"
}
]}
+
+========
+``POST``
+========
+Creates a new :term:`Type`.
+
+:Auth. Required: Yes
+:Roles Required: "admin" or "operations"
+:Response Type: Object
+
+Request Structure
+-----------------
+:name: The name of this type
+:description: A short description of this type
+:useInTable: The name of the Traffic Ops database table that contains objects
which are grouped, identified, or described by this type
+
+.. code-block:: http
+ :caption: Request Example
+
+ POST /api/2.0/types HTTP/1.1
+ User-Agent: python-requests/2.22.0
+ Accept-Encoding: gzip, deflate
+ Accept: */*
+ Connection: keep-alive
+ Cookie: mojolicious=...
+ Content-Length: 77
+
+ {
+ "name": "GRAFANA",
+ "description": "Grafana Service",
+ "useInTable": "server"
+ }
+
+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