POST /api/portal/validateportalname

Description

Checks if the name is available to create a portal.

Parameters
Name Description Type Example
portalName*
sent in Query
the name of a portal 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
  • portalNameEmpty - the portal name is empty, you need to send some value as portalName
  • portalNameExist - the portal name is already taken, you need to choose another name
  • 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 the list of all the existing potal names starting with the name in request array of string ["example","example2014"]
Example successful response
{
    message = "portalNameReadyToRegister"
}
Example error response
{
    "error": "portalNameExist",
    "message": "Portal already exists",
    "variants": [ "example", "example2014" ]
}