Validate a feature flag name.
POST/api/admin/features/validate
Validates a feature flag name: checks whether the name is URL-friendly and whether a feature with the given name already exists. Returns 200 if the feature name is compliant and unused.
Request
- application/json
Body
required
validateFeatureSchema
The feature name to validate.
my-feature-3
The id of the project that the feature flag will belong to. If the target project has a feature naming pattern defined, the name will be validated against that pattern.
project-y
Responses
- 200
- 400
- 401
- 409
- 415
This response has no body.
The request data does not match what we expect.
- application/json
- Schema
- Example (from schema)
Schema
The ID of the error instance
9c40958a-daac-400e-98fb-3bb438567008
The name of the error kind
ValidationError
A description of what went wrong.
The request payload you provided doesn't conform to the schema. The .parameters property should be object. You sent [].
{
"id": "9c40958a-daac-400e-98fb-3bb438567008",
"name": "ValidationError",
"message": "The request payload you provided doesn't conform to the schema. The .parameters property should be object. You sent []."
}
Authorization information is missing or invalid. Provide a valid API token as the authorization
header, e.g. authorization:*.*.my-admin-token
.
- application/json
- Schema
- Example (from schema)
Schema
The ID of the error instance
9c40958a-daac-400e-98fb-3bb438567008
The name of the error kind
AuthenticationRequired
A description of what went wrong.
You must log in to use Unleash. Your request had no authorization header, so we could not authorize you. Try logging in at /auth/simple/login.
{
"id": "9c40958a-daac-400e-98fb-3bb438567008",
"name": "AuthenticationRequired",
"message": "You must log in to use Unleash. Your request had no authorization header, so we could not authorize you. Try logging in at /auth/simple/login."
}
The provided resource can not be created or updated because it would conflict with the current state of the resource or with an already existing resource, respectively.
- application/json
- Schema
- Example (from schema)
Schema
The ID of the error instance
9c40958a-daac-400e-98fb-3bb438567008
The name of the error kind
NameExistsError
A description of what went wrong.
There is already a feature called "my-awesome-feature".
{
"id": "9c40958a-daac-400e-98fb-3bb438567008",
"name": "NameExistsError",
"message": "There is already a feature called \"my-awesome-feature\"."
}
The operation does not support request payloads of the provided type. Please ensure that you're using one of the listed payload types and that you have specified the right content type in the "content-type" header.
- application/json
- Schema
- Example (from schema)
Schema
The ID of the error instance
9c40958a-daac-400e-98fb-3bb438567008
The name of the error kind
ContentTypeerror
A description of what went wrong.
We do not accept the content-type you provided (application/xml). Try using one of the content-types we do accept instead (application/json) and make sure the body is in the corresponding format.
{
"id": "9c40958a-daac-400e-98fb-3bb438567008",
"name": "ContentTypeerror",
"message": "We do not accept the content-type you provided (application/xml). Try using one of the content-types we do accept instead (application/json) and make sure the body is in the corresponding format."
}