Modify automation member's permissions

This call edits a member's permissions in a specified automation. You need to have admin permissions in an automation in order to be able to edit members.

Request

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

Example request

PATCH v2/automation/automations/40a284d9-c0da-441c-8799-3de8d85bbd8d/members/rfranklin
Host: api.sbgenomics.com
X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f75
curl -s -H "X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f75" -H "content-type: application/json" -X PATCH "https://api.sbgenomics.com/v2/automation/automations/40a284d9-c0da-441c-8799-3de8d85bbd8d/rfranklin"
from sevenbridges import Api

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

automation = api.automations.get(id='a284d9-c0da-441c-8799-3de8d85bbd8d')
member = automation.get_member(username='rfranklin')

# modify member's permissions
member.permissions = {
    'write': True,
    'read': True,
    'copy': True,
    'execute': False,
    'admin': False
}

# send PATCH request to SB API
member.save()

print(member.permissions)

Header Fields

Key

Description of value

X-SBG-Auth-Token
required

Your Seven Bridges Platform authentication token.

Content-type
required

application/json

X-SBG-Advance-Access
required

advance

Path parameters

Key

Data type

Description

automation-id
required

String

The ID of the automation the member belongs to.

username
required

String

The username of the member you are modifying the permissions for.

Request body

Example request body

Kay

Description

username

String

read

Boolean: true or false

copy

Boolean: true or false

write

Boolean: true or false

execute

Boolean: true or false

admin

Boolean: true or false

{"username": "rfranklin",
            "permissions": {
                "write": true,
                "read": true,
                "copy": 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-automations-cli-vayu.sbgenomics.com/v2/automation/automations/40a284d9-c0da-441c-8799-3de8d85bbd8d/members/rfranklin",
    "username": "rfranklin",
    "permissions": {
        "write": true,
        "read": true,
        "copy": true,
        "execute": false,
        "admin": false
    }
}