REST APIs Flashcards

1
Q

What is a REST API?

A

A REST API is an Application Programming Interface that conforms to the constraints of REST architectural style and allows for interaction with RESTful web services. REST stands for representational state transfer. You can think of an API as a mediator between the users or clients and the resources or web services they want to get.

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

What are the key elements of the REST API paradigm?

A

The key elements of the REST API paradigm are the client, server and resource.

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

What does a REST request consist of?

A

A REST request consists of an HTTP method, an endpoint, headers, and a body.

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

Explain HTTP method in REST request.

A

HTTP method - describes what is to be done with a resource. POST, GET, PUT, DELETE or CRUD.

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

Explain endpoint in REST.

A

Endpoint - contains a URI indicating where and how to find the resource on the Internet. The most common type of URI is a URL, serving as a complete web address.

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

Explain headers in REST.

A

Headers - store information relevant to both the client and server. Mainly, headers provide authentication data — such as an API key, the name or IP address of the computer where the server is installed, and the information about the response format.

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

Explain body in REST.

A

Body - is used to convey additional information to the server.

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

What does the URL structure consist of?

A

Base URL, Resource path and Query parameters.

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

Describe the URL structure of a request in a REST API.

A

Base URL - Enter base URL for the web service endpoint.
Resource path - Enter the path to the complete web service endpoint.
Query parameters - Enter a name and value for each query parameter to pass. Query parameters are appended to the endpoint after a “?” in the URL at runtime.

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