HostingVhost
A Web Hosting instance's virtual hosts, by fqdn: list, create, get, update or delete one, or purge its cache (cache).
Operations
Every route this entity exposes. Each route links to its own reference on this page.
| Method | Route | SDK operation | Returns |
|---|---|---|---|
POST |
/simplehosting/instances/{instance_id}/vhosts |
create |
Accepted |
GET |
/simplehosting/instances/{instance_id}/vhosts |
list |
OK |
GET |
/simplehosting/instances/{instance_id}/vhosts/{vhost_fqdn} |
load |
OK |
DELETE |
/simplehosting/instances/{instance_id}/vhosts/{vhost_fqdn} |
remove |
No Content |
DELETE |
/simplehosting/instances/{instance_id}/vhosts/{vhost_fqdn}/cache |
remove |
No Content |
PATCH |
/simplehosting/instances/{instance_id}/vhosts/{vhost_fqdn} |
update |
OK |
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_vhosts, err := client.HostingVhost(nil).List(map[string]any{"instance_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(hosting_vhosts)
hosting_vhost, err := client.HostingVhost(nil).Load(map[string]any{"fqdn": "example", "instance_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(hosting_vhost)
created, err := client.HostingVhost(nil).Create(map[string]any{"instance_id": "example", "application": map[string]any{}, "fqdn": "example", "linked_dns_zone": map[string]any{}}, nil)
if err != nil {
panic(err)
}
fmt.Println(created)
updated, err := client.HostingVhost(nil).Update(map[string]any{"fqdn": "example", "instance_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(updated)
removed, err := client.HostingVhost(nil).Remove(map[string]any{"fqdn": "example", "instance_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(removed)
Lua
Construct client as shown in the Lua setup, then call the operations:
local hosting_vhosts, err = client:HostingVhost():list({ instance_id = "example" })
local hosting_vhost, err = client:HostingVhost():load({ fqdn = "example", instance_id = "example" })
local created, err = client:HostingVhost():create({ instance_id = "example", application = {}, fqdn = "example", linked_dns_zone = {} })
local updated, err = client:HostingVhost():update({ fqdn = "example", instance_id = "example" })
local removed, err = client:HostingVhost():remove({ fqdn = "example", instance_id = "example" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$hosting_vhosts = $client->HostingVhost()->list(["instance_id" => "example"]);
$hosting_vhost = $client->HostingVhost()->load(["fqdn" => "example", "instance_id" => "example"]);
$created = $client->HostingVhost()->create(["instance_id" => "example", "application" => [], "fqdn" => "example", "linked_dns_zone" => []]);
$updated = $client->HostingVhost()->update(["fqdn" => "example", "instance_id" => "example"]);
$client->HostingVhost()->remove(["fqdn" => "example", "instance_id" => "example"]);
Python
Construct client as shown in the Python setup, then call the operations:
hosting_vhosts = client.HostingVhost().list({"instance_id": "example"})
hosting_vhost = client.HostingVhost().load({"fqdn": "example", "instance_id": "example"})
created = client.HostingVhost().create({ "instance_id": "example", "application": {}, "fqdn": "example", "linked_dns_zone": {} })
updated = client.HostingVhost().update({"fqdn": "example", "instance_id": "example"})
client.HostingVhost().remove({"fqdn": "example", "instance_id": "example"})
Ruby
Construct client as shown in the Ruby setup, then call the operations:
hosting_vhosts = client.HostingVhost.list({ "instance_id" => "example" })
hosting_vhost = client.HostingVhost.load({ "fqdn" => "example", "instance_id" => "example" })
created = client.HostingVhost.create({ "instance_id" => "example", "application" => {}, "fqdn" => "example", "linked_dns_zone" => {} })
updated = client.HostingVhost.update({ "fqdn" => "example", "instance_id" => "example" })
client.HostingVhost.remove({ "fqdn" => "example", "instance_id" => "example" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const hosting_vhosts = await client.HostingVhost().list({ instance_id: "example" })
const hosting_vhost = await client.HostingVhost().load({ fqdn: "example", instance_id: "example" })
const created = await client.HostingVhost().create({ instance_id: "example", application: {}, fqdn: "example", linked_dns_zone: {} })
const updated = await client.HostingVhost().update({ fqdn: "example", instance_id: "example" })
await client.HostingVhost().remove({ fqdn: "example", instance_id: "example" })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
application |
object |
Yes | Application |
created_at |
string |
Yes | Created At |
deployment |
object |
Yes | Deployment |
fqdn |
string |
Yes | Fqdn |
https_strategy |
string |
No | Https Strategy |
is_a_test_vhost |
boolean |
Yes | Is A Test Vhost |
linked_dns_zone |
object |
Yes | Linked Dns Zone |
status |
string |
Yes | Status |
tls_validated_at |
string |
No | Tls Validated At |
create
POST /simplehosting/instances/{instance_id}/vhosts
Operation ID: postSimplehostingInstancesInstanceIdVhosts.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
instance_id |
path |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
application |
object |
No | |
application.name |
string |
Yes | |
application.parameters |
object |
No | |
fqdn |
string |
Yes | |
linked_dns_zone |
object |
No | |
linked_dns_zone.allow_alteration |
boolean |
Yes | |
linked_dns_zone.allow_alteration_override |
boolean |
No |
Responses
202: Accepted
application/json
| Property | Type | Required | Description |
|---|---|---|---|
fqdn |
string |
Yes | |
https_strategy |
enum: HTTP_only, allow_HTTP_and_HTTPS, redirect_HTTP_to_HTTPS |
Yes | |
linked_dns_zone |
object |
Yes | |
linked_dns_zone.allow_alteration |
boolean |
Yes | |
linked_dns_zone.last_checked_status |
enum: altered, livedns_conflict, livedns_done, livedns_error, unknown |
Yes | |
status |
enum: being_created, running, being_deleted, locked, waiting_ownership, ownership_validated, ... |
Yes |
401: Unauthorized
application/json
| Property | Type | Required | Description |
|---|---|---|---|
cause |
string |
Yes | |
code |
integer |
Yes | |
message |
string |
Yes | |
object |
string |
Yes |
403: Forbidden
application/json
| Property | Type | Required | Description |
|---|---|---|---|
cause |
string |
Yes | |
code |
integer |
Yes | |
message |
string |
Yes | |
object |
string |
Yes |
422: Unprocessable Entity
list
GET /simplehosting/instances/{instance_id}/vhosts
Operation ID: getSimplehostingInstancesInstanceIdVhosts.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
instance_id |
path |
string |
Yes | |
fqdn |
query |
string |
No | |
page |
query |
integer |
No | |
per_page |
query |
integer |
No | |
sort_by |
query |
string |
No | |
status |
query |
enum: being_created, running, being_deleted, locked, waiting_ownership, ownership_validated, ... |
No |
Responses
200: OK
application/json
| Property | Type | Required | Description |
|---|---|---|---|
[].application |
object |
No | |
[].application.name |
string |
Yes | |
[].application.parameters |
object |
No | |
[].created_at |
string (date-time) |
Yes | |
[].fqdn |
string |
Yes | |
[].https_strategy |
enum: HTTP_only, allow_HTTP_and_HTTPS, redirect_HTTP_to_HTTPS |
No | |
[].is_a_test_vhost |
boolean |
Yes | |
[].linked_dns_zone |
object |
Yes | |
[].linked_dns_zone.allow_alteration |
boolean |
Yes | |
[].linked_dns_zone.last_checked_at |
string (date-time) |
No | |
[].linked_dns_zone.last_checked_status |
enum: altered, livedns_conflict, livedns_done, livedns_error, unknown |
Yes | |
[].status |
enum: being_created, running, being_deleted, locked, waiting_ownership, ownership_validated, ... |
Yes | |
[].tls_validated_at |
string (date-time) |
No |
401: Unauthorized
application/json
| Property | Type | Required | Description |
|---|---|---|---|
cause |
string |
Yes | |
code |
integer |
Yes | |
message |
string |
Yes | |
object |
string |
Yes |
403: Forbidden
application/json
| Property | Type | Required | Description |
|---|---|---|---|
cause |
string |
Yes | |
code |
integer |
Yes | |
message |
string |
Yes | |
object |
string |
Yes |
load
GET /simplehosting/instances/{instance_id}/vhosts/{vhost_fqdn}
Operation ID: getSimplehostingInstancesInstanceIdVhostsVhostFqdn.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
instance_id |
path |
string |
Yes | |
vhost_fqdn |
path |
string |
Yes |
Responses
200: OK
application/json
| Property | Type | Required | Description |
|---|---|---|---|
application |
object |
No | |
application.name |
string |
Yes | |
application.parameters |
object |
No | |
application.status |
enum: error, running, being_created, cancelled |
Yes | |
created_at |
string (date-time) |
Yes | |
deployment |
object |
No | |
deployment.git |
object |
Yes | |
deployment.git.deploy_command |
string |
Yes | |
deployment.git.remote_command |
string |
Yes | |
deployment.git.url |
string |
Yes | |
deployment.sftp |
object |
Yes | |
deployment.sftp.directory |
string |
Yes | |
deployment.sftp.document_root |
string |
Yes | |
deployment.sftp.server |
string |
Yes | |
deployment.sftp.url |
string |
Yes | |
fqdn |
string |
Yes | |
https_strategy |
enum: HTTP_only, allow_HTTP_and_HTTPS, redirect_HTTP_to_HTTPS |
No | |
is_a_test_vhost |
boolean |
Yes | |
linked_dns_zone |
object |
Yes | |
linked_dns_zone.allow_alteration |
boolean |
Yes | |
linked_dns_zone.cname |
string |
Yes | |
linked_dns_zone.domain |
string |
Yes | |
linked_dns_zone.ipv4 |
string |
Yes | |
linked_dns_zone.ipv6 |
string |
Yes | |
linked_dns_zone.is_alterable |
boolean |
Yes | |
linked_dns_zone.is_root |
boolean |
Yes | |
linked_dns_zone.key |
string |
Yes | |
linked_dns_zone.last_checked_at |
string (date-time) |
No | |
linked_dns_zone.last_checked_status |
enum: altered, livedns_conflict, livedns_done, livedns_error, unknown |
Yes | |
linked_dns_zone.txt |
string |
Yes | |
status |
enum: being_created, running, being_deleted, locked, waiting_ownership, ownership_validated, ... |
Yes | |
tls_validated_at |
string (date-time) |
No |
401: Unauthorized
application/json
| Property | Type | Required | Description |
|---|---|---|---|
cause |
string |
Yes | |
code |
integer |
Yes | |
message |
string |
Yes | |
object |
string |
Yes |
403: Forbidden
application/json
| Property | Type | Required | Description |
|---|---|---|---|
cause |
string |
Yes | |
code |
integer |
Yes | |
message |
string |
Yes | |
object |
string |
Yes |
remove
DELETE /simplehosting/instances/{instance_id}/vhosts/{vhost_fqdn}
Operation ID: deleteSimplehostingInstancesInstanceIdVhostsVhostFqdn.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
instance_id |
path |
string |
Yes | |
vhost_fqdn |
path |
string |
Yes |
Responses
204: No Content
401: Unauthorized
application/json
| Property | Type | Required | Description |
|---|---|---|---|
cause |
string |
Yes | |
code |
integer |
Yes | |
message |
string |
Yes | |
object |
string |
Yes |
403: Forbidden
application/json
| Property | Type | Required | Description |
|---|---|---|---|
cause |
string |
Yes | |
code |
integer |
Yes | |
message |
string |
Yes | |
object |
string |
Yes |
DELETE /simplehosting/instances/{instance_id}/vhosts/{vhost_fqdn}/cache
Operation ID: deleteSimplehostingInstancesInstanceIdVhostsVhostFqdnCache.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
instance_id |
path |
string |
Yes | |
vhost_fqdn |
path |
string |
Yes |
Responses
204: No Content
401: Unauthorized
application/json
| Property | Type | Required | Description |
|---|---|---|---|
cause |
string |
Yes | |
code |
integer |
Yes | |
message |
string |
Yes | |
object |
string |
Yes |
403: Forbidden
application/json
| Property | Type | Required | Description |
|---|---|---|---|
cause |
string |
Yes | |
code |
integer |
Yes | |
message |
string |
Yes | |
object |
string |
Yes |
update
PATCH /simplehosting/instances/{instance_id}/vhosts/{vhost_fqdn}
Operation ID: patchSimplehostingInstancesInstanceIdVhostsVhostFqdn.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
instance_id |
path |
string |
Yes | |
vhost_fqdn |
path |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
application |
object |
No | |
application.name |
string |
Yes | |
application.parameters |
object |
No | |
https_strategy |
enum: HTTP_only, allow_HTTP_and_HTTPS, redirect_HTTP_to_HTTPS |
No | |
linked_dns_zone |
object |
No | |
linked_dns_zone.allow_alteration |
boolean |
Yes | |
linked_dns_zone.allow_alteration_override |
boolean |
No |
Responses
200: OK
application/json
| Property | Type | Required | Description |
|---|---|---|---|
fqdn |
string |
Yes | |
https_strategy |
enum: HTTP_only, allow_HTTP_and_HTTPS, redirect_HTTP_to_HTTPS |
Yes | |
linked_dns_zone |
object |
Yes | |
linked_dns_zone.allow_alteration |
boolean |
Yes | |
linked_dns_zone.last_checked_status |
enum: altered, livedns_conflict, livedns_done, livedns_error, unknown |
Yes | |
status |
enum: being_created, running, being_deleted, locked, waiting_ownership, ownership_validated, ... |
Yes |
401: Unauthorized
application/json
| Property | Type | Required | Description |
|---|---|---|---|
cause |
string |
Yes | |
code |
integer |
Yes | |
message |
string |
Yes | |
object |
string |
Yes |
403: Forbidden
application/json
| Property | Type | Required | Description |
|---|---|---|---|
cause |
string |
Yes | |
code |
integer |
Yes | |
message |
string |
Yes | |
object |
string |
Yes |