Features โ–ธ JSON/YAML/XML Output Support From Any API

Get output in JSON/YAML/XML from any API response

Fastest API development tool

Auto generation of APIs for MongoDB database

Auto generation of APIs for MySQL database

Auto generation of APIs for MariaDB database

Auto generation of APIs for PostgreSQL database

Auto generation of APIs for Oracle database

Auto generation of APIs for SQL Server database

Auto generation of APIs for TiDB

Auto generation of APIs for Percona XtraDB

Auto generation of APIs for Redis database

API Maker is the best tool for automatic API generation

Fastest API generation for databases

Superfast APIs automatically generated by API Maker

SAVA Info System Private Limited : ISO 9001 Certified Company

API Makerยฎ Developed by SAVA - ISO 9001 Certified Company

โ†’ API Maker is capable of converting API responses in JSON or YAML or XML format automatically by just passing the return type in the header.

โ†’ Response of autogenerated API, custom API, or third-party API will be converted to YAML or XML automatically if the user passes
โ€œx-am-content-type-responseโ€ header value in the request.

JSON

JSON Response
                      
{
    "success": true,
    "statusCode": 200,
    "data": [
        {
            "_id": "5b794fb02fe51f2ead6919da",
            "active": 1,
            "updatedAt": "2018-08-19T11:08:32.5822",
            "createdAt": "2018-08-19T11:08:32.5822",
            "company_name": "prayosha",
            "company_type": "PRODUCTION",
            "__v": 0
        }
    ]
}
                      
                   

XML

XML Response
                      
<?xml version='1.0'?>
<root>
    <success>true</success>
    <statusCode>200</statusCode>
    <data>
      <_el>
         <_id>5b794fb02fe51f2ead6919da</_id>
         <active>1</active>
         <updatedAt>2018-08-19T11:08:32.5822</updatedAt>
         <createdAt>2018-08-19T11:08:32.5822</createdAt>
         <company_name>prayosha</company_name>
         <company_type>PRODUCTION</company_type>
         <__v>0</__v>
      </_el>
    </data>
</root>
                      
                   

YAML

YAML Response
                      
success: true
statusCode: 200
data:
     _id: 5b794fb02fe51f2ead6919da
     active: 1
     updatedAt: 2018-08-19T11:08:32.5822
     createdAt: 2018-08-19T11:08:32.5822
     company_name: prayosha
     company_type: PRODUCTION
     __v: 0
                      
                   

User-defined Response pattern [flat/hierarchical]

โ†’ If we want to make the output structure flat, it is also done automatically. it makes API easily consumable in case of nested structure response. Just need to pass header โ€œx-am-response-object-typeโ€ with the value โ€œflatโ€.

โ†’ It can work in conjuction with โ€œx-am-response-caseโ€ and โ€œx-am-content-type-responseโ€ also.

โ†’ As you can see below example, how easily it can convert N number of nested levels of response in just simple flat response,

โ†’ By using this feature, we can easily save response to any SQL database which does not support nested-level of fields like MongoDB.

Default Nested Response

Default Nested Response
                      
{
    "success": true,
    "statusCode": 200,
    "data": {
        "hello": "world",
        "level1": {
            "level3": {
                "level3": {
                    "name": "API Maker"
                }
            }
        }
    }
}
                      
                   

Flat Response

Flat Response
                      
{
    "success": true,
    "statusCode": 200,
    "data": {
        "hello": "world",
        "level1_level2_level3_name": "API Maker"
    }
}
                      
                   

Response case changes automatically

โ†’ We can change response data to any case. Just need to pass the relevant value in the request header โ€œx-am-response-caseโ€.

  • The example above is the default response of any API
  • We passed the โ€œx-am-response-caseโ€ value as โ€œpascalCaseโ€ and it will return the API response as shown below.

โ†’ Below types of response cases are supported

  • camelCase
  • capitalCase
  • constantCase
  • dotCase
  • headerCase
  • noCase
  • paramCase
  • pascalCase
  • pathCase
  • sentenceCase
  • snakeCase

Default JSON Response

JSON Response
                      
{
    "success": true,
    "statusCode": 200,
    "data": [
        {
            "_id": "5b794fb02fe51f2ead6919da",
            "active": 1,
            "updatedAt": "2018-08-19T11:08:32.5822",
            "createdAt": "2018-08-19T11:08:32.5822",
            "company_name": "prayosha",
            "company_type": "PRODUCTION",
            "__v": 0
        }
    ]
}
                      
                   

Default XML Response

XML Response
                      
<?xml version='1.0'?>
<root>
    <success>true</success>
    <statusCode>200</statusCode>
    <data>
      <_el>
         <_id>5b794fb02fe51f2ead6919da</_id>
         <active>1</active>
         <updatedAt>2018-08-19T11:08:32.5822</updatedAt>
         <createdAt>2018-08-19T11:08:32.5822</createdAt>
         <company_name>prayosha</company_name>
         <company_type>PRODUCTION</company_type>
         <__v>0</__v>
      </_el>
    </data>
</root>
                      
                   

Default YAML Response

YAML Response
                      
success: true
statusCode: 200
data:
     _id: 5b794fb02fe51f2ead6919da
     active: 1
     updatedAt: 2018-08-19T11:08:32.5822
     createdAt: 2018-08-19T11:08:32.5822
     company_name: prayosha
     company_type: PRODUCTION
     __v: 0
                      
                   

constantCase JSON Response

JSON Response
                      
{
    "success": true,
    "statusCode": 200,
    "data": [
        {
            "_ID": "5b794fb02fe51f2ead6919da",
            "ACTIVE": 1,
            "UPDATEDAT": "2018-08-19T11:08:32.5822",
            "CREATEDAT": "2018-08-19T11:08:32.5822",
            "COMPANY_NAME": "prayosha",
            "COMPANY_TYPE": "PRODUCTION",
            "__V": 0
        }
    ]
}
                      
                   

constantCase XML Response

XML Response
                      
<?xml version='1.0'?>
<root>
    <success>true</success>
    <statusCode>200</statusCode>
    <data>
      <_el>
         <_ID>5b794fb02fe51f2ead6919da</_ID>
         <ACTIVE>1</ACTIVE>
         <UPDATEDAT>2018-08-19T11:08:32.5822</UPDATEDAT>
         <CREATEDAT>2018-08-19T11:08:32.5822</CREATEDAT>
         <COMPANY_NAME>prayosha</COMPANY_NAME>
         <COMPANY_TYPE>PRODUCTION</COMPANY_TYPE>
         <__V>0</__V>
      </_el>
    </data>
</root>
                      
                   

constantCase YAML Response

YAML Response
                      
success: true
statusCode: 200
data:
     _ID: 5b794fb02fe51f2ead6919da
     ACTIVE: 1
     UPDATEDAT: 2018-08-19T11:08:32.5822
     CREATEDAT: 2018-08-19T11:08:32.5822
     COMPANY_NAME: prayosha
     COMPANY_TYPE: PRODUCTION
     __V: 0