Teams API
Teams allow you to create sub-groups within your tenant with scoped access to specific resources. See RBAC for the full permission model.
GET
/api/teams List all teams for the current tenant
Parameters:
| Param | Type | Description |
|---|---|---|
limit | number | Max results (default 50) |
offset | number | Pagination offset |
Response (200):
{
"data": [
{
"id": "team_abc123",
"name": "platform-ops",
"description": "Platform engineering team",
"memberCount": 5,
"scopes": ["agents:read", "agents:write", "policies:read", "policies:write"],
"createdAt": "2026-01-10T09:00:00Z"
}
],
"total": 3,
"limit": 50,
"offset": 0
}import Rivano from '@rivano/sdk';
const rivano = new Rivano({ apiKey: process.env.RIVANO_API_KEY! });
const teams = await rivano.teams.list(); POST
/api/teams Create a new team
Request body:
{
"name": "product-team",
"description": "Product engineering — read-only trace access"
}Response (201):
{
"data": {
"id": "team_xyz789",
"name": "product-team",
"description": "Product engineering — read-only trace access",
"memberCount": 0,
"scopes": [],
"createdAt": "2026-04-04T10:00:00Z"
}
}const team = await rivano.teams.create({
name: 'product-team',
description: 'Product engineering — read-only trace access',
});
console.log('Team ID:', team.data.id); GET
/api/teams/:id/members List members of a team
Response (200):
{
"data": [
{
"userId": "user_abc123",
"email": "[email protected]",
"role": "admin",
"joinedAt": "2026-01-12T10:00:00Z"
},
{
"userId": "user_def456",
"email": "[email protected]",
"role": "member",
"joinedAt": "2026-02-01T14:00:00Z"
}
],
"total": 5
}const members = await rivano.teams.listMembers('team_abc123');
members.data.forEach(m => console.log(m.email, m.role)); POST
/api/teams/:id/members Add a member to a team
Request body:
{
"userId": "user_ghi789",
"role": "member"
}You can use either userId or email to identify the user.
Response (201):
{
"userId": "user_ghi789",
"email": "[email protected]",
"role": "member",
"joinedAt": "2026-04-04T10:05:00Z"
}await rivano.teams.addMember('team_abc123', {
userId: 'user_ghi789',
role: 'member',
}); DELETE
/api/teams/:id/members Remove a member from a team
Request body:
{
"userId": "user_ghi789"
}Response (200):
{ "success": true }await rivano.teams.removeMember('team_abc123', 'user_ghi789'); PUT
/api/teams/:id/scopes Set the access scopes for a team
Replaces the full scope list for the team.
Request body:
{
"scopes": ["agents:read", "traces:read", "costs:read"]
}Available scopes: agents:read, agents:write, policies:read, policies:write, traces:read, costs:read, costs:write, teams:read, teams:write, keys:read, keys:write, compliance:read, audit:read.
Response (200): Updated team object.
await rivano.teams.setScopes('team_xyz789', {
scopes: ['agents:read', 'traces:read', 'costs:read'],
}); Related
- RBAC — Role model and permission matrix
- Multi-Tenancy — Team scoping within tenant boundaries
- SSO Setup — Map IdP roles to Rivano team membership
- API Reference Overview — Auth and pagination