Skip to content

Look up the organization an active custom domain belongs to

GET
/public/hosts/{host}
curl --request GET \
--url https://api.modeldesk.io/public/hosts/begrippen.example.nl

For the app’s proxy, to route a request on a custom domain. Answers for a host that is an ACTIVE domain of an organization on effective custom hosting that can publish under the public contract, and the shared 404 for every other host. Letter case and a port on the host are ignored. Discloses only what the organization’s public pages already show. Needs no sign-in and reads no principal; GET only. Hit and miss both send Cache-Control: public, max-age=60, so a domain put in or taken out of service is routed within a minute.

host
required
string

Example

begrippen.example.nl

The organization serving the host.

Media typeapplication/json

Which organization an active custom domain belongs to, for the proxy to route a request on that host.

object
orgSlug
required

The organization’s slug, its address on the shared catalog host.

string
primaryDomain
required

The active domain that carries the organization page.

string
domains
required

Every active domain, the primary among them, sorted.

Array<string>
namespaces
required

The namespaces the organization publishes under, oldest first.

Array<object>

A namespace an organization publishes under.

object
iriPrefix
required

An absolute http(s) IRI prefix ending in /, as the administrator registered it.

string
isDefault
required

Whether this namespace’s candidate wins a cross-namespace ambiguity at resolve time.

boolean

Example generated

{
"orgSlug": "example",
"primaryDomain": "example",
"domains": [
"example"
],
"namespaces": [
{
"iriPrefix": "example",
"isDefault": true
}
]
}
Cache-Control
string
Example
public, max-age=60

No organization serves this host. The same body as every other public 404, with Cache-Control: public, max-age=60.

Media typeapplication/problem+json

An RFC 9457 problem document, always sent as application/problem+json.

object
type

Present only on a typed refusal, whose own schema requires it and fixes its value. An untyped problem omits it, which RFC 9457 defines as about:blank: the status and title are all there is to branch on.

string format: uri
title
required
string
status
required
integer
detail
required
string
instance

The path of the request that was refused. Absent when the request was refused before it reached the application’s handlers: a 401 for a missing or unusable access token, and a 403 for a service account whose scopes do not reach the route.

string
violations

Present on a 400 raised by request-body validation, and on a 422 that refuses named fields (a malformed slug or namespace prefix). Each entry names the rejected property, so a client can attach the message to the field that caused it rather than showing one error for the whole form.

Array<object>
object
property
required
string
message
required
string

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"violations": [
{
"property": "example",
"message": "example"
}
]
}