Roles & Permissions

Roles & Permissions

GET /api/v1/permissions

Get Permissions

getPermissions returns all available permissions

Response

Type: []Permission

FieldTypeDescription
iduuid.UUID
created_attime.Time
updated_attime.Time
namestringe.g., “models:read”, “workflows:execute”
descriptionstring
resourcestringe.g., “models”, “datasets”, “workflows”
actionstringe.g., “read”, “write”, “delete”, “execute”

Example

curl -X GET \
  -H "Authorization: Bearer <token>" \
  https://api.seeme.ai/api/v1/permissions

GET /api/v1/roles

Get Roles

getRoles returns all available roles

Response

Type: []Role

FieldTypeDescription
iduuid.UUID
created_attime.Time
updated_attime.Time
namestring
descriptionstring
slugstringe.g., “org_admin”, “project_editor”
scopestring“system”, “organization”, “team”, “project”
organization_idstringNULL = system role, else org-specific
is_systemboolSystem roles cannot be deleted
permissionsdatatypes.JSONArray of permission names: [“models:read”, “models:write”]
permission_list[]stringFor API responses (optional)

Example

curl -X GET \
  -H "Authorization: Bearer <token>" \
  https://api.seeme.ai/api/v1/roles

POST /api/v1/roles

Create Role

createRole creates a new custom role for an organization

Request Body

Type: CreateRoleRequest

Response

Type: Role

FieldTypeDescription
iduuid.UUID
created_attime.Time
updated_attime.Time
namestring
descriptionstring
slugstringe.g., “org_admin”, “project_editor”
scopestring“system”, “organization”, “team”, “project”
organization_idstringNULL = system role, else org-specific
is_systemboolSystem roles cannot be deleted
permissionsdatatypes.JSONArray of permission names: [“models:read”, “models:write”]
permission_list[]stringFor API responses (optional)

Example

curl -X POST \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{}' \
  https://api.seeme.ai/api/v1/roles

GET /api/v1/roles/{id}

Get Role By I D

getRoleByID returns a specific role

Parameters

NameInTypeRequired
idpathstringtrue

Response

Type: Role

FieldTypeDescription
iduuid.UUID
created_attime.Time
updated_attime.Time
namestring
descriptionstring
slugstringe.g., “org_admin”, “project_editor”
scopestring“system”, “organization”, “team”, “project”
organization_idstringNULL = system role, else org-specific
is_systemboolSystem roles cannot be deleted
permissionsdatatypes.JSONArray of permission names: [“models:read”, “models:write”]
permission_list[]stringFor API responses (optional)

Example

curl -X GET \
  -H "Authorization: Bearer <token>" \
  https://api.seeme.ai/api/v1/roles/{id}

PUT /api/v1/roles/{id}

Update Role

updateRole updates a role’s permissions and details

Parameters

NameInTypeRequired
idpathstringtrue

Request Body

Type: UpdateRoleRequest

Response

Type: Role

FieldTypeDescription
iduuid.UUID
created_attime.Time
updated_attime.Time
namestring
descriptionstring
slugstringe.g., “org_admin”, “project_editor”
scopestring“system”, “organization”, “team”, “project”
organization_idstringNULL = system role, else org-specific
is_systemboolSystem roles cannot be deleted
permissionsdatatypes.JSONArray of permission names: [“models:read”, “models:write”]
permission_list[]stringFor API responses (optional)

Example

curl -X PUT \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{}' \
  https://api.seeme.ai/api/v1/roles/{id}

DELETE /api/v1/roles/{id}

Delete Role

deleteRole deletes a custom role (not system roles)

Parameters

NameInTypeRequired
idpathstringtrue

Example

curl -X DELETE \
  -H "Authorization: Bearer <token>" \
  https://api.seeme.ai/api/v1/roles/{id}