Reachability

Carry out one option of a stored plan.

Changed on

Recomputes the plan's fingerprint first: when anything it depends on changed (or the plan expired or was used), nothing is created and the 409 carries the new plan under plan. Otherwise starts a run and returns it at once; poll …/reachability/runs/{run_id} for progress. Every resource is journaled before it is created, and a failed step removes what the run made again, newest first.

post/projects/{project_id}/environments/{environment_id}/reachability/apply

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • Auth
    HTTP bearer

Path parameters

project_idinteger required

Project ID

environment_idinteger required

Environment ID

Request body

answersobject

Answers to the option's fields by key. address, when given, must be the plan's; dns_provider_id takes a provider id, cloudflare_api_token the token (held in memory for the run, never stored on it).

confirmedboolean

The user saw and accepted the option's confirmation.

option'existing_tunnel' | 'direct_managed_dns' | 'new_tunnel' | 'new_tunnel_with_token' | 'direct_manual_dns' | 'private_worker' | 'tailscale_serve' | 'tailscale_service' | 'tailscale_service_with_credential' | 'tunnel_environment_hosts' required

Which option of the plan to carry out.

plan_idstring required

The plan this acts on, from POST …/reachability/plan.

Response

addressstring nullable
audience'public' | 'private' | 'signed_in' | 'tailnet_users' | 'unsupported' required

Who an address is for.

created_atstring date-time required
environment_idinteger nullable
errorstring nullable

What went wrong or what is still missing, and what to do.

finished_atstring date-time nullable
idinteger required
live_urlstring nullable

The address, once it is reachable.

optionstring required
plan_idstring nullable
project_idinteger nullable
state'running' | 'succeeded' | 'waiting' | 'failed' | 'interrupted' | 'recovering' | 'conflict' | 'undoing' | 'undo_paused' | 'undone' required
updated_atstring date-time required

Example response

{
  "created": [
    {
      "after": {
        "principals": [
          {
            "value": "alice@example.com"
          }
        ]
      },
      "before": {
        "principals": [
          {
            "value": "alice@example.com"
          }
        ]
      }
    }
  ],
  "journal": [
    {
      "intent": {
        "after": {
          "principals": [
            {
              "value": "alice@example.com"
            }
          ]
        },
        "before": {
          "principals": [
            {
              "value": "alice@example.com"
            }
          ]
        }
      },
      "resource": {
        "after": {
          "principals": [
            {
              "value": "alice@example.com"
            }
          ]
        },
        "before": {
          "principals": [
            {
              "value": "alice@example.com"
            }
          ]
        }
      }
    }
  ],
  "undo": [
    {
      "resource": {
        "after": {
          "principals": [
            {
              "value": "alice@example.com"
            }
          ]
        },
        "before": {
          "principals": [
            {
              "value": "alice@example.com"
            }
          ]
        }
      }
    }
  ]
}

Changes

    • breaking

      added subschema #16 subschema #17 to the created/items response property oneOf list for the response status

    • breaking

      added subschema #16 subschema #17 to the journal/items/intent response property oneOf list for the response status

    • breaking

      added subschema #16 subschema #17 to the journal/items/resource/oneOf[#/components/schemas/RunResource] response property oneOf list for the response status

    4 more changes in this revision