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/json-to-xml-converter
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/json-to-xml-converter/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.
json· string · required- Enter the json data used by this tool.
root_name· string · required- Enter the root element name used by this tool.
item_name· string · required- Enter the array item element name used by this tool.
indent_spaces· number · required- Enter the xml indentation used by this tool.
{
"type": "object",
"properties": {
"json": {
"type": "string",
"description": "Enter the json data used by this tool."
},
"root_name": {
"type": "string",
"description": "Enter the root element name used by this tool."
},
"item_name": {
"type": "string",
"description": "Enter the array item element name used by this tool."
},
"indent_spaces": {
"type": "number",
"description": "Enter the xml indentation used by this tool.",
"minimum": 0,
"maximum": 8
}
},
"required": [
"json",
"root_name",
"item_name",
"indent_spaces"
],
"additionalProperties": false
}
Output schema
On a successful execution, schema values appear in data.result.values.
xml· string- XML output produced by the tool.
element_count· number- Generated elements produced by the tool.
root_element· string- Root element produced by the tool.
source_type· string- Source JSON type produced by the tool.
{
"type": "object",
"properties": {
"xml": {
"type": "string",
"description": "XML output produced by the tool."
},
"element_count": {
"type": "number",
"description": "Generated elements produced by the tool."
},
"root_element": {
"type": "string",
"description": "Root element produced by the tool."
},
"source_type": {
"type": "string",
"description": "Source JSON type produced by the tool."
}
},
"additionalProperties": false
}
JSON to XML Converter 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/json-to-xml-converter/execute" \
-H "Content-Type: application/json" \
-d '{
"json": "{\"project\":\"UtilityPages\",\"tools\":[\"calculator\",\"converter\"],\"live\":true}",
"root_name": "root",
"item_name": "item",
"indent_spaces": 2
}'
{
"ok": true,
"data": {
"slug": "json-to-xml-converter",
"result": {
"values": {
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n <project>UtilityPages</project>\n <tools>\n <item>calculator</item>\n <item>converter</item>\n </tools>\n <live>true</live>\n</root>",
"element_count": 6,
"root_element": "root",
"source_type": "object"
},
"display": {
"display": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n <project>UtilityPages</project>\n <tools>\n <item>calculator</item>\n <item>converter</item>\n </tools>\n <live>true</live>\n</root>"
},
"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.