POST /api/portal/validateportalname
Checks if the name is available to create a portal.
Name |
Description |
Type |
Example |
portalName*
sent in Query
|
the name of a portal |
string |
example |
* - required field
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"] |
{
message = "portalNameReadyToRegister"
}
{
"error": "portalNameExist",
"message": "Portal already exists",
"variants": [ "example", "example2014" ]
}