3

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
  • how do I create such uri? Commented Mar 17, 2016 at 11:19

2 Answers 2

3

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
Sign up to request clarification or add additional context in comments.

1 Comment

That's great! Now I just need to figure out how I can put in the comma without it being encoded by the builder.
1

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 

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.