Sana Teamspaces API

The Teamspaces API from Sana — 3 operation(s) for teamspaces.

OpenAPI Specification

sana-teamspaces-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Sana Assignments Teamspaces API
  version: v0/v1
  description: Sana's REST API for the Sana AI knowledge/learning platform. Programmatic access to users, groups, programs, assignments, courses, paths, teamspaces, reporting/Insights, and xAPI statements. Authentication is OAuth 2.0 client credentials returning a bearer token; GET requests require the `read` scope and write requests require the `write` scope. The API is served per tenant at https://<domain>.sana.ai.
  contact:
    name: Sana API Documentation
    url: https://docs.sana.ai/api-docs/
servers:
- url: https://{domain}.sana.ai
  description: Per-tenant Sana host
  variables:
    domain:
      default: app
      description: Your Sana workspace subdomain
security:
- bearerAuth: []
tags:
- name: Teamspaces
paths:
  /api/v0/teamspaces:
    get:
      operationId: listTeamspaces
      tags:
      - Teamspaces
      summary: List teamspaces
      responses:
        '200':
          description: A list of teamspaces
    post:
      operationId: createTeamspace
      tags:
      - Teamspaces
      summary: Create a teamspace
      responses:
        '201':
          description: Teamspace created
  /api/v0/teamspaces/{teamspaceId}:
    get:
      operationId: getTeamspace
      tags:
      - Teamspaces
      summary: Retrieve a teamspace
      parameters:
      - $ref: '#/components/parameters/teamspaceId'
      responses:
        '200':
          description: A teamspace
    delete:
      operationId: deleteTeamspace
      tags:
      - Teamspaces
      summary: Delete a teamspace
      parameters:
      - $ref: '#/components/parameters/teamspaceId'
      responses:
        '204':
          description: Teamspace deleted
  /api/v0/teamspaces/{teamspaceId}/members:
    get:
      operationId: listTeamspaceMembers
      tags:
      - Teamspaces
      summary: List teamspace members
      parameters:
      - $ref: '#/components/parameters/teamspaceId'
      responses:
        '200':
          description: A list of members
    post:
      operationId: addTeamspaceMembers
      tags:
      - Teamspaces
      summary: Add teamspace members
      parameters:
      - $ref: '#/components/parameters/teamspaceId'
      responses:
        '200':
          description: Members added
    delete:
      operationId: removeTeamspaceMembers
      tags:
      - Teamspaces
      summary: Remove teamspace members
      parameters:
      - $ref: '#/components/parameters/teamspaceId'
      responses:
        '204':
          description: Members removed
components:
  parameters:
    teamspaceId:
      name: teamspaceId
      in: path
      required: true
      schema:
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer access token obtained from POST /api/token via the OAuth 2.0 client credentials grant.
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://{domain}.sana.ai/api/token
          scopes:
            read: Read access (required for GET requests)
            write: Write access (required for POST, PATCH, DELETE requests)