Adding/Removing Users from a Schedule
These endpoints allow you to programmatically manage user membership in schedules. You can add multiple users to a schedule or remove them using the respective endpoints. Each request requires a list of user IDs and appropriate authentication via an API token. Both adding and removing users support bulk operations through a single API call.
Adding UsersPOST /api/v1/schedules/[SCHEDULE ID]/add_users/
RemovingPOST /api/v1/schedules/[SCHEDULE ID]/remove_users/
orDELETE /api/v1/schedules/[SCHEDULE ID]/remove_users/
Required fields:
users | A list of User IDs (e.g [22,24]). |
Adding Users to a Schedule example
curl 'https://acmeinc.datareportive.com/api/v1/groups/1/add_users/' \
-X POST \
-H 'Authorization: Token [ TOKEN ]' \
-H 'Content-Type: application/json' \
-d '{"users":[1,2]}'
Remove Users to a Schedule example
curl 'https://acmeinc.datareportive.com/api/v1/groups/1/remove_users/' \
-X POST \
-H 'Authorization: Token [ TOKEN ]' \
-H 'Content-Type: application/json' \
-d '{"users":[1,2]}'