# REST Resource

> One thing a REST API offers, like an order. It has its own address.

**Field:** Software Development  
**Category:** APIs  
**Also known as:** Resource (REST), API Resource, Resource URI

## Think of it like

Think of it like a drawer with a name on it. Each drawer holds one kind of thing.

## Definition

A resource is one thing a REST API lets you work with, like a user or an order. Each resource has its own address, such as /orders/42. You use HTTP methods on that address. GET reads it, POST adds one, PUT or PATCH changes it and DELETE removes it. Good resource names are nouns, not verbs.

## Example

Jack's API has /orders for all orders and /orders/42 for one. To cancel order 42, he sends DELETE to /orders/42.

## Example code

```http
GET /orders/42 HTTP/1.1
Host: api.example.com
```

Read one order by asking for its address with GET.

## Why it matters

Clear resources make an API easy to guess. Users can work out new endpoints alone.

## Common mistake

Putting verbs in addresses, like /getOrder. The HTTP method already says what to do.

## Three principles

- **Nouns.** Name things, not actions.
- **One address each.** Like /orders/42.
- **Methods act.** GET, POST, PUT, PATCH, DELETE.

## Related terms

- [REST API](https://learn.benibix.com/term/development/rest-api)
- [API Endpoint](https://learn.benibix.com/term/development/endpoint)
- [HTTP Method](https://learn.benibix.com/term/infrastructure/http-method)
- [Uniform Resource Locator (URL)](https://learn.benibix.com/term/general/url)
- [Stateless API](https://learn.benibix.com/term/development/stateless-api)

## Told apart from

- [Endpoint vs REST Resource](https://learn.benibix.com/compare/endpoint-vs-rest-resource): People think an endpoint and a resource are the same, and they are not. A resource is a thing with an address, such as /orders/42. An endpoint is a method plus a path, such as GET /orders/42. So one resource usually has several endpoints, one for each thing you can do to it.

![Three resources drawn as folders, users, orders and products, each with an address such as /orders/42. Four verbs point at the orders folder: GET reads it, POST adds one, PUT or PATCH changes it, DELETE removes it. Beside them, two requests arrive one after the other, each carrying its own token, with a note that the server keeps no memory between them, which is what stateless means.](https://learn.benibix.com/diagrams/dev3-rest-resources.svg)

---

Source: https://learn.benibix.com/term/development/rest-resource
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
