Python
import requests
url = "https://app.langwatch.ai/api/role-bindings/{id}"
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://app.langwatch.ai/api/role-bindings/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://app.langwatch.ai/api/role-bindings/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'{
"id": "<string>",
"principal": {
"id": "<string>",
"name": "<string>"
},
"customRoleId": "<string>",
"customRoleName": "<string>",
"scopeId": "<string>",
"scopeName": "<string>",
"createdAt": "<string>"
}Role Bindings
Update role binding
Change a binding’s role (and custom role). The principal and scope are the binding’s identity and do not change; create a new binding instead.
PATCH
/
api
/
role-bindings
/
{id}
Python
import requests
url = "https://app.langwatch.ai/api/role-bindings/{id}"
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://app.langwatch.ai/api/role-bindings/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://app.langwatch.ai/api/role-bindings/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'{
"id": "<string>",
"principal": {
"id": "<string>",
"name": "<string>"
},
"customRoleId": "<string>",
"customRoleName": "<string>",
"scopeId": "<string>",
"scopeName": "<string>",
"createdAt": "<string>"
}Authorizations
Admin API key for organization-level operations (managing projects, API keys). Create one in Settings > API Keys or via POST /api/api-keys. Format: sk-lw-{id}_{secret}.
Path Parameters
Minimum string length:
1Body
application/json
Response
200 - application/json
Success
Show child attributes
Show child attributes
Available options:
ADMIN, MEMBER, VIEWER, CUSTOM Available options:
ORGANIZATION, TEAM, PROJECT Was this page helpful?
⌘I