POST /api/portal/validateportalname

Description

Checks if the specified name is available to create a portal.

Parameters
Name Description Type Example
portalName*
sent in Query
Portal name string "example"
* - required field
Returns

The response will contain the following information:

Name Description Type Example
error If the portal name is already taken or some other error occurred during the request, the response object will have the error key with one of the following values:
  • error - a general error, the description will be given in the message parameter,
  • portalNameEmpty - the portal name is empty, you need to send some value in the portalName parameter,
  • portalNameExist - the portal name is already taken, you need to choose another one,
  • portalNameIncorrect - the portal name contains some characters which are not allowed (characters other than base Latin letters and digits),
  • tooShortError - the portal name is too short, it cannot be less than 6 characters.
string "portalNameEmpty"
message If the portal name is available, the response object message key will have the "portalNameReadyToRegister" value, otherwise the error description will be included into the message value. string "portalNameReadyToRegister"
variants In case error is equal to "portalNameExist", the response will also have a list of all the existing potal names starting with the name from the request. array of string ["example", "example2014"]
Example successful response
{
    message = "portalNameReadyToRegister"
}
Example error response
{
    "error": "portalNameExist",
    "message": "Portal already exists",
    "variants": [ "example", "example2014" ]
}