Custom domains
8 endpoints at https://api.kosa8.com, sent with Authorization: Bearer $KOSA8_API_KEY. Generated from the API's own OpenAPI description, which a test holds to the router.
The preview's custom domains#
/v1/sandboxes/{id}/previews/{port}/domainsscope sandboxes:readidrequiredpath · stringportrequiredpath · stringcurl -s -X GET https://api.kosa8.com/v1/sandboxes/$SBX/previews/$PORT/domains \ -H "Authorization: Bearer $KOSA8_API_KEY"
Serve the preview at your own hostname#
/v1/sandboxes/{id}/previews/{port}/domainsscope sandboxes:writeThrough Cloudflare for SaaS custom hostnames: 501 not_available when this kosa8 Cloud has not configured it. A preview has at most 5 custom domains, an organization 50. The domain serves the preview as it is, private (signed link) or public, and follows the sandbox and port across a rotate.
Parametersidrequiredpath · stringportrequiredpath · stringhostnamerequiredstringssl_method"http" | "txt"curl -s -X POST https://api.kosa8.com/v1/sandboxes/$SBX/previews/$PORT/domains \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
A custom domain's status, asked of Cloudflare again#
/v1/sandboxes/{id}/previews/{port}/domains/{hostname}scope sandboxes:readidrequiredpath · stringportrequiredpath · stringhostnamerequiredpath · stringcurl -s -X GET https://api.kosa8.com/v1/sandboxes/$SBX/previews/$PORT/domains/$HOSTNAME \ -H "Authorization: Bearer $KOSA8_API_KEY"
Stop serving the preview at the hostname#
/v1/sandboxes/{id}/previews/{port}/domains/{hostname}scope sandboxes:writeidrequiredpath · stringportrequiredpath · stringhostnamerequiredpath · stringcurl -s -X DELETE https://api.kosa8.com/v1/sandboxes/$SBX/previews/$PORT/domains/$HOSTNAME \ -H "Authorization: Bearer $KOSA8_API_KEY"
The preview's custom domains#
/v1/previews/{preview_id}/domainsscope sandboxes:readpreview_idrequiredpath · stringcurl -s -X GET https://api.kosa8.com/v1/previews/$PREVIEW_ID/domains \ -H "Authorization: Bearer $KOSA8_API_KEY"
Serve the preview at your own hostname#
/v1/previews/{preview_id}/domainsscope sandboxes:writeThrough Cloudflare for SaaS custom hostnames: 501 not_available when this kosa8 Cloud has not configured it. A preview has at most 5 custom domains, an organization 50. The domain serves the preview as it is, private (signed link) or public, and follows the sandbox and port across a rotate.
Parameterspreview_idrequiredpath · stringhostnamerequiredstringssl_method"http" | "txt"curl -s -X POST https://api.kosa8.com/v1/previews/$PREVIEW_ID/domains \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
A custom domain's status, asked of Cloudflare again#
/v1/previews/{preview_id}/domains/{hostname}scope sandboxes:readpreview_idrequiredpath · stringhostnamerequiredpath · stringcurl -s -X GET https://api.kosa8.com/v1/previews/$PREVIEW_ID/domains/$HOSTNAME \ -H "Authorization: Bearer $KOSA8_API_KEY"
Stop serving the preview at the hostname#
/v1/previews/{preview_id}/domains/{hostname}scope sandboxes:writepreview_idrequiredpath · stringhostnamerequiredpath · stringcurl -s -X DELETE https://api.kosa8.com/v1/previews/$PREVIEW_ID/domains/$HOSTNAME \ -H "Authorization: Bearer $KOSA8_API_KEY"