Update member role
import requests
url = "https://api.diga.io/v1/project/{project_id}/member/{profile_id}/role"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.diga.io/v1/project/{project_id}/member/{profile_id}/role', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://api.diga.io/v1/project/{project_id}/member/{profile_id}/role \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.diga.io/v1/project/{project_id}/member/{profile_id}/role"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": "error",
"error_code": "CANNOT_REMOVE_LAST_ADMIN",
"message": "Cannot demote the last admin in project 550e8400-e29b-41d4-a716-446655440000"
}{
"status": "error",
"error_code": "MEMBER_NOT_FOUND",
"message": "Member 660e8400-e29b-41d4-a716-446655440001 not found in project 550e8400-e29b-41d4-a716-446655440000"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"status": "error",
"error_code": "INTERNAL_SERVER_ERROR",
"message": "Error: Internal Server Error"
}Project Members
Update member role
Change a project member’s role (e.g., from member to admin or vice versa).
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 = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.diga.io/v1/project/{project_id}/member/{profile_id}/role', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://api.diga.io/v1/project/{project_id}/member/{profile_id}/role \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.diga.io/v1/project/{project_id}/member/{profile_id}/role"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": "error",
"error_code": "CANNOT_REMOVE_LAST_ADMIN",
"message": "Cannot demote the last admin in project 550e8400-e29b-41d4-a716-446655440000"
}{
"status": "error",
"error_code": "MEMBER_NOT_FOUND",
"message": "Member 660e8400-e29b-41d4-a716-446655440001 not found in project 550e8400-e29b-41d4-a716-446655440000"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"status": "error",
"error_code": "INTERNAL_SERVER_ERROR",
"message": "Error: Internal Server Error"
}Autorizaciones
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Cuerpo
application/json
Request to update a member's role in the project.
New role for the member (admin or member)
Opciones disponibles:
admin, member, reader Respuesta
Successful Response
⌘I

