Difference between #14 and #15 of
How-To: Create a REST API

Revision #15 has been created by waterloomatt on Feb 22, 2012, 12:54:02 PM with the memo:

Changed Delete a post: index.php/api/posts (DELETE) to Delete a post: index.php/api/posts/123 (DELETE)
« previous (#14) next (#16) »

Changes

Title unchanged

How-To: Create a REST API

Category unchanged

How-tos

Yii version unchanged

Tags unchanged

REST, API, Tutorial

Content changed

[...]
* **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:
[...]
98 2
123 followers
Viewed: 498 364 times
Version: 1.1
Category: How-tos
Written by: jwerner
Last updated by: Rohit Suthar
Created on: Apr 15, 2011
Last updated: 9 years ago
Update Article

Revisions

View all history