Merge branch 'master' into origin-8019-crunchrun-log-throttle
[arvados.git] / services / api / app / controllers / arvados / v1 / schema_controller.rb
index 5f43ba8af8e2c9146af1fc267bd6888748b05510..e1f4ca5770403e1eb9164ed41d59e807ed1cc551 100644 (file)
@@ -37,6 +37,15 @@ class Arvados::V1::SchemaController < ApplicationController
         defaultTrashLifetime: Rails.application.config.default_trash_lifetime,
         blobSignatureTtl: Rails.application.config.blob_signature_ttl,
         maxRequestSize: Rails.application.config.max_request_size,
+        dockerImageFormats: Rails.application.config.docker_image_formats,
+        crunchLogBytesPerEvent: Rails.application.config.crunch_log_bytes_per_event,
+        crunchLogSecondsBetweenEvents: Rails.application.config.crunch_log_seconds_between_events,
+        crunchLogThrottlePeriod: Rails.application.config.crunch_log_throttle_period,
+        crunchLogThrottleBytes: Rails.application.config.crunch_log_throttle_bytes,
+        crunchLogThrottleLines: Rails.application.config.crunch_log_throttle_lines,
+        crunchLimitLogBytesPerJob: Rails.application.config.crunch_limit_log_bytes_per_job,
+        crunchLogPartialLineThrottlePeriod: Rails.application.config.crunch_log_partial_line_throttle_period,
+        websocketUrl: Rails.application.config.websocket_address,
         parameters: {
           alt: {
             type: "string",
@@ -82,12 +91,6 @@ class Arvados::V1::SchemaController < ApplicationController
         resources: {}
       }
 
-      if Rails.application.config.websocket_address
-        discovery[:websocketUrl] = Rails.application.config.websocket_address
-      elsif ENV['ARVADOS_WEBSOCKETS']
-        discovery[:websocketUrl] = root_url.sub(/^http/, 'ws') + "websocket"
-      end
-
       ActiveRecord::Base.descendants.reject(&:abstract_class?).each do |k|
         begin
           ctl_class = "Arvados::V1::#{k.to_s.pluralize}Controller".constantize
@@ -246,12 +249,18 @@ class Arvados::V1::SchemaController < ApplicationController
                 },
                 select: {
                   type: "array",
-                  description: "Select which fields to return",
+                  description: "Select which fields to return.",
                   location: "query"
                 },
                 distinct: {
                   type: "boolean",
-                  description: "Return each distinct object",
+                  description: "Return each distinct object.",
+                  location: "query"
+                },
+                count: {
+                  type: "string",
+                  description: "Type of count to return in items_available ('none' or 'exact').",
+                  default: "exact",
                   location: "query"
                 }
               },