JSON Format
HTTP Methods
OpenAPI Support
Flexible Configuration
REST API Proxy Creation Methods
There are several methods to create a REST API Proxy:Import from OpenAPI/Swagger File
Import from OpenAPI/Swagger File
Manual Creation
Manual Creation
Copy from Existing API Proxy
Copy from Existing API Proxy
Create REST API Proxy from SOAP Web Service
Create REST API Proxy from SOAP Web Service
Import from OpenAPI/Swagger File
Go to API Proxy Creation Page
Upload OpenAPI File
Method 1: Load from URL
Method 1: Load from URL
https://petstore.swagger.io/v2/swagger.json) and the Parse button is clicked. The file is parsed and API information is displayed.Method 2: File Upload
Method 2: File Upload
Method 3: Paste as Text
Method 3: Paste as Text
Check API Information
API Name
Version
Base URL
Endpoints
Schemas
Routing Configuration
Client Route (Relative Path)
Client Route (Relative Path)
Upstream Target (Backend Address)
Upstream Target (Backend Address)
Single Backend
Dynamic Backend
servers or host information in the OpenAPI file.Example:Save API Proxy
Supported OpenAPI Versions
Apinizer supports the following OpenAPI versions:- OpenAPI 2.0 (Swagger 2.0): Full support
- OpenAPI 3.0: Full support
- OpenAPI 3.1: Full support
OpenAPI 2.0 Features
swaggerfield:"2.0"valuehost,basePath,schemesfieldspathsanddefinitionsstructureparametersandresponsesdefinitions
OpenAPI 3.0/3.1 Features
openapifield:"3.0.0"or"3.1.0"valueserversarraypathsandcomponentsstructurerequestBodyandresponsesdefinitionssecuritySchemesandsecuritydefinitions
Post-Import Configuration
After the API Proxy is created, the following configurations can be made:HTTP Routing Configuration
Adding Policies
Testing
Deployment and Version
Common Scenarios
Scenario 1: Proxying Public API
Scenario 1: Proxying Public API
Use OpenAPI URL
Determine Relative Path
/petstoreProxy).Set Upstream Target
Save and Deploy
Scenario 2: Exposing Internal API
Scenario 2: Exposing Internal API
Upload OpenAPI File
Determine Relative Path
Set Upstream Target
Add Security Policies
Save and Deploy
Scenario 3: API Versioning
Scenario 3: API Versioning
Separate OpenAPI File for Each Version
Different Relative Paths
/api/v1, /api/v2).Separate Policies
Migration Strategy
Best Practices
OpenAPI File Quality
Relative Path Strategy
/{service-name}/{version}Backend Address
Security Policies
Troubleshooting
Import Error
Import Error
- Make sure the OpenAPI file is in valid JSON or YAML format.
- Make sure the OpenAPI version is supported.
- Check URL accessibility.
- Make sure the file size is within the limit.
Endpoints Not Visible
Endpoints Not Visible
- Make sure the
pathsfield in the OpenAPI file is correctly defined. - Check that endpoints are correctly defined under
paths.
Routing Error
Routing Error
- Make sure the Upstream Target address is correct.
- Check that the Backend API is accessible.
- Check HTTP Routing configuration.
Creating REST API Proxy from SOAP Web Service
The requirement to expose a Web Service developed with SOAP protocol as REST often arises, especially when existing services need to be used by newly developed mobile applications or JavaScript-based Web applications. Rewriting the existing service with REST or developing a new REST API that mimics its methods are not cost-effective solutions in terms of time and cost. Apinizer enables exposing SOAP Web services as REST and performing all necessary transformations through configuration.Creating REST Type API Proxy from SOAP Web Service
Upload WSDL File

Select Protocol Transformation

Method Transformation Settings
After the API Proxy is created, if desired, how the transformation between REST - SOAP message structures will be done for request and response messages of methods can be customized. For this, go to the API Proxy’s Development tab. When All is selected in the method list on the left, icons that open the transformation settings for request messages at the top and response messages at the bottom appear in the middle section.


Transformation Options
When a SOAP Service is exposed to clients as REST, request and response messages need to be transformed. The JSON message coming from the client must be converted to XML message before being sent to the SOAP service, and the XML message returned by the SOAP service must be converted to JSON message before being sent to the client. There are various options for performing this transformation:Jackson Transformation
JsonML Transformation
Template Message
Request Message Transformation Options
This section explains the details of transformation options for request messages.Use Jackson Transformation

| Field | Description |
|---|---|
| Ignore fields with NULL | If marked, NULL values in the JSON message coming in the request are not added as XML Elements to the XML message to be sent to the Backend API. |
| Ignore EMPTY fields | If marked, empty values in the JSON message coming in the request are not added as XML Elements to the XML message to be sent to the Backend API. |
| Use xsi:nil=“true” for NULL values | If marked, the xsi:nil="true" attribute is used for NULL values in the JSON message coming in the request in the XML message to be sent to the Backend API. Otherwise, an empty element is added to the XML message for the relevant value. Activating this value ensures that values sent as null in the JSON message are transmitted with the xsi:nil="true" field added when converting to XML. |
| Target XPath | Specifies where the XML obtained after converting the incoming JSON message to XML will be placed in the XML message expected by the SOAP service. |
| Replace Children | If the option is marked, the children of the Target XPath’s output element are deleted and the part converted from JSON is added in their place. Otherwise, the element is completely replaced. |
| Paths for Arrays within message | Specifies which parts in the JSON message should be interpreted as arrays. Each Path is written starting from the level of Target XPath (or from the top level if Target XPath is not given) and placing # between levels. Example: The expression “envelope#body#abc” indicates that the “abc” element inside “body” inside “envelope” will be processed as an array. When Array Within Array: When there is an array within an array and some objects sometimes come as array sometimes as singular, it is written starting from the outermost Array’s path and when going down to the object below, #* expression must be added after array expressions. For example, if abc element is an array and def element inside it is an array, it should be written as “envelope#body#abc, envelope#body#abc#*#def” in order. |
| Request Data Manipulation | Any part of the original request can be transferred to a specified part of the transformed request. Source Value/Variable specifies which part of the original request message will be transferred, and Target Value/Variable specifies where the part specified by Source Value/Variable will be placed in the transformed message. |
| Show Sample Message | The Request Message created according to the settings can be viewed. |
| JSON Request Message Expected by API Proxy from Client | XML Request Message Expected by Backend API/Service |
|---|---|
{ "Add": { "intB": "?", "intA": "?" } } | <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://tempuri.org/"> <soap:Header/> <soap:Body> <tem:Add> <tem:intA>?</tem:intA> <tem:intB>?</tem:intB> </tem:Add> </soap:Body> </soap:Envelope> |
Use JsonML Transformation

| Field | Description |
|---|---|
| Use JSON Object | Converts XML Elements as JSON Objects. |
| Use JSON Array | Converts XML Elements as JSON Array. |
| Request Data Manipulation | Any part of the original request can be transferred to a specified part of the transformed request. Source Value/Variable specifies which part of the original request message will be transferred, and Target Value/Variable specifies where the part specified by Source Value/Variable will be placed in the transformed message. |
| Show Sample Message | The Request Message created according to the settings can be viewed. |
| Transformation Type | JSON Request Message Expected by API Proxy from Client | XML Request Message Expected by Backend API/Service |
|---|---|---|
| JSON Object | { "soap:Envelope": { "xmlns:tem": "http://tempuri.org/", "soap:Header": "", "xmlns:soap": "http://www.w3.org/2003/05/soap-envelope", "soap:Body": { "tem:Add": { "tem:intA": "?", "tem:intB": "?" } } } } | <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://tempuri.org/"> <soap:Header/> <soap:Body> <tem:Add> <tem:intA>?</tem:intA> <tem:intB>?</tem:intB> </tem:Add> </soap:Body> </soap:Envelope> |
| JSON Array | [ "soap:Envelope", { "xmlns:tem": "http://tempuri.org/", "xmlns:soap": "http://www.w3.org/2003/05/soap-envelope" }, [ "soap:Header" ], [ "soap:Body", [ "tem:Add", [ "tem:intA", "?" ], [ "tem:intB", "?" ] ] ] ] | <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://tempuri.org/"> <soap:Header/> <soap:Body> <tem:Add> <tem:intA>?</tem:intA> <tem:intB>?</tem:intB> </tem:Add> </soap:Body> </soap:Envelope> |
Use Template Message

| Field | Description |
|---|---|
| Template Message | XML request message template expected by Backend API/Service |
| Request Data Manipulation | Any part of the original request can be transferred to a specified part of the transformed request. Source Value/Variable specifies which part of the original request message will be transferred, and Target Value/Variable specifies where the part specified by Source Value/Variable will be placed in the transformed message. |
Response Message Transformation Options
This section explains the details of transformation options for response messages.Use Jackson Transformation

| Field | Description |
|---|---|
| Ignore fields with NULL | If selected, NULL fields in the XML message coming from the Backend API are not added to the JSON message. |
| Ignore EMPTY fields | If selected, NULL fields in the XML message coming from the Backend API are not added to the JSON message as empty values. |
| Write Numbers as Strings | If selected, numeric values are written to the JSON message as strings. |
| Use xsi:nil=“true” for NULL values | Ensures that data coming with the xsi:nil="true" attribute in the XML message is transmitted as null when converting to JSON. |
| Source XPath | The XPath of the part of the response message returned as XML that will be converted to JSON is entered. |
| Unwrap Element | If marked, it converts the inside (children) of the element given with Source XPath, if not marked, it converts the element itself (with its contents/children). |
| Paths for Arrays within message | Specifies which parts in the JSON message should be interpreted as arrays. Each Path is written starting from the level of Target XPath (or from the top level if Target XPath is not given) and placing # between levels. Example: The expression “envelope#body#abc” indicates that the “abc” element inside “body” inside “envelope” will be processed as an array. When Array Within Array: When there is an array within an array and some objects sometimes come as array sometimes as singular, it is written starting from the outermost Array’s path and when going down to the object below, #* expression must be added after array expressions. For example, if abc element is an array and def element inside it is an array, it should be written as “envelope#body#abc, envelope#body#abc#*#def” in order. |
| Response Data Manipulation on Success | Any part of the original response can be transferred to a specified part of the transformed response. Source Value/Variable specifies which part of the original response message will be transferred, and Target Value/Variable specifies where the part specified by Source Value/Variable will be placed in the transformed message. The defined operations are performed only when the Backend API/Service returns a successful response. |
| Show Sample Message | The Response Message created according to the settings can be viewed. |
| XML Response Message Returned by Backend API/Service | JSON Response Message Returned by API Proxy to Client |
|---|---|
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <AddResponse xmlns="http://tempuri.org/"> <AddResult>?</AddResult> </AddResponse> </soap:Body> </soap:Envelope> | { "AddResponse" : { "AddResult" : "?" } } |
Use JsonML Transformation
| Field | Description |
|---|---|
| Use JSON Object | Converts XML Elements as JSON Objects. |
| Use JSON Array | Converts XML Elements as JSON Array. |
| Response Data Manipulation on Success | Any part of the original response can be transferred to a specified part of the transformed response. Source Value/Variable specifies which part of the original response message will be transferred, and Target Value/Variable specifies where the part specified by Source Value/Variable will be placed in the transformed message. The defined operations are performed only when the Backend API/Service returns a successful response. |
| Show Sample Message | The Response Message created according to the settings can be viewed. |
| Transformation Type | XML Response Message Returned by Backend API/Service | JSON Response Message Returned by API Proxy to Client |
|---|---|---|
| JSON Object | <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <AddResponse xmlns="http://tempuri.org/"> <AddResult>?</AddResult> </AddResponse> </soap:Body> </soap:Envelope> | { "soap:Envelope" : { "xmlns:xsd" : "http://www.w3.org/2001/XMLSchema", "xmlns:soap" : "http://www.w3.org/2003/05/soap-envelope", "xmlns:xsi" : "http://www.w3.org/2001/XMLSchema-instance", "soap:Body" : { "AddResponse" : { "xmlns" : "http://tempuri.org/", "AddResult" : "?" } } } } |
| JSON Array | <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <AddResponse xmlns="http://tempuri.org/"> <AddResult>?</AddResult> </AddResponse> </soap:Body> </soap:Envelope> | [ "soap:Envelope", { "xmlns:xsd": "http://www.w3.org/2001/XMLSchema", "xmlns:soap": "http://www.w3.org/2003/05/soap-envelope", "xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance" }, [ "soap:Body", [ "AddResponse", { "xmlns": "http://tempuri.org/" }, [ "AddResult", "3" ] ] ] ] |
Use Template Message
| Field | Description |
|---|---|
| Template Message | JSON response message to be returned to the client |
| Response Data Manipulation on Success | Any part of the original response can be transferred to a specified part of the transformed response. Source Value/Variable specifies which part of the original response message will be transferred, and Target Value/Variable specifies where the part specified by Source Value/Variable will be placed in the transformed message. The defined operations are performed only when the Backend API/Service returns a successful response. |

