Aha.io Team memberships API

The Team memberships API from Aha.io — 2 operation(s) for team memberships.

OpenAPI Specification

aha-team-memberships-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Aha! Account backups Team memberships API
  version: 1.0.0
  description: Complete API documentation for Aha! generated from actual test responses
  contact:
    name: Aha! Support
    url: https://www.aha.io/support
servers:
- url: https://{account-domain}.aha.io/api/v1
  description: Aha! API Server
  variables:
    account-domain:
      description: Your Aha! account domain
      default: company
security:
- OAuth2: []
- ApiKeyAuth: []
- CookieAuth: []
tags:
- name: Team memberships
paths:
  /api/v1/teams/{team_id}/team_memberships:
    post:
      summary: Add user to a team
      description: Team memberships for capacity planning teams. Users can be either Aha! users or virtual users
      tags:
      - Team memberships
      parameters:
      - name: team_id
        in: path
        required: true
        schema:
          type: string
        description: TeamId identifier
      responses:
        '204':
          description: No content - operation successful
      security:
      - OAuth2: []
      - ApiKeyAuth: []
      - CookieAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TeammembershipsPostRequest'
            example:
              team_membership:
                user_id: 689956296
    get:
      summary: List team memberships for a team
      description: Team memberships for capacity planning teams. Users can be either Aha! users or virtual users
      tags:
      - Team memberships
      parameters:
      - name: team_id
        in: path
        required: true
        schema:
          type: string
        description: TeamId identifier
      - name: fields
        in: query
        required: false
        schema:
          type: string
        example: team_member,team,created_at
      responses:
        '200':
          description: Successful operation
          headers:
            Content-Type:
              description: application/json; charset=utf-8
              schema:
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/TeammembershipsGetResponse'
              example:
                team_memberships:
                - id: '202266373'
                  team_member:
                    id: '540018633'
                    name: John Johnson
                    email: john.johnson@corporation.com
                    user_id: null
                    virtual: true
                  team:
                    id: '949295028'
                    name: Default team
                  created_at: '2019-01-01T00:00:00.000Z'
                - id: '646482528'
                  team_member:
                    id: '960059005'
                    name: Mary Humpty
                    email: no-reply@aha.io
                    user_id: '1020675218'
                    virtual: false
                  team:
                    id: '949295028'
                    name: Default team
                  created_at: '2019-01-01T00:00:00.000Z'
                pagination:
                  total_records: 2
                  total_pages: 1
                  current_page: 1
      security:
      - OAuth2: []
      - ApiKeyAuth: []
      - CookieAuth: []
  /api/v1/teams/{team_id}/team_memberships/{id}:
    delete:
      summary: Remove a user from a team
      description: Team memberships for capacity planning teams. Users can be either Aha! users or virtual users
      tags:
      - Team memberships
      parameters:
      - name: team_id
        in: path
        required: true
        schema:
          type: string
        description: TeamId identifier
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Id identifier
      responses:
        '204':
          description: No content - operation successful
      security:
      - OAuth2: []
      - ApiKeyAuth: []
      - CookieAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TeammembershipsPostRequest'
            example: {}
components:
  schemas:
    TeammembershipsGetResponse:
      type: object
      properties:
        team_memberships:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: '202266373'
              team_member:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  email:
                    type: string
                  user_id:
                    type: 'null'
                  virtual:
                    type: string
                example:
                  id: '540018633'
                  name: John Johnson
                  email: john.johnson@corporation.com
                  user_id: null
                  virtual: true
              team:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                example:
                  id: '949295028'
                  name: Default team
              created_at:
                type: string
                example: '2019-01-01T00:00:00.000Z'
            example:
              id: '202266373'
              team_member:
                id: '540018633'
                name: John Johnson
                email: john.johnson@corporation.com
                user_id: null
                virtual: true
              team:
                id: '949295028'
                name: Default team
              created_at: '2019-01-01T00:00:00.000Z'
          example:
          - id: '202266373'
            team_member:
              id: '540018633'
              name: John Johnson
              email: john.johnson@corporation.com
              user_id: null
              virtual: true
            team:
              id: '949295028'
              name: Default team
            created_at: '2019-01-01T00:00:00.000Z'
          - id: '646482528'
            team_member:
              id: '960059005'
              name: Mary Humpty
              email: no-reply@aha.io
              user_id: '1020675218'
              virtual: false
            team:
              id: '949295028'
              name: Default team
            created_at: '2019-01-01T00:00:00.000Z'
        pagination:
          type: object
          properties:
            total_records:
              type: integer
              example: 2
            total_pages:
              type: integer
              example: 1
            current_page:
              type: integer
              example: 1
          example:
            total_records: 2
            total_pages: 1
            current_page: 1
      example:
        team_memberships:
        - id: '202266373'
          team_member:
            id: '540018633'
            name: John Johnson
            email: john.johnson@corporation.com
            user_id: null
            virtual: true
          team:
            id: '949295028'
            name: Default team
          created_at: '2019-01-01T00:00:00.000Z'
        - id: '646482528'
          team_member:
            id: '960059005'
            name: Mary Humpty
            email: no-reply@aha.io
            user_id: '1020675218'
            virtual: false
          team:
            id: '949295028'
            name: Default team
          created_at: '2019-01-01T00:00:00.000Z'
        pagination:
          total_records: 2
          total_pages: 1
          current_page: 1
    TeammembershipsPostRequest:
      type: object
      properties: {}
      example: {}
  securitySchemes:
    OAuth2:
      type: oauth2
      description: OAuth2 authentication with bearer tokens
      flows:
        authorizationCode:
          authorizationUrl: https://{account-domain}.aha.io/oauth/authorize
          tokenUrl: https://{account-domain}.aha.io/oauth/token
          scopes: {}
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: API key authentication using Bearer token in Authorization header. Generate API keys at https://secure.aha.io/settings/api_keys
    CookieAuth:
      type: apiKey
      in: cookie
      name: session
      description: Cookie-based authentication for web browser integration