Rest API Flashcards

(35 cards)

1
Q

Define REST API.

A

A web service that follows Representational State Transfer principles for communication.

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

What does CRUD stand for in REST APIs?

A

Create, Read, Update, Delete - the four basic operations.

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

True or false: REST APIs use HTTP methods for operations.

A

TRUE

Common methods include GET, POST, PUT, and DELETE.

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

Fill in the blank: URI stands for ______.

A

Uniform Resource Identifier.

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

What is the purpose of HTTP status codes?

A

To indicate the result of an HTTP request.

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

Define endpoint in REST APIs.

A

A specific URL where a client can access resources.

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

What does JSON stand for?

A

JavaScript Object Notation - a lightweight data interchange format.

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

True or false: REST APIs can only return JSON format.

A

FALSE

REST APIs can return XML, HTML, and other formats.

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

Fill in the blank: Stateless means each request from a client must contain ______.

A

All necessary information to understand the request.

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

What is a resource in REST?

A

An object or representation of data that can be accessed via a URI.

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

Define HATEOAS.

A

Hypermedia as the Engine of Application State; a constraint of REST.

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

What is the role of headers in REST API requests?

A

To provide metadata about the request or response.

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

True or false: REST APIs can be cached.

A

TRUE

Caching improves performance by storing responses.

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

Fill in the blank: API versioning is important for ______.

A

Maintaining compatibility as the API evolves.

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

What is the base URL?

A

The root address for accessing the API.

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

Define API key.

A

A unique identifier used to authenticate requests.

17
Q

What is pagination in REST APIs?

A

The process of dividing a large dataset into smaller, manageable parts.

18
Q

Fill in the blank: Rate limiting controls the number of ______.

A

Requests a user can make in a given time frame.

19
Q

True or false: REST APIs are always synchronous.

A

FALSE

REST APIs can be designed for asynchronous communication.

20
Q

What is a webhook?

A

A user-defined HTTP callback triggered by specific events.

21
Q

Define CORS.

A

Cross-Origin Resource Sharing; a security feature for web applications.

22
Q

What does OAuth provide?

A

A secure authorization framework for APIs.

23
Q

True or false: REST APIs can only be accessed over HTTPS.

A

FALSE

REST APIs can also be accessed over HTTP.

24
Q

Fill in the blank: Throttling is used to ______.

A

Limit the number of requests a client can make.

25
What is **API documentation**?
A guide that explains how to use an API effectively.
26
Define **client** in the context of REST APIs.
An application or user that makes requests to the API.
27
What is the **request body**?
The data sent with a request, typically in JSON format.
28
True or false: REST APIs must use **XML** for data exchange.
FALSE ## Footnote JSON is more commonly used, but XML is also supported.
29
Fill in the blank: **Middleware** is software that acts as a ______.
Bridge between an operating system or database and applications.
30
What is **API testing**?
The process of verifying that an API meets its specifications.
31
Define **service-oriented architecture (SOA)**.
A design pattern that allows services to communicate over a network.
32
What is a **mock server**?
A simulated server that mimics API responses for testing.
33
True or false: REST APIs can be stateless and scalable.
TRUE ## Footnote Statelessness allows for easier scaling of services.
34
Fill in the blank: **API gateway** manages ______.
Traffic between clients and backend services.
35
What is **data serialization**?
The process of converting data structures into a format for transmission.