Restful Approach

vinnyband

New Member
Just a general question about how best to structure my restful API.I have a set of categories with different picture galleries in each. So currently I have:\[code\]/api/{CATEGORY}/{GALLERY-NAME}\[/code\]e.g.\[code\]/api/photographs/dogs/api/food/desserts\[/code\]If I don't specify a GALLERY-NAME it will list all of the galleries in a CATEGORY. If I don't specify a CATEGORY or a GALLERY-NAME, it will list all of the categories.Note: food and photographs are NOT key words - they are just category IDs.I'm wondering.. Should I have a pluralised section for my listings? Like /api/categories/ to list the categories and /api/categories/food/galleries to list the galleries? I just think it would look strange if you were to navigate to a site and see that sort of API.
 
Back
Top