Skip to content
SupportLogin

List the domains and subdomains available for generation

datasets.invent_domains() -> DatasetInventDomainsResponse
GET/api/v1/datasets/invent/domains

Returns every domain code accepted by POST /datasets/invent, each with its subdomain codes. Static — safe to cache.

ReturnsExpand Collapse
class DatasetInventDomainsResponse:
domains: List[Domain]
code: str

Code to send in domains.

title: str

Human-readable name.

subdomains: List[DomainSubdomain]

Subdomains available within this domain. Empty when the domain has no subdivision — send the domain code alone.

code: str

Qualified code to send in subdomains — copy it as-is rather than assembling it.

title: str

Human-readable name.

List the domains and subdomains available for generation

import os
from adaption import Adaption

client = Adaption(
    api_key=os.environ.get("ADAPTION_API_KEY"),  # This is the default and can be omitted
)
response = client.datasets.invent_domains()
print(response.domains)
{
  "domains": [
    {
      "code": "medical",
      "title": "Medical",
      "subdomains": [
        {
          "code": "medical.symptoms_diagnosis",
          "title": "Symptoms diagnosis"
        }
      ]
    }
  ]
}
Returns Examples
{
  "domains": [
    {
      "code": "medical",
      "title": "Medical",
      "subdomains": [
        {
          "code": "medical.symptoms_diagnosis",
          "title": "Symptoms diagnosis"
        }
      ]
    }
  ]
}