It's a lot more work for the end user to have to assemble URLs themselves instead of you providing them in the response.
Let's say someone does a GET request on /tickets. The response should include URLs for each ticket that gets returned, e.g. something like:
{
"tickets": [
{
"ticket_id": 1337,
"url": "/tickets/1337"
},
{
"ticket_id": 1336,
"url": "/tickets/1336"
}
]
}
Again, the analogy of the WWW itself is instructive. When you browse to the home page of a website, that page has links to the other pages on the site.Similarly, the home page of a REST web service should have links to the other resources on the web service, e.g.
{
"resources": [
{
"resource_name": "Foos",
"url": "/foos"
},
{
"resource_name": "Bars",
"url": "/bars"
},
{
"resource_name": "Tickets",
"url": "/tickets"
}
]
}
That is simple, predictable, discoverable and self documenting for the end user.