/api/v1/object/check-nameCheck whether an object name is free to use.
Check whether an object name is free to use.
A name is taken when an active object already has it, ignoring letter
case. Inactive objects do not hold their names. When you rename an
object, pass its slug in exclude_slug so it does not collide with
itself. Create and update run the same check, so this call only helps you
warn early.
Query parameters:
name(required) — the name to check, 1 to 100 characters.exclude_slug— the slug of an object to leave out of the check.
Scope: object.read.
Errors:
422—nameis missing or longer than 100 characters.
Response 200:
{
"status": 200,
"message": "There is already a unit with the same name.",
"data": { "available": false }
}
Send request
Use the documented inputs to call this endpoint directly.
Parameters
Values are applied to the request and the example on the right.
Responses
Successful response
{
"message": "string",
"data": "string"
}Bad request
{
"status": 1,
"message": "string",
"code": "string",
"data": {}
}The HTTP status code of the response.
What went wrong. Several validation messages are joined with ", ".
A stable, machine-readable reason. Only some errors set it.
Extra detail about the error. Only some errors set it.
Unauthorized
{
"status": 1,
"message": "string",
"code": "string",
"data": {}
}The HTTP status code of the response.
What went wrong. Several validation messages are joined with ", ".
A stable, machine-readable reason. Only some errors set it.
Extra detail about the error. Only some errors set it.
Internal server error
{
"status": 1,
"message": "string",
"code": "string",
"data": {}
}The HTTP status code of the response.
What went wrong. Several validation messages are joined with ", ".
A stable, machine-readable reason. Only some errors set it.
Extra detail about the error. Only some errors set it.
Powered by heyo-docs