class WarpEngine::AdminApi::Configuration
The Admin API settings of the host, set in the admin_api block of WarpEngine.configure (WarpEngine::Configuration::AdminApiDSL) and read through AdminApi.config.
Constants
- DEFAULT_MCP_EXCLUDE
-
The resources left out of the MCP tools unless the host says otherwise.
Attributes
The settings:
- enabled
-
serve the
AdminAPI at all (defaultfalse) token_owner_class-
the class name owning admin tokens; defaults to the engine’s application token owner class
- authenticator
-
:application_token, or a callable taking the request and returning aPrincipalornil - resources
-
:all, or the names of the resources to serve read_only-
refuse every write with 405 (default
false) page_size-
entries per page by default (50)
max_page_size-
the largest
perPageallowed (200) rate_limit-
{ to:, within: }requests per seconds, ornil openapi_requires_auth-
whether the OpenAPI document needs a token (default
true) docs_ui-
serve the Redoc page (default
false) - mcp
-
serve the MCP endpoint (default
false) mcp_exclude-
resource names left out of MCP
The settings:
- enabled
-
serve the
AdminAPI at all (defaultfalse) token_owner_class-
the class name owning admin tokens; defaults to the engine’s application token owner class
- authenticator
-
:application_token, or a callable taking the request and returning aPrincipalornil - resources
-
:all, or the names of the resources to serve read_only-
refuse every write with 405 (default
false) page_size-
entries per page by default (50)
max_page_size-
the largest
perPageallowed (200) rate_limit-
{ to:, within: }requests per seconds, ornil openapi_requires_auth-
whether the OpenAPI document needs a token (default
true) docs_ui-
serve the Redoc page (default
false) - mcp
-
serve the MCP endpoint (default
false) mcp_exclude-
resource names left out of MCP
The settings:
- enabled
-
serve the
AdminAPI at all (defaultfalse) token_owner_class-
the class name owning admin tokens; defaults to the engine’s application token owner class
- authenticator
-
:application_token, or a callable taking the request and returning aPrincipalornil - resources
-
:all, or the names of the resources to serve read_only-
refuse every write with 405 (default
false) page_size-
entries per page by default (50)
max_page_size-
the largest
perPageallowed (200) rate_limit-
{ to:, within: }requests per seconds, ornil openapi_requires_auth-
whether the OpenAPI document needs a token (default
true) docs_ui-
serve the Redoc page (default
false) - mcp
-
serve the MCP endpoint (default
false) mcp_exclude-
resource names left out of MCP
The settings:
- enabled
-
serve the
AdminAPI at all (defaultfalse) token_owner_class-
the class name owning admin tokens; defaults to the engine’s application token owner class
- authenticator
-
:application_token, or a callable taking the request and returning aPrincipalornil - resources
-
:all, or the names of the resources to serve read_only-
refuse every write with 405 (default
false) page_size-
entries per page by default (50)
max_page_size-
the largest
perPageallowed (200) rate_limit-
{ to:, within: }requests per seconds, ornil openapi_requires_auth-
whether the OpenAPI document needs a token (default
true) docs_ui-
serve the Redoc page (default
false) - mcp
-
serve the MCP endpoint (default
false) mcp_exclude-
resource names left out of MCP
The settings:
- enabled
-
serve the
AdminAPI at all (defaultfalse) token_owner_class-
the class name owning admin tokens; defaults to the engine’s application token owner class
- authenticator
-
:application_token, or a callable taking the request and returning aPrincipalornil - resources
-
:all, or the names of the resources to serve read_only-
refuse every write with 405 (default
false) page_size-
entries per page by default (50)
max_page_size-
the largest
perPageallowed (200) rate_limit-
{ to:, within: }requests per seconds, ornil openapi_requires_auth-
whether the OpenAPI document needs a token (default
true) docs_ui-
serve the Redoc page (default
false) - mcp
-
serve the MCP endpoint (default
false) mcp_exclude-
resource names left out of MCP
The settings:
- enabled
-
serve the
AdminAPI at all (defaultfalse) token_owner_class-
the class name owning admin tokens; defaults to the engine’s application token owner class
- authenticator
-
:application_token, or a callable taking the request and returning aPrincipalornil - resources
-
:all, or the names of the resources to serve read_only-
refuse every write with 405 (default
false) page_size-
entries per page by default (50)
max_page_size-
the largest
perPageallowed (200) rate_limit-
{ to:, within: }requests per seconds, ornil openapi_requires_auth-
whether the OpenAPI document needs a token (default
true) docs_ui-
serve the Redoc page (default
false) - mcp
-
serve the MCP endpoint (default
false) mcp_exclude-
resource names left out of MCP
The settings:
- enabled
-
serve the
AdminAPI at all (defaultfalse) token_owner_class-
the class name owning admin tokens; defaults to the engine’s application token owner class
- authenticator
-
:application_token, or a callable taking the request and returning aPrincipalornil - resources
-
:all, or the names of the resources to serve read_only-
refuse every write with 405 (default
false) page_size-
entries per page by default (50)
max_page_size-
the largest
perPageallowed (200) rate_limit-
{ to:, within: }requests per seconds, ornil openapi_requires_auth-
whether the OpenAPI document needs a token (default
true) docs_ui-
serve the Redoc page (default
false) - mcp
-
serve the MCP endpoint (default
false) mcp_exclude-
resource names left out of MCP
The settings:
- enabled
-
serve the
AdminAPI at all (defaultfalse) token_owner_class-
the class name owning admin tokens; defaults to the engine’s application token owner class
- authenticator
-
:application_token, or a callable taking the request and returning aPrincipalornil - resources
-
:all, or the names of the resources to serve read_only-
refuse every write with 405 (default
false) page_size-
entries per page by default (50)
max_page_size-
the largest
perPageallowed (200) rate_limit-
{ to:, within: }requests per seconds, ornil openapi_requires_auth-
whether the OpenAPI document needs a token (default
true) docs_ui-
serve the Redoc page (default
false) - mcp
-
serve the MCP endpoint (default
false) mcp_exclude-
resource names left out of MCP
The settings:
- enabled
-
serve the
AdminAPI at all (defaultfalse) token_owner_class-
the class name owning admin tokens; defaults to the engine’s application token owner class
- authenticator
-
:application_token, or a callable taking the request and returning aPrincipalornil - resources
-
:all, or the names of the resources to serve read_only-
refuse every write with 405 (default
false) page_size-
entries per page by default (50)
max_page_size-
the largest
perPageallowed (200) rate_limit-
{ to:, within: }requests per seconds, ornil openapi_requires_auth-
whether the OpenAPI document needs a token (default
true) docs_ui-
serve the Redoc page (default
false) - mcp
-
serve the MCP endpoint (default
false) mcp_exclude-
resource names left out of MCP
The settings:
- enabled
-
serve the
AdminAPI at all (defaultfalse) token_owner_class-
the class name owning admin tokens; defaults to the engine’s application token owner class
- authenticator
-
:application_token, or a callable taking the request and returning aPrincipalornil - resources
-
:all, or the names of the resources to serve read_only-
refuse every write with 405 (default
false) page_size-
entries per page by default (50)
max_page_size-
the largest
perPageallowed (200) rate_limit-
{ to:, within: }requests per seconds, ornil openapi_requires_auth-
whether the OpenAPI document needs a token (default
true) docs_ui-
serve the Redoc page (default
false) - mcp
-
serve the MCP endpoint (default
false) mcp_exclude-
resource names left out of MCP
The settings:
- enabled
-
serve the
AdminAPI at all (defaultfalse) token_owner_class-
the class name owning admin tokens; defaults to the engine’s application token owner class
- authenticator
-
:application_token, or a callable taking the request and returning aPrincipalornil - resources
-
:all, or the names of the resources to serve read_only-
refuse every write with 405 (default
false) page_size-
entries per page by default (50)
max_page_size-
the largest
perPageallowed (200) rate_limit-
{ to:, within: }requests per seconds, ornil openapi_requires_auth-
whether the OpenAPI document needs a token (default
true) docs_ui-
serve the Redoc page (default
false) - mcp
-
serve the MCP endpoint (default
false) mcp_exclude-
resource names left out of MCP
The settings:
- enabled
-
serve the
AdminAPI at all (defaultfalse) token_owner_class-
the class name owning admin tokens; defaults to the engine’s application token owner class
- authenticator
-
:application_token, or a callable taking the request and returning aPrincipalornil - resources
-
:all, or the names of the resources to serve read_only-
refuse every write with 405 (default
false) page_size-
entries per page by default (50)
max_page_size-
the largest
perPageallowed (200) rate_limit-
{ to:, within: }requests per seconds, ornil openapi_requires_auth-
whether the OpenAPI document needs a token (default
true) docs_ui-
serve the Redoc page (default
false) - mcp
-
serve the MCP endpoint (default
false) mcp_exclude-
resource names left out of MCP
Public Class Methods
Source
# File lib/warp_engine/admin_api/configuration.rb, line 40 def initialize @enabled = false @token_owner_class = nil @authenticator = :application_token @resources = :all @read_only = false @page_size = 50 @max_page_size = 200 @rate_limit = nil @openapi_requires_auth = true @docs_ui = false @mcp = false @mcp_exclude = DEFAULT_MCP_EXCLUDE end
Sets the defaults listed above.
Public Instance Methods
Source
# File lib/warp_engine/admin_api/configuration.rb, line 62 def docs_ui? = docs_ui == true
Whether the Redoc documentation page is served.
Source
# File lib/warp_engine/admin_api/configuration.rb, line 56 def enabled? = enabled == true
Whether the Admin API is on.
Source
# File lib/warp_engine/admin_api/configuration.rb, line 60 def mcp? = enabled? && mcp == true
Whether the MCP endpoint is served; needs enabled? too.
Source
# File lib/warp_engine/admin_api/configuration.rb, line 79 def mcp_excluded?(name) Array(mcp_exclude).map(&:to_sym).include?(name.to_sym) end
Whether the resource named name is left out of the MCP tools.
Source
# File lib/warp_engine/admin_api/configuration.rb, line 64 def openapi_requires_auth? = openapi_requires_auth != false
Whether the OpenAPI document needs a token; only an explicit false opens it.
Source
# File lib/warp_engine/admin_api/configuration.rb, line 67 def owner_class_name (token_owner_class.presence || WarpEngine.config.application_token_owner_class).presence&.to_s end
The class name of admin token owners, or nil when neither it nor the engine default is set.
Source
# File lib/warp_engine/admin_api/configuration.rb, line 58 def read_only? = read_only == true
Whether writes are refused.
Source
# File lib/warp_engine/admin_api/configuration.rb, line 72 def resource_enabled?(name) return true if resources.nil? || resources == :all Array(resources).map(&:to_sym).include?(name.to_sym) end
Whether the resource named name is served under resources.