{
"meta": {
"name": "Multi-format API",
"type": "http",
"seq": 1
},
"http": {
"method": "get",
"url": "https://api.example.com/data"
},
"headers": [
{
"name": "content-type",
"value": "application/json",
"enabled": true
}
],
"body": {
"json": "{\n \"message\": \"API supports multiple formats\"\n}"
},
"examples": [
{
"name": "JSON API Example",
"description": "An example using JSON format",
"request": {
"url": "https://api.example.com/json",
"method": "post",
"body": {
"mode": "json",
"json": "{\n \"format\": \"json\",\n \"data\": {\n \"name\": \"JSON Example\",\n \"value\": 123\n }\n}"
}
},
"response": {
"status": "201",
"statusText": "Created",
"body": {
"type": "json",
"content": "{\n \"id\": 1,\n \"format\": \"json\",\n \"created\": true\n}"
}
}
},
{
"name": "XML API Example",
"description": "An example using XML format",
"request": {
"url": "https://api.example.com/xml",
"method": "post",
"body": {
"mode": "xml",
"xml": "\n\n xml\n XML Example\n 456\n"
}
},
"response": {
"status": "201",
"statusText": "Created",
"body": {
"type": "xml",
"content": "\n\n 2\n xml\n true\n"
}
}
},
{
"name": "Text API Example",
"description": "An example using text format",
"request": {
"url": "https://api.example.com/text",
"method": "post",
"body": {
"mode": "text",
"text": "Plain text data\nFormat: text\nName: Text Example\nValue: 789"
}
},
"response": {
"status": "201",
"statusText": "Created",
"body": {
"type": "text",
"content": "Success: true\nFormat: text\nID: 3"
}
}
}
]
}