Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Lyo » Recommended url paths? Bugzilla example ..?
Recommended url paths? Bugzilla example ..? [message #1220203] Tue, 10 December 2013 11:13 Go to next message
Nils Kronqvist is currently offline Nils KronqvistFriend
Messages: 10
Registered: July 2009
Junior Member
Hi,

I'm trying to find a recommended url path "strategy", but have not found any advice except for the examples.

The Bugzilla example (e.g. h t t p://open-services.net/resources/tutorials/integrating-products-with-oslc/implementing-an-oslc-provider/providing-service-providers-and-catalogs/) provides one example. Seem logical, but one oddity:

h t t p://HOST/OSLC4JBugzilla/services/serviceProviders/{product_id}
Here - path segment serviceProviders is included

h t t p://HOST/OSLC4JBugzilla/services/{product_id}/changeRequests
Here - path segment serviceProviders is NOT included

Any specific reason for selecting strategy as in example?


The reference implementations e.g. ChangeManagement another way - e.g. listing a serviceProvider with url: h t t p://localhost:8080/OSLC4JRegistry/serviceProviders/1


Any general recommendations and advice here? E.g. using the OSLC4J prefix - should that be considered "reserved" for Lyo examples?

Rgs,

/Nils K
Re: Recommended url paths? Bugzilla example ..? [message #1220227 is a reply to message #1220203] Tue, 10 December 2013 13:40 Go to previous messageGo to next message
Steve Speicher is currently offline Steve SpeicherFriend
Messages: 87
Registered: July 2009
Member

Perhaps in the example you quoted "services" or "serviceProviders" is not needed.

I tend to use the general pattern of:
<server context>/<application context>/<resource kind>/<system assigned identifier, stable>

So you'd expect:
h t t p://HOST/OSLC4JBugzilla/serviceProviders
Doing a GET on this URL returns all serviceProviders. Doing a POST on this URL, with serviceProvider representation, creates a new serviceProvider

h t t p://HOST/OSLC4JBugzilla/serviceProviders/1
Would provide you with 1 instance of a service provider.

Next if I wanted to host bugs, I would probably do it this way:
h t t p://HOST/OSLC4JBugzilla/bugs/1

Unless of course, the bugs for your bug tracking tool are scoped only to a project or service provider, then I'd define it a little different.

Just a reminder we are talking about service provider implementation. How best to design the URL space the application will fill. Clients should still use the "follow their nose" approach to discovering resources of interest and not understand this URL construction design and build URLs to try to locate resources of interest.

Perhaps we should consider opening a bug against our reference implementation and make it a slightly better example of these things (what one would really do in a real implementation)
Re: Recommended url paths? Bugzilla example ..? [message #1220240 is a reply to message #1220227] Tue, 10 December 2013 14:46 Go to previous message
Nils Kronqvist is currently offline Nils KronqvistFriend
Messages: 10
Registered: July 2009
Junior Member
Thanks for fast answer!

A ChangeRequest can be part of multiple service providers at any time - but usually its system internal id is unique to (minimally) the server, so having the url to a bug like Bugzilla example i.e:

h t t p://HOST/OSLC4JBugzilla/services/{project_id}/changeRequests/{cr_id}

will make move of a bug between service providers problematic as its url = unique identifier will change. Maybe not envisioned in that example, but agree it makes sense adding a bug on this for the ref implementations. Created https://bugs.eclipse.org/bugs/show_bug.cgi?id=423711 - please update if it can be better worded.

Rgs,

/Nils K
Previous Topic:How control the verbosity of the rdf?
Next Topic:Connection Timeout error while running StockQuotes sample
Goto Forum:
  


Current Time: Fri Apr 19 22:26:06 GMT 2024

Powered by FUDForum. Page generated in 0.03184 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top