WellCube Cloud BE API

REST API behind the WellCube / Darwin Cloud platform. Covers session and limited-session issuance, user product entitlements and product invitations, installation and product administration with per-installation and per-product statistics, AWS product bundles, device/system actions with asynchronous job polling, and local-account linking, sharing, transfer and migration to federated (AWS Cognito) identity. Served publicly as OpenAPI 3.0.0 through a Swagger UI at https://cloud.wellcube.io/api/v1/docs/; all operations require an Authorization header token.

OpenAPI Specification

delos-wellcube-cloud-be-openapi.yml Raw ↑
openapi: 3.0.0
info:
  version: 11.13.9
  title: Cloud BE
  license:
    name: MIT
servers:
- url: https://cloud.wellcube.io/api/v1
paths:
  /sessions:
    post:
      summary: 'Session: Create'
      operationId: sessionCreate
      tags:
      - sessions
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - data
              properties:
                data:
                  type: object
                  required:
                  - email
                  - password
                  properties:
                    email:
                      type: string
                      format: email
                    password:
                      type: string
                      format: password
                    product:
                      type: string
              example:
                data:
                  email: admin@admin.admin
                  password: mypass1
      responses:
        default:
          description: Deprecated create session response
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - data
                properties:
                  status:
                    type: integer
                    example: 1
                  data:
                    type: object
                    required:
                    - jwt
                    properties:
                      jwt:
                        type: string
                      wasProductAdded:
                        type: boolean
                        example: false
        x-authentification-failed:
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - error
                properties:
                  status:
                    type: integer
                    example: 0
                  error:
                    type: object
                    required:
                    - code
                    - fields
                    properties:
                      code:
                        type: string
                        example: AUTHENTICATION_FAILED
                      fields:
                        type: object
                        properties:
                          email:
                            type: string
                            example: INVALID
                          password:
                            type: string
                            example: INVALID
                          status:
                            type: string
                            example: NOT_ACTIVE_USER
                    examples:
                    - code: AUTHENTICATION_FAILED
                      fields:
                        email: INVALID
                        password: INVALID
                    - code: AUTHENTICATION_FAILED
                      fields:
                        status: NOT_ACTIVE_USER
  /sessions/validate:
    get:
      summary: Validate auth token
      operationId: sessionValidate
      tags:
      - sessions
      responses:
        default:
          description: Token valid
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      status:
                        type: string
                        example: ACTIVE
                      role:
                        type: string
                        example: USER
        x-wrong-token:
          summary: Wrong token in headers
          $ref: '#/components/responses/WrongTokenError'
        x-user-not-valid-token:
          summary: User coded in token is not valid
          $ref: '#/components/responses/UserNotValidTokenError'
        x-user-not-active-token:
          summary: User coded in token is not active
          $ref: '#/components/responses/UserNotActiveTokenError'
  /limited-sessions:
    post:
      summary: 'Session: Create Limited'
      operationId: limitedSessionCreate
      tags:
      - sessions
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - data
              properties:
                data:
                  type: object
                  required:
                  - email
                  - password
                  properties:
                    email:
                      type: string
                      format: email
                    password:
                      type: string
                      format: password
                    product:
                      type: string
              example:
                data:
                  email: admin@admin.admin
                  password: mypass1
      responses:
        default:
          description: Common create session response
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - data
                properties:
                  status:
                    type: integer
                    example: 1
                  data:
                    $ref: '#/components/schemas/AccessData'
        x-authentification-failed:
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - error
                properties:
                  status:
                    type: integer
                    example: 0
                  error:
                    type: object
                    required:
                    - code
                    - fields
                    properties:
                      code:
                        type: string
                        example: AUTHENTICATION_FAILED
                      fields:
                        type: object
                        properties:
                          email:
                            type: string
                            example: INVALID
                          password:
                            type: string
                            example: INVALID
                          status:
                            type: string
                            example: NOT_ACTIVE_USER
                    examples:
                    - code: AUTHENTICATION_FAILED
                      fields:
                        email: INVALID
                        password: INVALID
                    - code: AUTHENTICATION_FAILED
                      fields:
                        status: NOT_ACTIVE_USER
  /limited-sessions/refresh:
    post:
      summary: 'Session: Refresh Limited'
      operationId: limitedSessionRefresh
      tags:
      - sessions
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - data
              properties:
                data:
                  type: object
                  required:
                  - refreshToken
                  properties:
                    refreshToken:
                      type: string
      responses:
        default:
          description: Common create session response
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - data
                properties:
                  status:
                    type: integer
                    example: 1
                  data:
                    $ref: '#/components/schemas/AccessData'
        x-authentification-failed:
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - error
                properties:
                  status:
                    type: integer
                    example: 0
                  error:
                    type: object
                    required:
                    - code
                    - fields
                    properties:
                      code:
                        type: string
                        example: AUTHENTICATION_FAILED
                      fields:
                        type: object
                        properties:
                          refreshToken:
                            type: string
                            example: EXPIRED
                          status:
                            type: string
                            example: NOT_ACTIVE_USER
                    examples:
                    - code: AUTHENTICATION_FAILED
                      fields:
                        refreshToken: EXPIRED
  /users/{userId}/products:
    get:
      summary: 'Users: List associated products with bundles'
      operationId: userProductsList
      tags:
      - users
      parameters:
      - name: userId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        default:
          description: Common associated products list response
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - data
                properties:
                  status:
                    type: integer
                    example: 1
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Product'
        x-permission-denied:
          summary: List associated products for another user than auth token
          $ref: '#/components/responses/PermissionDeniedError'
  /users/product-invitations:
    post:
      summary: 'Users: Product Invitation Create'
      operationId: userProductInvitationCreate
      tags:
      - users
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - data
              properties:
                data:
                  type: object
                  required:
                  - email
                  - product
                  properties:
                    email:
                      type: string
                    emailTemplate:
                      type: object
                      properties:
                        bucket:
                          type: string
                        key:
                          type: string
                        sender:
                          type: string
                        subject:
                          type: string
                        params:
                          type: object
                    product:
                      type: string
                    localState:
                      type: object
                    localGroups:
                      type: array
                      items:
                        type: string
                    expirationTime:
                      type: integer
                      description: Time to expire in seconds, default 2 days
                      default: 172800
      responses:
        default:
          description: Created product invitation
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 1
                  data:
                    $ref: '#/components/schemas/ProductInvitation'
        x-permission-denied:
          summary: Create invitation with no access to product installation
          $ref: '#/components/responses/PermissionDeniedError'
        x-product-not-exists:
          summary: Product to create invitation not exists
          $ref: '#/components/responses/NotExistsError'
        x-user-not-unique:
          summary: User data to invite is not unique
          $ref: '#/components/responses/NotUniqueError'
  /users/product-invitations/{invitationId}:
    get:
      summary: 'Users: Product Invitation Show'
      operationId: userProductInvitationShow
      tags:
      - users
      parameters:
      - name: invitationId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        default:
          description: Product invitation
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 1
                  data:
                    $ref: '#/components/schemas/ProductInvitation'
        x-action-not-exists:
          summary: Invite action not exists
          $ref: '#/components/responses/NotExistsError'
  /users/product-invitations/{invitationId}/confirm:
    post:
      summary: 'Users: Product Invitation Confirm'
      operationId: userProductInvitationConfirm
      tags:
      - users
      parameters:
      - name: invitationId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - data
              properties:
                data:
                  type: object
                  required:
                  - cognitoUserId
                  - firstName
                  - secondName
                  properties:
                    cognitoUserId:
                      type: string
                    firstName:
                      type: string
                    secondName:
                      type: string
                    company:
                      type: string
                    phone:
                      type: string
      responses:
        default:
          description: Access data for confirmed user
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 1
                  data:
                    $ref: '#/components/schemas/AccessData'
        x-action-expired:
          $ref: '#/components/responses/ExpiredError'
        x-action-not-exists:
          $ref: '#/components/responses/NotExistsError'
        x-user-not-exists:
          $ref: '#/components/responses/NotExistsError'
        x-product-not-exists:
          $ref: '#/components/responses/NotExistsError'
        x-permission-denied:
          $ref: '#/components/responses/PermissionDeniedError'
  /users/product-invitations/{invitationId}/revoke:
    post:
      summary: 'Users: Product Invitation Revoke'
      operationId: userProductInvitationRevoke
      tags:
      - users
      parameters:
      - name: invitationId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        default:
          description: Success status
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 1
                  data:
                    type: boolean
                    example: true
        x-action-not-exists:
          $ref: '#/components/responses/NotExistsError'
        x-user-not-exists:
          $ref: '#/components/responses/NotExistsError'
        x-product-not-exists:
          $ref: '#/components/responses/NotExistsError'
        x-permission-denied:
          $ref: '#/components/responses/PermissionDeniedError'
  /users/product-invitations/{invitationId}/renew:
    post:
      summary: 'Users: Product Invitation Renew'
      operationId: userProductInvitationRenew
      tags:
      - users
      parameters:
      - name: invitationId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - data
              properties:
                data:
                  type: object
                  properties:
                    expirationTime:
                      type: integer
                      description: Time to expire in seconds, default 2 days
                      default: 172800
      responses:
        default:
          description: Updated product invitation
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 1
                  data:
                    $ref: '#/components/schemas/ProductInvitation'
        x-action-not-exists:
          $ref: '#/components/responses/NotExistsError'
        x-user-not-exists:
          $ref: '#/components/responses/NotExistsError'
        x-product-not-exists:
          $ref: '#/components/responses/NotExistsError'
        x-permission-denied:
          $ref: '#/components/responses/PermissionDeniedError'
  /admin/users/cognito-sessions:
    post:
      summary: 'Users: Cognito Session Create'
      operationId: adminUserCognitoSessionCreate
      tags:
      - admin/users
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - data
              properties:
                data:
                  type: object
                  required:
                  - cognitoUserId
                  properties:
                    cognitoUserId:
                      type: string
      responses:
        default:
          description: Deprecated create session response
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - data
                properties:
                  status:
                    type: integer
                    example: 1
                  data:
                    type: object
                    required:
                    - jwt
                    properties:
                      jwt:
                        type: string
        x-permission-denied:
          summary: Create session for cognito user with non-admin permissions
          $ref: '#/components/responses/PermissionDeniedError'
        x-auth-failed:
          summary: Auth failed because of invalid cognito user data
          $ref: '#/components/responses/AuthFailedError'
  /admin/users/limited-cognito-sessions:
    post:
      summary: 'Users: Limited Cognito Session Create'
      operationId: adminUserLimitedCognitoSessionCreate
      tags:
      - admin/users
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - data
              properties:
                data:
                  type: object
                  required:
                  - cognitoUserId
                  properties:
                    cognitoUserId:
                      type: string
      responses:
        default:
          description: Common create session response
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - data
                properties:
                  status:
                    type: integer
                    example: 1
                  data:
                    $ref: '#/components/schemas/AccessData'
        x-permission-denied:
          summary: Create session for cognito user with non-admin permissions
          $ref: '#/components/responses/PermissionDeniedError'
        x-auth-failed:
          summary: Auth failed because of invalid cognito user data
          $ref: '#/components/responses/AuthFailedError'
  /admin/users/{userId}/products:
    get:
      summary: 'Users: List associated products with bundles'
      operationId: adminUserProductsList
      tags:
      - admin/users
      parameters:
      - name: userId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        default:
          description: Common associated products list response
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - data
                properties:
                  status:
                    type: integer
                    example: 1
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Product'
        x-not-exists:
          summary: List associated products for non-existing user
          $ref: '#/components/responses/NotExistsError'
        x-permission-denied:
          summary: List user associated products with non-admin permissions
          $ref: '#/components/responses/PermissionDeniedError'
  /admin/users/{userId}/products/{productId}:
    post:
      summary: 'Users: Create association with product'
      operationId: adminUserProductsCreate
      tags:
      - admin/users
      parameters:
      - name: userId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: productId
        in: path
        required: true
        schema:
          type: string
          format: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - data
              properties:
                data:
                  type: object
                  properties:
                    productBundlesIds:
                      type: array
                      items:
                        type: string
      responses:
        default:
          description: Common associated product response
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - data
                properties:
                  status:
                    type: integer
                    example: 1
                  data:
                    $ref: '#/components/schemas/Product'
        x-not-exists:
          summary: Create associated products for non-existing user or product
          $ref: '#/components/responses/NotExistsError'
        x-permission-denied:
          summary: Create user-to-product association with non-admin permissions
          $ref: '#/components/responses/PermissionDeniedError'
    put:
      summary: 'Users: Update association with product'
      operationId: adminUserProductsUpdate
      tags:
      - admin/users
      parameters:
      - name: userId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: productId
        in: path
        required: true
        schema:
          type: string
          format: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - data
              properties:
                data:
                  type: object
                  properties:
                    productBundlesIds:
                      type: array
                      items:
                        type: string
      responses:
        default:
          description: Common associated product response
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - data
                properties:
                  status:
                    type: integer
                    example: 1
                  data:
                    $ref: '#/components/schemas/Product'
        x-action-not-allowed:
          summary: Update user-to-product association for not associated product
          $ref: '#/components/responses/ActionNotAllowedError'
        x-not-exists:
          summary: Update associated products for non-existing user
          $ref: '#/components/responses/NotExistsError'
        x-permission-denied:
          summary: Update user-to-product association with non-admin permissions
          $ref: '#/components/responses/PermissionDeniedError'
    delete:
      summary: 'Users: Delete association with product'
      operationId: adminUserProductsDelete
      tags:
      - admin/users
      parameters:
      - name: userId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: productId
        in: path
        required: true
        schema:
          type: string
          format: string
      responses:
        default:
          description: Common action success response
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                properties:
                  status:
                    type: integer
                    example: 1
        x-permission-denied:
          summary: Delete user-to-product association with non-admin permissions
          $ref: '#/components/responses/PermissionDeniedError'
  /admin/installations:
    get:
      summary: 'Installation: List'
      operationId: adminInstallationsList
      tags:
      - admin/installations
      parameters:
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      - name: sortedBy
        in: query
        schema:
          type: string
          enum:
          - id
          - localUserName
          - createdAt
          - updatedAt
          example: createdAt
      - $ref: '#/components/parameters/order'
      - name: search
        in: query
        description: Installation id or name
        schema:
          type: string
      - name: connected
        in: query
        description: Connectivity status
        schema:
          type: boolean
      - name: tags
        in: query
        description: List of installations tags
        schema:
          type: array
          items:
            type: string
      - name: productName
        in: query
        description: Associated product name
        schema:
          type: string
      - name: userId
        in: query
        description: Local user id
        schema:
          type: string
          format: uuid
      responses:
        default:
          description: List of installations
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 1
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Installation'
        x-permission-denied:
          summary: List installations with non-admin permissions
          $ref: '#/components/responses/PermissionDeniedError'
  /admin/installations/{installationId}/products:
    get:
      summary: 'Installation: List Products associations'
      operationId: adminInstallationsListAssociatedProducts
      tags:
      - admin/installations
      parameters:
      - name: installationId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        default:
          description: List of associated Propducts
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 1
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Installation'
        x-permission-denied:
          summary: List of associated Propducts with non-admin permissions
          $ref: '#/components/responses/PermissionDeniedError'
  /admin/installations/{installationId}/stats:
    get:
      summary: 'Installation: Stats'
      operationId: adminInstallationStats
      tags:
      - admin/installations
      parameters:
      - name: installationId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        default:
          description: Show Installation Stats
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 1
                  data:
                    type: object
                    properties:
                      localAccountsCount:
                        type: integer
                      cloudUsersCount:
                        type: integer
                      productsCount:
                        type: integer
                      primaryProductsCount:
                        type: integer
        x-wrong-id:
          summary: Show Installation Stats with non-existing installationId
          $ref: '#/components/responses/WrongIdError'
        x-permission-denied:
          summary: Show Installation Stats with non-admin permissions
          $ref: '#/components/responses/PermissionDeniedError'
  /admin/products:
    get:
      summary: 'Product: List'
      operationId: adminProductList
      tags:
      - admin/products
      parameters:
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      - name: sortedBy
        in: query
        schema:
          type: string
          enum:
          - id
          - localUserName
          - createdAt
          - updatedAt
          example: createdAt
      - $ref: '#/components/parameters/order'
      - name: name
        in: query
        schema:
          type: string
      - name: resources
        in: query
        schema:
          type: string
      - name: isOpenRegistration
        in: query
        schema:
          type: boolean
      responses:
        default:
          description: List Products
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 1
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Product'
        x-permission-denied:
          summary: List Products with non-admin permissions
          $ref: '#/components/responses/PermissionDeniedError'
    post:
      summary: 'Product: Create'
      operationId: adminProductCreate
      tags:
      - admin/products
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - data
              properties:
                data:
                  type: object
                  required:
                  - name
                  - primaryInstallationId
                  properties:
                    name:
                      type: string
                    primaryInstallationId:
                      type: string
                      format: uuid
                    details:
                      type: string
                    resources:
                      type: string
                    isOpenRegistration:
                      type: boolean
                    canAssociateInstallation:
                      type: boolean
                    bundlesNames:
                      type: array
                      items:
                        type: string
                    primaryBundle:
                      type: string
      responses:
        default:
  

# --- truncated at 32 KB (75 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/delos/refs/heads/main/openapi/delos-wellcube-cloud-be-openapi.yml