REST API: A common style of API that uses web addresses (URLs) to identify resources and HTTP methods such as GET, POST, PUT, and DELETE to read or change them, usually exchanging JSON.

Example

GET /api/products returns a list of products. POST /api/products with a JSON body adds a new one. GET /api/products/42 returns product 42, and DELETE /api/products/42 removes it.

Core Ideas of REST

  • Resources are nouns in the URL: /users, /orders/7, not /getUser.
  • Methods say what to do: GET reads, POST creates, PUT or PATCH updates, DELETE removes. See HTTP.
  • Status codes say what happened: 200, 201, 400, 404, 500.
  • Stateless: each request carries everything the server needs, such as an auth token.
  • JSON is the usual format for request and response bodies.

A Simple REST Design for a Library App

ActionRequestResponse
List booksGET /books200 with a list
Get one bookGET /books/12200, or 404 if missing
Add a bookPOST /books201 with the new book
Update a bookPUT /books/12200 with the updated book
Delete a bookDELETE /books/12204 with no body

REST API Questions in Interviews

Expect "What is REST?", "PUT vs PATCH?", "Which status code would you return when...?" and "How do you secure an API?" If your project has a REST API, explain one endpoint end to end: URL, method, input validation, database work, and response. Testing your API in Postman before the interview helps you explain it confidently.

Related terms

  • API: the general idea REST is one style of.
  • HTTP: the protocol REST APIs are built on.
  • JSON: the usual data format of REST APIs.
  • CRUD: maps neatly to REST methods.
  • Backend: where REST APIs are built.

Previous term: Responsibility  |  Next term: Resume

Related guides

Frequently asked questions

What is a REST API in simple words?

A REST API is a way for apps to read and change data on a server using URLs for resources and HTTP methods such as GET and POST.

What is the difference between PUT and PATCH?

PUT usually replaces the whole resource. PATCH updates only the fields you send.

What does stateless mean in REST?

Each request contains everything the server needs, such as an auth token, so the server doesn't rely on stored session state between requests.

How do I test a REST API?

With tools such as Postman or curl, and with automated tests that call the endpoints and check status codes and responses.

Explore more internship terms

The IT Internship Glossary explains 199 terms you will hear before and during your internship, with simple definitions and real examples.

Browse all 199 terms
Dhaivat Ajwaliya

About the author

Dhaivat Ajwaliya

Dhaivat has 16+ years of experience in the IT industry, working on AI and cloud technologies, project delivery, and engineering leadership. He has interviewed and mentored many interns, wrote The Lost Intern, and runs the non-commercial Career Impact Initiative, mentoring students for free.