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 8899325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:49:41+00:00 2026-06-15T00:49:41+00:00

I have the base URL for a RESTful API. I have a list of

  • 0

I have the base URL for a RESTful API. I have a list of some of the resources types that it provides. like:

GET http://www.baseURL.com:8180/fruits

will result in something like:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  <FruitList xmlns="http://www.baseURL.com/Fruits">
  <Fruit>
    <Identity createdTimeStamp="2011-05-13T09:45:16.611-05:00" lastUpdatedTimeStamp="2012-11-19T03:24:19.310-06:00">
        <FruitName>Apple</FruitName>
    </Identity>
  </Fruit>
  <Fruit>
    <Identity createdTimeStamp="2011-05-13T09:45:17.241-05:00" lastUpdatedTimeStamp="2012-11-19T03:24:20.431-06:00">
      <FruitName>Banana</FruitName>
    </Identity>
  </Fruit>
  <Fruit>
    <Identity createdTimeStamp="2011-05-13T09:45:19.445-05:00" lastUpdatedTimeStamp="2012-11-19T03:24:21.281-06:00">
      <FruitName>Orange</FruitName>
    </Identity>
</Fruit>
</FruitList>

Is there a way that if I didn’t know that this API had ‘fruits’ as a resource that I could figure that out by some type of generic GET command?

  • 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-06-15T00:49:42+00:00Added an answer on June 15, 2026 at 12:49 am

    All communication requires some advance knowledge, RESTful APIs included. If I say “Hello” and you only speak Klingon, you might think I was insulting you. The pre-supposed knowledge required for a RESTful API includes:

    • The entry point (a URL)
    • Knowledge the interface and how to use it effectively (i.e. HTTP methods and return codes — see REST API – why use PUT DELETE POST GET? for more)
    • What representation formats can be reasonably expected to be available
    • An understanding of the semantics of those formats

    These should be documented so that client authors can make use of them. It therefore makes sense to re-use existing specifications wherever possible, rather than invent new ones. Doing so means existing clients can understand much or all of your API without even having seen any documentation for it. This is how new web sites can be added to the internet without browser vendors having to go back and update their browser to access the new web site.

    For example in HTML:

    entry point = http://www.example.com/
    hypertext formats expected = HTML, XHTML, SVG, etc.
    

    a modern browser knows the semantics of each of those, so when it encounters in a HTML response the text

    <link rel="stylesheet" href="/style.css">
    

    it will know that the LINK element represents a hypermedia pathway, and the relationship of the resource is that of the “stylesheet” relation, which it understands to have certain effects (namely, restyling the presentation of the primary response).

    Your API should have at its base URL, http://www.baseURL.com:8180/, a set of hypermedia links to resources it provides, <a href="/fruits">Fruits</a>, which can be followed by any client that understands HTML. If you want to add meaning to those links, you need to provide a relationship. There already exists a list of pre-defined link relations but if none of those suit you, you could either look for suitable relationships defined in other public ontologies, or define your own, using URIs within a namespace you control. It is recommended to use dereferencable HTTP URLs which provide human-readable documentation. For example:

    rel="http://www.baseURL.com:8180/documentation/#FruitList"
    

    So, in direct answer to your question,

    Is there a way that if I didn’t know that this API had ‘fruits’ as a resource that I could figure that out by some type of generic GET command?

    your client needs to GET the entry URL to the API, look at the relationship provided for each link, and know what that means because it is pre-defined somewhere and the client has knowledge of what a FruitList means to the user.

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

Sidebar

Related Questions

I have an old WCF 3.5 RESTful service that was at: http://www.mydomain.com/rest/Service.svc I have
Imagine that I have a Spring MVC controller something like this: @Controller @RequestMapping(/base-url) public
I have implemented some RESTful resource urls such as http://myapp.appspot.com/temperature/get with Jersey. I also
So I have the following code: NSURL *baseURL = [NSURL URLWithString:@http://www.baseurltoanxmlpage.com]; NSURL *url =
I would like to specify a base URL so I don't have to always
I have a url like this: index.php/home/lista_modelo_ajax?id=+$('#colecoes').val(), The thing is that the: $('#colecoes').val() is
I am trying out a RESTful API that has OAuth. I have the API
I have a base URL : http://my.server.com/folder/directory/sample And a relative one : ../../other/path How
I would like to have my base URL go to a specific category of
I have a bunch of strings like memory.caching and server.base.url. Within my configuration object

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.