Intro to APIs Flashcards

1
Q

What is the purpose of an API?

A

To provide abstraction to simplify connections between backend and UI.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the 4 primary components of an API?

A
  • API key
  • API documentation
  • Requests
  • Responses
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is an API key?

A

Identification mechanism to allow specific access to data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is API documentation?

A

The instructions for how to interface with an API.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is an API request?

A

A packet of information being sent to the program that you are blind to.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is an API response?

A

Feedback from the request, typically a JSOn file (REST APIs).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is contained in a RESTful API request?

A
  • Header: contains API key
  • Operations: CRUD / HTTP
  • Endpoints: resources
  • Parameters / body: Data in request
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the CRUD operations?

A
  • Create
  • Read
  • Update
  • Delete
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the most common HTTP methods?

A
  • Post
  • Get
  • Put
  • Patch
  • Delete
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the repsonses to the common HTTP methods?

A
  • POST: returns the new info that was sent in parameters
  • GET: obtains the info you were trying to read
  • PUT: Updated resource by replacing it with data in parameters
  • PATCH: Updates resources by modifying it with data in parameters
  • DELETE: Indicates if request for deletion was successful.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the difference between an internal and an external API?

A
  • Internal APIs is internal to a singular application: useful for using two different programming languages in the same application.
  • External API works with publicly available data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the common API error codes?

A
  • 100: in progress
  • 200: ok
  • 300: Redirect
  • 400: Error with Request
  • ## 500: Error with responsection
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the most common types of APIs?

A
  • REST
  • SOAP
  • AJAX
  • Webhooks
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly