Servage Magazine

Information about YOUR hosting company – where we give you a clear picture of what we think and do!

Articles Tagged ‘api’

Building linked data APIs with API Platform

Saturday, September 2nd, 2017 by Servage
api-platformAPI Platform is a framework for building RESTful APIs using PHP. It’s built on top of Symfony 3, and creating your first RESTful API can be done in just 5 minutes. API Platform is specifically designed for building APIs that utilize linked data, which is often used by libraries, social network websites, online stores and other websites where data is strongly related to other data. Features Briefly API Platform comes with a big collection of features designed to make building APIs using linked data easy. It comes with a CRUD out of the box for create, read, update and delete actions like RESTful APIs usually do. It integrates well with Swagger, a tool ...

What does it take to build an API?

Tuesday, August 22nd, 2017 by Servage
api-cloudBuilding a fully functional API consists of multiple pieces that are eventually connected together, such as authentication, integration with external services and the core application logic. In this article we will see what it takes to build a full API and what you should consider when the time comes to build one. Authentication If you application has user accounts, you will need to handle authentication with your API. The first thing you should do is decide how users authenticate. Is it a traditional username and password combination, an API key, or perhaps something more advanced like OAuth 2? Either way, if your application handles login details, you should also set up an SSL ...

What are SOAP APIs used for

Wednesday, November 9th, 2016 by Servage
SOAP-APISimple Object Access Protocol (SOAP) is not as popular as its counterpart REST. However, there are some cases where a SOAP API is preferred over REST. What kind of services might benefit from having a SOAP API instead of a RESTful one? We will find this out by getting familiar with the pros and cons of SOAP. Advantages of SOAP Unlike REST, SOAP is a protocol. SOAP defines its own standards, for example how messages are constructed and processed. Messages in SOAP are sent as envelopes that contain the body of the message and some metadata, such as headers. One of the advantages of SOAP is that these messages can be sent over ...

Best practices for designing a REST API

Saturday, October 22nd, 2016 by Servage
restThanks to things like the Internet of Things, Application Programming Interfaces (APIs) have become a big part of the internet. In addition to this, many applications allow other applications to integrate with them. Both of these features often happen using an API. Understanding how APIs work, and even better, understanding how to design them, is a valuable skill. So, what makes a good REST API? Resource names One of the first questions that comes to your mind when designing an API is probably this: What should a URI look like? A URI is the address to a resource, such as a user account. A URI might look like this: “/users/1/products/2”. Should these resources ...

The logic of Angular JS web applications

Saturday, November 7th, 2015 by Servage
angularMany developers new to Angular JS (or client-side Javascript development in general) are often struggling a bit with the understanding of the conceptual logic behind the development workflow and how things work together. Especially developers used to traditional server-side rendering will have to completely change their mindset. API-based The first thing to really understand is that client-side Javascript development is essentially an API-based development, because you are building a stand-alone Javascript application for the browser, which relies on data endpoints on your server. Essentially this is the same way of thinking when building native apps, or any other integrations. Forget about a traditional request which triggers a server-side script, which then renders and returns a ...

Enrich your website with data from other services

Thursday, March 12th, 2015 by Servage
apiWhen novice web developers are confronted with the process of Application Programming Interfaces, the reaction is often a feeling of being overwhelmed - both with possibilities, but also with complexities. Understanding and utilizing the power of regular script based interactions between web server and database to render a meaningful HTML output is already pressing many hobby coders to the limit of their understanding. Illustrating interactions between multiple servers through APIs is adding to that complexity, and understandably often creating a reaction of confusion or uncertainty how these services interact technically. The purpose of this post is to demystify the API term, and explain in simple terms how a typical API interaction ...

Talking about Google APIs for websites

Monday, July 1st, 2013 by Servage
Our historical journey on the web is awesome; first local to global and now global to local! Yes, online businesses now concentrate on localizing their services by providing accurate local information, including use of maps from Google map services. As a web designer, if you want to integrate Google maps or use Google APIs in your project you should consider this article about the Google APIs first. Google API is simply the most popular and powerful JavaScript libraries on the internet, used by more than 350,000 websites. It is absolutely free for moderate to low level traffic websites, resulting in a wave of map mash-ups in all kinds of websites. From ...

Using the Google Geolocation API

Saturday, May 4th, 2013 by Servage
At heat of every location based application is positioning and geolocation. In this tutorial we would use the geolocation API that will help you locate the area on the map but also it would suggest and provide the user the user with links to the areas with the same or like names. So first we are going to set up our java script with in the head tag. This API allows us to make use of the J-Query <div> <h1>J-Query API</h1> <p> <script   src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script></p> </div> Next we introduce the Google geolocation API <div> <h1>Geolocation API</h1> <p> <script src="https://maps.google.com/maps?file=api&v=2&key=YOUR_KEY" type="text/javascript">></script> </p> </div> Next with in the body tag we define our search function <div> <p> <script type="text/javascript"> function search() {$.getJSON('http://ws.geonames.org/searchJSON?q=' +  $('#q').val() + '&maxRows=10', function(data){  $.each(data.geonames, function(i,item){$('<a/>') .attr('data-lat', ...

REST principles explained

Monday, April 8th, 2013 by Servage
The term “REST” was coined by Roy Fielding in his Ph.D. dissertation: to describe a design pattern for implementing networked systems. Fielding is one of the principal authors of the Hypertext Transfer Protocol (HTTP) specification versions 1.0 and 1.1. "Representational State Transfer is intended to evoke an image of how a well-designed Web application behaves: a network of web pages (a virtual state-machine), where the user progresses through an application by selecting links (state transitions), resulting in the next page (representing the next state of the application) being transferred to the user and rendered for their use."  - Roy Fielding The motivation behind the development of REST was to create ...

Using the Flickr API in Javascript

Thursday, April 4th, 2013 by Servage
This is a little playtime with the Flickr API for Javascript coding :-) Flickr supports a lot of API including to view images, to search image which I am going to use in this tutorial. For further details on Flickr APIs check http://www.flickr.com/services/api/ Today what I am going to do is write a small code allowing us to search for images using Flickr API’s based on the specific tag word entered by the user. So first we are going to see how we are going to set up our java scripts with in the body tag. This API allows us to make use of  jQuery <div> <h1>jQuery API</h1> <p> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script></p> </div> Show a ...