Hi, I followed this comment to create a script that creates users in batch:
It works perfectly! (albeit it’s a bit slow, specially when you need to create 100+ users!!)
Now, I would prefer not to have to manually set the permissions for all those users.
I see from this comment (Uploading users in bulk in Django - #8 by Josh), that you can set the 'add_submissions' permission if you retrieve the project uid, however:
How do you retrieve a project UID without having to first submit dummy data and check in the saved data?
Is is possible to POST the permission/user id/project id to an endpoint? What would be the syntax for that?
I would recommend opening the Network tab in your browser as you perform actions in the UI to see which endpoints are called and what data is sent/received
However, the link posted in 2. points to " Not Found The requested resource was not found on this server.".
I would recommend opening the Network tab in your browser as you perform actions in the UI to see which endpoints are called and what data is sent/received
Ok so I followed the instructions written on https://kf.mydomain.com/api/v2/assets/aiSQbTFHeDFQbcHuJLmZnH/permission-assignments/, however when I POST the following payload:
to https://kf.mydomain.com/api/v2/assets/aiSQbTFHeDFQbcHuJLmZnH/permission-assignments/bulk/, I get a 403 Forbidden Error with {"detail":"Invalid token."}.
What I don’t get is that I use the exact same authorization token for creating users, and it works there.
Would you know how to fix that?
Hi @paperSheet, you need to ensure that the token being used is one that has sufficient permissions already to give additional permissions to other accounts. For example, the owner of a project can add another user to that project, but that user can’t add themselves.