Beginner Flashcards

1
Q

What does REST stand for?

A

Representational State Transfer

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

True or False: REST APIs are stateless.

A

True

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

Fill in the blank: REST APIs use ________ for communication.

A

HTTP

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

Which HTTP method is used to retrieve data from a server?

A

GET

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

What is the purpose of the HTTP POST method?

A

To send data to the server to create a new resource.

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

True or False: In REST, each resource is identified by a unique URI.

A

True

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

What is a common format for data exchange in REST APIs?

A

JSON

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

Multiple Choice: Which of the following is NOT a characteristic of REST APIs?
A) Statelessness
B) Layered System
C) Use of WebSockets
D) Cacheable responses

A

C) Use of WebSockets

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

What does the HTTP status code 404 indicate?

A

Not Found

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

Short Answer: Name one advantage of using REST APIs.

A

Scalability, simplicity, or ease of use.

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

True or False: REST APIs use HTTP methods to perform actions on resources.

A

True

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

Fill in the blank: The four main HTTP methods used in REST APIs are GET, POST, PUT, and _____?

A

DELETE

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

What is the purpose of the GET method in a REST API?

A

To retrieve data from the server.

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

Which HTTP status code indicates a successful request?

A

200 OK

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

What is the difference between PUT and PATCH in REST APIs?

A

PUT updates a resource completely, while PATCH updates a resource partially.

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

Multiple choice: Which of the following is not a REST architectural constraint? A) Statelessness B) Cacheability C) Layered System D) Statefulness

A

D) Statefulness

17
Q

What does it mean for a REST API to be stateless?

A

Each request from the client must contain all the information needed to understand and process the request.

18
Q

True or False: REST APIs can only return data in JSON format.

19
Q

What is the main advantage of using REST APIs?

A

They are simple to use and can be easily consumed by different clients.

20
Q

Fill in the blank: In REST, resources are identified by _____?

A

URIs (Uniform Resource Identifiers)

21
Q

What is HATEOAS in the context of REST?

A

Hypermedia as the Engine of Application State, where clients interact with the API through hypermedia links.

22
Q

Multiple choice: Which HTTP method would you use to create a new resource? A) GET B) POST C) PUT D) DELETE

23
Q

True or False: A REST API can have multiple representations of a resource.

24
Q

What is the purpose of the DELETE method in a REST API?

A

To remove a resource from the server.

25
Q

What is a common format for sending data in REST APIs?

A

JSON (JavaScript Object Notation)

26
Q

Fill in the blank: REST APIs are designed to be _____ and can be consumed by any client that understands HTTP.

A

platform-independent

27
Q

True or False: In REST APIs, the server maintains the client state.

28
Q

What does the status code 404 indicate in a REST API?

A

That the requested resource was not found.

29
Q

Multiple choice: Which of the following is a characteristic of REST? A) Client-server architecture B) Use of SOAP C) Stateful operations D) Binary data only

A

A) Client-server architecture