Saltar al contenido principal
PATCH
/
v1
/
project
/
{project_id}
/
member
/
{profile_id}
/
role
Update member role
import requests

url = "https://api.diga.io/v1/project/{project_id}/member/{profile_id}/role"

payload = { "role": "admin" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
{
  "status": "error",
  "error_code": "CANNOT_REMOVE_LAST_ADMIN",
  "message": "Cannot demote the last admin in project 550e8400-e29b-41d4-a716-446655440000"
}

Autorizaciones

Authorization
string
header
requerido

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Parámetros de ruta

project_id
string<uuid>
requerido
profile_id
string<uuid>
requerido

Cuerpo

application/json

Request to update a member's role in the project.

role
enum<string>
requerido

New role for the member (admin or member)

Opciones disponibles:
admin,
member

Respuesta

Successful Response