diff --git a/src/content/docs/speed/optimization/content/troubleshooting/disable-auto-minify.mdx b/src/content/docs/speed/optimization/content/troubleshooting/disable-auto-minify.mdx index 4d4f111f80edc55..13e7970af294aae 100644 --- a/src/content/docs/speed/optimization/content/troubleshooting/disable-auto-minify.mdx +++ b/src/content/docs/speed/optimization/content/troubleshooting/disable-auto-minify.mdx @@ -1,78 +1,66 @@ --- pcx_content_type: troubleshooting -title: Disable Auto Minify +title: Turn off Auto Minify via API +sidebar: + label: Turn off Auto Minify --- -If your site is still using deprecated features for [Auto Minify](/fundamentals/api/reference/deprecations/#auto-minify), disable Auto Minify via the Cloudflare dashboard or API. +If your site is still using deprecated features for [Auto Minify](/fundamentals/api/reference/deprecations/#2024-08-05), turn off Auto Minify via API. -## Dashboard +## Before you begin -To disable Auto Minify via the Cloudflare dashboard: +You will need an [API token](/fundamentals/api/get-started/create-token/) with the following permissions: -1. Log into the [Cloudflare Dashboard](https://dash.cloudflare.com). -2. Go to **Speed** > **Optimization**. -3. Go to **Content Optimization**. -4. For **Auto Minify**, deselect all options. +- _Zone_ > _Zone Settings_ > _Edit_ +- _Zone_ > _Zone Settings_ > _Read_ -## API +## (Optional) Check zone status -### Before you begin +To check your zone's Auto Minify status, send a `GET` request to the `/zones/{zone_id}/settings/minify` endpoint. -You will need: - -- An [API token](/fundamentals/api/get-started/create-token/) with the following permissions: - - `Zone - Zone Settings - Edit` - - `Zone - Zone Settings - Read` - -### (Optional) Check zone status - -To check your zone's Auto Minify status, send a `GET` request to the `/zones//settings/minify` endpoint. - -```sh title="cURL example" -curl 'https://api.cloudflare.com/client/v4/zones//settings/minify' \ - --header "Authorization: Bearer " \ - --header "Content-Type: application/json" +```bash +curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/settings/minify" \ +--header "Authorization: Bearer " ``` -You will get the following response. If any of the values in the highlighted line are `"on"`, then you need to disable them. - -```json title="Example response" {4} +```json output {4} { - "result": { - "id": "minify", - "value": { "css": "off", "html": "off", "js": "off" }, - "modified_on": null, - "editable": true - }, - "success": true, - "errors": [], - "messages": [] + "result": { + "id": "minify", + "value": { "css": "off", "html": "off", "js": "off" }, + "modified_on": null, + "editable": true + }, + "success": true, + "errors": [], + "messages": [] } ``` -### Disable with the API +If any of the values in the highlighted line are `"on"`, then you need to turn them off. -To disable Auto Minify for your zone, send a `PATCH` request to the `/zones//settings/minify` endpoint. +## Turn off Auto Minify using the API -```sh title="cURL example" -curl -X PATCH 'https://api.cloudflare.com/client/v4/zones//settings/minify' \ - --header "Authorization: Bearer " \ - --header "Content-Type: application/json" \ - -d '{"value":{"css":"off","html":"off","js":"off"}}' -``` +To turn off Auto Minify for your zone, send a `PATCH` request to the `/zones/{zone_id}/settings/minify` endpoint. The value for `success` in the response should be `true`. -If successful, you will get something similar to this response. The value for `success` should be `true`. +```bash +curl --request PATCH \ +"https://api.cloudflare.com/client/v4/zones/{zone_id}/settings/minify" \ +--header "Authorization: Bearer " \ +--header "Content-Type: application/json" \ +--data '{ "value": { "css": "off","html": "off","js": "off" } }' +``` -```json title="Example disabled response" {8} +```json output {8} { - "result": { - "id": "minify", - "value": { "js": "off", "css": "off", "html": "off" }, - "modified_on": "2024-08-15T19:32:20.882640Z", - "editable": true - }, - "success": true, - "errors": [], - "messages": [] + "result": { + "id": "minify", + "value": { "js": "off", "css": "off", "html": "off" }, + "modified_on": "2024-11-15T19:32:20.882640Z", + "editable": true + }, + "success": true, + "errors": [], + "messages": [] } ```