API

HostingAppDomain

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /api/v1/hosting/apps/{app_id}/domains/{id}/disable create Updated app domain
POST /api/v1/hosting/apps/{app_id}/domains/{id}/enable create Updated app domain
POST /api/v1/hosting/apps/{app_id}/domains create App domain created
GET /api/v1/hosting/apps/{app_id}/domains/{id} load Success
GET /api/v1/hosting/apps/{app_id}/domains load Success
PATCH /api/v1/hosting/apps/{app_id}/domains/{id} patch Success
DELETE /api/v1/hosting/apps/{app_id}/domains/{id} remove Success
PUT /api/v1/hosting/apps/{app_id}/domains/{id} update Success

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

hosting_app_domain, err := client.HostingAppDomain(nil).Load(map[string]any{"app_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(hosting_app_domain)
created, err := client.HostingAppDomain(nil).Create(map[string]any{"app_id": "example", "app_service_id": "example", "hostname": "example", "kind": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)
updated, err := client.HostingAppDomain(nil).Update(map[string]any{"id": "example_id", "app_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(updated)
patched, err := client.HostingAppDomain(nil).Patch(map[string]any{"id": "example_id", "app_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(patched)
removed, err := client.HostingAppDomain(nil).Remove(map[string]any{"app_id": "example", "id": "example_id"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(removed)

Lua

Construct client as shown in the Lua setup, then call the operations:

local hosting_app_domain, err = client:HostingAppDomain():load({ app_id = "example" })
local created, err = client:HostingAppDomain():create({ app_id = "example", app_service_id = "example", hostname = "example", kind = "example" })
local updated, err = client:HostingAppDomain():update({ id = "example_id", app_id = "example" })
local patched, err = client:HostingAppDomain():patch({ id = "example_id", app_id = "example" })
local removed, err = client:HostingAppDomain():remove({ app_id = "example", id = "example_id" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$hosting_app_domain = $client->HostingAppDomain()->load(["app_id" => "example"]);
$created = $client->HostingAppDomain()->create(["app_id" => "example", "app_service_id" => "example", "hostname" => "example", "kind" => "example"]);
$updated = $client->HostingAppDomain()->update(["id" => "example_id", "app_id" => "example"]);
$patched = $client->HostingAppDomain()->patch(["id" => "example_id", "app_id" => "example"]);
$client->HostingAppDomain()->remove(["app_id" => "example", "id" => "example_id"]);

Python

Construct client as shown in the Python setup, then call the operations:

hosting_app_domain = client.HostingAppDomain().load({"app_id": "example"})
created = client.HostingAppDomain().create({ "app_id": "example", "app_service_id": "example", "hostname": "example", "kind": "example" })
updated = client.HostingAppDomain().update({"id": "example_id", "app_id": "example"})
patched = client.HostingAppDomain().patch({"id": "example_id", "app_id": "example"})
client.HostingAppDomain().remove({"app_id": "example", "id": "example_id"})

Ruby

Construct client as shown in the Ruby setup, then call the operations:

hosting_app_domain = client.HostingAppDomain.load({ "app_id" => "example" })
created = client.HostingAppDomain.create({ "app_id" => "example", "app_service_id" => "example", "hostname" => "example", "kind" => "example" })
updated = client.HostingAppDomain.update({ "id" => "example_id", "app_id" => "example" })
patched = client.HostingAppDomain.patch({ "id" => "example_id", "app_id" => "example" })
client.HostingAppDomain.remove({ "app_id" => "example", "id" => "example_id" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const hosting_app_domain = await client.HostingAppDomain().load({ app_id: "example" })
const created = await client.HostingAppDomain().create({ app_id: "example", app_service_id: "example", hostname: "example", kind: "example" })
const updated = await client.HostingAppDomain().update({ id: "example_id", app_id: "example" })
const patched = await client.HostingAppDomain().patch({ id: "example_id", app_id: "example" })
await client.HostingAppDomain().remove({ app_id: "example", id: "example_id" })

Fields

Field Type Required Description
app_environment_id one,string,null Yes App Environment Id
app_service_id one,string,null Yes App Service Id
certificate one,object,null Yes Certificate
created_at string Yes Created At
dns_mode string Yes Dns Mode
dns_status string Yes Dns Status
failure_message one,string,null Yes Failure Message
hosted_app_id string Yes Hosted App Id
hostname string Yes Hostname
id string Yes Id
kind string Yes Kind
last_checked_at one,string,null Yes Last Checked At
path_rules array Yes Path Rules
record_name one,string,null Yes Record Name
record_type one,string,null Yes Record Type
record_value one,string,null Yes Record Value
redirect_to one,string,null Yes Redirect To
static_site_id one,string,null Yes Static Site Id
target_kind string Yes Target Kind
tls_status string Yes Tls Status
updated_at string Yes Updated At
verification_record one,object,null Yes Verification Record
verification_status string Yes Verification Status

create

POST /api/v1/hosting/apps/{app_id}/domains/{id}/disable

Operation ID: disable_api_v1_app_domain.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
app_id path string Yes
id path string Yes

Request body

application/json

The request body is object.

Responses

200: Updated app domain

application/json

Property Type Required Description
domain object Yes
domain.app_environment_id string Yes
domain.app_service_id string Yes
domain.certificate object Yes
domain.certificate.expires_at string (date-time) Yes
domain.certificate.last_error string Yes
domain.certificate.status string Yes
domain.created_at string (date-time) Yes
domain.dns_mode enum: manual_cname, cloudflare Yes
domain.dns_status enum: pending, configured, failed Yes
domain.failure_message string Yes
domain.hosted_app_id string Yes
domain.hostname string Yes
domain.id string Yes
domain.kind enum: primary, redirect, preview, internal Yes
domain.last_checked_at string (date-time) Yes
domain.path_rules array of object Yes
domain.path_rules[].action_kind enum: proxy, redirect, fixed_response, external Yes
domain.path_rules[].app_service_endpoint_id string Yes
domain.path_rules[].app_service_id string Yes
domain.path_rules[].backend_ref string Yes
domain.path_rules[].created_at string (date-time) Yes
domain.path_rules[].id string Yes
domain.path_rules[].last_error string Yes
domain.path_rules[].path_prefix string Yes
domain.path_rules[].status enum: pending, active, failed, disabled Yes
domain.path_rules[].updated_at string (date-time) Yes
domain.record_name string Yes
domain.record_type string Yes
domain.record_value string Yes
domain.redirect_to string Yes
domain.static_site_id string Yes
domain.target_kind enum: app_service, static_site Yes
domain.tls_status enum: pending, active, failed Yes
domain.updated_at string (date-time) Yes
domain.verification_record object Yes
domain.verification_record.name string Yes
domain.verification_record.type enum: TXT Yes
domain.verification_record.value string Yes
domain.verification_status string Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

POST /api/v1/hosting/apps/{app_id}/domains/{id}/enable

Operation ID: enable_api_v1_app_domain.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
app_id path string Yes
id path string Yes

Request body

application/json

The request body is object.

Responses

200: Updated app domain

application/json

Property Type Required Description
domain object Yes
domain.app_environment_id string Yes
domain.app_service_id string Yes
domain.certificate object Yes
domain.certificate.expires_at string (date-time) Yes
domain.certificate.last_error string Yes
domain.certificate.status string Yes
domain.created_at string (date-time) Yes
domain.dns_mode enum: manual_cname, cloudflare Yes
domain.dns_status enum: pending, configured, failed Yes
domain.failure_message string Yes
domain.hosted_app_id string Yes
domain.hostname string Yes
domain.id string Yes
domain.kind enum: primary, redirect, preview, internal Yes
domain.last_checked_at string (date-time) Yes
domain.path_rules array of object Yes
domain.path_rules[].action_kind enum: proxy, redirect, fixed_response, external Yes
domain.path_rules[].app_service_endpoint_id string Yes
domain.path_rules[].app_service_id string Yes
domain.path_rules[].backend_ref string Yes
domain.path_rules[].created_at string (date-time) Yes
domain.path_rules[].id string Yes
domain.path_rules[].last_error string Yes
domain.path_rules[].path_prefix string Yes
domain.path_rules[].status enum: pending, active, failed, disabled Yes
domain.path_rules[].updated_at string (date-time) Yes
domain.record_name string Yes
domain.record_type string Yes
domain.record_value string Yes
domain.redirect_to string Yes
domain.static_site_id string Yes
domain.target_kind enum: app_service, static_site Yes
domain.tls_status enum: pending, active, failed Yes
domain.updated_at string (date-time) Yes
domain.verification_record object Yes
domain.verification_record.name string Yes
domain.verification_record.type enum: TXT Yes
domain.verification_record.value string Yes
domain.verification_status string Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

POST /api/v1/hosting/apps/{app_id}/domains

Operation ID: post_api_v1_hosting_apps_app_id_domains.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
app_id path string Yes

Request body

application/json

Property Type Required Description
app_environment_id string No
app_service_id string Yes
dns_status enum: pending, configured, failed No
hostname string Yes
kind enum: primary, redirect, preview, internal Yes
redirect_to string No
tls_status enum: pending, active, failed No

Responses

200: App domain created

application/json

Property Type Required Description
domain object Yes
domain.app_environment_id string Yes
domain.app_service_id string Yes
domain.certificate object Yes
domain.certificate.expires_at string (date-time) Yes
domain.certificate.last_error string Yes
domain.certificate.status string Yes
domain.created_at string (date-time) Yes
domain.dns_mode enum: manual_cname, cloudflare Yes
domain.dns_status enum: pending, configured, failed Yes
domain.failure_message string Yes
domain.hosted_app_id string Yes
domain.hostname string Yes
domain.id string Yes
domain.kind enum: primary, redirect, preview, internal Yes
domain.last_checked_at string (date-time) Yes
domain.path_rules array of object Yes
domain.path_rules[].action_kind enum: proxy, redirect, fixed_response, external Yes
domain.path_rules[].app_service_endpoint_id string Yes
domain.path_rules[].app_service_id string Yes
domain.path_rules[].backend_ref string Yes
domain.path_rules[].created_at string (date-time) Yes
domain.path_rules[].id string Yes
domain.path_rules[].last_error string Yes
domain.path_rules[].path_prefix string Yes
domain.path_rules[].status enum: pending, active, failed, disabled Yes
domain.path_rules[].updated_at string (date-time) Yes
domain.record_name string Yes
domain.record_type string Yes
domain.record_value string Yes
domain.redirect_to string Yes
domain.static_site_id string Yes
domain.target_kind enum: app_service, static_site Yes
domain.tls_status enum: pending, active, failed Yes
domain.updated_at string (date-time) Yes
domain.verification_record object Yes
domain.verification_record.name string Yes
domain.verification_record.type enum: TXT Yes
domain.verification_record.value string Yes
domain.verification_status string Yes
201: App domain created

application/json

Property Type Required Description
domain object Yes
domain.app_environment_id string Yes
domain.app_service_id string Yes
domain.certificate object Yes
domain.certificate.expires_at string (date-time) Yes
domain.certificate.last_error string Yes
domain.certificate.status string Yes
domain.created_at string (date-time) Yes
domain.dns_mode enum: manual_cname, cloudflare Yes
domain.dns_status enum: pending, configured, failed Yes
domain.failure_message string Yes
domain.hosted_app_id string Yes
domain.hostname string Yes
domain.id string Yes
domain.kind enum: primary, redirect, preview, internal Yes
domain.last_checked_at string (date-time) Yes
domain.path_rules array of object Yes
domain.path_rules[].action_kind enum: proxy, redirect, fixed_response, external Yes
domain.path_rules[].app_service_endpoint_id string Yes
domain.path_rules[].app_service_id string Yes
domain.path_rules[].backend_ref string Yes
domain.path_rules[].created_at string (date-time) Yes
domain.path_rules[].id string Yes
domain.path_rules[].last_error string Yes
domain.path_rules[].path_prefix string Yes
domain.path_rules[].status enum: pending, active, failed, disabled Yes
domain.path_rules[].updated_at string (date-time) Yes
domain.record_name string Yes
domain.record_type string Yes
domain.record_value string Yes
domain.redirect_to string Yes
domain.static_site_id string Yes
domain.target_kind enum: app_service, static_site Yes
domain.tls_status enum: pending, active, failed Yes
domain.updated_at string (date-time) Yes
domain.verification_record object Yes
domain.verification_record.name string Yes
domain.verification_record.type enum: TXT Yes
domain.verification_record.value string Yes
domain.verification_status string Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Hosting delivery request failed validation

application/json

Property Type Required Description
details array of string No
error string Yes
502: Bad gateway

load

GET /api/v1/hosting/apps/{app_id}/domains/{id}

Operation ID: api_v1_app_domain.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
app_id path string Yes
id path string Yes

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

GET /api/v1/hosting/apps/{app_id}/domains

Operation ID: api_v1_app_domains.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
app_id path string Yes
app_environment_id query string No Return only records scoped to this environment of the app, including archived previews.

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

patch

PATCH /api/v1/hosting/apps/{app_id}/domains/{id}

Operation ID: patch_api_v1_hosting_apps_app_id_domains_id_.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
app_id path string Yes
id path string Yes

Request body

application/json

The request body is object.

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

remove

DELETE /api/v1/hosting/apps/{app_id}/domains/{id}

Operation ID: delete_api_v1_hosting_apps_app_id_domains_id_.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
app_id path string Yes
id path string Yes

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

update

PUT /api/v1/hosting/apps/{app_id}/domains/{id}

Operation ID: put_api_v1_hosting_apps_app_id_domains_id_.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
app_id path string Yes
id path string Yes

Request body

application/json

The request body is object.

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway