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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:33:46+00:00 2026-05-27T01:33:46+00:00

I create an API to access users and objects owned by those users. Objects

  • 0

I create an API to access users and objects owned by those users. Objects can be accessed anonymously, by the author, or by some kind of moderator/superviser.

In all three cases a set of fields can be different (or can be the same – it is not known yet); at least it is different for anonymous vs identified-authorized modes.

Lets assume we have a user 456 and this user owns an object 123.

The primary question is:
What’s the best URI schema for this case and what are the pros and cons of each:

The secondary question is:
Are these resources the same or are they different resources for the same entity?

  1. One single URI for all objects, with output varying depending on absence or presence of identity:

    /objects.json?criteria=xyz&user=456  -- result depends on identity & "user"
    /objects/123.json                    -- result depends on identity
    /users/456.json
    
  2. Different URIs for anonymous and identified access, as if they were different resources:

    /objects.json?criteria=xyz           -- anonymous only
    /objects/123.json                    -- anonymous only
    /users/456.json
    /users/456/objects.json              -- identified only
    /users/456/objects/123.json          -- identified only
    
  3. Something else?

UPD: Just invented:

/objects/123                         -- basic info, same for anonymous&identified
/objects/123/extra                   -- different kinds of extra info,
/objects/123/extended                -- ... or extended representations,
/objects/123/meta                    -- ... only for authorized roles for each.

/objects?criteria=xyz                -- common search for objects
/users/456/objects                   -- objects owned by user only

And there are URIs of extra resources in the public and per-user lists (lists are entrypoints), depending on what list is used.

With this approach, we have URIs pointing to the resources, that do not vary depending on identity of the requesting user. But we still have control on what parts of information we give or don’t give to the requesting user. And URIs are not duplicated in any mean or way. Perfect!

  • 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-27T01:33:46+00:00Added an answer on May 27, 2026 at 1:33 am

    Assuming the question is answered in the UPD above. This pseudo-answer is to close the question.

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

Sidebar

Related Questions

Situation I'm trying to create a REST API, where users can request responses in
The answer to this SO question says that you can create an api by
Hello All I am writing some software that will allow users to create their
I need to create an API that will allow my customer's developers to use
I'm about to create an API for a existing .NET application and want to
I found the following code to create a tinyurl.com url: http://tinyurl.com/api-create.php?url=http://myurl.com This will automatically
I am attempting to create a REST API in PHP and I'd like to
The Win32 API call RegisterTypeLib() is used to create the registry keys necessary to
Does the CCK api allow me to create a node type, from a custom
I want to create an Enumeration using CodeDom API . I have searched enough

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.