The base address for all Holo Zato services is:
http://proxy.holohost.net/zato/
-
Holo Zato API services communicate with other API services upstream. This means that responses and errors vary because they can be:
- generated internally by the Zato service
- generated upstream by the target API and returned via the Zato service
-
Authentication
- Holo Zato API services require authentication. You must pass in a correct authentication header.
- Authentication for upstream APIs is already handled by Zato internally.
- Authentication can be obtained from the HoloCentral team.
The following services are listed in the order in which the following entries should be made when setting up new routes for new hosts, as follows:
- holo-cloudflare-dns-create
- holo-proxy-service-create
- holo-proxy-route-create
- holo-cloudflare-dns2hash-create
- holo-cloudflare-hash2tranche-create
...
This service accepts a public key which is used to securely create a DNS entry on Cloudflare via their API. Currently, *.
is prepended & .holohost.net
is appended to the public key to create the fully qualified domain name for the DNS entry.
Method POST http://proxy.holohost.net/zato/holo-cloudflare-dns-create
Parameter | Required | Description |
---|---|---|
pubkey | required | A public key to be used as the basis for the DNS entry. |
curl -X POST "http://proxy.holohost.net/zato/holo-cloudflare-dns-create" \
-H "[a_header]: [a_valid_key]" \
-H "Content-Type: application/json" \
--data '{"pubkey":"something"}'
...
This service accepts a public key which is used to securely delete a DNS entry on Cloudflare via their API. Currently, *.
is prepended & .holohost.net
is appended to the public key to create the fully qualified domain name for the DNS entry.
Method POST http://proxy.holohost.net/zato/holo-cloudflare-dns-delete
Parameter | Required | Description |
---|---|---|
pubkey | required | A public key to be used as the basis for the DNS deletion. |
curl -X POST "http://proxy.holohost.net/zato/holo-cloudflare-dns-delete" \
-H "[a_header]: [a_valid_key]" \
-H "Content-Type: application/json" \
--data '{"pubkey":"something"}'
...
This service retrieves the DNS entries from Cloudflare via their API.
NOTE: This service is hard-coded to retrieve the DNS entries only for the holohost.net
zone.
Method GET http://proxy.holohost.net/zato/holo-cloudflare-dns-list
None
curl -X GET "http://proxy.holohost.net/zato/holo-cloudflare-dns-list" \
-H "[a_header]: [a_valid_key]"
...
This service accepts one value which is used to retrieve a DNS entry from Cloudflare via their API.
NOTE: This service is hard-coded to retrieve the DNS entries only for the holohost.net
zone.
Method POST http://proxy.holohost.net/zato/holo-cloudflare-dns-read
Parameter | Required | Description |
---|---|---|
record_id | required | The dns record to be retrieved. |
curl -X POST "http://proxy.holohost.net/zato/holo-cloudflare-dns-read" \
-H "[a_header]: [a_valid_key]" \
-H "Content-Type: application/json" \
--data '{"record_id":"[a_valid_dns_record_id]}'
...
This service accepts a domain name which is used to securely create a DNS entry on Cloudflare via their API. Currently, the incoming "name" is prepended to .holohost.net
to create the fully qualified domain name for the DNS entry.
The purpose for this service is for developers to create domain entries that are CNAMEd to loader.holohost.net
!
Method POST http://proxy.holohost.net/zato/holo-cloudflare-dns-customer-create
Parameter | Required | Description |
---|---|---|
type | required | record type: usually CNAME |
name | required | subdomain to be used. It will be prepended to holohost.net |
content | required | where the dns points to. For Holo holohost.net CNAMEs it will be loader.holohost.net |
curl -X POST "http://proxy.holohost.net/zato/holo-cloudflare-dns-customer-create" \
-H "[a_header]: [a_valid_key]" \
-H "Content-Type: application/json" \
--data '{"type":"CNAME", "name":"asdf","content":"loader.holohost.net"}'
...
This service accepts a domain name which is used to securely delete a DNS entry on Cloudflare via their API. Currently, the incoming "name" is prepended to .holohost.net
to create the fully qualified domain name for the DNS entry.
Method POST http://proxy.holohost.net/zato/holo-cloudflare-dns-customer-delete
Parameter | Required | Description |
---|---|---|
domain | required | subdomain to be used. It will be prepended to holohost.net |
curl -X POST "http://proxy.holohost.net/zato/holo-cloudflare-dns-customer-delete" \
-H "[a_header]: [a_valid_key]" \
-H "Content-Type: application/json" \
--data '{"domain":"asdf"}'
...
This service accepts four values which are used to securely create a "service" entry on the Holo proxy server via the proxy API.
Method POST http://proxy.holohost.net/zato/holo-proxy-service-create
Parameter | Required | Description |
---|---|---|
name | required | The name to be used. The name should be the case-sensitive version of [pubkey].holohost.net . (Ex. HcSCjblAhbLah.holohost.net ). |
protocol | required | The protocol to be used. Currently http . |
host | required | The host to be used. The host is an IP address, ex. 172.26.166.34 . Currently the ZeroTier-assigned IP address of the node. |
port | required | The port to be used. Currently 48080 . |
curl -X POST "http://proxy.holohost.net/zato/holo-proxy-service-create" \
-H "[a_header]: [a_valid_key]" \
-H "Content-Type: application/json" \
--data '{"name":"[pubkey].holohost.net", "protocol":"http", "host":"10.10.10.1", "port":48080}'
...
This service accepts one value which is used to securely delete a "service" entry on the Holo proxy server via the proxy API.
Method POST http://proxy.holohost.net/zato/holo-proxy-service-delete
Parameter | Required | Description |
---|---|---|
name | required | The name to be used. If the service was created correctly (see above), then the name should be the case-sensitive version of [pubkey].holohost.net . (Ex. HcSCjblAhbLah.holohost.net ). |
curl -X POST "http://proxy.holohost.net/zato/holo-proxy-service-delete" \
-H "[a_header]: [a_valid_key]" \
-H "Content-Type: application/json" \
--data '{"name":"[pubkey].holohost.net"}'
...
This service retrieves the "service" entries from the Holo proxy server via the proxy API.
Method GET http://proxy.holohost.net/zato/holo-proxy-service-list
None
curl -X GET "http://proxy.holohost.net/zato/holo-proxy-service-list" \
-H "[a_header]: [a_valid_key]"
...
This service accepts one value which is used to retrieve a "service" entry from the Holo proxy server via the proxy API.
Method POST http://proxy.holohost.net/zato/holo-proxy-service-read
Parameter | Required | Description |
---|---|---|
service_id | required | The service to be retrieved. |
curl -X POST "http://proxy.holohost.net/zato/holo-proxy-service-read" \
-H "[a_header]: [a_valid_key]" \
-H "Content-Type: application/json" \
--data '{"route_id":"[a_valid_service_id]}'
...
This service accepts four values which are used to securely create a "route" entry on the Holo proxy server via the proxy API.
Method POST http://proxy.holohost.net/zato/holo-proxy-route-create
Parameter | Required | Description |
---|---|---|
name | required | The name to be used. The name should be the case-sensitive version of [pubkey].holohost.net . (Ex. HcSCjblAhbLah.holohost.net ). The name should match the name of the service to which the route is forwarded. |
protocols | required | The protocols to be used. Protocols is an array. Currently ["http","https"] . |
hosts | required | The hosts to be used. Hosts is an array. Each host should be the lower-case version of the tranche entry. (Ex. ["*.hcscjblahblah.holohost.net"] ). |
service | required | The service id of the service to which the route is forwarded. (Ex. 53b36017-781d-4381-a299-b0f0a546b4be ). |
curl -X POST "http://proxy.holohost.net/zato/holo-proxy-route-create" \
-H "[a_header]: [a_valid_key]" \
-H "Content-Type: application/json" \
--data '{"name":"[pubkey].holohost.net", "protocols":["http","https"], "hosts":["*.[pubkey].holohost.net"], "service":"53b36017-781d-4381-a299-b0f0a546b4be" }'
...
This service accepts one value which is used to securely delete a "route" entry on the Holo proxy server via the proxy API.
Method POST http://proxy.holohost.net/zato/holo-proxy-route-delete
Parameter | Required | Description |
---|---|---|
name | required | The name to be used. If the route was created correctly (see above), then the name should be the case-sensitive version of [pubkey].holohost.net . (Ex. HcSCjblAhbLah.holohost.net ). The name should match the name of the service to which the route is forwarded. |
curl -X POST "http://proxy.holohost.net/zato/holo-proxy-route-delete" \
-H "[a_header]: [a_valid_key]" \
-H "Content-Type: application/json" \
--data '{"name":"[pubkey].holohost.net"}'
...
This service retrieves the "route" entries from the Holo proxy server via the proxy API.
Method GET http://proxy.holohost.net/zato/holo-proxy-route-list
None
curl -X GET "http://proxy.holohost.net/zato/holo-proxy-route-list" \
-H "[a_header]: [a_valid_key]"
...
This service accepts one value which is used to retrieve a "route" entry from the Holo proxy server via the proxy API.
Method POST http://proxy.holohost.net/zato/holo-proxy-route-read
Parameter | Required | Description |
---|---|---|
route_id | required | The route to be retrieved. |
curl -X POST "http://proxy.holohost.net/zato/holo-proxy-route-read" \
-H "[a_header]: [a_valid_key]" \
-H "Content-Type: application/json" \
--data '{"route_id":"[a_valid_route_id]}'
...
This service accepts a key/value pair which is used to securely create a KV Store entry on Cloudflare via their API.
Method POST http://proxy.holohost.net/zato/holo-cloudflare-dns2hash-create
Parameter | Required | Description |
---|---|---|
kv_key | required | The key to be used. The key is the domain name which will be used to retrieve the value. |
kv_value | required | The value to be paired with the key. The value is the hApp "holoHostingId" from the Holo Hosting hApp. |
curl -X POST "http://proxy.holohost.net/zato/holo-cloudflare-dns2hash-create" \
-H "[a_header]: [a_valid_key]" \
-H "Content-Type: application/json" \
--data '{"kv_key":"some_key", "kv_value":"some_value"}'
...
This service accepts a key which is used to securely delete a KV Store entry on Cloudflare via their API.
Method POST http://proxy.holohost.net/zato/holo-cloudflare-dns2hash-delete
Parameter | Required | Description |
---|---|---|
kv_key | required | The key to be used. The key (in dns2hash) is the domain name. |
curl -X POST "http://proxy.holohost.net/zato/holo-cloudflare-dns2hash-delete" \
-H "[a_header]: [a_valid_key]" \
-H "Content-Type: application/json" \
--data '{"kv_key":"some_key"}'
...
This service accepts a key/value pair which is used to securely create a KV Store entry on Cloudflare via their API.
Method POST http://proxy.holohost.net/zato/holo-cloudflare-hash2tranche-create
Parameter | Required | Description |
---|---|---|
kv_key | required | The key to be used. The key is the hApp "holoHostingId" from the Holo Hosting hApp. The key must match the value used in the "dns2hash" Cloudflare KV Store. |
kv_value | required | The value to be paired with the key. The value is an array of hosts, each in the form of [pubkey].holohost.net . |
curl -X POST "http://proxy.holohost.net/zato/holo-cloudflare-hash2tranche-create" \
-H "[a_header]: [a_valid_key]" \
-H "Content-Type: application/json" \
--data '{"kv_key":"some_key", "kv_value":["[pubkey].holohost.net", "etc."]}'
...
This service accepts a key which is used to securely delete a KV Store entry on Cloudflare via their API.
Method POST http://proxy.holohost.net/zato/holo-cloudflare-hash2tranche-delete
Parameter | Required | Description |
---|---|---|
kv_key | required | The key to be used. The key (in hash2tranche) is the hApp "holoHostingId" from the Holo Hosting hApp. |
curl -X POST "http://proxy.holohost.net/zato/holo-cloudflare-hash2tranche-delete" \
-H "[a_header]: [a_valid_key]" \
-H "Content-Type: application/json" \
--data '{"kv_key":"some_key"}'
...
This service accepts a KV Store namespace name which is used to securely retrieve and list a KV Store's keys from Cloudflare via their API.
Method POST http://proxy.holohost.net/zato/holo-cloudflare-list-keys
Parameter | Required | Description |
---|---|---|
kv_store | required | The kv store to be retrieved. |
curl -X POST "http://proxy.holohost.net/zato/holo-cloudflare-kvstore-list-keys" \
-H "[a_header]: [a_valid_key]" \
-H "Content-Type: application/json" \
--data '{"kv_store":"kv_store_name"}'
...
This service accepts a KV Store namespace name and a key which are used to securely retrieve a KV Store value from Cloudflare via their API.
Method POST http://proxy.holohost.net/zato/holo-cloudflare-get-value
Parameter | Required | Description |
---|---|---|
kv_store | required | The kv store to be used. |
kv_key | required | The key to be used. |
curl -X POST "http://proxy.holohost.net/zato/holo-cloudflare-kvstore-get-value" \
-H "[a_header]: [a_valid_key]" \
-H "Content-Type: application/json" \
--data '{"kv_store":"kv_store_name","kv_key":"some_key"}'
...