Overview
- Category
- Developer Tools
- API mode
not_available- Processing
- client-side
- Privacy
- no-data-stored
Public descriptor
The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.
GET /api/v1/tools/nginx-redirect-generator
Execute availability
This tool is documented as a browser capability. Its execute route does not produce a server-side result; when execution is enabled, it responds with browser_interaction_required and points callers to the public tool page.
POST /api/v1/tools/nginx-redirect-generator/execute
Authentication is not issued during the preview. A bearer API key is planned for execution after launch.
Input schema
object object; additional properties are not accepted.
source_path· string · required- Enter source path.
destination· string · required- Enter destination url.
status· string · required-
Enter redirect status. Accepted values:
301, 302, 307, 308. match_type· string · required-
Enter match type. Accepted values:
exact, prefix, regex.
{
"type": "object",
"properties": {
"source_path": {
"type": "string",
"description": "Enter source path."
},
"destination": {
"type": "string",
"description": "Enter destination url."
},
"status": {
"type": "string",
"description": "Enter redirect status.",
"enum": [
"301",
"302",
"307",
"308"
]
},
"match_type": {
"type": "string",
"description": "Enter match type.",
"enum": [
"exact",
"prefix",
"regex"
]
}
},
"required": [
"source_path",
"destination",
"status",
"match_type"
],
"additionalProperties": false
}
Output schema
On a successful execution, schema values appear in data.result.values.
configuration· string- Nginx configuration produced by the tool.
test_cases· array- Generated test cases produced by the tool.
warning· string- Safety note produced by the tool.
{
"type": "object",
"properties": {
"configuration": {
"type": "string",
"description": "Nginx configuration produced by the tool."
},
"test_cases": {
"type": "array",
"description": "Generated test cases produced by the tool."
},
"warning": {
"type": "string",
"description": "Safety note produced by the tool."
}
},
"additionalProperties": false
}
Nginx Redirect Generator worked example
The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.
curl -X POST "https://utilitypages.org/api/v1/tools/nginx-redirect-generator/execute" \
-H "Content-Type: application/json" \
-d '{
"source_path": "/old-page",
"destination": "https://example.com/new-page",
"status": "301",
"match_type": "exact"
}'
{
"ok": true,
"data": {
"slug": "nginx-redirect-generator",
"result": {
"values": {
"configuration": "location = /old-page { return 301 https://example.com/new-page; }",
"test_cases": [
{
"request": "/old-page",
"result": "https://example.com/new-page",
"status": "301"
}
],
"warning": "Review generated configuration in a staging environment before deployment."
},
"display": {
"display": "location = /old-page { return 301 https://example.com/new-page; }"
},
"warnings": [],
"assumptions": [],
"steps": []
}
},
"meta": [],
"request_id": "req_example_123"
}
Errors
api_not_launched· 503- Returned by the current launch gate for every execute request.
invalid_json· 400- Returned when an enabled execute request does not contain valid JSON.
validation_failed· 422- Returned when a request does not satisfy the input schema.
browser_interaction_required· 422- Returned for browser capability tools instead of inventing a server-side result.
tool_not_found· 404- Returned when a requested descriptor slug does not exist.
execution_failed· 503- Returned when an enabled server-side execution cannot complete.