Adding Users to Your Project
The first thing you need to do before adding a user to a project is to determine what role the user should have in your project. There's an API for retrieving all of the roles on your workspace, including any custom roles that you've created.
Here's how to find all available roles on your workspace: Role Templates .
curl --request POST \
--url https://api.shift.io/v3/roletemplates \
--header 'accept: application/json' \
--header 'x-key: YOUR_API_KEY' \
--header 'x-secret: YOUR_API_SECRET'This will return a response similar to the following, although you'll likely have more roles. Hang onto
the ID property. We'll need that in the next step.
[
{
"id":"5ef3be7fe4b08088b2a44ff1",
"displayName":"Uploader",
"description":"An uploader can view and create new assets.",
"permissionGroups":[
{
"displayName":"ASSET",
"groupIdentifier":"ASSET",
"permissions":["CREATE","READ"]
}],
"default":true,
"visible":true,
"deleted":false
}
]Now that you've chosen the role to give to your new project user, let's invite them to your project: Invite user to project .
curl --request POST \
--url https://api.shift.io/v3/projects/YOUR_NEW_PROJECT_ID/invitation \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-key: YOUR_API_KEY' \
--header 'x-secret: YOUR_API_SECRET'
--data '{"recipientEmail":"[email protected]","roleTemplateId":"5ef3be7fe4b08088b2a44ff1'Updated 25 days ago
What’s Next
Did this page help you?
