Good evening,
I'm new to syncope.
My goal is to add user, role and membership to syncope via curl call to
rest api
I'm able to add user and role and I can also associate user with role
through this call
curl --request POST -H "Accept: application/json" --data '
{"id":101,"membershipsToAdd":[{"role":100}]}' -u admin:password -H
"Content-Type: application/json"
http://localhost:8085/syncope/rest/users/766
My question is about attribute and membership.
Could you provide an example in which I can set attribute of membership?
In my example I've two attributes: group_name (string) and calendar which
is a file representing the calendar vcs binary type.
I've try this call
curl -H "Accept: application/json" --data
'{"id":769,"membershipMod":[{"role":344}],"attributeMod":[{"schema":"card_id,"valuesToBeAdded":"90"}]}'
-u admin:password -H "Content-Type: application/json"
http://localhost:8085/syncope/rest/users/769
with this error
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><syncope:error
xmlns:syncope="http://syncope.apache.org/1.2"><elements><element xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:ns4="
http://www.w3.org/2001/XMLSchema" xsi:type="ns4:string">Unrecognized field
"membershipsMod" (class org.apache.syncope.common.mod.UserMod), not marked
as ignorable (16 known properties: "resourcesToAdd", "virAttrsToRemove",
"resourcesToRemove", "securityQuestion", "virAttrsToUpdate",
"membershipsToAdd", "pwdPropRequest", "derAttrsToRemove", "derAttrsToAdd",
"username" [truncated]])
at [Source: org.apache.cxf.transport.http.AbstractHTTPDestination$1@8790bd;
line: 1, column: 29] (through reference chain:
org.apache.syncope.common.mod.UserMod["membershipsMod"])</element></elements><status>500</status><type>Unknown</type></syncope:error>
How can send vcs calendar file through rest call?
Can someone help me?
Thanks in advance