-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.json
More file actions
1 lines (1 loc) · 26.6 KB
/
openapi.json
File metadata and controls
1 lines (1 loc) · 26.6 KB
1
{"openapi": "3.0.2", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": {"/v1/request/": {"get": {"tags": ["Request"], "summary": "List All Existing Requests", "description": "A List all existing requests", "operationId": "List_all_existing_requests_v1_request__get", "parameters": [{"required": false, "schema": {"title": "Group Name", "type": "string"}, "name": "group_name", "in": "query"}, {"required": false, "schema": {"title": "Skip", "type": "integer", "default": 0}, "name": "skip", "in": "query"}, {"required": false, "schema": {"title": "Limit", "type": "integer", "default": 100}, "name": "limit", "in": "query"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"title": "Response List All Existing Requests V1 Request Get", "type": "array", "items": {"$ref": "#/components/schemas/Request_out"}}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "put": {"tags": ["Request"], "summary": "Find Or Create A Request", "description": "If the request allready exists it will be returned otherwise a new request will be created. \n A request is a 'ticket' for waiting and getting the outcoming responses metadata and content. \n For existing Requests you can, if applicable, access earlier cached versions of the responses and accelerate your client code if freshness of the content is not your priority \ud83d\ude80", "operationId": "Find_or_create_a_request_v1_request__put", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/Request_in"}}}, "required": true}, "responses": {"202": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Request_out"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Request_out"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/v1/request/{request_id}": {"get": {"tags": ["Request"], "summary": "Get A Certain Request", "description": "If you allready know the __id__ of your Request, you can explicitly demand a certain Request here", "operationId": "Get_a_certain_request_v1_request__request_id__get", "parameters": [{"required": true, "schema": {"title": "Request Id", "type": "string"}, "name": "request_id", "in": "path"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Request"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/v1/request/{request_id}/status/{request_timestamp}": {"get": {"tags": ["Request"], "summary": "Check If A Certain Requests Is Registered By The Backend", "description": "Check if your request is registered by the backend. You can now try to query a Response object at the `/v1/response/*` endpoints. **Hint**: This does not indicate that your response content is ready/available.", "operationId": "Check_if_a_certain_requests_is_registered_by_the_backend_v1_request__request_id__status__request_timestamp__get", "parameters": [{"required": true, "schema": {"title": "Request Id", "type": "string"}, "name": "request_id", "in": "path"}, {"required": true, "schema": {"title": "Request Timestamp", "type": "number"}, "name": "request_timestamp", "in": "path"}], "responses": {"200": {"description": "The request is existent and registered by the backend.", "content": {"application/json": {"schema": {}, "example": {"status": "registered"}}}}, "202": {"description": "The request is existent but not yet registered by the backend.", "content": {"application/json": {"example": {"status": "not_registered"}}}}, "404": {"description": "The request is not existent.", "content": {"application/json": {"example": {"status": "not_existent"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/v1/request/{request_id}/cache-config": {"get": {"tags": ["Request"], "summary": "Get A Certain Requests (Re)Cache Config", "description": "Get the (re)cache configuration of this request", "operationId": "Get_a_certain_requests__re_cache_config_v1_request__request_id__cache_config_get", "parameters": [{"required": true, "schema": {"title": "Request Id", "type": "string"}, "name": "request_id", "in": "path"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RequestCacheConfiguration"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "put": {"tags": ["Request"], "summary": "Set Or Update A Certain Requests (Re)Cache Config", "description": "Get the (re)cache configuration of this request", "operationId": "Set_or_Update_a_certain_requests__re_cache_config_v1_request__request_id__cache_config_put", "parameters": [{"required": true, "schema": {"title": "Request Id", "type": "string"}, "name": "request_id", "in": "path"}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RequestCacheConfiguration"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RequestCacheConfiguration"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/v1/request/{request_id}/response": {"get": {"tags": ["Response"], "summary": "List All Responses Of A Request", "description": "Get a list of all cached/ongoing/failed Responses of a Request. Sorted from(first entry) newest to oldest", "operationId": "List_all_responses_of_a_request_v1_request__request_id__response_get", "parameters": [{"required": true, "schema": {"title": "Request Id", "type": "string"}, "name": "request_id", "in": "path"}, {"required": false, "schema": {"title": "Status", "enum": ["wait", "in_progress", "ready", "duplicate", "failed"], "type": "string"}, "name": "status", "in": "query"}, {"required": false, "schema": {"title": "Tag", "type": "string"}, "name": "tag", "in": "query"}, {"required": false, "schema": {"title": "Skip", "type": "integer", "default": 0}, "name": "skip", "in": "query"}, {"required": false, "schema": {"title": "Limit", "type": "integer", "default": 10}, "name": "limit", "in": "query"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"title": "Response List All Responses Of A Request V1 Request Request Id Response Get", "type": "array", "items": {"$ref": "#/components/schemas/Response"}}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/v1/request/{request_id}/response/latest": {"get": {"tags": ["Response"], "summary": "Get Latest Response", "operationId": "get_latest_response_v1_request__request_id__response_latest_get", "parameters": [{"required": true, "schema": {"title": "Request Id", "type": "string"}, "name": "request_id", "in": "path"}, {"required": false, "schema": {"title": "Tag", "type": "string"}, "name": "tag", "in": "query"}, {"required": false, "schema": {"title": "Pinned", "type": "boolean"}, "name": "pinned", "in": "query"}, {"required": false, "schema": {"title": "Status", "enum": ["wait", "in_progress", "ready", "duplicate", "failed"], "type": "string"}, "name": "status", "in": "query"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Response"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/v1/request/{request_id}/response/t/{tag}": {"get": {"tags": ["Response"], "summary": "List Responses By Tag", "operationId": "list_responses_by_tag_v1_request__request_id__response_t__tag__get", "parameters": [{"required": true, "schema": {"title": "Request Id", "type": "string"}, "name": "request_id", "in": "path"}, {"required": true, "schema": {"title": "Tag", "type": "string"}, "name": "tag", "in": "path"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"title": "Response List Responses By Tag V1 Request Request Id Response T Tag Get", "type": "array", "items": {"$ref": "#/components/schemas/Response"}}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/v1/request/{request_id}/response/v/{version}": {"get": {"tags": ["Response"], "summary": "Get Response", "operationId": "get_response_v1_request__request_id__response_v__version__get", "parameters": [{"required": true, "schema": {"title": "Request Id", "type": "string"}, "name": "request_id", "in": "path"}, {"required": true, "schema": {"title": "Version", "type": "string"}, "name": "version", "in": "path"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Response"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/v1/request/{request_id}/response/v/{version}/content": {"get": {"tags": ["Response"], "summary": "Serve Responses Content", "operationId": "serve_responses_content_v1_request__request_id__response_v__version__content_get", "parameters": [{"required": true, "schema": {"title": "Request Id", "type": "string"}, "name": "request_id", "in": "path"}, {"required": true, "schema": {"title": "Version", "type": "string"}, "name": "version", "in": "path"}], "responses": {"200": {"description": "Return whatever the source response media type is.", "content": {"any": {}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/v1/request/{request_id}/response/v/{version}/pin": {"put": {"tags": ["Response"], "summary": "Pin A Certain Response Version In The Cache", "description": "When a Response is marked as `valid`-ated an older Response version can be purged out of the cache. \n If you pin a certain version, it will be keept no matter what.", "operationId": "Pin_a_certain_Response_version_in_the_cache_v1_request__request_id__response_v__version__pin_put", "parameters": [{"required": true, "schema": {"title": "Request Id", "type": "string"}, "name": "request_id", "in": "path"}, {"required": true, "schema": {"title": "Version", "type": "string"}, "name": "version", "in": "path"}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ResponsePinClaim"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Response"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/v1/request/{request_id}/response/v/{version}/tag": {"put": {"tags": ["Response"], "summary": "Mark A Certain Response Version. E.G. As 'Worked-For-Me'", "description": "Here you can tag a certain response version. \n The `tag` could be your clients version.\n This way you can make your client, dependend on external resources, having a stable reproducibe state. as it will always get the same file served. \n Which is the whole purpose of this venture :) \n A tag must be **at least 2 chars** long and **maximum 64 chars**. Also it must pass the regex match `'^[a-zA-Z0-9-_]*$'` (Only alphanummeric, -, _ and no whitespace)", "operationId": "Mark_a_certain_response_version__E_g__as__worked_for_me__v1_request__request_id__response_v__version__tag_put", "parameters": [{"required": true, "schema": {"title": "Request Id", "type": "string"}, "name": "request_id", "in": "path"}, {"required": true, "schema": {"title": "Version", "type": "string"}, "name": "version", "in": "path"}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ResponseTagClaim"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Response"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}}, "components": {"schemas": {"HTTPValidationError": {"title": "HTTPValidationError", "type": "object", "properties": {"detail": {"title": "Detail", "type": "array", "items": {"$ref": "#/components/schemas/ValidationError"}}}}, "Request": {"title": "Request", "required": ["url", "cache_configuration"], "type": "object", "properties": {"url": {"title": "Url", "type": "string"}, "http_method": {"title": "Http Method", "enum": ["get", "post", "put"], "type": "string", "default": "get"}, "http_header_fields": {"title": "Http Header Fields", "type": "object", "default": {}}, "http_query_params": {"title": "Http Query Params", "type": "object", "default": {}}, "http_request_body": {"title": "Http Request Body", "type": "object", "default": {}}, "group_name": {"title": "Group Name", "type": "string", "default": "DEFAULT_GROUP"}, "description": {"title": "Description", "type": "string"}, "documentation_link": {"title": "Documentation Link", "type": "string"}, "validation_hash_type": {"title": "Validation Hash Type", "enum": ["md5", "sha3_512", "blake2b", "sha384", "sha512", "shake_128", "shake_256", "blake2s", "sha256", "sha224", "sha3_256", "sha1", "sha3_384", "sha3_224"], "type": "string", "default": "md5"}, "cache_configuration": {"$ref": "#/components/schemas/RequestCacheConfiguration"}, "id": {"title": "Id", "type": "string"}, "request_timestamp": {"title": "Request Timestamp", "type": "number"}, "inital_request_datetime_utc": {"title": "Inital Request Datetime Utc", "type": "string", "format": "date-time"}, "latest_request_datetime_utc": {"title": "Latest Request Datetime Utc", "type": "string", "format": "date-time"}, "latest_requests": {"title": "Latest Requests", "type": "array", "items": {"type": "number"}, "default": [1672406000.9030838]}}}, "RequestCacheConfiguration": {"title": "RequestCacheConfiguration", "type": "object", "properties": {"request_id": {"title": "Request Id", "type": "string"}, "recaching_strategy": {"title": "Recaching Strategy", "oneOf": [{"$ref": "#/components/schemas/never"}, {"$ref": "#/components/schemas/age"}, {"$ref": "#/components/schemas/cron"}, {"$ref": "#/components/schemas/when_requested"}, {"$ref": "#/components/schemas/when_remote_changed"}], "default": {"strategy_name": "when_remote_changed", "check_interval_sec": 21600, "fallback_max_age_sec": 86400}, "discriminator": {"propertyName": "strategy_name", "mapping": {"never": "#/components/schemas/never", "age": "#/components/schemas/age", "cron": "#/components/schemas/cron", "when_requested": "#/components/schemas/when_requested", "when_remote_changed": "#/components/schemas/when_remote_changed"}}}, "max_cached_unpinned_versions": {"title": "Max Cached Unpinned Versions", "type": "integer", "default": 2}, "max_cached_pinned_versions": {"title": "Max Cached Pinned Versions", "type": "integer", "default": 10}}, "description": "The request cache configuration can be attached to a request to give Buffy-server instruction how and when to cache a request.\nAt the heart of the configuration is a [ReCachingStrategy](BuffyReCachingStrategies). the other option is how many versions of a request-response should be cached.\n\n**HINT**: This is pydantic model. Every `class-attribute` is also a `parameter`\n\n**example usage**\n```python\nimport json\nfrom buffy.buffypyclient import BuffyPyClient\nc = BuffyPyClient()\n\n# Define a strategy. Buffy-server has to re-cache the target url every 3601 seconds.\nstrategy = ReCachingStrategy.age(seconds=3601)\n# Lets pack the strategy in a RequestCacheConfiguration config\nconfig = RequestCacheConfiguration(recaching_strategy=strategy, max_cached_unpinned_versions=3)\n# Lets attach the config to our request\nreq = c.create_request(\"https://wikipedia.org\",cache_configuration=config)\n```"}, "Request_in": {"title": "Request_in", "required": ["url"], "type": "object", "properties": {"url": {"title": "Url", "type": "string"}, "http_method": {"title": "Http Method", "enum": ["get", "post", "put"], "type": "string", "default": "get"}, "http_header_fields": {"title": "Http Header Fields", "type": "object", "default": {}}, "http_query_params": {"title": "Http Query Params", "type": "object", "default": {}}, "http_request_body": {"title": "Http Request Body", "type": "object", "default": {}}, "group_name": {"title": "Group Name", "type": "string", "default": "DEFAULT_GROUP"}, "description": {"title": "Description", "type": "string"}, "documentation_link": {"title": "Documentation Link", "type": "string"}, "validation_hash_type": {"title": "Validation Hash Type", "enum": ["md5", "sha3_512", "blake2b", "sha384", "sha512", "shake_128", "shake_256", "blake2s", "sha256", "sha224", "sha3_256", "sha1", "sha3_384", "sha3_224"], "type": "string", "default": "md5"}, "cache_configuration": {"$ref": "#/components/schemas/RequestCacheConfiguration"}}}, "Request_out": {"title": "Request_out", "required": ["url", "cache_configuration"], "type": "object", "properties": {"url": {"title": "Url", "type": "string"}, "http_method": {"title": "Http Method", "enum": ["get", "post", "put"], "type": "string", "default": "get"}, "http_header_fields": {"title": "Http Header Fields", "type": "object", "default": {}}, "http_query_params": {"title": "Http Query Params", "type": "object", "default": {}}, "http_request_body": {"title": "Http Request Body", "type": "object", "default": {}}, "group_name": {"title": "Group Name", "type": "string", "default": "DEFAULT_GROUP"}, "description": {"title": "Description", "type": "string"}, "documentation_link": {"title": "Documentation Link", "type": "string"}, "validation_hash_type": {"title": "Validation Hash Type", "enum": ["md5", "sha3_512", "blake2b", "sha384", "sha512", "shake_128", "shake_256", "blake2s", "sha256", "sha224", "sha3_256", "sha1", "sha3_384", "sha3_224"], "type": "string", "default": "md5"}, "cache_configuration": {"$ref": "#/components/schemas/RequestCacheConfiguration"}, "id": {"title": "Id", "type": "string"}, "request_timestamp": {"title": "Request Timestamp", "type": "number"}}}, "Response": {"title": "Response", "required": ["request_id", "version", "status"], "type": "object", "properties": {"id": {"title": "Id", "type": "string"}, "request_id": {"title": "Request Id", "type": "string"}, "version": {"title": "Version", "type": "string"}, "previous_version": {"title": "Previous Version", "type": "string"}, "next_version": {"title": "Next Version", "type": "string"}, "status": {"title": "Status", "enum": ["wait", "in_progress", "ready", "duplicate", "failed"], "type": "string"}, "content_download_path": {"title": "Content Download Path", "type": "string"}, "cached_datetime_utc": {"title": "Cached Datetime Utc", "type": "string", "format": "date-time"}, "request_datetime_utc": {"title": "Request Datetime Utc", "type": "string", "format": "date-time"}, "pinned": {"title": "Pinned", "type": "boolean", "default": false}, "tags": {"title": "Tags", "type": "array", "items": {"type": "string"}, "default": []}, "download_stats": {"$ref": "#/components/schemas/ResponseDownloadStats"}, "content_attributes": {"$ref": "#/components/schemas/ResponseContentAttributes"}, "content_hash_hex": {"title": "Content Hash Hex", "type": "string"}, "pinned_until_utc": {"title": "Pinned Until Utc", "type": "string", "format": "date-time"}}, "description": "Metadata object for a request response.\n\n**HINT**: This is pydantic model. Every `class-attribute` is also a `parameter`"}, "ResponseContentAttributes": {"title": "ResponseContentAttributes", "type": "object", "properties": {"media_type": {"title": "Media Type", "type": "string"}, "etag": {"title": "Etag", "type": "string"}, "content_size_bytes": {"title": "Content Size Bytes", "type": "integer"}, "last_modified_datetime_utc": {"title": "Last Modified Datetime Utc", "type": "string", "format": "date-time"}, "filename": {"title": "Filename", "type": "string"}, "content_disposition": {"title": "Content Disposition", "type": "string"}}}, "ResponseDownloadStats": {"title": "ResponseDownloadStats", "required": ["state"], "type": "object", "properties": {"downloaded_bytes": {"title": "Downloaded Bytes", "type": "integer", "default": 0}, "avg_bytes_per_sec": {"title": "Avg Bytes Per Sec", "type": "integer"}, "download_running_duration_sec": {"title": "Download Running Duration Sec", "type": "number"}, "download_start_time_unix_ts": {"title": "Download Start Time Unix Ts", "type": "number"}, "total_bytes_to_download": {"title": "Total Bytes To Download", "type": "integer"}, "state": {"title": "State", "enum": ["init", "downloading", "failed", "finished"], "type": "string"}, "error": {"title": "Error", "type": "string"}}, "description": "Statistics about the running or finished download of remote HTTP resource\n\n**HINT**: This is pydantic model. Every `class-attribute` is also a `parameter`"}, "ResponsePinClaim": {"title": "ResponsePinClaim", "required": ["value"], "type": "object", "properties": {"request_id": {"title": "Request Id", "type": "string"}, "response_version": {"title": "Response Version", "type": "string"}, "value": {"title": "Value", "type": "boolean"}, "duration_sec": {"title": "Duration Sec", "type": "integer"}}}, "ResponseTagClaim": {"title": "ResponseTagClaim", "required": ["value"], "type": "object", "properties": {"request_id": {"title": "Request Id", "type": "string"}, "response_version": {"title": "Response Version", "type": "string"}, "value": {"title": "Value", "type": "string"}, "delete": {"title": "Delete", "type": "boolean", "default": false}}}, "ValidationError": {"title": "ValidationError", "required": ["loc", "msg", "type"], "type": "object", "properties": {"loc": {"title": "Location", "type": "array", "items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}}, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}}}, "age": {"title": "age", "type": "object", "properties": {"strategy_name": {"title": "Strategy Name", "enum": ["age"], "type": "string", "default": "age", "const": "age"}, "seconds": {"title": "Seconds", "type": "integer", "default": 3600}}, "description": "Age Strategy\n\nBuffy will redownload when the cached version has a certain age in seconds. \nThe default age is 3600sec. \nThis is usefull for dynamic remote resources, where the webserver wont provide any informations about the state of the resource like \"etag\", \"last_modified_datetime\" or \"size_in_bytes\"\n\nArgs:\n seconds (int): default:3600 - The duration a resource will be cached until it gets a redownload from the source "}, "cron": {"title": "cron", "type": "object", "properties": {"strategy_name": {"title": "Strategy Name", "enum": ["cron"], "type": "string", "default": "cron", "const": "cron"}, "cron": {"title": "Cron", "type": "string", "default": "0 0 * * *"}, "run_at_start": {"title": "Run At Start", "type": "boolean", "default": true}}, "description": "cron - Strategy\nBuffy will redownload the remote resource in an certain interval. Defined in the Linux cron format.\nSimilar to the \"age\"-Strategy, but allows more flexibility for more complex situations.\nThis is usefull for dynamic remote resources, where the webserver wont provide any informations about the state of the resource like \"etag\", \"last_modified_datetime\" or \"size_in_bytes\"\n\nparams:\n cron - str - a standard cron definition https://en.wikipedia.org/wiki/Cron\n\n run_at_start - bool - regardless of the cron schedule, Buffy will redownload the resource once when Buffy just started"}, "never": {"title": "never", "type": "object", "properties": {"strategy_name": {"title": "Strategy Name", "enum": ["never"], "type": "string", "default": "never", "const": "never"}}, "description": "never -\nOnce downlaoded we will serve only this cached file. no matter how often it is requested.\nThis is usefull for files that will be 100% static."}, "when_remote_changed": {"title": "when_remote_changed", "type": "object", "properties": {"strategy_name": {"title": "Strategy Name", "enum": ["when_remote_changed"], "type": "string", "default": "when_remote_changed", "const": "when_remote_changed"}, "check_interval_sec": {"title": "Check Interval Sec", "type": "integer", "default": 21600}, "fallback_max_age_sec": {"title": "Fallback Max Age Sec", "type": "integer", "default": 86400}}, "description": "Buffy will ask the webserver of the remote resource about the state of the resource.\nVia \"etag\", \"last_modified_datetime\" or \"size_in_bytes\" Buffy can determine if the resource changed.\nIf it has changed Buffy will download and cache the newer version.\nThis is usefull resources changing in random intervals.\n\nArgs:\n check_interval_sec (int): default:3600 - The duration a resource will be cached until it gets a redownload from the source\n fallback_max_age_sec (int): default:3600 - The duration a resource will be cached until it gets a redownload from the source"}, "when_requested": {"title": "when_requested", "type": "object", "properties": {"strategy_name": {"title": "Strategy Name", "enum": ["when_requested"], "type": "string", "default": "when_requested", "const": "when_requested"}}, "description": "when_requested - Strategy\nBuffy will redownload the resource when the client requests the resource.\nThis is the most simple scenario which is closest to a classic just-download case but with a fallback safeguard;\nIf the remote resource fails to download, buffy can fallback to an older cached version of the resource, if available.\n\n**HINT**: Multiple request during one server tick (default 0.3s), will be bundled and share one response. Example: If you simultaneously request 5 numbers from a REST API that generates random numbers, you will most likely just get same number for every request.\n In cases like this you maybe better off, bypassing a caching middleware like Buffy."}}}, "tags": [{"name": "Request", "description": "Request a remote HTTP resource. Buffy will download this resource in the background and provide it via the `../response/` path"}, {"name": "Response", "description": "The metadata of a Request outcome. The `../content` of a result can be a json document, a file, a binary file or whatever you requested :)"}]}