deleteProjectsBySlugDomainsByHostWithHttpInfo method

Future<Response> deleteProjectsBySlugDomainsByHostWithHttpInfo(
  1. String slug,
  2. String host
)

Gives a custom hostname back, so the name is free to reuse.

Gives a custom hostname back, so the name is free to reuse. A claim is FIRST-COME and global, so an add-only surface was not ownership but a leak: a customer who mistyped a domain, or claimed one they later moved elsewhere, could neither reuse it nor let anyone else. This is the third writer that closes it. The release is scoped to (host, org, slug), so it can only ever drop THIS tenant's own claim, and it is IDEMPOTENT: releasing a host we do not hold is a clean 204, never a 404 that would let a caller probe which hosts other tenants hold. The edge cache-tag is flushed, since the host stops routing here. Scope: a validated principal is required (403 without one) and the site is resolved within that principal's org, so another tenant's slug is a 404.

Note: This method returns the HTTP Response.

Parameters:

  • String slug (required): Slug is the project the host is attached to, from the path.

  • String host (required): Host is the custom hostname, from the path. It is cleaned to its canonical form (lowercased, trailing dot dropped) before anything is looked up.

Implementation

Future<Response> deleteProjectsBySlugDomainsByHostWithHttpInfo(String slug, String host,) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/projects/{slug}/domains/{host}'
    .replaceAll('{slug}', slug)
    .replaceAll('{host}', host);

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>[];


  return apiClient.invokeAPI(
    path,
    'DELETE',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}