Advertisement
Gigi95

REST cURL to create group

Apr 12th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.51 KB | None | 0 0
  1. curl -uadmin:rockstar -X PUT { "newGroup" : ["authorityType" : "GROUP", "shortName" : "COMPUTER_SCIENCE_400LVL", "fullName" : "COMPUTER_SCIENCE_400_LEVEL", "displayName" : "COMPUTER_SCIENCE_400LVL", "url" : "api/groups/COMPUTER_SCIENCE_400LVL", "zones" : ["APP.DEFAULT", "AUTH.ALF"] "http://localhost:8080/alfresco/service/api/groups"
  2.  
  3. But I got this error:
  4.  
  5. curl: (3) [globbing] unmatched brace in column 1
  6. curl: (6) Could not resolve host: newGroup
  7. curl: (6) Could not resolve host:
  8. curl: (3) [globbing] bad range in column 2
  9. curl: (6) Could not resolve host:
  10. curl: (6) Could not resolve host: GROUP,
  11. curl: (6) Could not resolve host: shortName
  12. curl: (6) Could not resolve host:
  13. curl: (6) Could not resolve host: COMPUTER_SCIENCE_400LVL,
  14. curl: (6) Could not resolve host: fullName
  15. curl: (6) Could not resolve host:
  16. curl: (6) Could not resolve host: COMPUTER_SCIENCE_400_LEVEL,
  17. curl: (6) Could not resolve host: displayName
  18. curl: (6) Could not resolve host:
  19. curl: (6) Could not resolve host: COMPUTER_SCIENCE_400LVL,
  20. curl: (6) Could not resolve host: url
  21. curl: (6) Could not resolve host:
  22. curl: (6) Could not resolve host: api
  23. curl: (6) Could not resolve host: zones
  24. curl: (6) Could not resolve host:
  25. curl: (3) [globbing] bad range in column 2
  26. curl: (3) [globbing] unmatched close brace/bracket in column 9
  27. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  28. <html xmlns="http://www.w3.org/1999/xhtml">
  29. <head>
  30. <title>Web Script Status 405 - Method Not Allowed</title>
  31. <link rel="stylesheet" href="/alfresco/css/webscripts.css" type="text/css" />
  32. </head>
  33. <body>
  34. <div>
  35. <table>
  36. <tr>
  37. <td><img src="/alfresco/images/logo/AlfrescoLogo32.png" alt="Alfresco" /></td>
  38. <td><span class="title">Web Script Status 405 - Method Not Allowed</span></td>
  39. </tr>
  40. </table>
  41. <br/>
  42. <table>
  43. <tr><td>The Web Script <a href="%2Falfresco%2Fservice%2Fapi%2Fgroups">/alfresco/service/api/groups</a> has responded with a status of 405 - Method Not Allowed.</td></tr>
  44. </table>
  45. <br/>
  46. <table>
  47. <tr><td><b>405 Description:</b></td><td> The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.</td></tr>
  48. <tr><td> </td></tr>
  49. <tr><td><b>Message:</b></td><td>03110002 Script url /api/groups does not support the method PUT</td></tr>
  50. <tr><td><b>Server</b>:</td><td>Community v5.2.0 (re21f2be5-b22) schema 10,057</td></tr>
  51. <tr><td><b>Time</b>:</td><td>Apr 11, 2018 10:50:37 AM</td></tr>
  52. <tr><td></td><td> </td></tr>
  53. </table>
  54. </div>
  55. </body>
  56. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement