Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6041791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:42:45+00:00 2026-05-23T06:42:45+00:00

Roy Fielding writes A REST API must not define fixed resource names or hierarchies

  • 0

Roy Fielding writes

A REST API must not define fixed
resource names or hierarchies (an
obvious coupling of client and
server). Servers must have the freedom
to control their own namespace.
Instead, allow servers to instruct
clients on how to construct
appropriate URIs, such as is done in
HTML forms and URI templates, by
defining those instructions within
media types and link relations.

How do you do this for system-to-system interfaces? Say the client wants to create an order in the server at http://my.server.org How is it supposed to learn that for creating an order it is supposed to use the url http://my.server.org/newOrder and not http://my.server.org/nO or anything else?

For a human interface (i.e. browser), I guess the server would provide some form of link (possibly in a form element) and the text around and in that link would tell a user which of the forms on that page is the correct one for creating an order (as supposed to creating a user or navigating to some search result)

What are the mechanics used for implementing this on the client side? And also: are they actually used or does the majority of people just hardwire the urls into the client?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T06:42:46+00:00Added an answer on May 23, 2026 at 6:42 am

    How do you do this for
    system-to-system interfaces? Say the
    client wants to create an order in the
    server at http://my.server.org How is
    it supposed to learn that for creating
    an order it is supposed to use the url
    http://my.server.org/newOrder and not
    http://my.server.org/nO or anything
    else?

    It doesn’t learn. Machine clients, generally, can’t “learn”. Not yet at least, we’re still pre-Skynet. You have to “teach” them.

    But what the key is that you don’t teach them URLs. You teach them relations.

    Consider, in HTML…

    <a rel="order" href="http://my.server.org/newOrder"/>
    

    and

    <a rel="order" href="http://my.server.org/nO"/>
    

    You’ll notice that the rel is the same, “order”, but the URL is not.

    In a “perfect” world, you system will have a single entry point, say, http://my.server.org/ and from there the client can find all of the rels that it needs to know about.

    In practice, many systems have several “well known”, and defined entry points from which the client can start, just as an expediency so the client does not alway have to start at the root of the system. These well known entry points have an implied commitment from the provider that these URLs won’t be changing any time soon. That they’re long lived, and the server will support them very well.

    But once passed the entry point, any URL you find likely does not have such a promise behind it. The URL can be a one use only URL. It could be directed to different machines for, say, load balancing. Who knows. But as a consumer of the service, you really don’t care what the URL is, you only care about the relation. The relation tells you the detail of the URL to use.

    The documentation of your hypermedia API explains how to apply the uniform interface to each of the rels that your client will encounter. The client can’t “intuit” that either, it has to be taught.

    Basically, by teaching the client how to navigate the relations that it will or MAY find in the payloads it processes is how the client manipulates the hypermedia API. The payloads contain sign posts to show the way, but the server dictates where those sign posts go.

    As for how often it is used, in the machine to machine world, likely not very much. Most systems aren’t large enough where the URLs change enough to matter, and the clients are so few that changing the clients is not a significant burden. So most just hard code away.

    But then, in the end, you just have bad clients. Nothing a REST system can do with a bad client. It can’t tell them apart at runtime anyway.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Well guys, I'm trying to get that MongoDB feature working for hours: http://www.mongodb.org/display/DOCS/Http+Interface I
I'm trying to create a function which removes all none English characters (except spaces,dots

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.