Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Direct updates of subresources #51

Open
boxfoot opened this issue Jul 17, 2017 · 2 comments
Open

Direct updates of subresources #51

boxfoot opened this issue Jul 17, 2017 · 2 comments
Labels

Comments

@boxfoot
Copy link
Contributor

boxfoot commented Jul 17, 2017

Let's say I have an organizational phone id (let's say 12345), and I want to get the whole record from the API. But I don't necessarily know the right organization id.

The format for phones is: /organizations/{orgId}/phones/{phoneId}

Is there a way for me to GET (or PUT changes) without knowing the organization id? Based on my current reading of version 1.1, there isn't. Should we add something like Google that would let me GET /organizations/-/phones/12345 for this situation?

@kinlane
Copy link
Contributor

kinlane commented Jul 17, 2017

Good thoughts.

I'd say #46 and #42 contribute to the GET portion, with addition of /search?phone=

But, your approach gracefully deals with GET and POST--providing an interesting design pattern to consider.

@kinlane
Copy link
Contributor

kinlane commented Aug 31, 2017

After the last round, my recommendation here is that sub resources also get introduced as top level resources, similar to how /services is, but more actually like /contacts is currently. I'd say services has become a top level, but /contacts is in limbo.

Example:

/contacts
/phones
/physical_address
/mailing_address
/holiday_schedule
/regular_schedule/
/disabilities

Maybe even shortening:

/address
/schedule

All allowing for:

  • Phone # loop
  • Address lookup
  • Who's open on holidays

Many other discovery types scenarios, rather than just wildcard. This is definitely lower priority, as there are bigger fishes to fry currently.

@kinlane kinlane added hold and removed road map labels Sep 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants