Add an automation member

This call adds a new user to a specified automation. Only a user who has admin permissions in the automation can add a new member. Users may have the following permissions:

  • Read
  • Write
  • Copy
  • Execute
  • Admin

For more information, see the documentation on setting project member permissions. Note that some user permissions imply others: for example, if you give a user admin permission, then they automatically receive read, write, copy and execute permissions.

Request

https://api.sbgenomics.com/v2/automation/automations/{automation-id}/members
https://eu-api.sbgenomics.com/v2/automation/automations/{automation-id}/members

Example request

POST /v2/automation/automations/40a284d9-c0da-441c-8799-3de8d85bbd8d/members Host: api.sbgenomics.com X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f74
curl --data '{"username": "francis-crick", "permissions": { "read": true, "write": true, "copy":false, "execute": false, "admin": false}}' -s -H "X-SBG-Auth-Token: 6282d5e2121d43e7900e9d52b15845e7" -H "content-type: application/json" -X POST "https://api.sbgenomics.com/v2/automation/automations/40a284d9-c0da-441c-8799-3de8d85bbd8d/member"'
from sevenbridges import Api

api = Api(url='https://api.sbgenomics.com/v2',
          token='3259c50e1ac5426ea8f1273259740f74',
          advance_access=True)

automation = api.automations.get(id='40a284d9-c0da-441c-8799-3de8d85bbd8d')

# send POST request to SB API
member = automation.add_member(
    user='francis-crick',
    permissions={
        'read': True,
        'copy': True,
        'write': True,
        'execute': False,
        'admin': False
    }
)

print(member.username)

Header Fields

Name

Description

X-SBG-Auth-Token
required

Your Seven Bridges Platform authentication token.

Content-Type
required

application/json

X-SBG-Advance-Access
required

advance

Path parameters

Name

Description

automation-id
required

The ID of the automation you are adding the member to.

Request body

In the body, you should enter a list of key-value pairs. The keys, and the values they take, are described in the following table.

Name

Data type

Description

username
required

string

The Seven Bridges Platform username of the person you want to add to the automation.

You should use either 'username' (recommended) or 'email'.

permissions
required

Array of key-value pairs. The keys are strings, and the values are Booleans.

The possible keys are:

"write" "read" "copy" "execute" "admin"

Each key may have the values true or false.

Example request body

{ 

     "username" : "francis-crick",
     "permissions": {
            "read" : true, 
            "copy" : true,
            "write": true, 
            "execute": false, 
            "admin": false
     }
}

Response

See a list of Seven Bridges Platform-specific response codes that may be contained in the body of the response.

Example response body

{ 
            "href":"https://api.sbgenomics.com/v2/automation/automations/{automation-id}/members/francis-crick", 
     "username" : "francis-crick",
     "permissions": {
            "read" : true, 
            "copy" : true,
            "write": true, 
            "execute": false, 
            "admin": false
      }
}