Cloudflare.WorkerSubdomain (Cloudflare v0.5.0)

Copy Markdown View Source

Worker Subdomain

Create Subdomain

PUT /accounts/{account_id}/workers/subdomain

Creates a Workers subdomain for an account.

Responses

200 Create Subdomain response.

Data is at body["result"]

{
  "subdomain": "*string*"
}
4XX Create Subdomain response failure.
{
  "errors": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "messages": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "result": {},
  "success": "*boolean*"
}

Get Subdomain

GET /accounts/{account_id}/workers/subdomain

Returns a Workers subdomain for an account.

Responses

200 Get Subdomain response.

Data is at body["result"]

{
  "subdomain": "*string*"
}
4XX Get Subdomain response failure.
{
  "errors": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "messages": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "result": {},
  "success": "*boolean*"
}

Delete Subdomain

DELETE /accounts/{account_id}/workers/subdomain

Deletes a Workers subdomain for an account.

Responses

204 Subdomain deleted successfully.

Data is at body["result"]

4XX Delete Subdomain response failure.
{
  "errors": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "messages": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "result": {},
  "success": "*boolean*"
}

Summary

Functions

client(opts \\ [])

create(body, opts \\ [])

delete(opts \\ [])

get(opts \\ [])

path_for(id, opts \\ [])

@spec path_for(term(), [{:action, String.t()}]) :: String.t()