@ -88,13 +88,19 @@ func registerAdminRouter(router *mux.Router, enableConfigOps, enableIAMOps bool)
adminRouter . Methods ( http . MethodGet ) . Path ( adminVersion + "/get-config-kv" ) . HandlerFunc ( httpTraceHdrs ( adminAPI . GetConfigKVHandler ) ) . Queries ( "key" , "{key:.*}" )
adminRouter . Methods ( http . MethodPut ) . Path ( adminVersion + "/set-config-kv" ) . HandlerFunc ( httpTraceHdrs ( adminAPI . SetConfigKVHandler ) )
adminRouter . Methods ( http . MethodDelete ) . Path ( adminVersion + "/del-config-kv" ) . HandlerFunc ( httpTraceHdrs ( adminAPI . DelConfigKVHandler ) )
}
// Enable config help in all modes.
adminRouter . Methods ( http . MethodGet ) . Path ( adminVersion + "/help-config-kv" ) . HandlerFunc ( httpTraceAll ( adminAPI . HelpConfigKVHandler ) ) . Queries ( "subSys" , "{subSys:.*}" , "key" , "{key:.*}" )
// Config KV history operations.
if enableConfigOps {
adminRouter . Methods ( http . MethodGet ) . Path ( adminVersion + "/list-config-history-kv" ) . HandlerFunc ( httpTraceAll ( adminAPI . ListConfigHistoryKVHandler ) ) . Queries ( "count" , "{count:[0-9]+}" )
adminRouter . Methods ( http . MethodDelete ) . Path ( adminVersion + "/clear-config-history-kv" ) . HandlerFunc ( httpTraceHdrs ( adminAPI . ClearConfigHistoryKVHandler ) ) . Queries ( "restoreId" , "{restoreId:.*}" )
adminRouter . Methods ( http . MethodPut ) . Path ( adminVersion + "/restore-config-history-kv" ) . HandlerFunc ( httpTraceHdrs ( adminAPI . RestoreConfigHistoryKVHandler ) ) . Queries ( "restoreId" , "{restoreId:.*}" )
}
/// Config operations
/// Config import/export bulk operations
if enableConfigOps {
// Get config
adminRouter . Methods ( http . MethodGet ) . Path ( adminVersion + "/config" ) . HandlerFunc ( httpTraceHdrs ( adminAPI . GetConfigHandler ) )