Hi All,

First, let me say that services is a great module. Haven't worked a whole bunch with it, but I do like it so far.

I have a question though. When I define a resource, is there any way to define it so it has more than one / (if that makes sense) ..

Here's what I mean

I want to be able to list a user's info by calling

{endpoint}/user/list/1

How can I define the list part?

I have tried doing it through a relationship, but no dice.

Right now it looks like user/1/list (with the relationship).

Thanks so much!

Comments

MrMaksimize’s picture

Title: Defining endpoints with more than one path » Defining resources with more than one path

Sorry, I meant to say resources

voxpelli’s picture

Status: Active » Fixed

Right now: Use query parameters on the main index function to achieve this.

There is an issue about #1042674: Add non-targeted relationships adding non-targeted relationships. There's however also some discussion about whether it should actually be needed or not.

MrMaksimize’s picture

just to clarify, the path would look something like {endpoint}/user/1?op=info, correct?

voxpelli’s picture

Yes - I think that would be the best solution currently

MrMaksimize’s picture

Well voxpelli I'm definitely +1 for your patch mate.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.