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