Hello friends, I am preparing REST apis for my content management system. I am using symphony 1.4. Finally I could create a REST api for getting contents from the server. The content of my routing file is given below.
Code: Select all api_womenbytitle: url: /rest/:title/womenbytitle.:sf_format class: sfDoctrineRoute param: { module: rest, action: womenbytitle } options: { model: Women, type: list, method: getWomenByTitle } requirements: sf_format: json sf_method: get Code: Select all api_women: url: /rest/women.:sf_format class: sfDoctrineRoute param: { module: rest, action: women } options: { model: Women, type: list, method: getWomens } requirements: sf_format: (?:xml|json) api_womenbytitle get the women related content by filtering database field title. The URL for accessing this API is http://localhost/restwebservice/rest/Sports/womenbytitle.json I will get a json file while executing this api who’s title contains a word “Sports” api_women get all women related contents. The URL for accessing this api is http://localhost/restwebservice/rest/women.json My doubt is, it is required to call the api with full file name? Like for example am I able to call the first api as following? That is without specifying the file name. http://localhost/restwebservice/rest/womenbytitle/Sports Hope my doubt is clear to you. Can somebody tell me what modification I should done in the routing file (or some other places) I request experts to please answer. Thanks and Regards Shihab -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en