The source for ERXRestRouteExample is intended to be browsed. To fully understand the framework, please review the annotations and explanations in the source.
- Show all Companies in plist format
curl
- Show all Companies in XML format
curl
- Show all Companies in JSON format
curl
- Show all Companies in SproutCore format
curl
- Show all Companies in Gianduia format
curl
- Show Person 1 in plist format
curl
- Show Person 1 in HTML (goes to PersonShowPage)
curl
- Update an attribute on Person:
curl -X PUT -d "{ name: 'Updated Name' }"
- Update a to-one relationship on Person:
curl -X PUT -d "{ company: { type:'Company', id:2 } }"
- Create a new Person:
curl -X POST -d "{ name:'Andrew Schrag' }"
- Create a new Person with a to-one relationship:
curl -X POST -d "{ name:'Andrew Schrag', company: { type:'Company', id:1 } }"
- Create a new Person and create a Company in its to-one relationship:
curl -X POST -d "{ name:'Andrew Schrag', company: { type:'Company', name:'New Company' } }"
- Update attribute across locked relationship (works):
curl -X PUT -d "{ company: { type:'Company', id:1, name:'mDimension Technology' } }"
- Change locked relationship (ignored):
curl -X PUT -d "{ company: { type:'Company', id:2 } }"
- ERXKeyFilter.Delegate API (doesn't allow setting a Person's company name to 'Microsoft'):
curl -X PUT -d "{ company: { type:'Company', id:1, name:'Microsoft' } }"
- Delete a Company:
curl -X DELETE