# Route Name (URI)

The **route URI** is the entry point in which the client will use to initiate the request for a desired resource. There are 4 considerations when it comes to planning for the URI path.

1. API Versioning
2. URI Path
3. Query String Parameters
4. HTTP Verb

![The anatomy of an HTTP request.](https://lh5.googleusercontent.com/Wjteb5dSTv6RsHs_yYoj0ZyJ4sZr-j848sIv8nH6HOJouSus8SFgEFTAPcbaqj3--MM8uweE6XIcmZ9rEfw0ckkgfc-kMGa75JaAHLisOpUuT6BxbtMTM_BaS-yOooLqU9NWF5eY)

## API Versioning

We talked about API versioning strategies under chapter 3, [Versioning Strategies](/part-2/chapter-3/7-versioning-strategies.md). Whichever strategy(ies) you decide to implore, make to specify it clearly in the design doc.

For me personally, I have always used the URI prefixing approach like this: `https://example.com/api/v1`.

## URI Path

Next is the URI path itself. Make sure to design the URIs by following the best practices and guidelines mentioned in chapter 3, [URI Design](/part-2/chapter-3/2-uri-design.md). Also, make sure to make them as RESTful as possible whilst being as pragmatic as possible.

## Query String Parameters

Similar to the above, try following the best practices mentioned in the [URI Query Design](/part-2/chapter-3/2-uri-design.md#uri-query-design) section of chapter 3. Make sure to remember that query strings are used mainly as optional parameters.

The final result of your decision should be something like this:

`GET /api/v1/users?page=1&limit=10`

Which should be very intuitive as it translates to "retrieve a list of the first 10 users in the application".

## HTTP Verb

Similar to the above, try following the best practices mentioned in chapter 3, [Method Verbs](/part-2/chapter-3/3-method-verbs.md). Make sure to always utilize the verbs as much as possible without naming the URIs as actions or functional APIs.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://book.restfulnode.com/part-2/chapter-5/1-route-name-uri.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
