Adding an ACL to a Document Type through API

Anything concerning integration via the REST API
Post Reply
csquared
Posts: 2
Joined: Fri Oct 11, 2019 7:17 pm

Adding an ACL to a Document Type through API

Post by csquared » Fri Oct 11, 2019 7:39 pm

As the name implies, I'd like to implement ACLs into a given Document Type through the API. I've looked through Swagger and other available documentation and the closest thing I've seen to ACLs are the permissions_list call and the permissions_pk_list input option in roles_update, but otherwise have not seen any way to implement Document Type ACLs.

Thank you!

User avatar
rosarior
Posts: 393
Joined: Tue Aug 21, 2018 3:28 am

Re: Adding an ACL to a Document Type through API

Post by rosarior » Sun Oct 13, 2019 10:54 am

The ACL and the Events apps data is exposed under the /objects/ namespace.
2019-10-13_06-49.png
2019-10-13_06-49.png (59.59 KiB) Viewed 14 times

csquared
Posts: 2
Joined: Fri Oct 11, 2019 7:17 pm

Re: Adding an ACL to a Document Type through API

Post by csquared » Thu Oct 17, 2019 5:26 pm

Thank you very much!

To continue - if I wanted to create an ACL for a given document_type with two specific permissions attached, I would use the /objects/{app_label}/{model}/{object_id}/acls/{id}/permissions/, correct?

I do have a few questions on building this out though - could I have a bit more clarification on what's expected for each parameter? What is the difference between the object_id and the id? Is it just the Role ID and the Document Type ID? Where does the model variable fit into this?

Thanks again.

Post Reply