Manage environments & users
Enable/Disable panic mode
Enable/Disable panic mode of the environment.
Required scope : environment.panic
curl --location --request PATCH 'https://api.flagship.io/v1/accounts/{ACCOUNT_ID}/account_environments/{ACCOUNT_ENVIRONMENT_ID}/panic' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data-raw '{
"panic": "on"
}'
The different modes are on , off.
View environment users
List all the users granted to the environment.
Required scope : environment.user.list
curl --location --request GET 'https://api.flagship.io/v1/accounts/(ACCOUNT_ID}/account_environments/{ACCOUNT_ENVIRONMENT_ID}/users' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--data-raw ''
Add/Edit user rights
Add or update users of the environment. You can add or edit multiple users in a row.
Required scope : environment.user.put
curl --location --request PUT 'https://api.flagship.io/v1/accounts/{ACCOUNT_ID}/account_environments/{ACCOUNT_ENVIRONMENT_ID}/users' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"email": "[email protected]",
"role": "ACCOUNT_ADMIN"
},
{
"email": "[email protected]",
"role": "CREATOR"
}
]'
Delete users
Delete users of the environment. You can delete multiple users in a row.
Required scope : environment.user.delete
curl --location -g --request DELETE 'https://api.flagship.io/v1/accounts/{ACCOUNT_ID}/account_environments/{ACCOUNT_ENVIRONMENT_ID}/users?emails[][email protected]&emails[][email protected]' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--data-raw ''
Updated 5 months ago