DomainPathRule
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/{domain_id}/path_rules |
create |
Path rule created |
GET |
/api/v1/hosting/apps/{app_id}/domains/{domain_id}/path_rules |
list |
Path rules for the domain, in routing precedence (most-specific prefix first, "/" catch-all last) |
GET |
/api/v1/hosting/apps/{app_id}/domains/{domain_id}/path_rules/{id} |
load |
App domain path rule |
PATCH |
/api/v1/hosting/apps/{app_id}/domains/{domain_id}/path_rules/{id} |
patch |
App domain path rule |
DELETE |
/api/v1/hosting/apps/{app_id}/domains/{domain_id}/path_rules/{id} |
remove |
Success |
PUT |
/api/v1/hosting/apps/{app_id}/domains/{domain_id}/path_rules/{id} |
update |
App domain path rule |
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:
domain_path_rules, err := client.DomainPathRule(nil).List(map[string]any{"app_id": "example", "domain_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(domain_path_rules)
domain_path_rule, err := client.DomainPathRule(nil).Load(map[string]any{"app_id": "example", "domain_id": "example", "id": "example_id"}, nil)
if err != nil {
panic(err)
}
fmt.Println(domain_path_rule)
created, err := client.DomainPathRule(nil).Create(map[string]any{"app_id": "example", "domain_id": "example", "app_service_id": "example", "path_prefix": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(created)
updated, err := client.DomainPathRule(nil).Update(map[string]any{"id": "example_id", "app_id": "example", "domain_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(updated)
patched, err := client.DomainPathRule(nil).Patch(map[string]any{"id": "example_id", "app_id": "example", "domain_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(patched)
removed, err := client.DomainPathRule(nil).Remove(map[string]any{"app_id": "example", "domain_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 domain_path_rules, err = client:DomainPathRule():list({ app_id = "example", domain_id = "example" })
local domain_path_rule, err = client:DomainPathRule():load({ app_id = "example", domain_id = "example", id = "example_id" })
local created, err = client:DomainPathRule():create({ app_id = "example", domain_id = "example", app_service_id = "example", path_prefix = "example" })
local updated, err = client:DomainPathRule():update({ id = "example_id", app_id = "example", domain_id = "example" })
local patched, err = client:DomainPathRule():patch({ id = "example_id", app_id = "example", domain_id = "example" })
local removed, err = client:DomainPathRule():remove({ app_id = "example", domain_id = "example", id = "example_id" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$domain_path_rules = $client->DomainPathRule()->list(["app_id" => "example", "domain_id" => "example"]);
$domain_path_rule = $client->DomainPathRule()->load(["app_id" => "example", "domain_id" => "example", "id" => "example_id"]);
$created = $client->DomainPathRule()->create(["app_id" => "example", "domain_id" => "example", "app_service_id" => "example", "path_prefix" => "example"]);
$updated = $client->DomainPathRule()->update(["id" => "example_id", "app_id" => "example", "domain_id" => "example"]);
$patched = $client->DomainPathRule()->patch(["id" => "example_id", "app_id" => "example", "domain_id" => "example"]);
$client->DomainPathRule()->remove(["app_id" => "example", "domain_id" => "example", "id" => "example_id"]);
Python
Construct client as shown in the Python setup, then call the operations:
domain_path_rules = client.DomainPathRule().list({"app_id": "example", "domain_id": "example"})
domain_path_rule = client.DomainPathRule().load({"app_id": "example", "domain_id": "example", "id": "example_id"})
created = client.DomainPathRule().create({ "app_id": "example", "domain_id": "example", "app_service_id": "example", "path_prefix": "example" })
updated = client.DomainPathRule().update({"id": "example_id", "app_id": "example", "domain_id": "example"})
patched = client.DomainPathRule().patch({"id": "example_id", "app_id": "example", "domain_id": "example"})
client.DomainPathRule().remove({"app_id": "example", "domain_id": "example", "id": "example_id"})
Ruby
Construct client as shown in the Ruby setup, then call the operations:
domain_path_rules = client.DomainPathRule.list({ "app_id" => "example", "domain_id" => "example" })
domain_path_rule = client.DomainPathRule.load({ "app_id" => "example", "domain_id" => "example", "id" => "example_id" })
created = client.DomainPathRule.create({ "app_id" => "example", "domain_id" => "example", "app_service_id" => "example", "path_prefix" => "example" })
updated = client.DomainPathRule.update({ "id" => "example_id", "app_id" => "example", "domain_id" => "example" })
patched = client.DomainPathRule.patch({ "id" => "example_id", "app_id" => "example", "domain_id" => "example" })
client.DomainPathRule.remove({ "app_id" => "example", "domain_id" => "example", "id" => "example_id" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const domain_path_rules = await client.DomainPathRule().list({ app_id: "example", domain_id: "example" })
const domain_path_rule = await client.DomainPathRule().load({ app_id: "example", domain_id: "example", id: "example_id" })
const created = await client.DomainPathRule().create({ app_id: "example", domain_id: "example", app_service_id: "example", path_prefix: "example" })
const updated = await client.DomainPathRule().update({ id: "example_id", app_id: "example", domain_id: "example" })
const patched = await client.DomainPathRule().patch({ id: "example_id", app_id: "example", domain_id: "example" })
await client.DomainPathRule().remove({ app_id: "example", domain_id: "example", id: "example_id" })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
action_kind |
string |
Yes | Action Kind |
app_service_endpoint_id |
one,string,null |
Yes | App Service Endpoint Id |
app_service_id |
one,string,null |
Yes | App Service Id |
backend_ref |
one,string,null |
Yes | Backend Ref |
created_at |
string |
Yes | Created At |
id |
string |
Yes | Id |
last_error |
one,string,null |
Yes | Last Error |
path_prefix |
string |
Yes | Path Prefix |
status |
string |
Yes | Status |
updated_at |
string |
Yes | Updated At |
create
POST /api/v1/hosting/apps/{app_id}/domains/{domain_id}/path_rules
Operation ID: post_api_v1_hosting_apps_app_id_domains_domain_id_path_rules.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
app_id |
path |
string |
Yes | |
domain_id |
path |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
app_service_endpoint_id |
string |
No | |
app_service_id |
string |
Yes | |
path_prefix |
string |
Yes |
Responses
200: Path rule created
application/json
| Property | Type | Required | Description |
|---|---|---|---|
path_rule |
object |
Yes | |
path_rule.action_kind |
enum: proxy, redirect, fixed_response, external |
Yes | |
path_rule.app_service_endpoint_id |
string |
Yes | |
path_rule.app_service_id |
string |
Yes | |
path_rule.backend_ref |
string |
Yes | |
path_rule.created_at |
string (date-time) |
Yes | |
path_rule.id |
string |
Yes | |
path_rule.last_error |
string |
Yes | |
path_rule.path_prefix |
string |
Yes | |
path_rule.status |
enum: pending, active, failed, disabled |
Yes | |
path_rule.updated_at |
string (date-time) |
Yes |
201: Path rule created
application/json
| Property | Type | Required | Description |
|---|---|---|---|
path_rule |
object |
Yes | |
path_rule.action_kind |
enum: proxy, redirect, fixed_response, external |
Yes | |
path_rule.app_service_endpoint_id |
string |
Yes | |
path_rule.app_service_id |
string |
Yes | |
path_rule.backend_ref |
string |
Yes | |
path_rule.created_at |
string (date-time) |
Yes | |
path_rule.id |
string |
Yes | |
path_rule.last_error |
string |
Yes | |
path_rule.path_prefix |
string |
Yes | |
path_rule.status |
enum: pending, active, failed, disabled |
Yes | |
path_rule.updated_at |
string (date-time) |
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
list
GET /api/v1/hosting/apps/{app_id}/domains/{domain_id}/path_rules
Operation ID: api_v1_app_domain_path_rules.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
app_id |
path |
string |
Yes | |
domain_id |
path |
string |
Yes |
Responses
200: Path rules for the domain, in routing precedence (most-specific prefix first, "/" catch-all last)
application/json
| Property | Type | Required | Description |
|---|---|---|---|
path_rules |
array of object |
Yes | |
path_rules[].action_kind |
enum: proxy, redirect, fixed_response, external |
Yes | |
path_rules[].app_service_endpoint_id |
string |
Yes | |
path_rules[].app_service_id |
string |
Yes | |
path_rules[].backend_ref |
string |
Yes | |
path_rules[].created_at |
string (date-time) |
Yes | |
path_rules[].id |
string |
Yes | |
path_rules[].last_error |
string |
Yes | |
path_rules[].path_prefix |
string |
Yes | |
path_rules[].status |
enum: pending, active, failed, disabled |
Yes | |
path_rules[].updated_at |
string (date-time) |
Yes |
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
load
GET /api/v1/hosting/apps/{app_id}/domains/{domain_id}/path_rules/{id}
Operation ID: api_v1_app_domain_path_rule.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
app_id |
path |
string |
Yes | |
domain_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Responses
200: App domain path rule
application/json
| Property | Type | Required | Description |
|---|---|---|---|
path_rule |
object |
Yes | |
path_rule.action_kind |
enum: proxy, redirect, fixed_response, external |
Yes | |
path_rule.app_service_endpoint_id |
string |
Yes | |
path_rule.app_service_id |
string |
Yes | |
path_rule.backend_ref |
string |
Yes | |
path_rule.created_at |
string (date-time) |
Yes | |
path_rule.id |
string |
Yes | |
path_rule.last_error |
string |
Yes | |
path_rule.path_prefix |
string |
Yes | |
path_rule.status |
enum: pending, active, failed, disabled |
Yes | |
path_rule.updated_at |
string (date-time) |
Yes |
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
patch
PATCH /api/v1/hosting/apps/{app_id}/domains/{domain_id}/path_rules/{id}
Operation ID: patch_api_v1_hosting_apps_app_id_domains_domain_id_path_rules_id_.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
app_id |
path |
string |
Yes | |
domain_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
app_service_endpoint_id |
string |
No | |
app_service_id |
string |
Yes | |
path_prefix |
string |
Yes |
Responses
200: App domain path rule
application/json
| Property | Type | Required | Description |
|---|---|---|---|
path_rule |
object |
Yes | |
path_rule.action_kind |
enum: proxy, redirect, fixed_response, external |
Yes | |
path_rule.app_service_endpoint_id |
string |
Yes | |
path_rule.app_service_id |
string |
Yes | |
path_rule.backend_ref |
string |
Yes | |
path_rule.created_at |
string (date-time) |
Yes | |
path_rule.id |
string |
Yes | |
path_rule.last_error |
string |
Yes | |
path_rule.path_prefix |
string |
Yes | |
path_rule.status |
enum: pending, active, failed, disabled |
Yes | |
path_rule.updated_at |
string (date-time) |
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
remove
DELETE /api/v1/hosting/apps/{app_id}/domains/{domain_id}/path_rules/{id}
Operation ID: delete_api_v1_hosting_apps_app_id_domains_domain_id_path_rules_id_.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
app_id |
path |
string |
Yes | |
domain_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Responses
200: Success
application/json
The response is object.
204: Path rule deleted
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
update
PUT /api/v1/hosting/apps/{app_id}/domains/{domain_id}/path_rules/{id}
Operation ID: put_api_v1_hosting_apps_app_id_domains_domain_id_path_rules_id_.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
app_id |
path |
string |
Yes | |
domain_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
app_service_endpoint_id |
string |
No | |
app_service_id |
string |
Yes | |
path_prefix |
string |
Yes |
Responses
200: App domain path rule
application/json
| Property | Type | Required | Description |
|---|---|---|---|
path_rule |
object |
Yes | |
path_rule.action_kind |
enum: proxy, redirect, fixed_response, external |
Yes | |
path_rule.app_service_endpoint_id |
string |
Yes | |
path_rule.app_service_id |
string |
Yes | |
path_rule.backend_ref |
string |
Yes | |
path_rule.created_at |
string (date-time) |
Yes | |
path_rule.id |
string |
Yes | |
path_rule.last_error |
string |
Yes | |
path_rule.path_prefix |
string |
Yes | |
path_rule.status |
enum: pending, active, failed, disabled |
Yes | |
path_rule.updated_at |
string (date-time) |
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 |