Skip to content
Start here

Delete scheduled page test

client.Speed.Schedule.Delete(ctx, url, params) (*ScheduleDeleteResponse, error)
DELETE/zones/{zone_id}/speed_api/schedule/{url}

Deletes a scheduled test for a page.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Zone Settings Write
ParametersExpand Collapse
url string

A URL.

params ScheduleDeleteParams
ZoneID param.Field[string]

Path param: Identifier.

maxLength32
Region param.Field[ScheduleDeleteParamsRegion]optional

Query param: A test region.

const ScheduleDeleteParamsRegionAsiaEast1 ScheduleDeleteParamsRegion = "asia-east1"
const ScheduleDeleteParamsRegionAsiaNortheast1 ScheduleDeleteParamsRegion = "asia-northeast1"
const ScheduleDeleteParamsRegionAsiaNortheast2 ScheduleDeleteParamsRegion = "asia-northeast2"
const ScheduleDeleteParamsRegionAsiaSouth1 ScheduleDeleteParamsRegion = "asia-south1"
const ScheduleDeleteParamsRegionAsiaSoutheast1 ScheduleDeleteParamsRegion = "asia-southeast1"
const ScheduleDeleteParamsRegionAustraliaSoutheast1 ScheduleDeleteParamsRegion = "australia-southeast1"
const ScheduleDeleteParamsRegionEuropeNorth1 ScheduleDeleteParamsRegion = "europe-north1"
const ScheduleDeleteParamsRegionEuropeSouthwest1 ScheduleDeleteParamsRegion = "europe-southwest1"
const ScheduleDeleteParamsRegionEuropeWest1 ScheduleDeleteParamsRegion = "europe-west1"
const ScheduleDeleteParamsRegionEuropeWest2 ScheduleDeleteParamsRegion = "europe-west2"
const ScheduleDeleteParamsRegionEuropeWest3 ScheduleDeleteParamsRegion = "europe-west3"
const ScheduleDeleteParamsRegionEuropeWest4 ScheduleDeleteParamsRegion = "europe-west4"
const ScheduleDeleteParamsRegionEuropeWest8 ScheduleDeleteParamsRegion = "europe-west8"
const ScheduleDeleteParamsRegionEuropeWest9 ScheduleDeleteParamsRegion = "europe-west9"
const ScheduleDeleteParamsRegionMeWest1 ScheduleDeleteParamsRegion = "me-west1"
const ScheduleDeleteParamsRegionSouthamericaEast1 ScheduleDeleteParamsRegion = "southamerica-east1"
const ScheduleDeleteParamsRegionUsCentral1 ScheduleDeleteParamsRegion = "us-central1"
const ScheduleDeleteParamsRegionUsEast1 ScheduleDeleteParamsRegion = "us-east1"
const ScheduleDeleteParamsRegionUsEast4 ScheduleDeleteParamsRegion = "us-east4"
const ScheduleDeleteParamsRegionUsSouth1 ScheduleDeleteParamsRegion = "us-south1"
const ScheduleDeleteParamsRegionUsWest1 ScheduleDeleteParamsRegion = "us-west1"
ReturnsExpand Collapse
type ScheduleDeleteResponse struct{…}
Count float64optional

Number of items affected.

Delete scheduled page test

package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/speed"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  schedule, err := client.Speed.Schedule.Delete(
    context.TODO(),
    "example.com",
    speed.ScheduleDeleteParams{
      ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", schedule.Count)
}
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "count": 1
  }
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "count": 1
  }
}