api_flashcards

(22 cards)

1
Q

Term

A

Definition

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

API

A

Application Programming Interface - a collection of methods of communication for building and interacting with software. It’s how one computer talks to another computer.

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

Web API

A

A collection of endpoints that supply data to applications. They define the routes and types of responses the client can expect to receive after hitting those routes.

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

REST APIs

A

Web APIs that conform to the REST architectural style principles. They are typically useful for CRUD operations. Client sends request to server that has a REST API standard interface, which accepts the request, updates any resources, and sends back a JSON response to client.

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

HTTP Methods

A

Requests from client to server. Main methods include GET, POST, PUT/PATCH, and DELETE.

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

GET Method

A

Gets data from the server.

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

POST Method

A

Submits data to the server.

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

PUT/PATCH Methods

A

Updates resource already on the server. PUT will update the entire resource, PATCH will update portion of resource but not all browsers support PATCH requests.

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

DELETE Method

A

Deletes data from the server.

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

HTTP Status Codes

A

Responses sent from server to indicate the result of a request.

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

1xx Status Codes

A

Informational responses.

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

2xx Status Codes

A

Success responses. 200: OK, 201: Created, 202: Accepted, 204: No Content.

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

3xx Status Codes

A

Redirect responses - further action must be taken. 301: Moved Permanently, 302: Found but temporarily moved to somewhere else, 304: Not Modified.

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

4xx Status Codes

A

Client error responses. 400: Bad Request, 401: Unauthorized, 404: Not Found, 405: Method Not Allowed.

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

5xx Status Codes

A

Server error responses. 500: Internal Server Error - server had a problem and couldn’t process the request, out of your control.

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

API Keys

A

Passwords to access an API and perform some action.

17
Q

API Tokens

A

Like a password to access an API key.

18
Q

Service

A

Software or system that provides a set of functionality. Some common functionalities are authentication, data processing, or communication with other systems.

19
Q

Resource

A

Data that can be manipulated by an application, such as a file, object, database record, or a network connection. Resources are typically consumed by an API or other interface that allows interaction with the application.

20
Q

How to Test APIs - Step 1

A

Make a request using a tool like Postman or curl, and see if the response is what you expected.

21
Q

How to Test APIs - Step 2

A

Verify the response status code is 200 or 201. Ask for the response body and verify the data is what you expected.

22
Q

How to Test APIs - Step 3

A

Verify the Database. Query the database to see if the data was actually created in the database.