Add Users to Your Project

As a
Automation Assembler
user with the project administrator role, you can use PATCH requests to add users and assign roles in your project.
  • Verify that all general prerequisites and prerequisites for the
    Automation Assembler
    Infrastructure as a Service (IaaS) service have been satisfied. See Prerequisites for API Use Case Examples.
  • Verify that you have the project administrator role in your project and you have the project ID. See Create a Project to use in Automation Assembler.
  • Prepare parameters including additional email addresses for administrators, members, or viewers that you want to add to the project.
  1. Assign the project ID variable.
    project_id='<
    your_project_id
    >'
    your_project_id
    is the ID of the new project you created.
  2. List the details of your project.
    curl -X GET -H 'Accept: application/json' -H "Authorization: Bearer $access_token" "$url/iaas/api/projects/$project_id?apiVersion=$api_version" | jq "."
  3. Examine the response to see the administrators and users who are already in your project.
  4. Submit a request to add a new administrator that includes the existing administrator for the project.
    If the call does not include existing administrators for the project, the PATCH request removes those administrators from the project. Specifying the administrator type is optional.
    curl -X PATCH \ "$url/iaas/api/projects/$project_id?apiVersion=$api_version" \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $access_token" \ -d '{ "administrators" : [ {"email" : "<
    your_new_administrator_email
    >", "type" : "user"}, {"email" : "<
    existing_administrator
    >", "type" : "user"} ] }' | jq "."
  5. Submit a request to add a new member that includes the existing users for the project.
    If the call does not include existing members for the project, the PATCH request removes those members from the project. Specifying the member type is optional.
    curl -X PATCH \ "$url/iaas/api/projects/$project_id?apiVersion=$api_version" \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $access_token" \ -d '{ "members" : [ {"email" : "<
    your_new_member_email
    >", "type" : "user"}, {"email" : "<
    existing_member
    >", "type" : "user"} ] }' | jq "."
Add Users to Your
Automation Assembler
Project
For the project
Example-Assembler-project
, add another administrator and member at
mycompany.com
.
$ url='https://appliance.domain.com' $ api_version='
2021-07-15
' $ project_id='5944aacb-91de-4541-bb9e-ef2a5403f81b'
List the details of your project.
$ curl -X GET -H 'Accept: application/json' -H "Authorization: Bearer $access_token" "$url/iaas/api/projects/$project_id?apiVersion=$api_version" | jq "."
A snippet of the response shows existing administrators, members, and viewers.
... "administrators": [ { "email": "admin1@mycompany.com", "type": "user" } ], "members": [ { "email": "member1@mycompany.com", "type": "user" } ], "viewers": [ { "email": "viewer1@mycompany.com", "type": "user" } ], ...
Add the administrator. Include the existing administrator
admin1@mycompany.com
in the PATCH request.
$ curl -X PATCH \ "$url/iaas/api/projects/$project_id?apiVersion=$api_version" \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $access_token" \ -d '{ "administrators" : [ {"email" : "newadministrator@mycompany.com", "type" : "user"}, {"email" : "admin1@mycompany.com", "type" : "user"} ] }' | jq "."
Add the member. Include the existing member
member1@mycompany.com
in the PATCH request.
$ curl -X PATCH \ "$url/iaas/api/projects/$project_id?apiVersion=$api_version" \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $access_token" \ -d '{ "members" : [ {"email" : "newmember@mycompany.com", "type" : "user"}, {"email" : "member1@mycompany.com", "type" : "user"} ] }' | jq "."
The response shows the project with administrators, members, and viewers, including the new administrator and new member.
{ "administrators": [ { "email": "newadministrator@mycompany.com", "type": "user" }, { "email": "admin1@mycompany.com", "type": "user" } ], "members": [ { "email": "newmember@mycompany.com", "type": "user" }, { "email": "member1@mycompany.com", "type": "user" } ], "viewers": [ { "email": "viewer1@mycompany.com", "type": "user" } ], "sharedResources": true, "name": "Example-Assembler-project", "description": "This is an example project for
Automation Assembler
", "id": "5944aacb-91de-4541-bb9e-ef2a5403f81b", "orgId": "8327d53f-91ea-420a-8613-ba8f3149db95" } }