Overview

APIBond is a free service that acts as a proxy where you can configure an existing API. You can filter, validate or transform any API response within less than 3 minutes. You can also monitor, analyze, secure and scale your existing end points using our cutting-edge API management tool.


Create an API

You can create an API using one of our integrated 3rd party providers as a source or you can use your custom end point. Our tool generates a new end point for each API you created and you’ll be using the APIBond url to access your transformed response.

In this tutorial, you will create an APIBond end point by using the Open Weather Map , free weather API for developers, as the source API. Below is the response when you make a call to get the NYC weather data (http://api.openweathermap.org/data/2.5/weather?q=NYC,%20NY):

 

API speed, reduced response size and filtering out invalid response are crucial for any application. Also, relying on a schema provided by a third party service may impact your app. In other words, if Open Weather Map changes its response schema or shuts down their service, you wouldn’t want your application get affected by those changes . One way to achieve that robustness  is to create an APIBond end point where you define the schema and tweak the source API later if needed. OK, let’s go through ten steps on how to create an end point via APIBond

 

  1. Login to APiBond and hit “Create and API” button
    create

     

  2. Open Weather Map is not a provider integrated with APIBond by default, so click on “Other API”
    select-other

     

  3. Enter http://api.openweathermap.org/data/2.5/weather?q=NYC,%20NY for the API Request URL
  4. Because Open Weather Map is a public API and doesn’t require authentication, you can leave “Request Auth” as “None”.
  5. When you hit “Continue”, you will see the list of fields for the original API Response on the left
    create

     

  6. Select the fields that you want to include in your API response. You should see the selected fields on the right. Select weather section and name field. Next, click “Continue”
  7. In this step, you can rename the field names, validate and transform the field values. Right click on field names on the right hand side to rename or delete them. Rename name as city. To add a validator, just drag the components on the left on to the fields on the right. You can also create your custom validator by clicking on “Add” button. Let’s add a string length validator to make sure that the city field is less than 100 characters.
    create

     

  8. To add a transformer, click on the transformers tab, and drag’n drop the transformer on to fields on the right.  Drag the lowercase transformer on to the city field and then hit “Next”
    create

     

  9. Name your API. It’s the name of the new end point that you’ll be using You can also turn on the authentication to make your API accessible via a security token. Click on “Create API”
    create

     

  10. Congrats! You’re API is published. Now you need to use your APIBond end point along with the path and query parameters that you pass for your original API. All you need to do is to replace the “host” section of the url. Eg. for NY weather data, instead of the original url (http://api.openweathermap.org/data/2.5/weather?q=NYC,%20NY), you need to use https://{YourAPIName}.apibond.com/data/2.5/weather?q=NYC,%20NY
    create

     

You can test your new API in your browser or via simple curl command. Here is your new response


Filter fields

Usually third party APIs don’t let you filter or rename fields in their API response. if you have response size constraints, it’s important to have just the fields that you need. APIBond allows you to filter and rename the fields in the response so you can customize and normalize your APIBond end point. See the Create an API section for more details.


Add Validators

APIBond response validator is a handy way to filter redundant data from your response. You can validate the response with field level granularity. You have several options on how to filter invalid data using  them. If the validation fails, you can leave the field value as it is and get an error message only, or you can empty the value to prevent your app from crashes due to invalid data. Another way would be to skip the entire record if a field doesn’t comply with your validation rules. You’re not limited to the default validators listed on APIBond. They’re there just to warm you up! You can create custom validators by clicking “Add” button on the third step (see Create an API section for more details). For even more flexibility, you can also create validators via our Builder API.


Add Transformers

A transformer is one of the key APIBond components that you can modify the response at the field level. It can save you a lot of time by reducing the basic manual transformation jobs that you do over an over again in your codebase. You can easily add a transformer by dragging one onto a field. You can add multiple transformers to a field and the order is very important. Eg. If you add an uppercase transformer before an MD5 transformer to a field, the result would be completely different if you add the MD5 transformer first. You can add unlimited number of transformers for your API. All you need to do is to hit “Add” button in the third step (see “create an API” section for more details).


Secure

All end points that you create via APIBond will be using 128-bit SSL by default. Make sure that you use https:// instead of unencrypted http:// for your APIBond end points..

The simplest way of protecting your API from unauthorized access is to create authentication tokens via APIBond. Then you can pass those as a request or header parameters. You have several options for creating your auth token. You can create an end point specific global token when you create your api. You do it by simply turning on the authentication option. You can also assign group tokens to apis so that you can restrict your api access to specific groups that you define.


Monitor

APIBond Monitoring module allows to troubleshoot any possible slowness, validation issues or any type of errors related to your end point and notifies you when your custom thresholds are exceeded. You can easily drill down on  issue by the “Logs” tab on your dashboard.


Analyze

APIBond analyzes the request and response patterns and provide you a deeper understanding of your API. It allows you to identify the patterns by its real-time analytics dashboard. You can access the analytics through the “Stats” tab on your API dashboard