> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://api.docs.modulards.com/modular-ds-public-api/patch-protect/website-protection/retrieve-a-website-s-patch-protect-settings/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api.docs.modulards.com/_mcp/server. # Retrieve a website's Patch & Protect settings GET https://api.modulards.com/api/public/v1/patchstack-services/{site_preset_patchstack} Returns how Patch & Protect protects one website: whether the protection is on, how it is doing against the security provider, when its attack figures were last read and the settings it runs with. Use it to check that a website is protected and how. The id in the path is the id of the website's protection record, not the website id: read it from the `site_preset_patchstack` include of "Retrieve a website" or "List websites" (`?include=site_preset_patchstack`). `connection_status` is one of `connected`, `sync_error`, `disconnected`, `site_not_found`, `api_unreachable`, `site_not_linked`, or `unknown` before the first health check. The settings (firewall, hardening, `.htaccess`, login, CAPTCHA and activity log) are read-only here: editing them stays in the dashboard, where an edit on one website forks the shared configuration. Three kinds of value never leave the server: the CAPTCHA secret keys, which are credentials of the customer's provider account; the custom login slug, because a hidden login URL that is handed out is not hidden; and the firewall's own defences (detection thresholds, trusted IP header, whitelist rules, IP block list) and custom `.htaccess` rules, which are replaced by the booleans `has_whitelist_rules`, `has_ip_block_list` and `has_custom_rules`. `custom_login_enabled` is returned, so a reader knows the login was moved without learning where. A website with no protection has no record at all: read `has_patchstack` and `filter[patchstack]` on "List websites" instead. Switching the protection on is "Switch Patch & Protect for websites". Reference: https://api.docs.modulards.com/modular-ds-public-api/patch-protect/website-protection/retrieve-a-website-s-patch-protect-settings ## Authentication - `Authorization` header (bearer token, required) — Personal access token created in the Modular DS dashboard; read-only tokens can only call GET endpoints. ## Request ### Path parameters - `site_preset_patchstack` (string, required) ## Response ### 200 200 - A protected website - `data` (ApiPublicV1PatchstackServicesSitePresetPatchstackGetResponsesContentApplicationJsonSchemaData, optional) - `jsonapi` (ApiPublicV1PatchstackServicesSitePresetPatchstackGetResponsesContentApplicationJsonSchemaJsonapi, optional) ## Types ### ApiPublicV1PatchstackServicesSitePresetPatchstackGetResponsesContentApplicationJsonSchemaData - `attributes` (ApiPublicV1PatchstackServicesSitePresetPatchstackGetResponsesContentApplicationJsonSchemaDataAttributes, optional) - `id` (string, optional) - `links` (ApiPublicV1PatchstackServicesSitePresetPatchstackGetResponsesContentApplicationJsonSchemaDataLinks, optional) - `type` (string, optional) ### ApiPublicV1PatchstackServicesSitePresetPatchstackGetResponsesContentApplicationJsonSchemaJsonapi - `version` (string, optional) ### ApiPublicV1PatchstackServicesSitePresetPatchstackGetResponsesContentApplicationJsonSchemaDataAttributes - `configuration` (ApiPublicV1PatchstackServicesSitePresetPatchstackGetResponsesContentApplicationJsonSchemaDataAttributesConfiguration, optional) - `connection_status` (string, optional) — How the protection is doing against the security provider: connected, otherwise the reason (sync_error, disconnected, site_not_found, api_unreachable or site_not_linked), or unknown before the first check. - `created_at` (string, optional) - `last_stats_at` (datetime, optional, nullable) — When the attack figures were last read. - `status` (string, optional) - `updated_at` (string, optional) ### ApiPublicV1PatchstackServicesSitePresetPatchstackGetResponsesContentApplicationJsonSchemaDataLinks - `self` (string, optional) ### ApiPublicV1PatchstackServicesSitePresetPatchstackGetResponsesContentApplicationJsonSchemaDataAttributesConfiguration - `activity_log` (ApiPublicV1PatchstackServicesSitePresetPatchstackGetResponsesContentApplicationJsonSchemaDataAttributesConfigurationActivityLog, optional) - `firewall` (ApiPublicV1PatchstackServicesSitePresetPatchstackGetResponsesContentApplicationJsonSchemaDataAttributesConfigurationFirewall, optional) - `hardening_captcha` (ApiPublicV1PatchstackServicesSitePresetPatchstackGetResponsesContentApplicationJsonSchemaDataAttributesConfigurationHardeningCaptcha, optional) - `hardening_general` (ApiPublicV1PatchstackServicesSitePresetPatchstackGetResponsesContentApplicationJsonSchemaDataAttributesConfigurationHardeningGeneral, optional) - `hardening_htaccess` (ApiPublicV1PatchstackServicesSitePresetPatchstackGetResponsesContentApplicationJsonSchemaDataAttributesConfigurationHardeningHtaccess, optional) - `hardening_login` (ApiPublicV1PatchstackServicesSitePresetPatchstackGetResponsesContentApplicationJsonSchemaDataAttributesConfigurationHardeningLogin, optional) ### ApiPublicV1PatchstackServicesSitePresetPatchstackGetResponsesContentApplicationJsonSchemaDataAttributesConfigurationActivityLog - `enabled` (boolean, optional) - `log_comments` (boolean, optional) - `log_failed_logins_app` (boolean, optional) - `log_failed_logins_local` (boolean, optional) - `log_posts` (boolean, optional) ### ApiPublicV1PatchstackServicesSitePresetPatchstackGetResponsesContentApplicationJsonSchemaDataAttributesConfigurationFirewall - `auto_prepend_enabled` (boolean, optional) - `block_bruteforce_ips` (boolean, optional) - `enabled` (boolean, optional) - `has_ip_block_list` (boolean, optional) - `has_whitelist_rules` (boolean, optional) - `whitelist_user_roles` (list of string, optional) ### ApiPublicV1PatchstackServicesSitePresetPatchstackGetResponsesContentApplicationJsonSchemaDataAttributesConfigurationHardeningCaptcha - `enable_on_comments` (boolean, optional) - `enable_on_forgot_password` (boolean, optional) - `enable_on_login` (boolean, optional) - `enable_on_register` (boolean, optional) - `site_key_invisible` (any, optional, nullable) - `site_key_turnstile` (any, optional, nullable) - `site_key_v2` (any, optional, nullable) - `site_key_v3` (any, optional, nullable) - `type` (string, optional) ### ApiPublicV1PatchstackServicesSitePresetPatchstackGetResponsesContentApplicationJsonSchemaDataAttributesConfigurationHardeningGeneral - `disable_application_passwords` (boolean, optional) - `disable_plugin_theme_editor` (boolean, optional) - `disable_user_enumeration` (boolean, optional) - `hide_wp_version` (boolean, optional) - `restrict_rest_api` (boolean, optional) - `restrict_xmlrpc` (boolean, optional) ### ApiPublicV1PatchstackServicesSitePresetPatchstackGetResponsesContentApplicationJsonSchemaDataAttributesConfigurationHardeningHtaccess - `add_security_headers` (boolean, optional) - `block_debug_log` (boolean, optional) - `block_default_file_access` (boolean, optional) - `block_readme_txt` (boolean, optional) - `disable_directory_indexing` (boolean, optional) - `enabled` (boolean, optional) - `has_custom_rules` (boolean, optional) ### ApiPublicV1PatchstackServicesSitePresetPatchstackGetResponsesContentApplicationJsonSchemaDataAttributesConfigurationHardeningLogin - `custom_login_enabled` (boolean, optional) - `enable_2fa` (boolean, optional) ## Examples **Response** ```json { "data": { "attributes": { "configuration": { "activity_log": { "enabled": true, "log_comments": false, "log_failed_logins_app": false, "log_failed_logins_local": true, "log_posts": false }, "firewall": { "auto_prepend_enabled": false, "block_bruteforce_ips": false, "enabled": true, "has_ip_block_list": false, "has_whitelist_rules": false, "whitelist_user_roles": [ "administrator" ] }, "hardening_captcha": { "enable_on_comments": false, "enable_on_forgot_password": false, "enable_on_login": false, "enable_on_register": false, "site_key_invisible": null, "site_key_turnstile": null, "site_key_v2": null, "site_key_v3": null, "type": "v2" }, "hardening_general": { "disable_application_passwords": true, "disable_plugin_theme_editor": true, "disable_user_enumeration": true, "hide_wp_version": true, "restrict_rest_api": false, "restrict_xmlrpc": true }, "hardening_htaccess": { "add_security_headers": true, "block_debug_log": true, "block_default_file_access": true, "block_readme_txt": true, "disable_directory_indexing": true, "enabled": true, "has_custom_rules": false }, "hardening_login": { "custom_login_enabled": false, "enable_2fa": false } }, "connection_status": "connected", "created_at": "2026-09-24T15:00:57.000000Z", "last_stats_at": "2026-09-24T15:00:57.000000Z", "status": "enabled", "updated_at": "2026-09-24T15:00:57.000000Z" }, "id": "1", "links": { "self": "https://api.modulards.local/api/public/v1/patchstack-services/1" }, "type": "site-preset-patchstacks" }, "jsonapi": { "version": "1.1" } } ``` **SDK Code** ```python 200 - A protected website import requests url = "https://api.modulards.com/api/public/v1/patchstack-services/site_preset_patchstack" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript 200 - A protected website const url = 'https://api.modulards.com/api/public/v1/patchstack-services/site_preset_patchstack'; const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go 200 - A protected website package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.modulards.com/api/public/v1/patchstack-services/site_preset_patchstack" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby 200 - A protected website require 'uri' require 'net/http' url = URI("https://api.modulards.com/api/public/v1/patchstack-services/site_preset_patchstack") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java 200 - A protected website import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.modulards.com/api/public/v1/patchstack-services/site_preset_patchstack") .header("Authorization", "Bearer ") .asString(); ``` ```php 200 - A protected website request('GET', 'https://api.modulards.com/api/public/v1/patchstack-services/site_preset_patchstack', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp 200 - A protected website using RestSharp; var client = new RestClient("https://api.modulards.com/api/public/v1/patchstack-services/site_preset_patchstack"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift 200 - A protected website import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.modulards.com/api/public/v1/patchstack-services/site_preset_patchstack")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```