34k+
News
Guide
API
Wiki
Forum
Community
Places
Members
Hall of Fame
Badges
More
Learn
Books
Resources
Develop
Download Yii
Extensions
Report an Issue
Report a Security Issue
Contribute to Yii
Donate
About
Release Cycle
License
Team
Official Logos and Design
Login
How-To: Create a REST API
Comparing
#14
with
#15
Revision #15 was created by
waterloomatt
on Feb 22, 2012, 12:54:02 PM.
Changed Delete a post: index.php/api/posts (DELETE) to Delete a post: index.php/api/posts/123 (DELETE)
« Previous (#14)
Next (#16) »
Content
[...]
* **View all posts:** _index.php/api/posts_ (HTTP method _GET_)
* **View a single posts:** _index.php/api/posts/123_ (also _GET_ )
* **Create a new post:** _index.php/api/posts_ (_POST_)
* **Update a post:** _index.php/api/posts/123_ (_PUT_)
* **Delete a post:** _index.php/api/posts
/123
_ (_DELETE_)
In order to parse these URL's, set up the URL manager in _config/main.php_ like this:
[...]