Create child role via REST

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Create child role via REST

Antonio Ciancio
Hello,

is it possible to create children roles via REST API?

Regards,

Antonio
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Create child role via REST

ilgrosso
Administrator
On 14/06/2017 13:35, Antonio Ciancio wrote:
> Hello,
>
> is it possible to create children roles via REST API?

As a general criteria, everything that you can do via Admin Console can
be done via REST, as the Admin Console is nothing but a REST client to
the Core.

Regards.

--
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Create child role via REST

Antonio Ciancio
Thanks Francesco,

Must I use the same method I use to create parent roles?

"http://address:port/syncope/rest/role"

with this payload:

"{\"id\": ParentRoleId, \"name\": \"RoleParentName\", \"inheritOwner\": false,\"inheritTemplates\": false, "rAttrTemplates":["attr1", "attr2", ..., "attrN"] "}"

Regards

Antonio



2017-06-14 14:05 GMT+02:00 Francesco Chicchiriccò <[hidden email]>:
On 14/06/2017 13:35, Antonio Ciancio wrote:
Hello,

is it possible to create children roles via REST API?

As a general criteria, everything that you can do via Admin Console can be done via REST, as the Admin Console is nothing but a REST client to the Core.

Regards.

--
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Create child role via REST

Antonio Ciancio
Hi,

as follows, the right payload to add a child role:

{"id":0, "parent":parentRoleId, "name":"childRoleName", "inheritOwner":false,"inheritTemplates":false, "rAttrTemplates":["attr1", "attr2", ..., "attrN"]}

I hope it can be useful!

Regards,

Antonio

2017-06-15 10:47 GMT+02:00 Antonio Ciancio <[hidden email]>:
Thanks Francesco,

Must I use the same method I use to create parent roles?

"http://address:port/syncope/rest/role"

with this payload:

"{\"id\": ParentRoleId, \"name\": \"RoleParentName\", \"inheritOwner\": false,\"inheritTemplates\": false, "rAttrTemplates":["attr1", "attr2", ..., "attrN"] "}"

Regards

Antonio



2017-06-14 14:05 GMT+02:00 Francesco Chicchiriccò <[hidden email]>:
On 14/06/2017 13:35, Antonio Ciancio wrote:
Hello,

is it possible to create children roles via REST API?

As a general criteria, everything that you can do via Admin Console can be done via REST, as the Admin Console is nothing but a REST client to the Core.

Regards.

--
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/



Loading...