Popsink teams API

The teams API from Popsink — 2 operation(s) for teams.

OpenAPI Specification

popsink-teams-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Fast admin teams API
  version: 0.1.0
servers:
- url: /api
tags:
- name: teams
paths:
  /teams/:
    post:
      tags:
      - teams
      summary: Teams:Create
      description: Create a team.
      operationId: teams_create_teams__post
      security:
      - OAuth2PasswordBearer: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TeamCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - teams
      summary: Teams:List
      description: List the teams of the current user.
      operationId: teams_list_teams__get
      security:
      - OAuth2PasswordBearer: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
          title: Page
      - name: size
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 1
          default: 50
          title: Size
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Page_TeamList_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /teams/{team_id}:
    get:
      tags:
      - teams
      summary: Teams:Get
      description: Read a team.
      operationId: teams_get_teams__team_id__get
      security:
      - OAuth2PasswordBearer: []
      parameters:
      - name: team_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Team Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TeamCreate:
      properties:
        name:
          type: string
          title: Name
          description: Name of the team
          examples:
          - Data Avengers
        description:
          type: string
          title: Description
          description: Short description of the team
          examples:
          - Team managing data pipelines and infrastructure.
        env_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Env Id
          description: Optional environment ID the team is associated with
          examples:
          - bfe91314-1234-4c6f-bb0c-01867487cc23
      type: object
      required:
      - name
      - description
      title: TeamCreate
      description: Request model for creating a new team.
    TeamList:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Unique identifier of the team
          examples:
          - 8c18a0db-3b10-4f9b-a7d3-6e837bafacb0
        name:
          type: string
          title: Name
          description: Name of the team
          examples:
          - Data Avengers
      type: object
      required:
      - id
      - name
      title: TeamList
      description: Response model for listing teams (brief format).
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    TeamRead:
      properties:
        name:
          type: string
          title: Name
          description: Name of the team
          examples:
          - Data Avengers
        description:
          type: string
          title: Description
          description: Short description of the team
          examples:
          - Team managing data pipelines and infrastructure.
        env_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Env Id
          description: Optional environment ID the team is associated with
          examples:
          - bfe91314-1234-4c6f-bb0c-01867487cc23
        id:
          type: string
          format: uuid
          title: Id
          description: Unique identifier for the team
          examples:
          - 8c18a0db-3b10-4f9b-a7d3-6e837bafacb0
      type: object
      required:
      - name
      - description
      - id
      title: TeamRead
      description: Response model for reading a team.
    Page_TeamList_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/TeamList'
          type: array
          title: Items
        total:
          anyOf:
          - type: integer
            minimum: 0
          - type: 'null'
          title: Total
        page:
          anyOf:
          - type: integer
            minimum: 1
          - type: 'null'
          title: Page
        size:
          anyOf:
          - type: integer
            minimum: 1
          - type: 'null'
          title: Size
        pages:
          anyOf:
          - type: integer
            minimum: 0
          - type: 'null'
          title: Pages
      type: object
      required:
      - items
      - total
      - page
      - size
      title: Page[TeamList]
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: auth/jwt/login