curl --request GET \
--url https://api.example.com/api/admin/settings{
"home": "~/.prefect",
"profiles_path": "<string>",
"debug_mode": false,
"api": {
"url": "<string>",
"auth_string": "<string>",
"key": "<string>",
"tls_insecure_skip_verify": false,
"ssl_cert_file": "<string>",
"enable_http2": false,
"request_timeout": 60
},
"cli": {
"colors": true,
"prompt": true,
"wrap_lines": true
},
"client": {
"max_retries": 5,
"retry_jitter_factor": 0.2,
"retry_extra_codes": "404,429,503",
"csrf_support_enabled": true,
"custom_headers": {},
"metrics": {
"enabled": false,
"port": 4201
}
},
"cloud": {
"api_url": "https://api.prefect.cloud/api",
"enable_orchestration_telemetry": true,
"max_log_size": 25000,
"ui_url": "<string>"
},
"deployments": {
"default_work_pool_name": "<string>",
"default_docker_build_namespace": "my-dockerhub-registry"
},
"experiments": {
"warn": true,
"plugins": {
"enabled": false,
"allow": [
"<string>"
],
"deny": [
"<string>"
],
"setup_timeout_seconds": 20,
"strict": false,
"safe_mode": false
}
},
"flows": {
"default_retries": 0,
"default_retry_delay_seconds": 0
},
"internal": {
"logging_level": "ERROR"
},
"logging": {
"level": "INFO",
"config_path": "<string>",
"extra_loggers": "<string>",
"log_prints": false,
"colors": true,
"markup": false,
"to_api": {
"enabled": true,
"batch_interval": 2,
"batch_size": 4000000,
"max_log_size": 1000000,
"when_missing_flow": "warn"
}
},
"results": {
"default_serializer": "pickle",
"persist_by_default": false,
"default_storage_block": "<string>",
"local_storage_path": "<string>"
},
"runner": {
"process_limit": 5,
"poll_frequency": 10,
"heartbeat_frequency": 31,
"server": {
"enable": false,
"host": "localhost",
"port": 8080,
"log_level": "ERROR",
"missed_polls_tolerance": 2
}
},
"server": {
"logging_level": "WARNING",
"analytics_enabled": true,
"metrics_enabled": false,
"log_retryable_errors": false,
"register_blocks_on_start": true,
"memoize_block_auto_registration": true,
"memo_store_path": "<string>",
"deployment_schedule_max_scheduled_runs": 50,
"api": {
"auth_string": "<string>",
"host": "127.0.0.1",
"port": 4200,
"base_path": "/v2/api",
"default_limit": 200,
"keepalive_timeout": 5,
"csrf_protection_enabled": false,
"csrf_token_expiration": "PT1H",
"cors_allowed_origins": "*",
"cors_allowed_methods": "*",
"cors_allowed_headers": "*"
},
"concurrency": {
"lease_storage": "prefect.server.concurrency.lease_storage.memory",
"initial_deployment_lease_duration": 300,
"maximum_concurrency_slot_wait_seconds": 30
},
"database": {
"sqlalchemy": {
"connect_args": {
"application_name": "<string>",
"search_path": "<string>",
"statement_cache_size": 123,
"prepared_statement_cache_size": 123,
"tls": {
"enabled": false,
"ca_file": "<string>",
"cert_file": "<string>",
"key_file": "<string>",
"check_hostname": true
}
},
"pool_size": 5,
"pool_recycle": 3600,
"pool_timeout": 30,
"max_overflow": 10
},
"connection_url": "<string>",
"driver": "postgresql+asyncpg",
"host": "<string>",
"port": 123,
"user": "<string>",
"name": "<string>",
"password": "<string>",
"echo": false,
"migrate_on_start": true,
"timeout": 10,
"connection_timeout": 5
},
"deployments": {
"concurrency_slot_wait_seconds": 30
},
"docket": {
"name": "prefect-server",
"url": "memory://"
},
"ephemeral": {
"enabled": false,
"startup_timeout_seconds": 20
},
"events": {
"stream_out_enabled": true,
"related_resource_cache_ttl": "PT5M",
"maximum_labels_per_resource": 500,
"maximum_related_resources": 100,
"maximum_size_bytes": 1500000,
"expired_bucket_buffer": "PT1M",
"proactive_granularity": "PT5S",
"retention_period": "P7D",
"maximum_websocket_backfill": "PT15M",
"websocket_backfill_page_size": 250,
"messaging_broker": "prefect.server.utilities.messaging.memory",
"messaging_cache": "prefect.server.utilities.messaging.memory",
"causal_ordering": "prefect.server.events.ordering.memory",
"maximum_event_name_length": 1024
},
"flow_run_graph": {
"max_nodes": 10000,
"max_artifacts": 10000
},
"logs": {
"stream_out_enabled": false,
"stream_publishing_enabled": false
},
"services": {
"cancellation_cleanup": {
"enabled": true,
"loop_seconds": 20
},
"event_persister": {
"enabled": true,
"batch_size": 20,
"read_batch_size": 1,
"flush_interval": 5,
"batch_size_delete": 10000,
"queue_max_size": 50000,
"max_flush_retries": 5
},
"event_logger": {
"enabled": false
},
"foreman": {
"enabled": true,
"loop_seconds": 15,
"inactivity_heartbeat_multiple": 3,
"fallback_heartbeat_interval_seconds": 30,
"deployment_last_polled_timeout_seconds": 60,
"work_queue_last_polled_timeout_seconds": 60
},
"late_runs": {
"enabled": true,
"loop_seconds": 5,
"after_seconds": "PT15S"
},
"scheduler": {
"enabled": true,
"loop_seconds": 60,
"deployment_batch_size": 100,
"max_runs": 100,
"min_runs": 3,
"max_scheduled_time": "P100D",
"min_scheduled_time": "PT1H",
"insert_batch_size": 500,
"recent_deployments_loop_seconds": 5
},
"pause_expirations": {
"enabled": true,
"loop_seconds": 5
},
"repossessor": {
"enabled": true,
"loop_seconds": 15
},
"task_run_recorder": {
"enabled": true,
"read_batch_size": 1
},
"triggers": {
"enabled": true,
"read_batch_size": 1,
"pg_notify_reconnect_interval_seconds": 10,
"pg_notify_heartbeat_interval_seconds": 5
}
},
"tasks": {
"tag_concurrency_slot_wait_seconds": 30,
"max_cache_key_length": 2000,
"scheduling": {
"max_scheduled_queue_size": 1000,
"max_retry_queue_size": 100,
"pending_task_timeout": "PT0S"
}
},
"ui": {
"enabled": true,
"api_url": "<string>",
"serve_base": "/",
"static_directory": "<string>",
"show_promotional_content": true
}
},
"tasks": {
"refresh_cache": false,
"default_no_cache": false,
"disable_caching": false,
"default_retries": 0,
"default_retry_delay_seconds": 0,
"default_persist_result": true,
"runner": {
"thread_pool_max_workers": 1,
"process_pool_max_workers": 1
},
"scheduling": {
"default_storage_block": "<string>",
"delete_failed_submissions": true
}
},
"testing": {
"test_mode": false,
"unit_test_mode": false,
"unit_test_loop_debug": true,
"test_setting": "FOO"
},
"worker": {
"heartbeat_seconds": 30,
"query_seconds": 10,
"prefetch_seconds": 10,
"webserver": {
"host": "0.0.0.0",
"port": 8080
}
},
"ui_url": "<string>",
"silence_api_url_misconfiguration": false
}Get the current Prefect REST API settings.
Secret setting values will be obfuscated.
curl --request GET \
--url https://api.example.com/api/admin/settings{
"home": "~/.prefect",
"profiles_path": "<string>",
"debug_mode": false,
"api": {
"url": "<string>",
"auth_string": "<string>",
"key": "<string>",
"tls_insecure_skip_verify": false,
"ssl_cert_file": "<string>",
"enable_http2": false,
"request_timeout": 60
},
"cli": {
"colors": true,
"prompt": true,
"wrap_lines": true
},
"client": {
"max_retries": 5,
"retry_jitter_factor": 0.2,
"retry_extra_codes": "404,429,503",
"csrf_support_enabled": true,
"custom_headers": {},
"metrics": {
"enabled": false,
"port": 4201
}
},
"cloud": {
"api_url": "https://api.prefect.cloud/api",
"enable_orchestration_telemetry": true,
"max_log_size": 25000,
"ui_url": "<string>"
},
"deployments": {
"default_work_pool_name": "<string>",
"default_docker_build_namespace": "my-dockerhub-registry"
},
"experiments": {
"warn": true,
"plugins": {
"enabled": false,
"allow": [
"<string>"
],
"deny": [
"<string>"
],
"setup_timeout_seconds": 20,
"strict": false,
"safe_mode": false
}
},
"flows": {
"default_retries": 0,
"default_retry_delay_seconds": 0
},
"internal": {
"logging_level": "ERROR"
},
"logging": {
"level": "INFO",
"config_path": "<string>",
"extra_loggers": "<string>",
"log_prints": false,
"colors": true,
"markup": false,
"to_api": {
"enabled": true,
"batch_interval": 2,
"batch_size": 4000000,
"max_log_size": 1000000,
"when_missing_flow": "warn"
}
},
"results": {
"default_serializer": "pickle",
"persist_by_default": false,
"default_storage_block": "<string>",
"local_storage_path": "<string>"
},
"runner": {
"process_limit": 5,
"poll_frequency": 10,
"heartbeat_frequency": 31,
"server": {
"enable": false,
"host": "localhost",
"port": 8080,
"log_level": "ERROR",
"missed_polls_tolerance": 2
}
},
"server": {
"logging_level": "WARNING",
"analytics_enabled": true,
"metrics_enabled": false,
"log_retryable_errors": false,
"register_blocks_on_start": true,
"memoize_block_auto_registration": true,
"memo_store_path": "<string>",
"deployment_schedule_max_scheduled_runs": 50,
"api": {
"auth_string": "<string>",
"host": "127.0.0.1",
"port": 4200,
"base_path": "/v2/api",
"default_limit": 200,
"keepalive_timeout": 5,
"csrf_protection_enabled": false,
"csrf_token_expiration": "PT1H",
"cors_allowed_origins": "*",
"cors_allowed_methods": "*",
"cors_allowed_headers": "*"
},
"concurrency": {
"lease_storage": "prefect.server.concurrency.lease_storage.memory",
"initial_deployment_lease_duration": 300,
"maximum_concurrency_slot_wait_seconds": 30
},
"database": {
"sqlalchemy": {
"connect_args": {
"application_name": "<string>",
"search_path": "<string>",
"statement_cache_size": 123,
"prepared_statement_cache_size": 123,
"tls": {
"enabled": false,
"ca_file": "<string>",
"cert_file": "<string>",
"key_file": "<string>",
"check_hostname": true
}
},
"pool_size": 5,
"pool_recycle": 3600,
"pool_timeout": 30,
"max_overflow": 10
},
"connection_url": "<string>",
"driver": "postgresql+asyncpg",
"host": "<string>",
"port": 123,
"user": "<string>",
"name": "<string>",
"password": "<string>",
"echo": false,
"migrate_on_start": true,
"timeout": 10,
"connection_timeout": 5
},
"deployments": {
"concurrency_slot_wait_seconds": 30
},
"docket": {
"name": "prefect-server",
"url": "memory://"
},
"ephemeral": {
"enabled": false,
"startup_timeout_seconds": 20
},
"events": {
"stream_out_enabled": true,
"related_resource_cache_ttl": "PT5M",
"maximum_labels_per_resource": 500,
"maximum_related_resources": 100,
"maximum_size_bytes": 1500000,
"expired_bucket_buffer": "PT1M",
"proactive_granularity": "PT5S",
"retention_period": "P7D",
"maximum_websocket_backfill": "PT15M",
"websocket_backfill_page_size": 250,
"messaging_broker": "prefect.server.utilities.messaging.memory",
"messaging_cache": "prefect.server.utilities.messaging.memory",
"causal_ordering": "prefect.server.events.ordering.memory",
"maximum_event_name_length": 1024
},
"flow_run_graph": {
"max_nodes": 10000,
"max_artifacts": 10000
},
"logs": {
"stream_out_enabled": false,
"stream_publishing_enabled": false
},
"services": {
"cancellation_cleanup": {
"enabled": true,
"loop_seconds": 20
},
"event_persister": {
"enabled": true,
"batch_size": 20,
"read_batch_size": 1,
"flush_interval": 5,
"batch_size_delete": 10000,
"queue_max_size": 50000,
"max_flush_retries": 5
},
"event_logger": {
"enabled": false
},
"foreman": {
"enabled": true,
"loop_seconds": 15,
"inactivity_heartbeat_multiple": 3,
"fallback_heartbeat_interval_seconds": 30,
"deployment_last_polled_timeout_seconds": 60,
"work_queue_last_polled_timeout_seconds": 60
},
"late_runs": {
"enabled": true,
"loop_seconds": 5,
"after_seconds": "PT15S"
},
"scheduler": {
"enabled": true,
"loop_seconds": 60,
"deployment_batch_size": 100,
"max_runs": 100,
"min_runs": 3,
"max_scheduled_time": "P100D",
"min_scheduled_time": "PT1H",
"insert_batch_size": 500,
"recent_deployments_loop_seconds": 5
},
"pause_expirations": {
"enabled": true,
"loop_seconds": 5
},
"repossessor": {
"enabled": true,
"loop_seconds": 15
},
"task_run_recorder": {
"enabled": true,
"read_batch_size": 1
},
"triggers": {
"enabled": true,
"read_batch_size": 1,
"pg_notify_reconnect_interval_seconds": 10,
"pg_notify_heartbeat_interval_seconds": 5
}
},
"tasks": {
"tag_concurrency_slot_wait_seconds": 30,
"max_cache_key_length": 2000,
"scheduling": {
"max_scheduled_queue_size": 1000,
"max_retry_queue_size": 100,
"pending_task_timeout": "PT0S"
}
},
"ui": {
"enabled": true,
"api_url": "<string>",
"serve_base": "/",
"static_directory": "<string>",
"show_promotional_content": true
}
},
"tasks": {
"refresh_cache": false,
"default_no_cache": false,
"disable_caching": false,
"default_retries": 0,
"default_retry_delay_seconds": 0,
"default_persist_result": true,
"runner": {
"thread_pool_max_workers": 1,
"process_pool_max_workers": 1
},
"scheduling": {
"default_storage_block": "<string>",
"delete_failed_submissions": true
}
},
"testing": {
"test_mode": false,
"unit_test_mode": false,
"unit_test_loop_debug": true,
"test_setting": "FOO"
},
"worker": {
"heartbeat_seconds": 30,
"query_seconds": 10,
"prefetch_seconds": 10,
"webserver": {
"host": "0.0.0.0",
"port": 8080
}
},
"ui_url": "<string>",
"silence_api_url_misconfiguration": false
}Successful Response
Settings for Prefect using Pydantic settings.
See https://docs.pydantic.dev/latest/concepts/pydantic_settings
The path to the Prefect home directory. Defaults to ~/.prefect
The path to a profiles configuration file. Supports $PREFECT_HOME templating. Defaults to $PREFECT_HOME/profiles.toml.
If True, enables debug mode which may provide additional logging and debugging features.
Settings for interacting with the Prefect API
Show child attributes
The URL of the Prefect API. If not set, the client will attempt to infer it.
The auth string used for basic authentication with a self-hosted Prefect API. Should be kept secret.
The API key used for authentication with the Prefect API. Should be kept secret.
If True, disables SSL checking to allow insecure requests. Setting to False is recommended only during development. For example, when using self-signed certificates.
This configuration settings option specifies the path to an SSL certificate file.
If true, enable support for HTTP/2 for communicating with an API. If the API does not support HTTP/2, this will have no effect and connections will be made via HTTP/1.1.
The default timeout for requests to the API
Settings for controlling CLI behavior
Show child attributes
If True, use colors in CLI output. If False, output will not include colors codes.
If True, use interactive prompts in CLI commands. If False, no interactive prompts will be used. If None, the value will be dynamically determined based on the presence of an interactive-enabled terminal.
If True, wrap text by inserting new lines in long lines in CLI output. If False, output will not be wrapped.
Settings for controlling API client behavior
Show child attributes
The maximum number of retries to perform on failed HTTP requests.
Defaults to 5. Set to 0 to disable retries.
See `PREFECT_CLIENT_RETRY_EXTRA_CODES` for details on which HTTP status codes are
retried.x >= 0A value greater than or equal to zero to control the amount of jitter added to retried
client requests. Higher values introduce larger amounts of jitter.
Set to 0 to disable jitter. See `clamped_poisson_interval` for details on the how jitter
can affect retry lengths.x >= 0A list of extra HTTP status codes to retry on. Defaults to an empty list.
429, 502 and 503 are always retried. Please note that not all routes are idempotent and retrying
may result in unexpected behavior."404,429,503"
Determines if CSRF token handling is active in the Prefect client for API
requests.
When enabled (`True`), the client automatically manages CSRF tokens by
retrieving, storing, and including them in applicable state-changing requestsCustom HTTP headers to include with every API request to the Prefect server.
Headers are specified as key-value pairs. Note that headers like 'User-Agent'
and CSRF-related headers are managed by Prefect and cannot be overridden.Show child attributes
Settings for interacting with Prefect Cloud
Show child attributes
API URL for Prefect Cloud. Used for authentication with Prefect Cloud.
Whether or not to enable orchestration telemetry.
Maximum size in characters for a single log when sending logs to Prefect Cloud.
The URL of the Prefect Cloud UI. If not set, the client will attempt to infer it.
Settings for configuring deployments defaults
Settings for controlling experimental features
Show child attributes
If True, warn on usage of experimental features.
Settings for the experimental plugin system
Show child attributes
Enable the experimental plugin system.
Comma-separated list of plugin names to allow. If set, only these plugins will be loaded.
Comma-separated list of plugin names to deny. These plugins will not be loaded.
Maximum time in seconds for all plugins to complete their setup hooks.
If True, exit if a required plugin fails during setup.
If True, load plugins but do not execute their hooks. Useful for testing.
Settings for controlling logging behavior
Show child attributes
The default logging level for Prefect loggers.
DEBUG, INFO, WARNING, ERROR, CRITICAL A path to a logging configuration file. Defaults to $PREFECT_HOME/logging.yml
Additional loggers to attach to Prefect logging at runtime.
If True, print statements in flows and tasks will be redirected to the Prefect logger for the given run.
If True, use colors in CLI output. If False, output will not include colors codes.
Whether to interpret strings wrapped in square brackets as a style.
This allows styles to be conveniently added to log messages, e.g.
`[red]This is a red message.[/red]`. However, the downside is, if enabled,
strings that contain square brackets may be inaccurately interpreted and
lead to incomplete output, e.g.
`[red]This is a red message.[/red]` may be interpreted as
`[red]This is a red message.[/red]`.Settings for controlling logging to the API
Show child attributes
If True, logs will be sent to the API.
The number of seconds between batched writes of logs to the API.
The number of logs to batch before sending to the API.
The maximum size in characters for a single log. When connected to Prefect Cloud, this value is capped at PREFECT_CLOUD_MAX_LOG_SIZE (default 25,000).
Controls the behavior when loggers attempt to send logs to the API handler from outside of a flow.
All logs sent to the API must be associated with a flow run. The API log handler can
only be used outside of a flow by manually providing a flow run identifier. Logs
that are not associated with a flow run will not be sent to the API. This setting can
be used to determine if a warning or error is displayed when the identifier is missing.
The following options are available:
- "warn": Log a warning message.
- "error": Raise an error.
- "ignore": Do not log a warning message or raise an error.warn, error, ignore Settings for controlling result storage behavior
Show child attributes
The default serializer to use when not otherwise specified.
The default setting for persisting results when not otherwise specified.
The block-type/block-document slug of a block to use as the default result storage.
The default location for locally persisted results. Defaults to $PREFECT_HOME/storage.
Settings for controlling runner behavior
Show child attributes
Maximum number of processes a runner will execute in parallel.
Number of seconds a runner should wait between queries for scheduled work.
Number of seconds a runner should wait between heartbeats for flow runs.
x >= 30Settings for controlling runner server behavior
Show child attributes
Whether or not to enable the runner's webserver.
The host address the runner's webserver should bind to.
The port the runner's webserver should bind to.
The log level of the runner's webserver.
DEBUG, INFO, WARNING, ERROR, CRITICAL Number of missed polls before a runner is considered unhealthy by its webserver.
Settings for controlling server behavior
Show child attributes
The default logging level for the Prefect API server.
DEBUG, INFO, WARNING, ERROR, CRITICAL When enabled, Prefect sends anonymous data (e.g. count of flow runs, package version)
on server startup to help us improve our product.Whether or not to enable Prometheus metrics in the API.
If True, log retryable errors in the API and it's services.
If set, any block types that have been imported will be registered with the backend on application startup. If not set, block types must be manually registered.
Controls whether or not block auto-registration on start
Path to the memo store file. Defaults to $PREFECT_HOME/memo_store.toml
The maximum number of scheduled runs to create for a deployment.
Settings for controlling API server behavior
Show child attributes
A string to use for basic authentication with the API in the form 'user:password'.
The API's host address (defaults to 127.0.0.1).
The API's port address (defaults to 4200).
The base URL path to serve the API under.
"/v2/api"
The default limit applied to queries that can return multiple objects, such as POST /flow_runs/filter.
The API's keep alive timeout (defaults to `5`).
Refer to https://www.uvicorn.org/settings/#timeouts for details.
When the API is hosted behind a load balancer, you may want to set this to a value
greater than the load balancer's idle timeout.
Note this setting only applies when calling `prefect server start`; if hosting the
API with another tool you will need to configure this there instead.Controls the activation of CSRF protection for the Prefect server API.
When enabled (`True`), the server enforces CSRF validation checks on incoming
state-changing requests (POST, PUT, PATCH, DELETE), requiring a valid CSRF
token to be included in the request headers or body. This adds a layer of
security by preventing unauthorized or malicious sites from making requests on
behalf of authenticated users.
It is recommended to enable this setting in production environments where the
API is exposed to web clients to safeguard against CSRF attacks.
Note: Enabling this setting requires corresponding support in the client for
CSRF token management. See PREFECT_CLIENT_CSRF_SUPPORT_ENABLED for more.Specifies the duration for which a CSRF token remains valid after being issued
by the server.
The default expiration time is set to 1 hour, which offers a reasonable
compromise. Adjust this setting based on your specific security requirements
and usage patterns.A comma-separated list of origins that are authorized to make cross-origin requests to the API.
By default, this is set to `*`, which allows requests from all origins.A comma-separated list of methods that are authorized to make cross-origin requests to the API.
By default, this is set to `*`, which allows requests from all methods.A comma-separated list of headers that are authorized to make cross-origin requests to the API.
By default, this is set to `*`, which allows requests from all headers.Settings for controlling server-side concurrency limit handling
Show child attributes
The module to use for storing concurrency limit leases.
Initial duration for deployment concurrency lease in seconds.
30 <= x <= 3600The maximum number of seconds to wait before retrying when a concurrency slot cannot be acquired.
x >= 0Settings for controlling server database behavior
Show child attributes
Settings for controlling SQLAlchemy behavior
Show child attributes
Settings for controlling SQLAlchemy connection behavior
Show child attributes
Controls the application_name field for connections opened from the connection pool when using a PostgreSQL database with the Prefect backend.
PostgreSQL schema name to set in search_path when using a PostgreSQL database with the Prefect backend. Note: The public schema should be included in the search path (e.g. 'myschema, public') to ensure that pg_trgm and other extensions remain available.
Controls statement cache size for PostgreSQL connections. Setting this to 0 is required when using PgBouncer in transaction mode. Defaults to None.
Controls the size of the statement cache for PostgreSQL connections. When set to 0, statement caching is disabled. Defaults to None to use SQLAlchemy's default behavior.
Settings for controlling SQLAlchemy mTLS behavior
Show child attributes
Controls whether connected to mTLS enabled PostgreSQL when using a PostgreSQL database with the Prefect backend.
This configuration settings option specifies the path to PostgreSQL client certificate authority file.
This configuration settings option specifies the path to PostgreSQL client certificate file.
This configuration settings option specifies the path to PostgreSQL client key file.
This configuration settings option specifies whether to verify PostgreSQL server hostname.
Controls connection pool size of database connection pools from the Prefect backend.
This setting causes the pool to recycle connections after the given number of seconds has passed; set it to -1 to avoid recycling entirely.
Number of seconds to wait before giving up on getting a connection from the pool. Defaults to 30 seconds.
Controls maximum overflow of the connection pool. To prevent overflow, set to -1.
A database connection URL in a SQLAlchemy-compatible
format. Prefect currently supports SQLite and Postgres. Note that all
Prefect database engines must use an async driver - for SQLite, use
`sqlite+aiosqlite` and for Postgres use `postgresql+asyncpg`.
SQLite in-memory databases can be used by providing the url
`sqlite+aiosqlite:///file::memory:?cache=shared&uri=true&check_same_thread=false`,
which will allow the database to be accessed by multiple threads. Note
that in-memory databases can not be accessed from multiple processes and
should only be used for simple tests.The database driver to use when connecting to the database. If not set, the driver will be inferred from the connection URL.
postgresql+asyncpg, sqlite+aiosqlite The database server host.
The database server port.
The user to use when connecting to the database.
The name of the Prefect database on the remote server, or the path to the database file for SQLite.
The password to use when connecting to the database. Should be kept secret.
If True, SQLAlchemy will log all SQL issued to the database. Defaults to False.
If True, the database will be migrated on application startup.
A statement timeout, in seconds, applied to all database interactions made by the Prefect backend. Defaults to 10 seconds.
A connection timeout, in seconds, applied to database connections. Defaults to 5.
Settings for controlling server deployments behavior
Show child attributes
The number of seconds to wait before retrying when a deployment flow run cannot secure a concurrency slot from the server.
x >= 0Settings for controlling ephemeral server behavior
Show child attributes
Settings for controlling server events behavior
Show child attributes
Whether or not to stream events out to the API via websockets.
The number of seconds to cache related resources for in the API.
The maximum number of labels a resource may have.
The maximum number of related resources an Event may have.
The maximum size of an Event when serialized to JSON
The amount of time to retain expired automation buckets
How frequently proactive automations are evaluated
The amount of time to retain events in the database.
The maximum range to look back for backfilling events for a websocket subscriber.
The page size for the queries to backfill events for websocket subscribers.
Which message broker implementation to use for the messaging system, should point to a module that exports a Publisher and Consumer class.
Which cache implementation to use for the events system. Should point to a module that exports a Cache class.
Which causal ordering implementation to use for the events system. Should point to a module that exports a CausalOrdering class.
The maximum length of an event name.
Settings for controlling flow run graph behavior
Settings for controlling server services behavior
Show child attributes
Settings for controlling the cancellation cleanup service
Show child attributes
Whether or not to start the cancellation cleanup service in the server application.
The cancellation cleanup service will look for non-terminal tasks and subflows this often. Defaults to 20.
Settings for controlling the event persister service
Show child attributes
Whether or not to start the event persister service in the server application.
The number of events the event persister will attempt to insert in one batch.
The number of events the event persister will attempt to read from the message broker in one batch.
The maximum number of seconds between flushes of the event persister.
The number of expired events and event resources the event persister will attempt to delete in one batch.
The maximum number of events that can be queued in memory for persistence. When the queue is full, new events will be dropped.
The maximum number of consecutive flush failures before events are dropped instead of being re-queued.
Settings for controlling the foreman service
Show child attributes
Whether or not to start the foreman service in the server application.
The foreman service will check for offline workers this often. Defaults to 15.
The number of heartbeats that must be missed before a worker is marked as offline. Defaults to `3`.The number of seconds to use for online/offline evaluation if a worker's heartbeat
interval is not set. Defaults to `30`.The number of seconds before a deployment is marked as not ready if it has not been
polled. Defaults to `60`.The number of seconds before a work queue is marked as not ready if it has not been
polled. Defaults to `60`.Settings for controlling the late runs service
Show child attributes
Whether or not to start the late runs service in the server application.
The late runs service will look for runs to mark as late this often. Defaults to `5`.The late runs service will mark runs as late after they have exceeded their scheduled start time by this many seconds. Defaults to `5` seconds.Settings for controlling the scheduler service
Show child attributes
Whether or not to start the scheduler service in the server application.
The scheduler loop interval, in seconds. This determines
how often the scheduler will attempt to schedule new flow runs, but has no
impact on how quickly either flow runs or task runs are actually executed.
Defaults to `60`.The number of deployments the scheduler will attempt to
schedule in a single batch. If there are more deployments than the batch
size, the scheduler immediately attempts to schedule the next batch; it
does not sleep for `scheduler_loop_seconds` until it has visited every
deployment once. Defaults to `100`.The scheduler will attempt to schedule up to this many
auto-scheduled runs in the future. Note that runs may have fewer than
this many scheduled runs, depending on the value of
`scheduler_max_scheduled_time`. Defaults to `100`.The scheduler will attempt to schedule at least this many
auto-scheduled runs in the future. Note that runs may have more than
this many scheduled runs, depending on the value of
`scheduler_min_scheduled_time`. Defaults to `3`.The scheduler will create new runs up to this far in the
future. Note that this setting will take precedence over
`scheduler_max_runs`: if a flow runs once a month and
`scheduler_max_scheduled_time` is three months, then only three runs will be
scheduled. Defaults to 100 days (`8640000` seconds).The scheduler will create new runs at least this far in the
future. Note that this setting will take precedence over `scheduler_min_runs`:
if a flow runs every hour and `scheduler_min_scheduled_time` is three hours,
then three runs will be scheduled even if `scheduler_min_runs` is 1. Defaults toThe number of runs the scheduler will attempt to insert in a single batch.
Defaults to `500`.The number of seconds the recent deployments scheduler will wait between checking for recently updated deployments. Defaults to `5`.Settings for controlling the pause expiration service
Show child attributes
Whether or not to start the paused flow run expiration service in the server
application. If disabled, paused flows that have timed out will remain in a Paused state
until a resume attempt.The pause expiration service will look for runs to mark as failed this often. Defaults to `5`.Settings for controlling the repossessor service
Settings for controlling the task run recorder service
Show child attributes
Whether or not to start the task run recorder service in the server application.
The number of task runs the task run recorder will attempt to read from the message broker in one batch.
Settings for controlling the triggers service
Show child attributes
Whether or not to start the triggers service in the server application.
The number of events the triggers service will attempt to read from the message broker in one batch.
The number of seconds to wait before reconnecting to the PostgreSQL NOTIFY/LISTEN
connection after an error. Only used when using PostgreSQL as the database.
Defaults to `10`.The number of seconds between heartbeat checks for the PostgreSQL NOTIFY/LISTEN
connection to ensure it's still alive. Only used when using PostgreSQL as the database.
Defaults to `5`.Settings for controlling server tasks behavior
Show child attributes
The number of seconds to wait before retrying when a task run cannot secure a concurrency slot from the server.
x >= 0The maximum number of characters allowed for a task run cache key.
Settings for controlling server-side behavior related to task scheduling
Show child attributes
The maximum number of scheduled tasks to queue for submission.
The maximum number of retries to queue for submission.
How long before a PENDING task are made available to another task worker.
Settings for controlling server UI behavior
Show child attributes
Whether or not to serve the Prefect UI.
The connection url for communication from the UI to the API. Defaults to PREFECT_API_URL if set. Otherwise, the default URL is generated from PREFECT_SERVER_API_HOST and PREFECT_SERVER_API_PORT.
The base URL path to serve the Prefect UI from.
The directory to serve static files from. This should be used when running into permissions issues when attempting to serve the UI from the default directory (for example when running in a Docker container).
Whether or not to display promotional content in the UI, including upgrade prompts and marketing banners.
Settings for controlling task behavior
Show child attributes
If True, enables a refresh of cached results: re-executing the task will refresh the cached results.
If True, sets the default cache policy on all tasks to NO_CACHE.
If True, disables caching on all tasks regardless of cache policy.
This value sets the default number of retries for all tasks.
x >= 0This value sets the default retry delay seconds for all tasks.
If True, results will be persisted by default for all tasks. Set to False to disable persistence by default. Note that setting to False will override the behavior set by a parent flow or task.
Settings for controlling task runner behavior
Settings for controlling client-side task scheduling behavior
Settings used during testing
Show child attributes
If True, places the API in test mode. This may modify behavior to facilitate testing.
This setting only exists to facilitate unit testing. If True, code is executing in a unit test context. Defaults to False.
If True turns on debug mode for the unit testing event loop.
This setting only exists to facilitate unit testing. If in test mode, this setting will return its value. Otherwise, it returns None.
Settings for controlling worker behavior
Show child attributes
Number of seconds a worker should wait between sending a heartbeat.
Number of seconds a worker should wait between queries for scheduled work.
The number of seconds into the future a worker should query for scheduled work.
The URL of the Prefect UI. If not set, the client will attempt to infer it.
If `True`, disable the warning when a user accidentally misconfigure its `PREFECT_API_URL`
Sometimes when a user manually set `PREFECT_API_URL` to a custom url,reverse-proxy for example,
we would like to silence this warning so we will set it to `FALSE`.Was this page helpful?