Create person api not working

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2013 11:42 AM
Hi,
Please help find out why the following not working. I tried to create a person and sure the auth is correct.
The returned json is my own info, not the "test1" user I need to create.
curl –data "userName=test1&firstName=Test&lastName=One&email=test1@yahoo.com" http://server006/alfresco/service/api/people?alf_ticket=TICKET_baa8c13f1787fcd2f981137b7e9d4a2bbee18...
Thanks in advance!
-David
Please help find out why the following not working. I tried to create a person and sure the auth is correct.
The returned json is my own info, not the "test1" user I need to create.
curl –data "userName=test1&firstName=Test&lastName=One&email=test1@yahoo.com" http://server006/alfresco/service/api/people?alf_ticket=TICKET_baa8c13f1787fcd2f981137b7e9d4a2bbee18...
Thanks in advance!
-David
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2013 12:20 PM
You are calling the get person webscript.
To update or create objects you need to be using PUT or POST. Alfresco APIs tend to work with JSON bodies.
Look at
POST /alfresco/service/api/people
To update or create objects you need to be using PUT or POST. Alfresco APIs tend to work with JSON bodies.
Look at
POST /alfresco/service/api/people

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2013 05:21 PM
Thanks for your reply!
But if you look at my api calling script, I already use the POST method. Again, the script is (one line):
curl –data "userName=test1&firstName=Test&lastName=One&email=test1@yahoo.com" http://server006/alfresco/service/api/people?alf_ticket=TICKET_baa8c13f1787fcd2f981137b7e9d4a2bbee18...
But if you look at my api calling script, I already use the POST method. Again, the script is (one line):
curl –data "userName=test1&firstName=Test&lastName=One&email=test1@yahoo.com" http://server006/alfresco/service/api/people?alf_ticket=TICKET_baa8c13f1787fcd2f981137b7e9d4a2bbee18...

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2013 05:48 PM
Never mind, I figured it out. Thanks for your help anyway!
