SubDomain

Return the subdomain validation pattern

This function retrieves the regular expression that the system uses to validate a subdomain label.

Note:

Use this value to validate a subdomain label in an interface before you call the SubDomain::addsubdomain function. It does not replace the server-side validation that SubDomain::addsubdomain performs.

get/SubDomain/validregex

Request

  • Base URL
    https://cpanel-server.tld:2083/execute
  • Auth
    HTTP basic

Response

HTTP Request was successful.

datastring[]

A single-element array holding the validation pattern.

errorsstring[] nullable
messagesstring[] nullable
status0 | 1
  • 1 — Success.
  • 0 — Failed. Check the errors field for more details.
warningsstring[] nullable

Example response

{
  "data": [
    "^[A-Za-z0-9][A-Za-z0-9-]*$"
  ],
  "status": 1
}

Changes

No recorded changes to this operation across all 5 revisions of this API.