Skip to content

Domain Management

In Contendo Server, domains are isolated environments that serve as tenants in the multi-tenant architecture. Each domain has its own users, access control settings, and content storage, ensuring complete segregation between different clients or organizational units.

Domain Management requires super user access.

Domain Operations

Operation Description
Create Domain Creates a new domain in Contendo Server.
Get Domains Retrieves a list of all domains in the system.
Disable Domain Disables a domain in Contendo Server.
Enable Domain Enables a previously disabled domain.

Create Domain

The createDomain operation in Contendo Server allows you to create a new domain (tenant) within the system. Once created, the domain will be available for creating repositories, users, and groups.

Request Format

  • Operation: createDomain
  • HTTP method: POST
  • URL: {CONTENDO_SERVER_URL}
  • Content-Type: application/json, multipart/form-data, application/x-www-form-urlencoded

Parameters

Name Required Description
domainName Yes The name of the domain to create. Must be unique within Contendo Server.

Example Request - create "petstore" domain:

curl -X 'POST' \
  '{CONTENDO_SERVER_URL}' \
  -H 'Content-Type: application/json' \
  -d '{
  "operation": "createDomain",
  "domainName": "petstore"
}'

Response Format

  • Http 200 for success
  • No response body

Errors

HTTP Status Message Description
409 Conflict Domain already exists Domain name is already used by an existing domain.
400 Bad Request Acceptable domainName format is ^\w{3,}$ Domain name contains invalid characters.

Get Domains

The domains operation in Contendo Server retrieves a list of all domains in the system.

Request Format

  • Operation: domains
  • HTTP method: GET
  • URL: {CONTENDO_SERVER_URL}

Example Request:

curl -X 'GET' \
  '{CONTENDO_SERVER_URL}/api?operation=domains'

Response Format

  • Content-Type: application/json
  • Response body: A JSON array containing information about all domains in the system
Field Name Description
id The unique identifier of the domain.
name The name of the domain.
enabled Indicates whether the domain is currently enabled.
createdOn The timestamp when the domain was created (in milliseconds).

Example Response:

[
  {
    "id": 1,
    "name": "petstore",
    "enabled": true,
    "createdOn": 1743497769000
  },
  {
    "id": 2,
    "name": "playground",
    "enabled": true,
    "createdOn": 1744612887000
  },
  {
    "id": 3,
    "name": "webshop",
    "enabled": true,
    "createdOn": 1746622807000
  }
]

Disable Domain

The disableDomain operation in Contendo Server allows you to disable a domain, preventing users from accessing it while preserving all its data. Performing this operation on an already disabled domain has no effect.

Request Format

  • Operation: disableDomain
  • HTTP method: POST
  • URL: {DOMAIN_URL}
  • Content-Type: application/json, multipart/form-data, application/x-www-form-urlencoded

The domain that should be disabled is specified via the {DOMAIN_URL} of the target domain.

Example Request:

curl -X 'POST' \
  '{DOMAIN_URL}/api/domainName?operation=disableDomain'

Response Format

  • Http 200 for success
  • No response body

Errors

HTTP Status Message Description
404 Not Found Domain not found: 'domainName' The specified domain name does not exist.

Enable Domain

The enableDomain operation in Contendo Server allows you to re-enable a previously disabled domain, restoring user access to it. Performing this operation on an already enabled domain has no effect.

Request Format

  • Operation: enableDomain
  • HTTP method: POST
  • URL: {DOMAIN_URL}
  • Content-Type: application/json, multipart/form-data, application/x-www-form-urlencoded

The domain that should be enabled is specified via {DOMAIN_URL}

Example Request:

curl -X 'POST' \
  '{DOMAIN_URL}/api/domainName?operation=enableDomain'

Response Format

  • Http 200 for success
  • No response body

Errors

HTTP Status Message Description
404 Not Found Domain not found: 'domainName' The specified domain name does not exist.