views:

38

answers:

2

I'm trying to structure a URI that accesses my data by id.

Currently my URIs are query based like so:

.../content?parentList=15&type=note

How could I structure a similar URI so that I could query for notes in multiple lists?

Essentially combining the results of the next two URIs.

.../content?parentList=15&type=note
.../content?parentList=16&type=note

Is there a standard way to do this?

+1  A: 

According to the current draft of the URI Template spec (Section 3.6 on page 7), you could do:

.../content?parentList=15,16&type=note
Darrel Miller
That's great! Now I just need to figure out how I can put in the comma without it being encoded by the builder.
CodeFusionMobile
A: 

The Query portion of the URI doesn't require each parameter to occur only once. Just repeat the query:

.../content?parentList=15&parentList=16&type=note

It is also part of the URI template internet draft:

{?list+}

becomes

?list=val1&list=val2&list=val3 
mogsie