HydraCore
API by router

Webhost

List Webhost Nodes

GET
/v1/webhost/nodes

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response
[index: integer]?
Example Request
curl -X GET 'https://example.com/v1/webhost/nodes'
Example Response
[  {    "capacity_sites": 0,    "created_at": "2019-08-24T14:15:22Z",    "host_instance_id": "e4401c96-13ab-4e07-90ac-7be0c56a09cc",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "metadata_json": {},    "name": "string",    "region_id": "string",    "status": "string",    "updated_at": "2019-08-24T14:15:22Z",    "used_sites": 0  }]

Create Webhost Node

POST
/v1/webhost/nodes

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Header Parameters

X-Api-Key?string|null

Request Body

application/json
  1. body
capacity_sites?Capacity Sites
Range1 <= value <= 500
Default25
host_instance_id*Host Instance Id
Formatuuid
name*Name
Length1 <= length <= 120

Response Body

Successful Response

application/json
  1. response
capacity_sites*Capacity Sites
created_at*Created At
Formatdate-time
host_instance_id*Host Instance Id
Formatuuid
id*Id
Formatuuid
metadata_json?
name*Name
region_id?string|null
status*Status
updated_at*Updated At
Formatdate-time
used_sites*Used Sites
Example Request
curl -X POST 'https://example.com/v1/webhost/nodes' \  -H 'Content-Type: application/json' \  -d '{  "host_instance_id": "e4401c96-13ab-4e07-90ac-7be0c56a09cc",  "name": "string"}'
Example Response
{  "capacity_sites": 0,  "created_at": "2019-08-24T14:15:22Z",  "host_instance_id": "e4401c96-13ab-4e07-90ac-7be0c56a09cc",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "metadata_json": {},  "name": "string",  "region_id": "string",  "status": "string",  "updated_at": "2019-08-24T14:15:22Z",  "used_sites": 0}

Get Webhost Node

GET
/v1/webhost/nodes/{node_id}

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

node_id*Node Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response
capacity_sites*Capacity Sites
created_at*Created At
Formatdate-time
host_instance_id*Host Instance Id
Formatuuid
id*Id
Formatuuid
metadata_json?
name*Name
region_id?string|null
status*Status
updated_at*Updated At
Formatdate-time
used_sites*Used Sites
Example Request
curl -X GET 'https://example.com/v1/webhost/nodes/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "capacity_sites": 0,  "created_at": "2019-08-24T14:15:22Z",  "host_instance_id": "e4401c96-13ab-4e07-90ac-7be0c56a09cc",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "metadata_json": {},  "name": "string",  "region_id": "string",  "status": "string",  "updated_at": "2019-08-24T14:15:22Z",  "used_sites": 0}

Get Webhost Capacity

GET
/v1/webhost/nodes/{node_id}/capacity

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

node_id*Node Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response
available_sites*Available Sites
capacity_sites*Capacity Sites
node_id*Node Id
Formatuuid
status*Status
used_sites*Used Sites
Example Request
curl -X GET 'https://example.com/v1/webhost/nodes/497f6eca-6276-4993-bfeb-53cbbbba6f08/capacity'
Example Response
{  "available_sites": 0,  "capacity_sites": 0,  "node_id": "6e0bdcac-9717-4a6f-972e-97489dffeb0c",  "status": "string",  "used_sites": 0}
GET
/v1/webhost/nodes/{node_id}/telemetry

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

node_id*Node Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response
app_sites?App Sites
Default0
collected_at?Collected At
Formatdate-time
disk_available_bytes?Disk Available Bytes
Default0
disk_total_bytes?Disk Total Bytes
Default0
disk_used_bytes?Disk Used Bytes
Default0
error?string|null
host_instance_id*Host Instance Id
Formatuuid
host_instance_status*Host Instance Status
keep_bytes_budget?integer|null
keep_count?integer|null
live_sites?Live Sites
Default0
node_id*Node Id
Formatuuid
reachable*Reachable
release_bytes?Release Bytes
Default0
release_count?Release Count
Default0
total_sites?Total Sites
Default0
Example Request
curl -X GET 'https://example.com/v1/webhost/nodes/497f6eca-6276-4993-bfeb-53cbbbba6f08/telemetry'
Example Response
{  "app_sites": 0,  "collected_at": "2019-08-24T14:15:22Z",  "disk_available_bytes": 0,  "disk_total_bytes": 0,  "disk_used_bytes": 0,  "error": "string",  "host_instance_id": "e4401c96-13ab-4e07-90ac-7be0c56a09cc",  "host_instance_status": "string",  "keep_bytes_budget": 0,  "keep_count": 0,  "live_sites": 0,  "node_id": "6e0bdcac-9717-4a6f-972e-97489dffeb0c",  "reachable": true,  "release_bytes": 0,  "release_count": 0,  "total_sites": 0}

List Hosted Websites

GET
/v1/webhost/sites

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response
[index: integer]?
Example Request
curl -X GET 'https://example.com/v1/webhost/sites'
Example Response
[  {    "created_at": "2019-08-24T14:15:22Z",    "current_commit_sha": "string",    "current_release_id": "string",    "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",    "dedicated_instance_id": "e82b7abe-feea-468c-83e4-862e76c31e5f",    "deployed_at": "2019-08-24T14:15:22Z",    "hosting_mode": "string",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "metadata_json": {},    "name": "string",    "primary_domain": "string",    "repo_path": "string",    "status": "string",    "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0",    "updated_at": "2019-08-24T14:15:22Z",    "webhost_node_id": "74e0578b-8bae-4d5e-9ee2-da58f6bde41d",    "website_config_id": "c0aa0662-77a9-4227-8f52-c7a29b8a3ad3"  }]

Create Hosted Website

POST
/v1/webhost/sites

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Header Parameters

X-Api-Key?string|null

Request Body

application/json
  1. body
customer_id?|null
dedicated_instance_id?|null
hosting_mode*Hosting Mode
Match^(dedicated|shared)$
name*Name
Length1 <= length <= 160
primary_domain?|null
webhost_node_id?|null
website_config_id?|null

Response Body

Successful Response

application/json
  1. response
created_at*Created At
Formatdate-time
current_commit_sha?string|null
current_release_id?string|null
customer_id?|null
dedicated_instance_id?|null
deployed_at?|null
hosting_mode*Hosting Mode
id*Id
Formatuuid
metadata_json?
name*Name
primary_domain?string|null
repo_path?string|null
status*Status
tenant_id*Tenant Id
Formatuuid
updated_at*Updated At
Formatdate-time
webhost_node_id?|null
website_config_id?|null
Example Request
curl -X POST 'https://example.com/v1/webhost/sites' \  -H 'Content-Type: application/json' \  -d '{  "hosting_mode": "string",  "name": "string"}'
Example Response
{  "created_at": "2019-08-24T14:15:22Z",  "current_commit_sha": "string",  "current_release_id": "string",  "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",  "dedicated_instance_id": "e82b7abe-feea-468c-83e4-862e76c31e5f",  "deployed_at": "2019-08-24T14:15:22Z",  "hosting_mode": "string",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "metadata_json": {},  "name": "string",  "primary_domain": "string",  "repo_path": "string",  "status": "string",  "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0",  "updated_at": "2019-08-24T14:15:22Z",  "webhost_node_id": "74e0578b-8bae-4d5e-9ee2-da58f6bde41d",  "website_config_id": "c0aa0662-77a9-4227-8f52-c7a29b8a3ad3"}

Get Hosted Website

GET
/v1/webhost/sites/{website_id}

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

website_id*Website Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response
created_at*Created At
Formatdate-time
current_commit_sha?string|null
current_release_id?string|null
customer_id?|null
dedicated_instance_id?|null
deployed_at?|null
hosting_mode*Hosting Mode
id*Id
Formatuuid
metadata_json?
name*Name
primary_domain?string|null
repo_path?string|null
status*Status
tenant_id*Tenant Id
Formatuuid
updated_at*Updated At
Formatdate-time
webhost_node_id?|null
website_config_id?|null
Example Request
curl -X GET 'https://example.com/v1/webhost/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "created_at": "2019-08-24T14:15:22Z",  "current_commit_sha": "string",  "current_release_id": "string",  "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",  "dedicated_instance_id": "e82b7abe-feea-468c-83e4-862e76c31e5f",  "deployed_at": "2019-08-24T14:15:22Z",  "hosting_mode": "string",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "metadata_json": {},  "name": "string",  "primary_domain": "string",  "repo_path": "string",  "status": "string",  "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0",  "updated_at": "2019-08-24T14:15:22Z",  "webhost_node_id": "74e0578b-8bae-4d5e-9ee2-da58f6bde41d",  "website_config_id": "c0aa0662-77a9-4227-8f52-c7a29b8a3ad3"}

Update Hosted Website

PATCH
/v1/webhost/sites/{website_id}

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

website_id*Website Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Request Body

application/json
  1. body
dedicated_instance_id?|null
name?|null
primary_domain?|null
status?|null
webhost_node_id?|null

Response Body

Successful Response

application/json
  1. response
created_at*Created At
Formatdate-time
current_commit_sha?string|null
current_release_id?string|null
customer_id?|null
dedicated_instance_id?|null
deployed_at?|null
hosting_mode*Hosting Mode
id*Id
Formatuuid
metadata_json?
name*Name
primary_domain?string|null
repo_path?string|null
status*Status
tenant_id*Tenant Id
Formatuuid
updated_at*Updated At
Formatdate-time
webhost_node_id?|null
website_config_id?|null
Example Request
curl -X PATCH 'https://example.com/v1/webhost/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "created_at": "2019-08-24T14:15:22Z",  "current_commit_sha": "string",  "current_release_id": "string",  "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",  "dedicated_instance_id": "e82b7abe-feea-468c-83e4-862e76c31e5f",  "deployed_at": "2019-08-24T14:15:22Z",  "hosting_mode": "string",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "metadata_json": {},  "name": "string",  "primary_domain": "string",  "repo_path": "string",  "status": "string",  "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0",  "updated_at": "2019-08-24T14:15:22Z",  "webhost_node_id": "74e0578b-8bae-4d5e-9ee2-da58f6bde41d",  "website_config_id": "c0aa0662-77a9-4227-8f52-c7a29b8a3ad3"}

Delete Hosted Website

DELETE
/v1/webhost/sites/{website_id}

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

website_id*Website Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

Example Request
curl -X DELETE 'https://example.com/v1/webhost/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
Empty

Get Website Analytics

GET
/v1/webhost/sites/{website_id}/analytics

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

website_id*Website Id
Formatuuid

Query Parameters

period?Period
Default7

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response
daily_views?array<>
device_breakdown?
period_days*Period Days
top_pages*array<>
total_views*Total Views
unique_sessions*Unique Sessions
Example Request
curl -X GET 'https://example.com/v1/webhost/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/analytics'
Example Response
{  "daily_views": [    {}  ],  "device_breakdown": {},  "period_days": 0,  "top_pages": [    {}  ],  "total_views": 0,  "unique_sessions": 0}

Deploy Hosted Website

POST
/v1/webhost/sites/{website_id}/deploy

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

website_id*Website Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response
message*Message
status*Status
task_id?string|null
website_id*Website Id
Formatuuid
Example Request
curl -X POST 'https://example.com/v1/webhost/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/deploy'
Example Response
{  "message": "string",  "status": "string",  "task_id": "string",  "website_id": "9a5872c2-0bf0-4c68-9c27-86a09b05bf66"}

List Form Submissions

GET
/v1/webhost/sites/{website_id}/forms

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

website_id*Website Id
Formatuuid

Query Parameters

unread_only?Unread Only
Defaultfalse

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response
[index: integer]?
Example Request
curl -X GET 'https://example.com/v1/webhost/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/forms'
Example Response
[  {    "created_at": "2019-08-24T14:15:22Z",    "form_data": {},    "hosted_website_id": "2e68090f-4b97-4f89-8ca4-5adeb58dde95",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "is_read": true,    "page_slug": "string",    "submitter_email": "string",    "website_config_id": "c0aa0662-77a9-4227-8f52-c7a29b8a3ad3"  }]
GET
/v1/webhost/sites/{website_id}/forms/stats

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

website_id*Website Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response
total*Total
unread*Unread
Example Request
curl -X GET 'https://example.com/v1/webhost/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/forms/stats'
Example Response
{  "total": 0,  "unread": 0}
PATCH
/v1/webhost/sites/{website_id}/forms/{submission_id}

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

website_id*Website Id
Formatuuid
submission_id*Submission Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response
created_at*Created At
Formatdate-time
form_data*
hosted_website_id?|null
id*Id
Formatuuid
is_read*Is Read
page_slug?string|null
submitter_email?string|null
website_config_id*Website Config Id
Formatuuid
Example Request
curl -X PATCH 'https://example.com/v1/webhost/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/forms/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "created_at": "2019-08-24T14:15:22Z",  "form_data": {},  "hosted_website_id": "2e68090f-4b97-4f89-8ca4-5adeb58dde95",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "is_read": true,  "page_slug": "string",  "submitter_email": "string",  "website_config_id": "c0aa0662-77a9-4227-8f52-c7a29b8a3ad3"}
GET
/v1/webhost/sites/{website_id}/history

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

website_id*Website Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response
[index: integer]?
Example Request
curl -X GET 'https://example.com/v1/webhost/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/history'
Example Response
[  {    "actor_user_id": "d6ed4497-4325-4995-9f49-e288b7192e46",    "artifact_hash": "string",    "change_source": "string",    "commit_sha": "string",    "created_at": "2019-08-24T14:15:22Z",    "deployed_at": "2019-08-24T14:15:22Z",    "hosted_website_id": "2e68090f-4b97-4f89-8ca4-5adeb58dde95",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "metadata_json": {},    "notes": "string",    "release_id": "string",    "status": "string"  }]
POST
/v1/webhost/sites/{website_id}/live-migrate

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

website_id*Website Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Request Body

application/json
  1. body
target_node_id*Target Node Id
Formatuuid

Response Body

Successful Response

application/json
  1. response
message*Message
status*Status
task_id?string|null
website_id*Website Id
Formatuuid
Example Request
curl -X POST 'https://example.com/v1/webhost/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/live-migrate' \  -H 'Content-Type: application/json' \  -d '{  "target_node_id": "b1754cfa-2739-4a10-a13a-c665edec0e55"}'
Example Response
{  "message": "string",  "status": "string",  "task_id": "string",  "website_id": "9a5872c2-0bf0-4c68-9c27-86a09b05bf66"}

Migrate Hosted Website

POST
/v1/webhost/sites/{website_id}/migrate

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

website_id*Website Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Request Body

application/json
  1. body
dedicated_instance_id?|null
primary_domain?|null
target_mode*Target Mode
Match^(shared|dedicated)$
webhost_node_id?|null

Response Body

Successful Response

application/json
  1. response
created_at*Created At
Formatdate-time
current_commit_sha?string|null
current_release_id?string|null
customer_id?|null
dedicated_instance_id?|null
deployed_at?|null
hosting_mode*Hosting Mode
id*Id
Formatuuid
metadata_json?
name*Name
primary_domain?string|null
repo_path?string|null
status*Status
tenant_id*Tenant Id
Formatuuid
updated_at*Updated At
Formatdate-time
webhost_node_id?|null
website_config_id?|null
Example Request
curl -X POST 'https://example.com/v1/webhost/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/migrate' \  -H 'Content-Type: application/json' \  -d '{  "target_mode": "string"}'
Example Response
{  "created_at": "2019-08-24T14:15:22Z",  "current_commit_sha": "string",  "current_release_id": "string",  "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",  "dedicated_instance_id": "e82b7abe-feea-468c-83e4-862e76c31e5f",  "deployed_at": "2019-08-24T14:15:22Z",  "hosting_mode": "string",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "metadata_json": {},  "name": "string",  "primary_domain": "string",  "repo_path": "string",  "status": "string",  "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0",  "updated_at": "2019-08-24T14:15:22Z",  "webhost_node_id": "74e0578b-8bae-4d5e-9ee2-da58f6bde41d",  "website_config_id": "c0aa0662-77a9-4227-8f52-c7a29b8a3ad3"}

Rollback Hosted Website

POST
/v1/webhost/sites/{website_id}/rollback

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

website_id*Website Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Request Body

application/json
  1. body
git_ref?|null
release_id?|null

Response Body

Successful Response

application/json
  1. response
created_at*Created At
Formatdate-time
current_commit_sha?string|null
current_release_id?string|null
customer_id?|null
dedicated_instance_id?|null
deployed_at?|null
hosting_mode*Hosting Mode
id*Id
Formatuuid
metadata_json?
name*Name
primary_domain?string|null
repo_path?string|null
status*Status
tenant_id*Tenant Id
Formatuuid
updated_at*Updated At
Formatdate-time
webhost_node_id?|null
website_config_id?|null
Example Request
curl -X POST 'https://example.com/v1/webhost/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/rollback' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "created_at": "2019-08-24T14:15:22Z",  "current_commit_sha": "string",  "current_release_id": "string",  "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",  "dedicated_instance_id": "e82b7abe-feea-468c-83e4-862e76c31e5f",  "deployed_at": "2019-08-24T14:15:22Z",  "hosting_mode": "string",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "metadata_json": {},  "name": "string",  "primary_domain": "string",  "repo_path": "string",  "status": "string",  "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0",  "updated_at": "2019-08-24T14:15:22Z",  "webhost_node_id": "74e0578b-8bae-4d5e-9ee2-da58f6bde41d",  "website_config_id": "c0aa0662-77a9-4227-8f52-c7a29b8a3ad3"}