cancel
Showing results for 
Search instead for 
Did you mean: 

Create person api not working

db9p
Champ in-the-making
Champ in-the-making
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
3 REPLIES 3

mrogers
Star Contributor
Star Contributor
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

db9p
Champ in-the-making
Champ in-the-making
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...

db9p
Champ in-the-making
Champ in-the-making
Never mind, I figured it out. Thanks for your help anyway!