Skip to content
This repository was archived by the owner on Jun 18, 2024. It is now read-only.

Commit cb2f85d

Browse files
committed
Did some basic copy-editing (parallel structure, clarity, etc).
1 parent c9aefbe commit cb2f85d

1 file changed

Lines changed: 18 additions & 16 deletions

File tree

api-basics.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
---
2+
published: true
23
layout: default
34
title: API basics
4-
permalink: /api-basics/
5-
filename: api-basics.md
5+
permalink: "/api-basics/"
6+
filename: "api-basics.md"
67
---
78

89
### What is an API?
@@ -15,11 +16,11 @@ APIs are launched primarily to give partners that are outside the agency or comp
1516

1617
### Why do you need an API?
1718

18-
We want to make government more efficient; essentially do more with less. Government data assets are numerous and valuable, and we cannot afford to waste time and money by duplicating data processes. APIs allow for machine to machine querying, essentially removing the barriers to access data. APIs are not useful in all cases, but by providing data as a service, the opportunity for significantly reducing the barrier to access data and proliferate an innovation economy exists. Without them, we institute a culture of replicating data processes every time we use them.
19+
We want to make government more efficient; essentially do more with less. Government data assets are numerous and valuable, and we cannot afford to waste time and money by duplicating data processes. APIs allow for machine to machine querying, essentially removing the barriers to access data. APIs are not useful in all cases, but by providing data as a service, the opportunity for significantly reducing the barrier to access data and proliferate an innovation economy exists. Without them, we institute a culture of replicating data processes every time we use them.
1920

2021
### History of modern web APIs
2122

22-
APIs have been around since the 1980s, when they were used in hardware and software development. However, the history of the modern Web API is fairly short -- just a little over ten years. There are several pioneers of Web APIs, and while they didn't necessarily invent any of the technologies at play here, they did popularize their usage and establish some of the common practices.
23+
APIs have been around since the 1980s, when they were used in hardware and software development. However, the history of the modern Web API is fairly short -- just a little over ten years. There are several pioneers of Web APIs, and while they didn't necessarily invent any of the technologies at play here, they did popularize their usage and establish some of the common practices.
2324

2425
### How government agencies are using APIs
2526

@@ -58,45 +59,46 @@ Many of these pioneers have shaped the way in which we develop, deploy, consume,
5859

5960
### What technology goes into an API?
6061

61-
APIs are driven by a set of specific technologies, making them easily understood by developers. This type of standardization means that APIs can work with common programming languages. The most popular approach to delivering web APIs, which is:
62+
APIs are driven by a set of specific technologies, making them easily understood by developers. This type of standardization means that APIs can work with common programming languages. The most popular approach to delivering web APIs is:
6263

6364
* [Pragmatic REST](http://apievangelist.com/buildingblocks/pragmatic_rest.php)
6465

65-
Since REST takes advantage of the same Internet mechanisms that are used to view regular web pages it has many advantages, resulting in faster implementations and easier for developers to understand. REST APIs allow you to take data and functionality available on your website and make these resources available through a Web API. Then, instead of returning HTML to represent these resources, the API returns data in one of two possible formats:
66+
Since REST takes advantage of the same Internet mechanisms that are used to view regular web pages it has many advantages, resulting in faster implementations and and ease of use for developers. REST APIs allow you to take data and functionality available on your website and make these resources available through a Web API. Then, instead of returning HTML to represent these resources, the API returns data in one of two possible formats:
6667

6768
<ul>
6869
<li><a href="http://apievangelist.com/buildingblocks/extensible_markup_language_(xml).php">Extensible Markup Language (XML)</a></li>
6970
<li><a href="http://apievangelist.com/buildingblocks/javascript_object_notation_(json).php">JavaScript Object Notation (JSON)</a></li>
7071
</ul>
7172

72-
Developers can then take this data and use in web and mobile applications. However XML and JSON are easily consumed by spreadsheets and other tools non-developers can use as well, making APIs accessible by anyone.
73+
Developers can then take this data and use it in web and mobile applications. In addition, XML and JSON are easily consumed by spreadsheets and other tools non-developers can use as well, making APIs accessible by anyone.
7374

7475

75-
REST with JSON has become the favorite of developers and API owners, because it is easier to both deploy and consume than other implementations. Even though REST + JSON is not a standard, it is seeing wide acceptance across the industry.
76+
REST with JSON has become the favorite of developers and API owners because it is easier to both deploy and consume than other implementations. Even though REST + JSON is not a standard, it is seeing wide acceptance across the industry.
7677

7778
### When Things Go Wrong — Error Handling
7879

79-
One of the most important issues to remember in API strategy is, developers need to handle what happens when an error occurs; otherwise, access to data fails and subsequently so does the application. For the purposes of the service framework, an error is defined as an unexpected behavior that occurred during the process of a request. It's important to note that what might be considered an "error" can often be an expected behavior.
80+
One of the most important issues to remember in API strategy is that developers need to handle what happens when an error occurs otherwise access to data fails and subsequently so does the application. For the purposes of the service framework, an error is defined as an unexpected behavior that occurred during the process of a request. It's important to note that what might be considered an "error" can often be an expected behavior.
81+
8082
For instance, a search operation returning no results (a blank object) and an HTTP status 200 OK code might be construed as an error, but in reality this is not outside the realm of expected normal operation.
8183

82-
So really when we say errors we mean bad things happen like a database server goes down or a required parameter wasn't passed to a URI. Ultimately it is the responsibility of your code to anticipate and appropriately handle errors.
84+
So really when we say errors we mean bad things happen (a database server goes down or a required parameter wasn't passed to a URI). Ultimately it is the responsibility of your code to anticipate and appropriately handle errors.
8385

8486
### Developing an API Ecosystem
8587

86-
An API starts with the desire to share data or resources that a company offers. It's built with technologies like REST, XML, and JSON, and supported through documentation, along with a handful of code samples to show how to use it.
88+
An API starts with the desire to share data or resources that a company offers. It's built with technologies like REST, XML, and JSON, and supported through documentation, along with a handful of code samples to show how to use it.
8789

88-
An API and its supporting developer area are created. And then, what's next? How does a simple API area build community? How does it evolve into a thriving ecosystem like Facebook’s of Foursquare's?
90+
An API and its supporting developer area are created. And then, what's next? How does a simple API area build community? How does it evolve into a thriving ecosystem like Facebook’s of Foursquare's?
8991

90-
It all starts with developers. Giving developers a self-service, resource-rich environment where they have the spotlight and a voice that will encourage them in turn to contribute to the API community.
92+
It all starts with developers. Giving developers a self-service, resource-rich environment where they have the spotlight and a voice that will encourage them in turn to contribute to the API community.
9193

9294
An API owner has to support its API's community, be proactive about reaching out to its community and know what it needs.
9395

94-
Resources for developers need to be abundant and well organized. Common resources like blogs, forum, and FAQs are necessary. Tutorials, case studies and "How To’s" can take things even further.
96+
Resources for developers need to be abundant and well organized. Common resources such as blogs, forum, and FAQs are necessary. Tutorials, case studies and "How To’s" can take things even further.
9597

9698
Support and resources can create a positive feedback loop among developers and encourage activity that will ideally spread to other users.
9799

98100
Developers can’t be expected to visit an API area regularly, so an API community needs to extend its reach to existing social network and developer communities including Twitter, LinkedIn, Github, and Stack Exchange.
99101

100-
Even more than just a presence on these social networks, an API needs to have an offline presence too -- something that can be accomplished by attending conferences, meet-ups, and hackathons, for example. These activities will only serve to strengthen the API community.
102+
Even more than just a presence on these social networks, an API needs to have an offline presence too -- something that can be accomplished by attending conferences, meet-ups, and hackathons, for example. These activities will only serve to strengthen the API community.
101103

102-
*Re-used from [apievangilist.com](http://www.apievangelist.com) under a [Creative Commons](http://creativecommons.org/licenses/by-sa/3.0/) license and the [Federal Aviation Administration](http://services.faa.gov/).*
104+
*Re-used from [apievangilist.com](http://www.apievangelist.com) under a [Creative Commons](http://creativecommons.org/licenses/by-sa/3.0/) license and the [Federal Aviation Administration](http://services.faa.gov/).*

0 commit comments

Comments
 (0)