openapi: 3.0.0
info:
  title: Edge Impulse API
  version: 1.0.0
servers:
  - url: https://studio.edgeimpulse.com/v1
paths:
  /api-login:
    post:
      summary: Get JWT token
      security: []
      description: Get a JWT token to authenticate with the API.
      tags:
        - Login
      operationId: login
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetJWTRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetJWTResponse'
  /api-sso/{usernameOrEmail}:
    get:
      summary: Get SSO settings for a user or email domain
      description: >-
        Get the list of identity providers enabled for a user or a given email
        domain.
      tags:
        - Login
      operationId: getSSODomainIdPs
      security: []
      parameters:
        - $ref: '#/components/parameters/UsernameOrEmailParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSSODomainIdPsResponse'
  /api-user-create:
    post:
      summary: Create user
      security: []
      description: >-
        Create a new user and project. This API is no longer publicly available.
        Sign up at https://studio.edgeimpulse.com/signup instead.
      tags:
        - User
      x-middleware:
        - DisallowCreateUserApiCall
      operationId: createUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateUserRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateUserResponse'
  /api-create-pro-user:
    post:
      summary: Create Professional Tier user
      security: []
      description: >-
        Create a new user for the Professional Plan and a new project. Note that
        the Professional plan will not be enabled until the payment is
        successful. This API is internal (it requires some signed fields), sign
        up at https://studio.edgeimpulse.com/signup instead.
      tags:
        - User
      operationId: createProTierUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProTierUserRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateUserResponse'
  /api-user-create-enterprise-trial:
    post:
      summary: Create enterprise trial user
      security: []
      description: >-
        Creates an enterprise trial user and a new trial organization, and
        redirects the user to the new organization. This API is internal (it
        requires some signed fields), sign up at
        https://studio.edgeimpulse.com/signup instead.
      tags:
        - User
      operationId: createEnterpriseTrialUser
      requestBody:
        description: Trial request
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEnterpriseTrialUserRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateEnterpriseTrialResponse'
  /api-user-need-to-set-password/{usernameOrEmail}:
    get:
      summary: Get user registration state
      security: []
      description: >-
        Tells whether a user is registered and whether it needs to set its
        password.
      tags:
        - User
      operationId: getUserNeedToSetPassword
      parameters:
        - $ref: '#/components/parameters/UsernameOrEmailParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetUserNeedToSetPasswordResponse'
  /api/user:
    get:
      summary: Get current user
      description: >-
        Get information about the current user. This function is only available
        through a JWT token.
      tags:
        - User
      operationId: getCurrentUser
      parameters:
        - $ref: '#/components/parameters/UserExcludeProjectsParameter'
      x-oauth-scopes:
        - user:read
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetUserResponse'
    post:
      summary: Update current user
      description: >-
        Update user properties such as name. This function is only available
        through a JWT token.
      tags:
        - User
      operationId: updateCurrentUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
    delete:
      summary: Delete current user
      description: >-
        Delete a user. This function is only available through a JWT token, and
        can only remove the current user.
      tags:
        - User
      operationId: deleteCurrentUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteUserRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/user/projects:
    get:
      summary: Get current user projects
      description: >-
        Get projects for the current user. This returns all projects regardless
        of whitelabel. This function is only available through a JWT token.
      tags:
        - User
      operationId: getCurrentUserProjects
      x-oauth-scopes:
        - projects:read
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetUserProjectsResponse'
  /api/user/convert:
    post:
      summary: Convert current evaluation user
      description: Convert current evaluation user account to regular account.
      tags:
        - User
      operationId: convertCurrentUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConvertUserRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/user/activate:
    post:
      summary: Activate current user
      description: >-
        Activate the current user account (requires an activation code). This
        function is only available through a JWT token.
      tags:
        - User
      operationId: activateCurrentUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActivateUserOrVerifyEmailRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/user/request-activation:
    post:
      summary: Request activation code
      description: >-
        Request a new activation code for the current user. This function is
        only available through a JWT token.
      tags:
        - User
      operationId: requestActivationCodeCurrentUser
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/user/create-developer-profile:
    post:
      summary: Create developer profile
      description: Create a developer profile for the current active user.
      tags:
        - User
      operationId: createDeveloperProfile
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateDeveloperProfileResponse'
  /api/user/trial:
    post:
      summary: Start enterprise trial
      description: >-
        Create an enterprise trial for the current user. Users can only go
        through a trial once.
      tags:
        - User
      operationId: startEnterpriseTrial
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartEnterpriseTrialRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateEnterpriseTrialResponse'
  /api/user/emails:
    get:
      summary: List emails
      description: >-
        Get a list of all emails sent by Edge Impulse to the current user. This
        function is only available through a JWT token, and is not available for
        all users.
      security:
        - permissions:
            - users:emails:read
      tags:
        - User
      operationId: listEmailsCurrentUser
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListEmailResponse'
  /api/user/photo:
    post:
      summary: Upload photo
      description: >-
        Upload a photo for the current user. This function is only available
        through a JWT token.
      tags:
        - User
      operationId: uploadPhotoCurrentUser
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadUserPhotoRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadUserPhotoResponse'
    delete:
      summary: Delete photo
      description: >-
        Delete user profile photo. This function is only available through a JWT
        token.
      tags:
        - User
      operationId: deletePhotoCurrentUser
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/user/change-password:
    post:
      summary: Change password current user
      description: >-
        Change the password for the current user account. This function is only
        available through a JWT token.
      tags:
        - User
      operationId: changePasswordCurrentUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangePasswordRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/user/organizations:
    get:
      summary: Get organizations
      description: >-
        List all organizations that the current user is a member of. This
        function is only available through a JWT token.
      tags:
        - User
      operationId: listOrganizationsCurrentUser
      x-oauth-scopes:
        - user:read
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOrganizationsResponse'
  /api/users/buckets:
    get:
      summary: Get buckets current user
      description: >-
        List all organizational storage buckets that the current user has access
        to. This function is only available through a JWT token.
      tags:
        - User
      operationId: listOrganizationBucketsCurrentUser
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOrganizationBucketsUserResponse'
  /api/user/by-third-party-activation-code:
    post:
      summary: Get user by third party activation code
      description: >-
        Get information about a user through an activation code. This function
        is only available through a JWT token.
      tags:
        - User
      operationId: getUserByThirdPartyActivationCode
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserByThirdPartyActivationRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetUserResponse'
  /api/user/activate-by-third-party-activation-code:
    post:
      summary: Activate user by third party activation code
      description: >-
        Activate a user that was created by a third party. This function is only
        available through a JWT token.
      tags:
        - User
      operationId: activateUserByThirdPartyActivationCode
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/ActivateUserByThirdPartyActivationCodeRequest
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetJWTResponse'
  /api/user/accept-tos:
    post:
      summary: Accept Terms of Service
      description: Accept Terms of Service.
      tags:
        - User
      operationId: acceptTermsOfService
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/user/accept-eula:
    post:
      summary: Accept End-User License Agreement
      description: >-
        To access some models or tooling, you might need to first accept an
        End-User License Agreement. The full list of available EULAs are listed
        via `GetUserResponse`.
      tags:
        - User
      operationId: acceptEula
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AcceptEulaRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/user/dismiss-notification:
    post:
      summary: Dismiss a notification
      description: Dismiss a notification
      tags:
        - User
      operationId: userDismissNotification
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserDismissNotificationRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/user/mfa/totp/create-key:
    post:
      summary: Generate a new TOTP MFA key
      description: >-
        Creates a new MFA key, only allowed if the user has no MFA configured.
        TOTP tokens use SHA-1 algorithm.
      tags:
        - User
      operationId: userGenerateNewTotpMfaKey
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserGenerateNewMfaKeyResponse'
  /api/user/mfa/totp/set-key:
    post:
      summary: Set TOTP MFA key
      description: >-
        Enable MFA on this account using an TOTP token. First create a new key
        via `userGenerateNewTotpMfaKey`.
      tags:
        - User
      operationId: userSetTotpMfaKey
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserSetTotpMfaKeyRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserSetTotpMfaKeyResponse'
  /api/user/mfa/totp/clear:
    post:
      summary: Remove TOTP MFA key
      description: Disable MFA on this account using an TOTP token.
      tags:
        - User
      operationId: userDeleteTotpMfaKey
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserDeleteTotpMfaKeyRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/user/subscription/upgrade:
    post:
      summary: Upgrade subscription
      description: Upgrade the current subscription.
      tags:
        - User
      operationId: userUpgradeSubscription
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpgradeSubscriptionRequest'
      responses:
        '302':
          description: A redirect to the payment portal
  /api/user/subscription/cancel:
    post:
      summary: Cancel subscription
      description: Cancel the current subscription.
      tags:
        - User
      operationId: userCancelSubscription
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DowngradeSubscriptionRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/user/subscription/undo-cancel:
    post:
      summary: Undo subscription cancellation
      description: >
        Stop a pending cancellation. If you schedule a subscription to be
        canceled, and

        the subscription hasn't yet reached the end of the billing period, you
        can stop

        the cancellation. After a subscription has been canceled, you can't
        reactivate it.
      tags:
        - User
      operationId: userUndoCancelSubscription
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/user/subscription/metrics:
    get:
      summary: Get user billable compute metrics
      description: >-
        Get billable compute metrics for a user. This function is only available
        to users with an active subscription.
      tags:
        - User
      operationId: userGetSubscriptionMetrics
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserSubscriptionMetricsResponse'
  /api/users/{userId}:
    get:
      summary: Get user
      description: >-
        Get information about a user. This function is only available through a
        JWT token.
      tags:
        - User
      parameters:
        - $ref: '#/components/parameters/UserIdParameter'
      operationId: getUser
      x-oauth-scopes:
        - user:read
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetUserResponse'
    post:
      summary: Update user
      description: >-
        Update user properties such as name. This function is only available
        through a JWT token.
      tags:
        - User
      parameters:
        - $ref: '#/components/parameters/UserIdParameter'
      operationId: updateUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
    delete:
      summary: Delete user
      description: >-
        Delete a user. This function is only available through a JWT token, and
        can only remove the current user.
      tags:
        - User
      parameters:
        - $ref: '#/components/parameters/UserIdParameter'
      operationId: deleteUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteUserRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/users/{userId}/activate:
    post:
      summary: Activate user
      description: >-
        Activate a user account (requires an activation code). This function is
        only available through a JWT token.
      tags:
        - User
      parameters:
        - $ref: '#/components/parameters/UserIdParameter'
      operationId: activateUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActivateUserOrVerifyEmailRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/users/{userId}/request-activation:
    post:
      summary: Request activation code
      description: >-
        Request a new activation code. This function is only available through a
        JWT token.
      tags:
        - User
      parameters:
        - $ref: '#/components/parameters/UserIdParameter'
      operationId: requestActivationCodeUser
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/users/{userId}/emails:
    get:
      summary: List emails
      description: >-
        Get a list of all emails sent by Edge Impulse to a user. This function
        is only available through a JWT token, and is not available for all
        users.
      security:
        - permissions:
            - users:emails:read
      tags:
        - User
      parameters:
        - $ref: '#/components/parameters/UserIdParameter'
      operationId: listEmailsUser
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListEmailResponse'
  /api/users/{userId}/photo:
    post:
      summary: Upload photo
      description: >-
        Upload a photo for a user. This function is only available through a JWT
        token, and is not available for all users.
      tags:
        - User
      parameters:
        - $ref: '#/components/parameters/UserIdParameter'
      operationId: uploadPhotoUser
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadUserPhotoRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadUserPhotoResponse'
  /api/users/{userId}/change-password:
    post:
      summary: Change password
      description: >-
        Change the password for a user account. This function is only available
        through a JWT token.
      tags:
        - User
      parameters:
        - $ref: '#/components/parameters/UserIdParameter'
      operationId: changePasswordUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangePasswordRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/users/{userId}/set-password:
    post:
      summary: Set password for SSO user
      description: >-
        Set the password for a new SSO user. This function is only available
        through an SSO access token.
      security: []
      tags:
        - User
      parameters:
        - $ref: '#/components/parameters/UserIdParameter'
      operationId: setUserPassword
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetUserPasswordRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/users/{userId}/organizations:
    get:
      summary: Get organizations
      description: >-
        List all organizations for a user. This function is only available
        through a JWT token.
      tags:
        - User
      operationId: listOrganizationsUser
      x-oauth-scopes:
        - organizations:read
      parameters:
        - $ref: '#/components/parameters/UserIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOrganizationsResponse'
  /api/users/{userId}/buckets:
    get:
      summary: Get buckets
      description: >-
        List all organizational storage buckets that a user has access to. This
        function is only available through a JWT token.
      tags:
        - User
      operationId: listOrganizationBucketsUser
      parameters:
        - $ref: '#/components/parameters/UserIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOrganizationBucketsUserResponse'
  /api/users/{userId}/feedback:
    post:
      summary: Send feedback
      description: Send feedback to Edge Impulse or get in touch with sales.
      tags:
        - User
      operationId: sendUserFeedback
      parameters:
        - $ref: '#/components/parameters/UserIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendUserFeedbackRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/users/{userId}/upgrade:
    post:
      summary: Send upgrade request
      description: Send an upgrade to Enterprise request to Edge Impulse.
      tags:
        - User
      operationId: sendUserUpgradeRequest
      parameters:
        - $ref: '#/components/parameters/UserIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnterpriseUpgradeOrTrialExtensionRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/users/{userId}/trials:
    get:
      summary: Get enterprise trials
      description: >-
        Get a list of all enterprise trials for a user. This function is only
        available through a JWT token.
      tags:
        - User
      operationId: listEnterpriseTrialsUser
      parameters:
        - $ref: '#/components/parameters/UserIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListEnterpriseTrialsResponse'
  /api-user-request-reset-password:
    post:
      summary: Request reset password
      security: []
      description: Request a password reset link for a user.
      tags:
        - User
      operationId: requestResetPassword
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RequestResetPasswordRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api-user-reset-password:
    post:
      summary: Reset password
      security: []
      description: Reset the password for a user.
      tags:
        - User
      operationId: resetPassword
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResetPasswordRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api-user-verify-reset-password-code:
    post:
      summary: Verify reset password code
      security: []
      description: Verify whether the reset password code for the user is valid.
      tags:
        - User
      operationId: verifyResetPassword
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VerifyResetPasswordRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/whitelabel/{whitelabelIdentifier}/domain:
    get:
      summary: Get white label domain
      description: Get a white label domain given its unique identifier.
      operationId: getWhitelabelDomain
      security: []
      tags:
        - Whitelabels
      parameters:
        - $ref: '#/components/parameters/WhitelabelIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetWhitelabelDomainResponse'
  /api/whitelabel/{whitelabelIdentifier}/deploymentTargets:
    post:
      summary: Update deployment targets
      description: >-
        Update some or all of the deployment targets enabled for this white
        label.
      operationId: updateDeploymentTargets
      tags:
        - Whitelabels
      parameters:
        - $ref: '#/components/parameters/WhitelabelIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWhitelabelDeploymentTargetsRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/whitelabel/{whitelabelIdentifier}/impulse/blocks:
    get:
      summary: Get impulse blocks
      description: Lists all possible DSP and ML blocks available for this white label.
      operationId: getAllImpulseBlocks
      tags:
        - Whitelabels
      parameters:
        - $ref: '#/components/parameters/WhitelabelIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetImpulseBlocksResponse'
  /api/deployment/targets:
    get:
      summary: Deployment targets
      description: List all deployment targets
      operationId: listAllDeploymentTargets
      tags:
        - Deployment
      x-middleware:
        - AllowsReadOnly
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeploymentTargetsResponse'
  /api/projects:
    get:
      summary: List active projects
      x-skip-route: true
      description: >-
        Retrieve list of active projects. If authenticating using JWT token this
        lists all the projects the user has access to, if authenticating using
        an API key, this only lists that project.
      tags:
        - Projects
      operationId: listProjects
      x-oauth-scopes:
        - projects:read
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListProjectsResponse'
  /api/projects/create:
    post:
      summary: Create new project
      description: Create a new project. This API can only be called using a JWT token.
      tags:
        - Projects
      operationId: createProject
      x-oauth-scopes:
        - projects:create
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProjectRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateProjectResponse'
  /api/{projectId}/devkeys:
    get:
      summary: Get development keys
      description: >-
        Retrieve the development API and HMAC keys for a project. These keys are
        specifically marked to be used during development. These keys can be
        `undefined` if no development keys are set. Only available through JWT
        token authentication, if you authenticate with an API key then all keys
        will return undefined (this is changed behavior since 28 January 2026).
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: listDevkeys
      x-oauth-scopes:
        - projects:read
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DevelopmentKeysResponse'
  /api/{projectId}/downloads:
    get:
      summary: Get downloads
      description: Retrieve the downloads for a project.
      tags:
        - Projects
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      operationId: listDownloads
      x-oauth-scopes:
        - projects:read
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectDownloadsResponse'
  /api/{projectId}/csv-wizard/download-config:
    get:
      summary: Download CSV Wizard config
      description: >-
        Returns a JSON file with the current CSV wizard config. If there is no
        config this will throw a 5xx error.
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: downloadCsvWizardConfig
      x-oauth-scopes:
        - projects:read
      responses:
        '200':
          description: OK
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
  /api/{projectId}/csv-wizard/uploaded-file:
    get:
      summary: Get CSV Wizard uploaded file info
      description: >-
        Returns whether the file that was uploaded when the CSV wizard was
        configured is available.
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: getCsvWizardUploadedFileInfo
      x-oauth-scopes:
        - projects:read
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCsvWizardUploadedFileInfo'
    post:
      summary: Store CSV Wizard uploaded file
      description: >-
        Asynchronously called in the CSV Wizard to store the file that the CSV
        wizard was based on.
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: uploadCsvWizardUploadedFile
      x-oauth-scopes:
        - projects:update
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadCsvWizardUploadedFileRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/csv-wizard/uploaded-file/download:
    get:
      summary: Download CSV Wizard uploaded file
      description: >-
        Returns the file that was uploaded when the CSV wizard was configured.
        If there is no config this will throw a 5xx error.
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: downloadCsvWizardUploadedFile
      x-oauth-scopes:
        - projects:read
      responses:
        '200':
          description: OK
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
  /api/{projectId}/collaborators/add:
    post:
      summary: Add collaborator
      description: Add a collaborator to a project.
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: addCollaborator
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddCollaboratorRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityCreatedResponse'
  /api/{projectId}/collaborators/remove:
    post:
      summary: Remove collaborator
      description: >-
        Remove a collaborator to a project. Note that you cannot invoke this
        function if only a single collaborator is present.
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: removeCollaborator
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RemoveCollaboratorRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/collaborators/transfer-ownership:
    post:
      summary: Transfer ownership (user)
      description: Transfer ownership of a project to another user.
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: transferOwnership
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddCollaboratorRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/collaborators/transfer-ownership-org:
    post:
      summary: Transfer ownership (organization)
      description: Transfer ownership of a project to another organization.
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: transferOwnershipOrganization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransferOwnershipOrganizationRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/hmackeys:
    get:
      summary: Get HMAC keys
      description: Retrieve all HMAC keys.
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: listProjectHmacKeys
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListHmacKeysResponse'
    post:
      summary: Add HMAC key
      description: >-
        Add an HMAC key. If you set `developmentKey` to `true` this flag will be
        removed from the current development HMAC key.
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: addProjectHmacKey
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddHmacKeyRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityCreatedResponse'
  /api/{projectId}/hmackeys/{hmacId}:
    delete:
      summary: Remove HMAC key
      description: >-
        Revoke an HMAC key. Note that if you revoke the development key some
        services (such as automatic provisioning of devices through the serial
        daemon) will no longer work.
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/HmacIdParameter'
      operationId: revokeProjectHmacKey
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/apikeys:
    get:
      summary: Get API keys
      description: >-
        Retrieve all API keys. This does **not** return the full API key, but
        only a portion (for security purposes). The development key will be
        returned in full, as it'll be set in devices and is thus not private.
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: listProjectApiKeys
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListApiKeysResponse'
    post:
      summary: Add API key
      description: >-
        Add an API key. If you set `developmentKey` to `true` this flag will be
        removed from the current development API key.
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: addProjectApiKey
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddProjectApiKeyRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddApiKeyResponse'
  /api/{projectId}/apikeys/{apiKeyId}:
    delete:
      summary: Revoke API key
      description: >-
        Revoke an API key. Note that if you revoke the development API key some
        services (such as automatic provisioning of devices through the serial
        daemon) will no longer work.
      tags:
        - Projects
      x-middleware:
        - ProjectRequiresAdmin
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/ApiKeyIdParameter'
      operationId: revokeProjectApiKey
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/emails:
    get:
      summary: List emails
      description: Get a list of all emails sent by Edge Impulse regarding this project.
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: listEmails
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListEmailResponse'
  /api/{projectId}/socket-token:
    get:
      summary: Get socket token
      description: Get a token to authenticate with the web socket interface.
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: getSocketToken
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SocketTokenResponse'
  /api/{projectId}/data-axes:
    get:
      summary: Get data axes summary
      description: Get a list of axes that are present in the training data.
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/IncludeDisabledParameter'
        - $ref: '#/components/parameters/IncludeNotProcessedParameter'
      operationId: getProjectDataAxesSummary
      x-oauth-scopes:
        - projects:read
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectDataAxesSummaryResponse'
  /api/{projectId}/data-summary:
    get:
      summary: Get data summary
      description: >-
        Get summary of all data present in the training set. This returns the
        number of data items, the total length of all data, and the labels. This
        is similar to `dataSummary` in `ProjectInfoResponse` but allows you to
        exclude disabled items or items that are still processing.
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/IncludeDisabledParameter'
        - $ref: '#/components/parameters/IncludeNotProcessedParameter'
      operationId: getProjectTrainingDataSummary
      x-oauth-scopes:
        - projects:read
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectTrainingDataSummaryResponse'
  /api/{projectId}/data-interval:
    get:
      summary: Get the interval (in ms) of the training data
      description: >-
        Get the interval of the training data; if multiple intervals are
        present, the interval of the longest data item is returned. This only
        takes data in your _training_ set into account.
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: getProjectRecommendedDataInterval
      x-oauth-scopes:
        - projects:read
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectDataIntervalResponse'
  /api/{projectId}/compute-time-limit:
    post:
      summary: Set compute time limit
      description: >-
        Change the job compute time limit for the project. This function is only
        available through a JWT token, and is not available to all users.
      security:
        - permissions:
            - projects:limits:write
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: setProjectComputeTimeLimit
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetProjectComputeTimeRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/dsp-file-size-limit:
    post:
      summary: Set DSP file size limit
      description: >-
        Change the DSP file size limit for the project. This function is only
        available through a JWT token, and is not available to all users.
      security:
        - permissions:
            - projects:limits:write
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: setProjectFileSizeLimit
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetProjectDspFileSizeRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/versions:
    get:
      summary: List versions
      description: Get all versions for this project.
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: listVersions
      x-oauth-scopes:
        - projects:read
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListVersionsResponse'
  /api/{projectId}/versions/public:
    get:
      summary: List public versions
      description: >-
        Get all public versions for this project. You don't need any
        authentication for this function.
      security: []
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: listPublicVersions
      x-oauth-scopes:
        - projects:read
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPublicVersionsResponse'
  /api/{projectId}/versions/{versionId}:
    post:
      summary: Update version
      description: Updates a version, this only updates fields that were set in the body.
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/VersionIdParameter'
      operationId: updateVersion
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateVersionRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
    delete:
      summary: Delete versions
      description: Delete a version. This does not delete the version from cold storage.
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/VersionIdParameter'
      operationId: deleteVersion
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/versions/{versionId}/make-private:
    post:
      summary: Make version private
      description: Make a public version private.
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/VersionIdParameter'
      operationId: makeVersionPrivate
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/readme/upload-image:
    post:
      summary: Upload image for readme
      description: Uploads an image to the user CDN and returns the path.
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: uploadReadmeImage
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadImageRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadReadmeImageResponse'
  /api/{projectId}/launch-getting-started:
    post:
      summary: Launch getting started wizard
      description: >-
        This clears out *all data in your project*, and is irrevocable. This
        function is only available through a JWT token, and is not available to
        all users.
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: launchGettingStartedWizard
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/last-modification:
    get:
      summary: Last modification
      description: >-
        Get the last modification date for a project (will be upped when data is
        modified, or when an impulse is trained)
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: getProjectLastModificationDate
      x-oauth-scopes:
        - projects:read
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LastModificationDateResponse'
  /api/{projectId}/development-boards:
    get:
      summary: Development boards
      description: List all development boards for a project
      operationId: listDevelopmentBoards
      x-oauth-scopes:
        - projects:read
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DevelopmentBoardsResponse'
  /api/{projectId}/target-constraints:
    get:
      summary: Get target constraints
      description: >-
        Retrieve target constraints for a project. The constraints object
        captures hardware attributes of your target device, along with an
        application budget to allow guidance on performance and resource usage
      operationId: getTargetConstraints
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      x-oauth-scopes:
        - projects:read
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTargetConstraintsResponse'
    post:
      summary: Set target constraints
      description: >-
        Set target constraints for a project. Use the constraints object to
        capture hardware attributes of your target device, along with an
        application budget to allow guidance on performance and resource usage
      operationId: setTargetConstraints
      x-oauth-scopes:
        - projects:update
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TargetConstraints'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/model-variants:
    get:
      summary: Get a list of all model variants available for this project
      description: >-
        Get a list of model variants applicable to all trained learn blocks in
        this project.
      operationId: getModelVariants
      x-oauth-scopes:
        - projects:read
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetModelVariantsResponse'
  /api/{projectId}/dismiss-notification:
    post:
      summary: Dismiss a notification
      description: Dismiss a notification
      operationId: projectDismissNotification
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectDismissNotificationRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/synthetic-data:
    get:
      summary: Get synthetic data config
      description: Get the last used synthetic data config
      operationId: getSyntheticDataConfig
      x-oauth-scopes:
        - projects:read
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSyntheticDataConfigResponse'
  /api/{projectId}/ai-actions:
    get:
      summary: List AI Actions
      description: Get all AI actions.
      operationId: listAIActions
      x-oauth-scopes:
        - projects:read
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAIActionsResponse'
  /api/{projectId}/ai-actions/order:
    post:
      summary: Set AI Actions order
      description: >-
        Change the order of AI actions. Post the new order of all AI Actions by
        ID. You need to specify _all_ AI Actions here. If not, an error will be
        thrown.
      operationId: setAIActionsOrder
      x-oauth-scopes:
        - projects:update
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetAIActionsOrderRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/ai-actions/create:
    post:
      summary: Create AI Action
      description: Create a new AI Action.
      operationId: createAIAction
      x-oauth-scopes:
        - projects:update
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityCreatedResponse'
  /api/{projectId}/ai-actions/new:
    get:
      summary: Get new AI Actions config
      description: Get the AI Actions config for a new action
      operationId: getNewAIAction
      x-oauth-scopes:
        - projects:read
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAIActionResponse'
  /api/{projectId}/ai-actions/{actionId}:
    get:
      summary: Get AI Actions config
      description: Get an AI Actions config
      operationId: getAIAction
      x-oauth-scopes:
        - projects:read
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/ActionIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAIActionResponse'
    post:
      summary: Save AI Actions config
      description: >-
        Store an AI Actions config. Use `createAIActionsJob` to run the job.
        Post the full AI Action here w/ all parameters.
      operationId: updateAIAction
      x-oauth-scopes:
        - projects:update
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/ActionIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAIActionRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
    delete:
      summary: Delete AI Actions config
      description: Deletes an AI Actions.
      operationId: deleteAIAction
      x-oauth-scopes:
        - projects:update
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/ActionIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/ai-actions/{actionId}/preview-samples:
    post:
      summary: Preview samples for AI Actions
      description: >-
        Get a number of random samples to show in the AI Actions screen. If
        `saveConfig` is passed in, then a valid actionId is required in the URL.
        If you don't need to save the config (e.g. when creating a new action),
        you can use -1.
      operationId: previewAIActionsSamples
      x-oauth-scopes:
        - projects:read
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/ActionIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PreviewAIActionsSamplesRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSamplesResponse'
  /api/{projectId}/ai-actions/{actionId}/clear-proposed-changes:
    get:
      summary: Clear AI Actions proposed changes
      description: Remove all proposed changes for an AI Actions job.
      operationId: clearAIActionsProposedChanges
      x-oauth-scopes:
        - projects:update
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/ActionIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/tags:
    post:
      summary: Update tags
      description: Update the list of project tags.
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: updateProjectTags
      x-oauth-scopes:
        - projects:update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateProjectTagsRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/projects/public:
    get:
      summary: List public projects
      description: >-
        Retrieve the list of all public projects. You don't need any
        authentication for this method.
      security: []
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/LimitResultsParameter'
        - $ref: '#/components/parameters/OffsetResultsParameter'
        - $ref: '#/components/parameters/FiltersProjectNameParameter'
        - $ref: '#/components/parameters/FiltersProjectTypesParameter'
        - $ref: '#/components/parameters/SortQueryParameter'
      operationId: listPublicProjects
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPublicProjectsResponse'
  /api/projects/types:
    get:
      summary: List public project types
      description: >-
        Retrieve the list of available public project types. You don't need any
        authentication for this method.
      security: []
      tags:
        - Projects
      operationId: listPublicProjectTypes
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPublicProjectTypesResponse'
  /api/{projectId}/devices:
    get:
      summary: Lists devices
      description: >-
        List all devices for this project. Devices get included here if they
        connect to the remote management API or if they have sent data to the
        ingestion API and had the `device_id` field set.
      tags:
        - Devices
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: listDevices
      x-oauth-scopes:
        - devices:read
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListDevicesResponse'
  /api/{projectId}/device/{deviceId}:
    get:
      summary: Get device
      description: Retrieves a single device
      tags:
        - Devices
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DeviceIdParameter'
      operationId: getDevice
      x-oauth-scopes:
        - devices:read
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDeviceResponse'
    delete:
      summary: Delete device
      description: >-
        Delete a device. When this device sends a new message to ingestion or
        connects to remote management the device will be recreated.
      tags:
        - Devices
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DeviceIdParameter'
      operationId: deleteDevice
      x-oauth-scopes:
        - devices:delete
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/device/{deviceId}/start-sampling:
    post:
      summary: Start sampling
      description: >-
        Start sampling on a device. This function returns immediately. Updates
        are streamed through the websocket API.
      tags:
        - Devices
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DeviceIdParameter'
      operationId: startSampling
      x-oauth-scopes:
        - devices:update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartSamplingRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartSamplingResponse'
  /api/{projectId}/device/{deviceId}/debug-stream/inference/start:
    post:
      summary: Start inference debug stream
      description: >-
        Start an inference debug stream for this device with inference results
        (and images if a camera is attached). Updates are streamed through the
        websocket API. A keep-alive token is returned, you'll need to ping the
        API (with keepDeviceDebugStreamAlive) every 10 seconds (so we know when
        the client is disconnected).
      tags:
        - Devices
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DeviceIdParameter'
      operationId: startDeviceInferenceDebugStream
      x-oauth-scopes:
        - devices:update
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartDeviceDebugStreamResponse'
  /api/{projectId}/device/{deviceId}/debug-stream/snapshot/start:
    post:
      summary: Start snapshot debug stream
      description: >-
        Start a snapshot debug stream for this device with a current camera
        view. Updates are streamed through the websocket API. A keep-alive token
        is returned, you'll need to ping the API (with
        keepDeviceDebugStreamAlive) every 10 seconds (so we know when the client
        is disconnected).
      tags:
        - Devices
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DeviceIdParameter'
      operationId: startDeviceSnapshotDebugStream
      x-oauth-scopes:
        - devices:update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartDeviceSnapshotDebugStreamRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartDeviceDebugStreamResponse'
  /api/{projectId}/device/{deviceId}/debug-stream/keep-alive:
    post:
      summary: Keep debug stream alive
      description: >-
        If you have opened a debug stream, ping this interface every 10 seconds
        to let us know to keep the debug stream open.
      tags:
        - Devices
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DeviceIdParameter'
      operationId: keepDeviceDebugStreamAlive
      x-oauth-scopes:
        - devices:update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KeepDeviceDebugStreamAliveRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/device/{deviceId}/debug-stream/stop:
    post:
      summary: Stop debug stream
      description: If you have opened a debug stream, close it.
      tags:
        - Devices
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DeviceIdParameter'
      operationId: stopDeviceDebugStream
      x-oauth-scopes:
        - devices:update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StopDeviceDebugStreamRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/device/{deviceId}/get-impulse-records:
    post:
      summary: Get impulse records
      description: Retrieve impulse records from the device.
      tags:
        - Devices
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DeviceIdParameter'
      operationId: getImpulseRecords
      x-oauth-scopes:
        - devices:read
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetImpulseRecordsRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/devices/create:
    post:
      summary: Create device
      description: >-
        Create a new device. If you set `ifNotExists` to `false` and the device
        already exists, the `deviceType` will be overwritten.
      tags:
        - Devices
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: createDevice
      x-oauth-scopes:
        - devices:create
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDeviceRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/devices/{deviceId}/rename:
    post:
      summary: Rename device
      description: Set the current name for a device.
      tags:
        - Devices
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DeviceIdParameter'
      operationId: renameDevice
      x-oauth-scopes:
        - devices:update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RenameDeviceRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/devices/{deviceId}/request-model-update:
    post:
      summary: Trigger model update request
      description: >-
        Trigger a model update request, this only works for devices connected to
        remote management server in inference mode.
      tags:
        - Devices
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DeviceIdParameter'
      operationId: requestDeviceModelUpdate
      x-oauth-scopes:
        - devices:update
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/raw-data:
    get:
      summary: List samples
      description: Retrieve all raw data by category.
      operationId: listSamples
      tags:
        - Raw data
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/RawDataCategoryQueryParameter'
        - $ref: '#/components/parameters/LimitResultsParameter'
        - $ref: '#/components/parameters/OffsetResultsParameter'
        - $ref: '#/components/parameters/ExcludeSensorsParameter'
        - $ref: '#/components/parameters/FiltersLabelsParameter'
        - $ref: '#/components/parameters/FiltersFilenameParameter'
        - $ref: '#/components/parameters/FiltersMaxLengthParameter'
        - $ref: '#/components/parameters/FiltersMinLengthParameter'
        - $ref: '#/components/parameters/FiltersMinFrequencyParameter'
        - $ref: '#/components/parameters/FiltersMaxFrequencyParameter'
        - $ref: '#/components/parameters/FiltersSignatureParameter'
        - $ref: '#/components/parameters/FiltersDisabledParameter'
        - $ref: '#/components/parameters/FiltersMinLabelParameter'
        - $ref: '#/components/parameters/FiltersMaxLabelParameter'
        - $ref: '#/components/parameters/SearchQueryParameter'
        - $ref: '#/components/parameters/ProposedActionsJobIdParameter'
        - $ref: '#/components/parameters/TruncateStructuredLabelsParameter'
        - $ref: '#/components/parameters/SamplesSortByParameter'
        - $ref: '#/components/parameters/FiltersDataTypeParameter'
        - $ref: '#/components/parameters/FiltersMinIdParameter'
        - $ref: '#/components/parameters/FiltersMaxIdParameter'
        - $ref: '#/components/parameters/FiltersMetadataParameter'
        - $ref: '#/components/parameters/FiltersMinDateParameter'
        - $ref: '#/components/parameters/FiltersMaxDateParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSamplesResponse'
  /api/{projectId}/raw-data/count:
    get:
      summary: Count samples
      description: Count all raw data by category.
      operationId: countSamples
      tags:
        - Raw data
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/RawDataCategoryQueryParameter'
        - $ref: '#/components/parameters/FiltersLabelsParameter'
        - $ref: '#/components/parameters/FiltersFilenameParameter'
        - $ref: '#/components/parameters/FiltersMaxLengthParameter'
        - $ref: '#/components/parameters/FiltersMinLengthParameter'
        - $ref: '#/components/parameters/FiltersMinFrequencyParameter'
        - $ref: '#/components/parameters/FiltersMaxFrequencyParameter'
        - $ref: '#/components/parameters/FiltersSignatureParameter'
        - $ref: '#/components/parameters/FiltersDisabledParameter'
        - $ref: '#/components/parameters/FiltersMinLabelParameter'
        - $ref: '#/components/parameters/FiltersMaxLabelParameter'
        - $ref: '#/components/parameters/SearchQueryParameter'
        - $ref: '#/components/parameters/FiltersDataTypeParameter'
        - $ref: '#/components/parameters/FiltersMinIdParameter'
        - $ref: '#/components/parameters/FiltersMaxIdParameter'
        - $ref: '#/components/parameters/FiltersMetadataParameter'
        - $ref: '#/components/parameters/FiltersMinDateParameter'
        - $ref: '#/components/parameters/FiltersMaxDateParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CountSamplesResponse'
  /api/{projectId}/raw-data/label-object-detection-queue:
    get:
      summary: Object detection label queue
      description: Get all unlabeled items from the object detection queue.
      operationId: getObjectDetectionLabelQueue
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectDetectionLabelQueueResponse'
  /api/{projectId}/raw-data/label-object-detection-queue/count:
    get:
      summary: Object detection label queue count
      description: Get count for unlabeled items from the object detection queue.
      operationId: getObjectDetectionLabelQueueCount
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectDetectionLabelQueueCountResponse'
  /api/{projectId}/rebalance:
    post:
      summary: Rebalance dataset
      description: >-
        This API is deprecated, use rebalanceDatasetV2 instead
        (`/v1/api/{projectId}/v2/rebalance`). Rebalances the dataset over
        training / testing categories. This resets the category for all data and
        splits it 80%/20% between training and testing. This is a deterministic
        process based on the hash of the name of the data.
      operationId: rebalanceDataset
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RebalanceDatasetResponse'
  /api/{projectId}/v2/rebalance:
    post:
      summary: Rebalance dataset
      description: >-
        Rebalances the dataset over training / testing categories. This resets
        the category for all data and splits it 80%/20% between training and
        testing. This is a deterministic process based on the hash of the name
        of the data. Returns immediately on small datasets, or starts a job on
        larger datasets. To get the dataset ratio (as returned by the v1
        endpoint), use getDatasetRatio.
      operationId: rebalanceDatasetV2
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/GenericApiResponse'
                  - $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/raw-data/ratio:
    get:
      summary: Get dataset ratio
      description: Retrieve number of samples in train and test set.
      operationId: getDatasetRatio
      tags:
        - Raw data
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDatasetRatioResponse'
  /api/{projectId}/raw-data/clear-all-object-detection-labels:
    post:
      summary: Clear all object detection labels
      description: >-
        Clears all object detection labels for this dataset, and places all
        images back in the labeling queue.
      operationId: clearAllObjectDetectionLabels
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/raw-data/delete-all:
    post:
      summary: Remove all samples
      description: >-
        Deletes all samples for this project over all categories. This also
        invalidates all DSP and learn blocks. Note that this does not delete the
        data from cold storage.
      operationId: deleteAllSamples
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/raw-data/delete-all/{category}:
    post:
      summary: Remove all samples by category
      description: >-
        Deletes all samples for this project over a single category. Note that
        this does not delete the data from cold storage.
      operationId: deleteAllSamplesByCategory
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/RawDataCategoryParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/raw-data/metadata:
    get:
      summary: Get project sample metadata
      description: Get metadata for all samples in a project.
      operationId: getSampleMetadata
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/RawDataCategoryQueryParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSampleMetadataResponse'
  /api/{projectId}/raw-data/metadata-filter-options:
    get:
      summary: Get project sample metadata filter options
      description: >-
        Get a list of unique key value pairs across all samples in a project
        that can be applied as filters to the /api/{projectId}/raw-data endpoint
      operationId: getSampleMetadataFilterOptions
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/RawDataCategoryQueryParameter'
        - $ref: '#/components/parameters/LimitResultsParameter'
        - $ref: '#/components/parameters/OffsetResultsParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSampleMetadataFilterOptionsResponse'
  /api/{projectId}/raw-data/imported-from:
    get:
      summary: List data with "imported from" metadata key
      description: >-
        Lists all data with an 'imported from' metadata key. Used to check in a
        data source which items are already in a project.
      operationId: getAllImportedFrom
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/LimitResultsParameter'
        - $ref: '#/components/parameters/OffsetResultsParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAllImportedFromResponse'
  /api/{projectId}/raw-data/{sampleId}:
    get:
      summary: Get sample
      description: Get a sample.
      operationId: getSample
      tags:
        - Raw data
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
        - $ref: '#/components/parameters/LimitPayloadValues'
        - $ref: '#/components/parameters/CacheKeyParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
        - $ref: '#/components/parameters/ProposedActionsJobIdParameter'
        - $ref: '#/components/parameters/TruncateStructuredLabelsParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSampleResponse'
    delete:
      summary: Remove sample
      description: >-
        Deletes the sample. Note that this does not delete the data from cold
        storage.
      operationId: deleteSample
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/raw-data/{sampleId}/raw:
    get:
      summary: Download file
      description: >-
        Download a sample in it's original format as uploaded to the ingestion
        service.
      operationId: getSampleAsRaw
      tags:
        - Raw data
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
      responses:
        '200':
          description: CBOR or JSON file
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
  /api/{projectId}/raw-data/{sampleId}/wav:
    get:
      summary: Get WAV file
      description: >-
        Get a sample as a WAV file. This only applies to samples with an audio
        axis.
      operationId: getSampleAsAudio
      tags:
        - Raw data
      x-middleware:
        - SupportsRange
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
        - $ref: '#/components/parameters/AxisIndexParameter'
        - $ref: '#/components/parameters/OptionalSliceStartParameter'
        - $ref: '#/components/parameters/OptionalSliceEndParameter'
        - $ref: '#/components/parameters/CacheKeyParameter'
      responses:
        '200':
          description: Wav file
          content:
            audio/wav:
              schema:
                type: string
                format: binary
  /api/{projectId}/raw-data/{sampleId}/image:
    get:
      summary: Get image file
      description: >-
        Get a sample as an image file. This only applies to samples with RGBA
        data.
      operationId: getSampleAsImage
      tags:
        - Raw data
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
        - $ref: '#/components/parameters/AfterInputBlockParameter'
        - $ref: '#/components/parameters/CacheKeyParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: Image file (either JPEG or PNG format)
          content:
            image/jpeg:
              schema:
                type: string
                format: binary
  /api/{projectId}/raw-data/{sampleId}/video:
    get:
      summary: Get video file
      description: >-
        Get a sample as an video file. This only applies to samples with video
        data.
      operationId: getSampleAsVideo
      tags:
        - Raw data
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
        - $ref: '#/components/parameters/AfterInputBlockParameter'
        - $ref: '#/components/parameters/CacheKeyParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: Video file in AVI or MP4 format
          content:
            video/mp4:
              schema:
                type: string
                format: binary
  /api/{projectId}/raw-data/{sampleId}/slice:
    get:
      summary: Get sample slice
      description: Get a slice of a sample.
      operationId: getSampleSlice
      tags:
        - Raw data
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
        - $ref: '#/components/parameters/SliceStartParameter'
        - $ref: >-
            #/components/parameters/OptionalSliceEndDefaultToWindowLengthParameter
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
        - $ref: '#/components/parameters/TruncateStructuredLabelsParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSampleResponse'
  /api/{projectId}/raw-data/{sampleId}/rename:
    post:
      summary: Rename sample
      description: >-
        Sets the file name of the sample. This name does not need to be unique,
        but it's highly recommended to do so.
      operationId: renameSample
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RenameSampleRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/raw-data/{sampleId}/edit-label:
    post:
      summary: Edit label
      description: >-
        Sets the label (also known as class) of the sample. Use the same label
        for similar types of data, as they are used during training.
      operationId: editLabel
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditSampleLabelRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/raw-data/{sampleId}/move:
    post:
      summary: Move sample
      description: Move a sample to another category (e.g. from test to training).
      operationId: moveSample
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MoveRawDataRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/raw-data/{sampleId}/crop:
    post:
      summary: Crop sample
      description: Crop a sample to within a new range.
      operationId: cropSample
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CropSampleRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CropSampleResponse'
  /api/{projectId}/raw-data/{sampleId}/split:
    post:
      summary: Split sample into frames
      description: >
        Split a video sample into individual frames.

        Depending on the length of the video sample this will either execute
        immediately or return the ID of a job that will perform this action.
      operationId: splitSampleInFrames
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SplitSampleInFramesRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/GenericApiResponse'
                  - $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/raw-data/{sampleId}/find-segments:
    post:
      summary: Find segments
      description: Find start and end times for all non-noise events in a sample
      operationId: findSegmentsInSample
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FindSegmentSampleRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FindSegmentSampleResponse'
  /api/{projectId}/raw-data/{sampleId}/segment:
    post:
      summary: Segment sample
      description: >-
        Slice a sample into multiple segments. The original file will be marked
        as deleted, but you can crop any created segment to retrieve the
        original file.
      operationId: segmentSample
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SegmentSampleRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/raw-data/{sampleId}/bounding-boxes:
    post:
      summary: Set bounding boxes
      description: Set the bounding boxes for a sample
      operationId: setSampleBoundingBoxes
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SampleBoundingBoxesRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/raw-data/{sampleId}/structured-labels:
    post:
      summary: Update structured labels
      description: >-
        Set structured labels for a sample. If a sample has structured labels
        the `label` column is ignored, and the sample is allowed to have
        multiple labels. An array of { startIndex, endIndex, label } needs to be
        passed in with labels for the complete sample (see `valuesCount` to get
        the upper bound). endIndex is _inclusive_. If you pass in an incorrect
        array (e.g. missing values) you'll get an error back.
      operationId: setSampleStructuredLabels
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetSampleStructuredLabelsRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/raw-data/store-segment-length:
    post:
      summary: Store the last segment length
      description: >-
        When segmenting a sample into smaller segments, store the segment length
        to ensure uniform segment lengths.
      operationId: storeSegmentLength
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreSegmentLengthRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/raw-data/{sampleId}/original:
    get:
      summary: Get the original downsampled data
      description: Get the original, uncropped, downsampled data.
      operationId: getUncroppedDownsampledSample
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
        - $ref: '#/components/parameters/LimitPayloadValues'
        - $ref: '#/components/parameters/ZoomStart'
        - $ref: '#/components/parameters/ZoomEnd'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
        - $ref: '#/components/parameters/TruncateStructuredLabelsParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSampleResponse'
  /api/{projectId}/raw-data/{sampleId}/retry-processing:
    post:
      summary: Retry processing
      description: If a sample failed processing, retry the processing operation.
      operationId: retryProcessing
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/raw-data/{sampleId}/enable:
    post:
      summary: Enable sample
      description: Enable a sample, ensuring that it is not excluded from the dataset.
      operationId: enableSample
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/raw-data/{sampleId}/disable:
    post:
      summary: Disable sample
      description: Disable a sample, ensuring that it is excluded from the dataset.
      operationId: disableSample
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/raw-data/{sampleId}/autolabel:
    post:
      summary: Auto-label an image
      description: Classify an image using another neural network.
      operationId: classifyUsingAutolabel
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ObjectDetectionAutoLabelRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectDetectionAutoLabelResponse'
  /api/{projectId}/raw-data/{sampleId}/metadata:
    post:
      summary: Set sample metadata
      description: Adds or updates the metadata associated to a sample.
      operationId: setSampleMetadata
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetSampleMetadataRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/raw-data/{sampleId}/to-labeling-queue:
    post:
      summary: Move sample to labeling queue
      description: Clears the bounding box labels and moves item back to labeling queue
      operationId: moveToLabelingQueue
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/raw-data/{sampleId}/propose-changes:
    post:
      summary: Propose changes
      description: >-
        Queue up changes to an object as part of the AI Actions flow. This
        overwrites any previous proposed changes.
      operationId: setSampleProposedChanges
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetSampleProposedChangesRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/raw-data/{sampleId}/video-dimensions:
    post:
      summary: Set sample video dimensions
      description: >-
        Update the video dimensions for a sample. This is only available for
        video files that do not have dimensions set yet.
      operationId: setSampleVideoDimensions
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetSampleVideoDimensionsRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/raw-data/batch/edit-labels:
    post:
      summary: Edit labels for multiple samples
      description: >
        Sets the label (also known as class) of multiple samples. If you want to
        relabel bounding boxes, use "batchEditBoundingBoxes" instead.

        Depending on the number of affected samples this will either execute
        immediately or return the ID of a job that will perform this action in
        batches.
      operationId: batchEditLabels
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/RawDataCategoryQueryParameter'
        - $ref: '#/components/parameters/FiltersLabelsParameter'
        - $ref: '#/components/parameters/FiltersFilenameParameter'
        - $ref: '#/components/parameters/FiltersMaxLengthParameter'
        - $ref: '#/components/parameters/FiltersMinLengthParameter'
        - $ref: '#/components/parameters/FiltersMinFrequencyParameter'
        - $ref: '#/components/parameters/FiltersMaxFrequencyParameter'
        - $ref: '#/components/parameters/FiltersSignatureParameter'
        - $ref: '#/components/parameters/FiltersDisabledParameter'
        - $ref: '#/components/parameters/FiltersIdsParameter'
        - $ref: '#/components/parameters/FiltersExcludeIdsParameter'
        - $ref: '#/components/parameters/FiltersMinLabelParameter'
        - $ref: '#/components/parameters/FiltersMaxLabelParameter'
        - $ref: '#/components/parameters/SearchQueryParameter'
        - $ref: '#/components/parameters/FiltersDataTypeParameter'
        - $ref: '#/components/parameters/FiltersMinIdParameter'
        - $ref: '#/components/parameters/FiltersMaxIdParameter'
        - $ref: '#/components/parameters/FiltersMetadataParameter'
        - $ref: '#/components/parameters/FiltersMinDateParameter'
        - $ref: '#/components/parameters/FiltersMaxDateParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditSampleLabelRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/GenericApiResponse'
                  - $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/raw-data/batch/edit-bounding-boxes:
    post:
      summary: Edit bounding boxes for multiple samples
      description: >
        Relabels (or removes) bounding boxes for multiple samples.

        Depending on the number of affected samples this will either execute
        immediately or return the ID of a job that will perform this action in
        batches.
      operationId: batchEditBoundingBoxes
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/RawDataCategoryQueryParameter'
        - $ref: '#/components/parameters/FiltersLabelsParameter'
        - $ref: '#/components/parameters/FiltersFilenameParameter'
        - $ref: '#/components/parameters/FiltersMaxLengthParameter'
        - $ref: '#/components/parameters/FiltersMinLengthParameter'
        - $ref: '#/components/parameters/FiltersMinFrequencyParameter'
        - $ref: '#/components/parameters/FiltersMaxFrequencyParameter'
        - $ref: '#/components/parameters/FiltersSignatureParameter'
        - $ref: '#/components/parameters/FiltersDisabledParameter'
        - $ref: '#/components/parameters/FiltersIdsParameter'
        - $ref: '#/components/parameters/FiltersExcludeIdsParameter'
        - $ref: '#/components/parameters/FiltersMinLabelParameter'
        - $ref: '#/components/parameters/FiltersMaxLabelParameter'
        - $ref: '#/components/parameters/SearchQueryParameter'
        - $ref: '#/components/parameters/FiltersDataTypeParameter'
        - $ref: '#/components/parameters/FiltersMinIdParameter'
        - $ref: '#/components/parameters/FiltersMaxIdParameter'
        - $ref: '#/components/parameters/FiltersMetadataParameter'
        - $ref: '#/components/parameters/FiltersMinDateParameter'
        - $ref: '#/components/parameters/FiltersMaxDateParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchEditBoundingBoxesRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/GenericApiResponse'
                  - $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/raw-data/batch/back-to-labeling:
    post:
      summary: Put samples back into the object detection labeling queue
      description: >
        Batch operation to put multiple samples back into the object detection
        labeling queue.

        Depending on the number of affected samples this will either execute
        immediately or return the ID of a job that will perform this action in
        batches.
      operationId: batchBackToLabeling
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/RawDataCategoryQueryParameter'
        - $ref: '#/components/parameters/FiltersLabelsParameter'
        - $ref: '#/components/parameters/FiltersFilenameParameter'
        - $ref: '#/components/parameters/FiltersMaxLengthParameter'
        - $ref: '#/components/parameters/FiltersMinLengthParameter'
        - $ref: '#/components/parameters/FiltersMinFrequencyParameter'
        - $ref: '#/components/parameters/FiltersMaxFrequencyParameter'
        - $ref: '#/components/parameters/FiltersSignatureParameter'
        - $ref: '#/components/parameters/FiltersDisabledParameter'
        - $ref: '#/components/parameters/FiltersIdsParameter'
        - $ref: '#/components/parameters/FiltersExcludeIdsParameter'
        - $ref: '#/components/parameters/FiltersMinLabelParameter'
        - $ref: '#/components/parameters/FiltersMaxLabelParameter'
        - $ref: '#/components/parameters/SearchQueryParameter'
        - $ref: '#/components/parameters/FiltersDataTypeParameter'
        - $ref: '#/components/parameters/FiltersMinIdParameter'
        - $ref: '#/components/parameters/FiltersMaxIdParameter'
        - $ref: '#/components/parameters/FiltersMetadataParameter'
        - $ref: '#/components/parameters/FiltersMinDateParameter'
        - $ref: '#/components/parameters/FiltersMaxDateParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BackToLabelingRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/GenericApiResponse'
                  - $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/raw-data/batch/delete:
    post:
      summary: Remove multiple samples
      description: >
        Deletes samples. Note that this does not delete the data from cold
        storage.

        Depending on the number of affected samples this will either execute
        immediately or return the ID of a job that will perform this action in
        batches.
      operationId: batchDelete
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/RawDataCategoryQueryParameter'
        - $ref: '#/components/parameters/FiltersLabelsParameter'
        - $ref: '#/components/parameters/FiltersFilenameParameter'
        - $ref: '#/components/parameters/FiltersMaxLengthParameter'
        - $ref: '#/components/parameters/FiltersMinLengthParameter'
        - $ref: '#/components/parameters/FiltersMinFrequencyParameter'
        - $ref: '#/components/parameters/FiltersMaxFrequencyParameter'
        - $ref: '#/components/parameters/FiltersSignatureParameter'
        - $ref: '#/components/parameters/FiltersDisabledParameter'
        - $ref: '#/components/parameters/FiltersIdsParameter'
        - $ref: '#/components/parameters/FiltersExcludeIdsParameter'
        - $ref: '#/components/parameters/FiltersMinLabelParameter'
        - $ref: '#/components/parameters/FiltersMaxLabelParameter'
        - $ref: '#/components/parameters/SearchQueryParameter'
        - $ref: '#/components/parameters/FiltersDataTypeParameter'
        - $ref: '#/components/parameters/FiltersMinIdParameter'
        - $ref: '#/components/parameters/FiltersMaxIdParameter'
        - $ref: '#/components/parameters/FiltersMetadataParameter'
        - $ref: '#/components/parameters/FiltersMinDateParameter'
        - $ref: '#/components/parameters/FiltersMaxDateParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/GenericApiResponse'
                  - $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/raw-data/batch/moveSamples:
    post:
      summary: Move multiple samples
      description: >
        Move multiple samples to another category (e.g. from test to training).

        Depending on the number of affected samples this will either execute
        immediately or return the ID of a job that will perform this action in
        batches.
      operationId: batchMove
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/RawDataCategoryQueryParameter'
        - $ref: '#/components/parameters/FiltersLabelsParameter'
        - $ref: '#/components/parameters/FiltersFilenameParameter'
        - $ref: '#/components/parameters/FiltersMaxLengthParameter'
        - $ref: '#/components/parameters/FiltersMinLengthParameter'
        - $ref: '#/components/parameters/FiltersMinFrequencyParameter'
        - $ref: '#/components/parameters/FiltersMaxFrequencyParameter'
        - $ref: '#/components/parameters/FiltersSignatureParameter'
        - $ref: '#/components/parameters/FiltersDisabledParameter'
        - $ref: '#/components/parameters/FiltersIdsParameter'
        - $ref: '#/components/parameters/FiltersExcludeIdsParameter'
        - $ref: '#/components/parameters/FiltersMinLabelParameter'
        - $ref: '#/components/parameters/FiltersMaxLabelParameter'
        - $ref: '#/components/parameters/SearchQueryParameter'
        - $ref: '#/components/parameters/FiltersDataTypeParameter'
        - $ref: '#/components/parameters/FiltersMinIdParameter'
        - $ref: '#/components/parameters/FiltersMaxIdParameter'
        - $ref: '#/components/parameters/FiltersMetadataParameter'
        - $ref: '#/components/parameters/FiltersMinDateParameter'
        - $ref: '#/components/parameters/FiltersMaxDateParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MoveRawDataRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/GenericApiResponse'
                  - $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/raw-data/batch/enable-samples:
    post:
      summary: Enable multiple samples
      description: >
        Enables samples, ensuring that they are not excluded from the dataset.

        Depending on the number of affected samples this will either execute
        immediately or return the ID of a job that will perform this action in
        batches.
      operationId: batchEnable
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/RawDataCategoryQueryParameter'
        - $ref: '#/components/parameters/FiltersLabelsParameter'
        - $ref: '#/components/parameters/FiltersFilenameParameter'
        - $ref: '#/components/parameters/FiltersMaxLengthParameter'
        - $ref: '#/components/parameters/FiltersMinLengthParameter'
        - $ref: '#/components/parameters/FiltersMinFrequencyParameter'
        - $ref: '#/components/parameters/FiltersMaxFrequencyParameter'
        - $ref: '#/components/parameters/FiltersSignatureParameter'
        - $ref: '#/components/parameters/FiltersDisabledParameter'
        - $ref: '#/components/parameters/FiltersIdsParameter'
        - $ref: '#/components/parameters/FiltersExcludeIdsParameter'
        - $ref: '#/components/parameters/FiltersMinLabelParameter'
        - $ref: '#/components/parameters/FiltersMaxLabelParameter'
        - $ref: '#/components/parameters/SearchQueryParameter'
        - $ref: '#/components/parameters/FiltersDataTypeParameter'
        - $ref: '#/components/parameters/FiltersMinIdParameter'
        - $ref: '#/components/parameters/FiltersMaxIdParameter'
        - $ref: '#/components/parameters/FiltersMetadataParameter'
        - $ref: '#/components/parameters/FiltersMinDateParameter'
        - $ref: '#/components/parameters/FiltersMaxDateParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/GenericApiResponse'
                  - $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/raw-data/batch/disable-samples:
    post:
      summary: Disable multiple samples
      description: >
        Disables samples, ensuring that they are excluded from the dataset.

        Depending on the number of affected samples this will either execute
        immediately or return the ID of a job that will perform this action in
        batches.
      operationId: batchDisable
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/RawDataCategoryQueryParameter'
        - $ref: '#/components/parameters/FiltersLabelsParameter'
        - $ref: '#/components/parameters/FiltersFilenameParameter'
        - $ref: '#/components/parameters/FiltersMaxLengthParameter'
        - $ref: '#/components/parameters/FiltersMinLengthParameter'
        - $ref: '#/components/parameters/FiltersMinFrequencyParameter'
        - $ref: '#/components/parameters/FiltersMaxFrequencyParameter'
        - $ref: '#/components/parameters/FiltersSignatureParameter'
        - $ref: '#/components/parameters/FiltersDisabledParameter'
        - $ref: '#/components/parameters/FiltersIdsParameter'
        - $ref: '#/components/parameters/FiltersExcludeIdsParameter'
        - $ref: '#/components/parameters/FiltersMinLabelParameter'
        - $ref: '#/components/parameters/FiltersMaxLabelParameter'
        - $ref: '#/components/parameters/SearchQueryParameter'
        - $ref: '#/components/parameters/FiltersDataTypeParameter'
        - $ref: '#/components/parameters/FiltersMinIdParameter'
        - $ref: '#/components/parameters/FiltersMaxIdParameter'
        - $ref: '#/components/parameters/FiltersMetadataParameter'
        - $ref: '#/components/parameters/FiltersMinDateParameter'
        - $ref: '#/components/parameters/FiltersMaxDateParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/GenericApiResponse'
                  - $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/raw-data/batch/add-metadata:
    post:
      summary: Add metadata (multiple samples)
      description: Add specific metadata for multiple samples.
      operationId: batchAddMetadata
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/RawDataCategoryQueryParameter'
        - $ref: '#/components/parameters/FiltersLabelsParameter'
        - $ref: '#/components/parameters/FiltersFilenameParameter'
        - $ref: '#/components/parameters/FiltersMaxLengthParameter'
        - $ref: '#/components/parameters/FiltersMinLengthParameter'
        - $ref: '#/components/parameters/FiltersMinFrequencyParameter'
        - $ref: '#/components/parameters/FiltersMaxFrequencyParameter'
        - $ref: '#/components/parameters/FiltersSignatureParameter'
        - $ref: '#/components/parameters/FiltersDisabledParameter'
        - $ref: '#/components/parameters/FiltersIdsParameter'
        - $ref: '#/components/parameters/FiltersExcludeIdsParameter'
        - $ref: '#/components/parameters/FiltersMinLabelParameter'
        - $ref: '#/components/parameters/FiltersMaxLabelParameter'
        - $ref: '#/components/parameters/SearchQueryParameter'
        - $ref: '#/components/parameters/FiltersDataTypeParameter'
        - $ref: '#/components/parameters/FiltersMinIdParameter'
        - $ref: '#/components/parameters/FiltersMaxIdParameter'
        - $ref: '#/components/parameters/FiltersMetadataParameter'
        - $ref: '#/components/parameters/FiltersMinDateParameter'
        - $ref: '#/components/parameters/FiltersMaxDateParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchAddMetadataRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/GenericApiResponse'
                  - $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/raw-data/batch/clear-metadata-by-key:
    post:
      summary: Clear metadata by key (multiple samples)
      description: Clears a specific metadata field (by key) for multiple samples.
      operationId: batchClearMetadataByKey
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/RawDataCategoryQueryParameter'
        - $ref: '#/components/parameters/FiltersLabelsParameter'
        - $ref: '#/components/parameters/FiltersFilenameParameter'
        - $ref: '#/components/parameters/FiltersMaxLengthParameter'
        - $ref: '#/components/parameters/FiltersMinLengthParameter'
        - $ref: '#/components/parameters/FiltersMinFrequencyParameter'
        - $ref: '#/components/parameters/FiltersMaxFrequencyParameter'
        - $ref: '#/components/parameters/FiltersSignatureParameter'
        - $ref: '#/components/parameters/FiltersDisabledParameter'
        - $ref: '#/components/parameters/FiltersIdsParameter'
        - $ref: '#/components/parameters/FiltersExcludeIdsParameter'
        - $ref: '#/components/parameters/FiltersMinLabelParameter'
        - $ref: '#/components/parameters/FiltersMaxLabelParameter'
        - $ref: '#/components/parameters/SearchQueryParameter'
        - $ref: '#/components/parameters/FiltersDataTypeParameter'
        - $ref: '#/components/parameters/FiltersMinIdParameter'
        - $ref: '#/components/parameters/FiltersMaxIdParameter'
        - $ref: '#/components/parameters/FiltersMetadataParameter'
        - $ref: '#/components/parameters/FiltersMinDateParameter'
        - $ref: '#/components/parameters/FiltersMaxDateParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchClearMetadataByKeyRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/GenericApiResponse'
                  - $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/raw-data/batch/clear-metadata:
    post:
      summary: Clear all metadata (multiple samples)
      description: Clears all metadata for multiple samples.
      operationId: batchClearMetadata
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/RawDataCategoryQueryParameter'
        - $ref: '#/components/parameters/FiltersLabelsParameter'
        - $ref: '#/components/parameters/FiltersFilenameParameter'
        - $ref: '#/components/parameters/FiltersMaxLengthParameter'
        - $ref: '#/components/parameters/FiltersMinLengthParameter'
        - $ref: '#/components/parameters/FiltersMinFrequencyParameter'
        - $ref: '#/components/parameters/FiltersMaxFrequencyParameter'
        - $ref: '#/components/parameters/FiltersSignatureParameter'
        - $ref: '#/components/parameters/FiltersDisabledParameter'
        - $ref: '#/components/parameters/FiltersIdsParameter'
        - $ref: '#/components/parameters/FiltersExcludeIdsParameter'
        - $ref: '#/components/parameters/FiltersMinLabelParameter'
        - $ref: '#/components/parameters/FiltersMaxLabelParameter'
        - $ref: '#/components/parameters/SearchQueryParameter'
        - $ref: '#/components/parameters/FiltersDataTypeParameter'
        - $ref: '#/components/parameters/FiltersMinIdParameter'
        - $ref: '#/components/parameters/FiltersMaxIdParameter'
        - $ref: '#/components/parameters/FiltersMetadataParameter'
        - $ref: '#/components/parameters/FiltersMinDateParameter'
        - $ref: '#/components/parameters/FiltersMaxDateParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/raw-data/track-objects:
    post:
      summary: Track objects
      description: >-
        Track objects between two samples. Source sample should have bounding
        boxes set.
      operationId: trackObjects
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrackObjectsRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrackObjectsResponse'
  /api/{projectId}/raw-data/data-explorer/features:
    get:
      summary: Get data explorer features
      description: t-SNE2 output of the raw dataset
      operationId: getDataExplorerFeatures
      tags:
        - Raw data
      x-middleware:
        - AllowsReadOnly
        - CustomResponse
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDataExplorerFeaturesResponse'
  /api/{projectId}/raw-data/data-explorer/has-features:
    get:
      summary: Check data explorer features
      description: t-SNE2 output of the raw dataset
      operationId: hasDataExplorerFeatures
      tags:
        - Raw data
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HasDataExplorerFeaturesResponse'
  /api/{projectId}/raw-data/data-explorer/predictions:
    get:
      summary: Get data explorer predictions
      description: >-
        Predictions for every data explorer point (only available when using
        current impulse to populate data explorer)
      operationId: getDataExplorerPredictions
      tags:
        - Raw data
      x-middleware:
        - AllowsReadOnly
        - CustomResponse
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataExplorerPredictionsResponse'
  /api/{projectId}/raw-data/data-explorer/clear:
    post:
      summary: Clear data explorer
      description: Remove the current data explorer state
      operationId: clearDataExplorer
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/raw-data/data-explorer/settings:
    get:
      summary: Get data explorer settings
      description: >-
        Get data explorer configuration, like the type of data, and the input /
        dsp block to use.
      operationId: getDataExplorerSettings
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDataExplorerSettingsResponse'
    post:
      summary: Set data explorer settings
      description: >-
        Set data explorer configuration, like the type of data, and the input /
        dsp block to use.
      operationId: setDataExplorerSettings
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataExplorerSettings'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/raw-data/data-quality/diversity/exists:
    get:
      summary: Check if data diversity metrics exist
      description: >-
        Determine if data diversity metrics have been calculated. To calculate
        these metrics, use the `calculateDataQualityMetrics` endpoint.
      operationId: hasDiversityData
      tags:
        - Raw data
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HasDataExplorerFeaturesResponse'
  /api/{projectId}/raw-data/data-quality/diversity:
    get:
      summary: Get diversity metrics data
      description: >-
        Obtain metrics that describe the similarity and diversity of a dataset.
        To calculate these metrics, use the `calculateDataQualityMetrics`
        endpoint.
      operationId: getDiversityData
      tags:
        - Raw data
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDiversityDataResponse'
  /api/{projectId}/raw-data/data-quality/label-noise/exists:
    get:
      summary: Check if label noise metrics exist
      description: >-
        Determine if label noise metrics have been calculated. To calculate
        these metrics, use the `calculateDataQualityMetrics` endpoint.
      operationId: hasLabelNoiseData
      tags:
        - Raw data
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HasDataExplorerFeaturesResponse'
  /api/{projectId}/raw-data/data-quality/label-noise:
    get:
      summary: Get label noise data
      description: >-
        Obtain metrics that describe potential label noise issues in the
        dataset. To calculate these metrics, use the
        `calculateDataQualityMetrics` endpoint.
      operationId: getLabelNoiseData
      tags:
        - Raw data
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetLabelNoiseDataResponse'
  /api/{projectId}/raw-data/ai-actions-preview/{jobId}/proposed-changes:
    get:
      summary: Get AI Actions proposed changes
      description: Get proposed changes from an AI Actions job.
      operationId: getAIActionsProposedChanges
      tags:
        - Raw data
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/JobIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAIActionsProposedChangesResponse'
  /api/{projectId}/impulse:
    get:
      summary: Get impulse
      description: >-
        Retrieve the impulse for this project. If you specify `impulseId` then
        that impulse is returned, otherwise the default impulse is returned.
      operationId: getImpulse
      tags:
        - Impulse
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetImpulseResponse'
    post:
      summary: Create impulse
      description: >-
        Sets the impulse for this project.  If you specify `impulseId` then that
        impulse is created/updated, otherwise the default impulse is
        created/updated.
      operationId: createImpulse
      tags:
        - Impulse
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateImpulseRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateImpulseResponse'
    delete:
      summary: Delete impulse
      description: >-
        Clears the impulse and all associated blocks for this project.  If you
        specify `impulseId` then that impulse is cleared, otherwise the default
        impulse is cleared.
      operationId: deleteImpulse
      tags:
        - Impulse
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/impulse/new:
    post:
      summary: Create new empty impulse
      description: Create a new empty impulse, and return the ID.
      operationId: createNewEmptyImpulse
      tags:
        - Impulse
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateNewEmptyImpulseRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateNewEmptyImpulseResponse'
  /api/{projectId}/impulse/update:
    post:
      summary: Update impulse
      description: >-
        Update the impulse for this project.  If you specify `impulseId` then
        that impulse is created/updated, otherwise the default impulse is
        created/updated.
      operationId: updateImpulse
      tags:
        - Impulse
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateImpulseRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/impulse/all:
    get:
      summary: Get impulse including disabled blocks
      description: >-
        Retrieve the impulse for this project including disabled blocks. If you
        specify `impulseId` then that impulse is returned, otherwise the default
        impulse is returned.
      operationId: getImpulseAll
      tags:
        - Impulse
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetImpulseResponse'
  /api/{projectId}/impulse/get-new-block-id:
    post:
      summary: Get new block ID
      description: >-
        Returns an unused block ID. Use this function to determine new block IDs
        when you construct an impulse; so you won't accidentally re-use block
        IDs.
      operationId: getNewBlockId
      tags:
        - Impulse
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetNewBlockIdResponse'
  /api/{projectId}/impulse/blocks:
    get:
      summary: Get impulse blocks
      description: Lists all possible blocks that can be used in the impulse
      operationId: getImpulseBlocks
      tags:
        - Impulse
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetImpulseBlocksResponse'
  /api/{projectId}/verify-dsp-block/url:
    post:
      summary: Verify custom DSP block
      description: Verify the validity of a custom DSP block
      operationId: verifyDspBlockUrl
      tags:
        - Impulse
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VerifyDspBlockUrlRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerifyDspBlockUrlResponse'
  /api/{projectId}/transfer-learning-models:
    get:
      summary: Get all transfer learning models
      description: Retrieve all transfer learning models across all categories
      operationId: getAllTransferLearningModels
      tags:
        - Impulse
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAllTransferLearningModelsResponse'
  /api/{projectId}/impulses:
    get:
      summary: Get all impulses
      description: Retrieve all impulse for a project
      operationId: getAllImpulses
      x-oauth-scopes:
        - projects:read
      tags:
        - Impulse
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAllImpulsesResponse'
  /api/{projectId}/impulses-detailed:
    get:
      summary: Get all impulses (incl. metrics)
      description: >-
        Retrieve all impulse for a project, including accuracy and performance
        metrics.
      operationId: getAllDetailedImpulses
      tags:
        - Impulse
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAllDetailedImpulsesResponse'
  /api/{projectId}/download-impulses-detailed:
    get:
      summary: Download all impulses (incl. metrics), as JSON or CSV.
      description: >-
        Download all impulse for a project, including accuracy and performance
        metrics, as JSON or CSV.
      operationId: downloadDetailedImpulses
      tags:
        - Impulse
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DetailedImpulsesFormatParameter'
      responses:
        '200':
          description: File
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
  /api/{projectId}/impulse/{impulseId}/clone/structure:
    post:
      summary: Clone impulse (structure)
      description: >-
        Clones the complete structure (incl. config) of an impulse. Does not
        copy data.
      operationId: cloneImpulseStructure
      tags:
        - Impulse
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/ImpulseIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CloneImpulseRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateImpulseResponse'
  /api/{projectId}/impulse/{impulseId}/clone/complete:
    post:
      summary: Clone impulse (complete)
      description: >-
        Clones the complete impulse (incl. config and data) of an existing
        impulse.
      operationId: cloneImpulseComplete
      tags:
        - Impulse
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/ImpulseIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CloneImpulseRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/impulse/{impulseId}/set-thresholds:
    post:
      summary: Set thresholds
      description: >-
        Set thresholds (e.g. min. confidence rating, or min. anomaly score) for
        an impulse.
      operationId: setImpulseThresholds
      tags:
        - Impulse
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/ImpulseIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetImpulseThresholdsRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SetImpulseThresholdsResponse'
  /api/{projectId}/impulse/{impulseId}/regenerate-model-testing-summary:
    post:
      summary: Regenerate model testing summary
      description: >-
        Regenerate model testing results (without re-running feature
        generation). Use this if thresholds changed (e.g. via
        setImpulseThresholds), but no job was kicked off automatically.
      operationId: regenerateModelTestingSummary
      tags:
        - Impulse
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/ImpulseIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/dsp/{dspId}:
    get:
      summary: Get config
      description: >-
        Retrieve the configuration parameters for the DSP block. Use the impulse
        functions to retrieve all DSP blocks.
      operationId: getDspConfig
      tags:
        - DSP
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DspIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DSPConfigResponse'
    post:
      summary: Set config
      description: >-
        Set configuration parameters for the DSP block. Only values set in the
        body will be overwritten.
      operationId: setDspConfig
      tags:
        - DSP
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DspIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DSPConfigRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/dsp/{dspId}/clear:
    post:
      summary: Clear DSP block
      description: Clear generated features for a DSP block (used in tests).
      operationId: clearDspBlock
      tags:
        - DSP
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DspIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/dsp/{dspId}/metadata:
    get:
      summary: Get metadata
      description: Retrieve the metadata from a generated DSP block.
      operationId: getDspMetadata
      tags:
        - DSP
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DspIdParameter'
        - $ref: '#/components/parameters/ExcludeIncludedSamplesParameter'
        - $ref: '#/components/parameters/OptionalDSPCategoryParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DSPMetadataResponse'
  /api/{projectId}/dsp/{dspId}/raw-data/{sampleId}:
    get:
      summary: Get raw sample
      description: >-
        Get raw sample data, but with only the axes selected by the DSP block.
        E.g. if you have selected only accX and accY as inputs for the DSP
        block, but the raw sample also contains accZ, accZ is filtered out. If
        you pass dspId = 0 this will return a raw graph without any processing.
      operationId: getDspRawSample
      tags:
        - DSP
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DspIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
        - $ref: '#/components/parameters/LimitPayloadValues'
        - $ref: '#/components/parameters/TruncateStructuredLabelsParameter'
        - $ref: '#/components/parameters/UseCachedUpsampledDataParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSampleResponse'
  /api/{projectId}/dsp/{dspId}/raw-data/{sampleId}/slice:
    get:
      summary: Get raw sample (slice)
      description: >-
        Get slice of raw sample data, but with only the axes selected by the DSP
        block. E.g. if you have selected only accX and accY as inputs for the
        DSP block, but the raw sample also contains accZ, accZ is filtered out.
      operationId: getDspSampleSlice
      tags:
        - DSP
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DspIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
        - $ref: '#/components/parameters/SliceStartParameter'
        - $ref: >-
            #/components/parameters/OptionalSliceEndDefaultToWindowLengthParameter
        - $ref: '#/components/parameters/TruncateStructuredLabelsParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSampleResponse'
  /api/{projectId}/dsp/{dspId}/raw-data/{sampleId}/slice/run:
    post:
      summary: Get processed sample (slice)
      description: >-
        Get slice of sample data, and run it through the DSP block. This only
        the axes selected by the DSP block. E.g. if you have selected only accX
        and accY as inputs for the DSP block, but the raw sample also contains
        accZ, accZ is filtered out.
      operationId: runDspSampleSlice
      tags:
        - DSP
      x-middleware:
        - CustomResponse
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DspIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
        - $ref: '#/components/parameters/SliceStartParameter'
        - $ref: >-
            #/components/parameters/OptionalSliceEndDefaultToWindowLengthParameter
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DspRunRequestWithoutFeatures'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DspRunResponseWithSample'
  /api/{projectId}/dsp/{dspId}/raw-data/{sampleId}/slice/run/readonly:
    get:
      summary: Get processed sample (slice)
      description: >-
        Get slice of sample data, and run it through the DSP block. This only
        the axes selected by the DSP block. E.g. if you have selected only accX
        and accY as inputs for the DSP block, but the raw sample also contains
        accZ, accZ is filtered out.
      operationId: runDspSampleSliceReadOnly
      tags:
        - DSP
      x-middleware:
        - AllowsReadOnly
        - CustomResponse
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DspIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
        - $ref: '#/components/parameters/SliceStartParameter'
        - $ref: >-
            #/components/parameters/OptionalSliceEndDefaultToWindowLengthParameter
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DspRunResponseWithSample'
  /api/{projectId}/dsp/{dspId}/features/labels:
    get:
      summary: Feature labels
      description: Retrieve the names of the features the DSP block generates
      operationId: getDspFeatureLabels
      tags:
        - DSP
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DspIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DspFeatureLabelsResponse'
  /api/{projectId}/dsp/{dspId}/features/get-graph/{category}:
    get:
      summary: Sample of trained features
      description: >-
        Get a sample of trained features, this extracts a number of samples and
        their labels. Used to visualize the current training set.
      operationId: dspSampleTrainedFeatures
      tags:
        - DSP
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DspIdParameter'
        - $ref: '#/components/parameters/FeatureAx1Parameter'
        - $ref: '#/components/parameters/FeatureAx2Parameter'
        - $ref: '#/components/parameters/FeatureAx3Parameter'
        - $ref: '#/components/parameters/RawDataCategoryParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DspTrainedFeaturesResponse'
  /api/{projectId}/dsp/{dspId}/features/get-graph/classification/{sampleId}:
    get:
      summary: Features for sample
      description: >-
        Runs the DSP block against a sample. This will move the sliding window
        (dependent on the sliding window length and the sliding window increase
        parameters in the impulse) over the complete file, and run the DSP
        function for every window that is extracted.
      operationId: dspGetFeaturesForSample
      tags:
        - DSP
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DspIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DspSampleFeaturesResponse'
  /api/{projectId}/dsp/{dspId}/features/importance:
    get:
      summary: Feature importance
      description: >-
        Retrieve the feature importance for a DSP block (only available for
        blocks where dimensionalityReduction is not enabled)
      operationId: getDspFeatureImportance
      tags:
        - DSP
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DspIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DspFeatureImportanceResponse'
  /api/{projectId}/dsp-data/{dspId}/x/{category}:
    get:
      summary: Download DSP data
      description: >-
        Download output from a DSP block over all data in the training set,
        already sliced in windows. In Numpy binary format.
      operationId: downloadDspData
      tags:
        - DSP
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DspIdParameter'
        - $ref: '#/components/parameters/RawDataCategoryParameter'
        - $ref: '#/components/parameters/DSPDataRawParameter'
      responses:
        '200':
          description: Numpy binary file
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
  /api/{projectId}/dsp-data/{dspId}/y/{category}:
    get:
      summary: Download DSP labels
      description: >-
        Download labels for a DSP block over all data in the training set,
        already sliced in windows.
      operationId: downloadDspLabels
      tags:
        - DSP
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DspIdParameter'
        - $ref: '#/components/parameters/RawDataCategoryParameter'
      responses:
        '200':
          description: Numpy binary file
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
  /api/{projectId}/dsp/{dspId}/get-autotuner-results:
    get:
      summary: Get results from DSP autotuner
      description: Get a set of parameters, found as a result of running the DSP autotuner.
      operationId: getAutotunerResults
      tags:
        - DSP
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DspIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DspAutotunerResults'
  /api/{projectId}/dsp/{dspId}/profile:
    post:
      summary: Profile custom DSP block
      description: >-
        Returns performance characteristics for a custom DSP block (needs
        `hasTfliteImplementation`). Updates are streamed over the websocket API
        (or can be retrieved through the /stdout endpoint). Use
        getProfileTfliteJobResult to get the results when the job is completed.
      tags:
        - DSP
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DspIdParameter'
      operationId: startProfileCustomDspBlock
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DspRunRequestWithoutFeaturesReadOnly'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/dsp/{dspId}/performance:
    get:
      summary: Get DSP block performance for all latency devices
      description: >-
        Get estimated performance (latency and RAM) for the DSP block, for all
        supported project latency devices.
      operationId: getPerformanceAllVariants
      tags:
        - DSP
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DspIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DspPerformanceAllVariantsResponse'
  /api/{projectId}/dsp/{dspId}/run:
    post:
      summary: Get processed sample (from features array)
      description: >-
        Takes in a features array and runs it through the DSP block. This data
        should have the same frequency as set in the input block in your
        impulse.
      operationId: runDspOnFeaturesArray
      tags:
        - DSP
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DspIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DspRunRequestWithFeatures'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DspRunResponse'
  /api/{projectId}/training/{learnId}/x:
    get:
      summary: Download data
      description: >-
        Download the processed data for this learning block. This is data
        already processed by the signal processing blocks.
      operationId: getLearnXData
      tags:
        - Learn
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/LearnIdParameter'
      responses:
        '200':
          description: Numpy binary file
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
  /api/{projectId}/training/{learnId}/y:
    get:
      summary: Download labels
      description: >-
        Download the labels for this learning block. This is data already
        processed by the signal processing blocks. Not all blocks support this
        function. If so, a GenericApiResponse is returned with an error message.
      operationId: getLearnYData
      tags:
        - Learn
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/LearnIdParameter'
      responses:
        '200':
          description: Numpy binary file
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
  /api/{projectId}/training/anomaly/{learnId}:
    get:
      summary: Anomaly information
      description: >-
        Get information about an anomaly block, such as its dependencies. Use
        the impulse blocks to find the learnId.
      operationId: getAnomaly
      tags:
        - Learn
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/LearnIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnomalyConfigResponse'
    post:
      summary: Anomaly settings
      description: >-
        Configure the anomaly block, such as its minimum confidence score. Use
        the impulse blocks to find the learnId.
      operationId: setAnomaly
      tags:
        - Learn
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/LearnIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetAnomalyParameterRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/training/anomaly/{learnId}/metadata:
    get:
      summary: Anomaly metadata
      description: >-
        Get metadata about a trained anomaly block. Use the impulse blocks to
        find the learnId.
      operationId: getAnomalyMetadata
      tags:
        - Learn
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/LearnIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnomalyModelMetadataResponse'
  /api/{projectId}/training/anomaly/{learnId}/gmm/metadata:
    get:
      summary: Anomaly GMM metadata
      description: >-
        Get raw model metadata of the Gaussian mixture model (GMM) for a trained
        anomaly block. Use the impulse blocks to find the learnId.
      operationId: getGmmMetadata
      tags:
        - Learn
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/LearnIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnomalyGmmMetadataResponse'
  /api/{projectId}/training/keras/{learnId}:
    get:
      summary: Keras information
      description: >-
        Get information about a Keras block, such as its dependencies. Use the
        impulse blocks to find the learnId.
      operationId: getKeras
      tags:
        - Learn
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/LearnIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KerasResponse'
    post:
      summary: Keras settings
      description: >-
        Configure the Keras block, such as its minimum confidence score. Use the
        impulse blocks to find the learnId.
      operationId: setKeras
      tags:
        - Learn
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/LearnIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetKerasParameterRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/training/keras/{learnId}/metadata:
    get:
      summary: Keras metadata
      description: >-
        Get metadata about a trained Keras block. Use the impulse blocks to find
        the learnId.
      operationId: getKerasMetadata
      tags:
        - Learn
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/LearnIdParameter'
        - $ref: '#/components/parameters/ExcludeLabelsParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KerasModelMetadataResponse'
  /api/{projectId}/training/keras/{learnId}/data-explorer/features:
    get:
      summary: Get data explorer features
      description: t-SNE2 output of the raw dataset using embeddings from this Keras block
      operationId: getKerasDataExplorerFeatures
      tags:
        - Learn
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/LearnIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDataExplorerFeaturesResponse'
  /api/{projectId}/training/keras/{learnId}/download-export:
    get:
      summary: Download Keras export
      description: >-
        Download an exported Keras block - needs to be exported via
        'exportKerasBlock' first
      operationId: downloadKerasExport
      tags:
        - Learn
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/LearnIdParameter'
      responses:
        '200':
          description: File
          content:
            application/zip:
              schema:
                type: string
                format: binary
  /api/{projectId}/training/keras/{learnId}/download-data:
    get:
      summary: Download Keras data export
      description: >-
        Download the data of an exported Keras block - needs to be exported via
        'exportKerasBlockData' first
      operationId: downloadKerasData
      tags:
        - Learn
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/LearnIdParameter'
      responses:
        '200':
          description: File
          content:
            application/zip:
              schema:
                type: string
                format: binary
  /api/{projectId}/training/keras/{learnId}/profile:
    post:
      summary: Start a profile job for a Keras learn block
      description: >-
        Starts an asynchronous profiling job, if there's no profiling
        information for the currently selected latency device. Afterwards,
        re-fetch model metadata to get the profiling job IDs.
      operationId: startKerasProfileJob
      tags:
        - Learn
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/LearnIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/training/anomaly/{learnId}/profile:
    post:
      summary: Start a profile job for an anomaly learn block
      description: >-
        Starts an asynchronous profiling job, if there's no profiling
        information for the currently selected latency device. Afterwards,
        re-fetch model metadata to get the profiling job IDs.
      operationId: startAnomalyProfileJob
      tags:
        - Learn
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/LearnIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/learn-data/{learnId}/model/{modelDownloadId}:
    get:
      summary: Download trained model
      description: >-
        Download a trained model for a learning block. Depending on the block
        this can be a TensorFlow model, or the cluster centroids.
      operationId: downloadLearnModel
      tags:
        - Learn
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/LearnIdParameter'
        - $ref: '#/components/parameters/ModelDownloadIdParameter'
      responses:
        '200':
          description: File
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
  /api/{projectId}/training/anomaly/{learnId}/features/get-graph:
    get:
      summary: Trained features
      description: >-
        Get a sample of trained features, this extracts a number of samples and
        their features.
      operationId: anomalyTrainedFeatures
      tags:
        - Learn
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/LearnIdParameter'
        - $ref: '#/components/parameters/FeatureAx1Parameter'
        - $ref: '#/components/parameters/FeatureAx2Parameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnomalyTrainedFeaturesResponse'
  /api/{projectId}/training/anomaly/{learnId}/features/get-graph/classification/{sampleId}:
    get:
      summary: Trained features for sample
      description: >-
        Get trained features for a single sample. This runs both the DSP
        prerequisites and the anomaly classifier.
      operationId: anomalyTrainedFeaturesPerSample
      tags:
        - Learn
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/LearnIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnomalyTrainedFeaturesResponse'
  /api/{projectId}/pretrained-model:
    get:
      summary: Get pretrained model
      description: >-
        Receive info back about the earlier uploaded pretrained model (via
        `uploadPretrainedModel`) input/output tensors. If you want to deploy a
        pretrained model from the API, see `startDeployPretrainedModelJob`.
      operationId: getPretrainedModelInfo
      tags:
        - Learn
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPretrainedModelResponse'
  /api/{projectId}/pretrained-model/upload:
    post:
      summary: Upload a pretrained model
      description: >-
        Upload a pretrained model and receive info back about the input/output
        tensors. If you want to deploy a pretrained model from the API, see
        `startDeployPretrainedModelJob`.
      operationId: uploadPretrainedModel
      tags:
        - Learn
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadPretrainedModelRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/pretrained-model/save:
    post:
      summary: Save parameters for pretrained model
      description: >-
        Save input / model configuration for a pretrained model. This overrides
        the current impulse. If you want to deploy a pretrained model from the
        API, see `startDeployPretrainedModelJob`.
      operationId: savePretrainedModelParameters
      tags:
        - Learn
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SavePretrainedModelRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/pretrained-model/test:
    post:
      summary: Test pretrained model
      description: >-
        Test out a pretrained model (using raw features) - upload first via 
        `uploadPretrainedModel`. If you want to deploy a pretrained model from
        the API, see `startDeployPretrainedModelJob`.
      operationId: testPretrainedModel
      tags:
        - Learn
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestPretrainedModelRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestPretrainedModelResponse'
  /api/{projectId}/pretrained-model/test-image:
    post:
      summary: Test pretrained model using image data
      description: >
        Test out a pretrained model (using image data) - upload first via 
        `uploadPretrainedModel`.

        If you want to deploy a pretrained model from the API, see
        `startDeployPretrainedModelJob`.

        This will transform raw image data (e.g. RGB to grayscale, resize)
        before classifying.

        To classify raw features, see `testPretrainedModel`.
      operationId: testPretrainedModelImages
      tags:
        - Learn
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestPretrainedModelImagesRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestPretrainedModelResponse'
  /api/{projectId}/pretrained-model/profile:
    post:
      summary: Profile pretrained model
      description: >-
        Returns the latency, RAM and ROM used for the pretrained model - upload
        first via  `uploadPretrainedModel`. This is using the project's selected
        latency device. Updates are streamed over the websocket API (or can be
        retrieved through the /stdout endpoint). Use getProfileTfliteJobResult
        to get the results when the job is completed.
      tags:
        - Learn
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      operationId: profilePretrainedModel
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/pretrained-model/download/{pretrainedModelDownloadType}:
    get:
      summary: Download pretrained model
      description: Download a pretrained model file
      operationId: downloadPretrainedModel
      tags:
        - Learn
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/PretrainedModelDownloadParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: File
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
  /api/{projectId}/classify/{sampleId}:
    get:
      summary: Classify sample (deprecated)
      description: >-
        This API is deprecated, use classifySampleV2 instead
        (`/v1/api/{projectId}/classify/v2/{sampleId}`). Classify a complete file
        against the current impulse. This will move the sliding window
        (dependent on the sliding window length and the sliding window increase
        parameters in the impulse) over the complete file, and classify for
        every window that is extracted.
      operationId: classifySample
      tags:
        - Classify
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
        - $ref: '#/components/parameters/IncludeDebugInfoParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClassifySampleResponse'
  /api/{projectId}/classify/v2/{sampleId}:
    post:
      summary: Classify sample
      description: >
        Classify a complete file against the current impulse. This will move the
        sliding window (dependent on

        the sliding window length and the sliding window increase parameters in
        the impulse) over the complete

        file, and classify for every window that is extracted. Depending on the
        size of your file, whether your

        sample is resampled, and whether the result is cached you'll get either
        the result or a job back. If

        you receive a job, then wait for the completion of the job, and then
        call this function again to receive

        the results. The unoptimized (float32) model is used by default, and
        classification with an optimized

        (int8) model can be slower.
      operationId: classifySampleV2
      tags:
        - Classify
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
        - $ref: '#/components/parameters/IncludeDebugInfoParameter'
        - $ref: '#/components/parameters/ModelVariantParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
        - $ref: '#/components/parameters/TruncateStructuredLabelsParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ClassifySampleResponse'
                  - $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/classify/v2/{sampleId}/variants:
    post:
      summary: Classify sample for the given set of variants
      description: >
        Classify a complete file against the current impulse, for all given
        variants.

        Depending on the size of your file and whether the sample is resampled,
        you may get a job ID in

        the response.
      operationId: classifySampleForVariants
      tags:
        - Classify
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
        - $ref: '#/components/parameters/IncludeDebugInfoParameter'
        - $ref: '#/components/parameters/ModelVariantsListParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
        - $ref: '#/components/parameters/TruncateStructuredLabelsParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: >-
                      #/components/schemas/ClassifySampleResponseMultipleVariants
                  - $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/classify/v2/{sampleId}/raw-data/{windowIndex}:
    get:
      summary: >-
        Get a window of raw sample features from cache, after a live
        classification job has completed.
      description: >
        Get raw sample features for a particular window. This is only available
        after a live classification job

        has completed and raw features have been cached.
      operationId: getSampleWindowFromCache
      tags:
        - Classify
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
        - $ref: '#/components/parameters/SampleWindowIndexParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
        - $ref: '#/components/parameters/TruncateStructuredLabelsParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSampleResponse'
  /api/{projectId}/classify/all/result:
    get:
      summary: Classify job result
      description: >-
        Get classify job result, containing the result for the complete testing
        dataset.
      operationId: getClassifyJobResult
      tags:
        - Classify
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/FeatureExplorerOnlyParameter'
        - $ref: '#/components/parameters/ModelVariantParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
        - $ref: '#/components/parameters/TruncateStructuredLabelsParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClassifyJobResponse'
  /api/{projectId}/classify/all/result/page:
    get:
      summary: Single page of a classify job result
      description: Get classify job result, containing the predictions for a given page.
      operationId: getClassifyJobResultPage
      tags:
        - Classify
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/LimitResultsParameter'
        - $ref: '#/components/parameters/OffsetResultsParameter'
        - $ref: '#/components/parameters/ModelVariantParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
        - $ref: '#/components/parameters/TruncateStructuredLabelsParameter'
        - $ref: '#/components/parameters/FiltersLabelsParameter'
        - $ref: '#/components/parameters/FiltersFilenameParameter'
        - $ref: '#/components/parameters/FiltersMaxLengthParameter'
        - $ref: '#/components/parameters/FiltersMinLengthParameter'
        - $ref: '#/components/parameters/FiltersMinFrequencyParameter'
        - $ref: '#/components/parameters/FiltersMaxFrequencyParameter'
        - $ref: '#/components/parameters/FiltersSignatureParameter'
        - $ref: '#/components/parameters/FiltersMinLabelParameter'
        - $ref: '#/components/parameters/FiltersMaxLabelParameter'
        - $ref: '#/components/parameters/SearchQueryParameter'
        - $ref: '#/components/parameters/FiltersDataTypeParameter'
        - $ref: '#/components/parameters/FiltersMinIdParameter'
        - $ref: '#/components/parameters/FiltersMaxIdParameter'
        - $ref: '#/components/parameters/FiltersMetadataParameter'
        - $ref: '#/components/parameters/FiltersMinDateParameter'
        - $ref: '#/components/parameters/FiltersMaxDateParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClassifyJobResponsePage'
  /api/{projectId}/classify/anomaly-gmm/{blockId}/{sampleId}:
    get:
      summary: Classify sample by learn block
      description: >-
        This API is deprecated, use classifySampleByLearnBlockV2
        (`/v1/api/{projectId}/classify/anomaly-gmm/v2/{blockId}/{sampleId}`)
        instead. Classify a complete file against the specified learn block.
        This will move the sliding window (dependent on the sliding window
        length and the sliding window increase parameters in the impulse) over
        the complete file, and classify for every window that is extracted.
      operationId: classifySampleByLearnBlock
      tags:
        - Classify
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
        - $ref: '#/components/parameters/BlockIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClassifySampleResponse'
  /api/{projectId}/classify/anomaly-gmm/v2/{blockId}/{sampleId}:
    post:
      summary: Classify sample by learn block
      description: >
        Classify a complete file against the specified learn block. This will
        move the sliding window

        (dependent on the sliding window length and the sliding window increase
        parameters in the impulse)

        over the complete file, and classify for every window that is extracted.
        Depending on the size of your

        file, whether your sample is resampled, and whether the result is cached
        you'll get either the result

        or a job back. If you receive a job, then wait for the completion of the
        job, and then call this

        function again to receive the results. The unoptimized (float32) model
        is used by default, and

        classification with an optimized (int8) model can be slower.
      operationId: classifySampleByLearnBlockV2
      tags:
        - Classify
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
        - $ref: '#/components/parameters/BlockIdParameter'
        - $ref: '#/components/parameters/ModelVariantParameter'
        - $ref: '#/components/parameters/TruncateStructuredLabelsParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ClassifySampleResponse'
                  - $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/classify/image:
    post:
      summary: Classify an image
      description: Test out a trained impulse (using a posted image).
      operationId: classifyImage
      tags:
        - Classify
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadImageRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestPretrainedModelResponse'
  /api/{projectId}/performance-calibration/status:
    get:
      summary: Get status
      description: Get performance calibration status
      operationId: getPerformanceCalibrationStatus
      tags:
        - PerformanceCalibration
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPerformanceCalibrationStatusResponse'
  /api/{projectId}/performance-calibration/ground-truth:
    get:
      summary: Get ground truth
      description: Get performance calibration ground truth data
      operationId: getPerformanceCalibrationGroundTruth
      tags:
        - PerformanceCalibration
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetPerformanceCalibrationGroundTruthResponse
  /api/{projectId}/performance-calibration/raw-result:
    get:
      summary: Get raw result
      description: Get performance calibration raw result
      operationId: getPerformanceCalibrationRawResult
      tags:
        - PerformanceCalibration
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: File
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetPerformanceCalibrationRawResultResponse
  /api/{projectId}/performance-calibration/parameter-sets:
    get:
      summary: Get parameter sets
      description: Get performance calibration parameter sets
      operationId: getPerformanceCalibrationParameterSets
      tags:
        - PerformanceCalibration
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: File
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetPerformanceCalibrationParameterSetsResponse
  /api/{projectId}/performance-calibration/parameters:
    get:
      summary: Get parameters
      description: Get performance calibration stored parameters
      operationId: getPerformanceCalibrationSavedParameters
      tags:
        - PerformanceCalibration
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetPerformanceCalibrationParametersResponse
    post:
      summary: Save performance calibration parameters
      description: Set the current performance calibration parameters
      operationId: setPerformanceCalibrationSavedParameters
      tags:
        - PerformanceCalibration
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/PerformanceCalibrationSaveParameterSetRequest
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
    delete:
      summary: Clear performance calibration parameters
      description: Clears the current performance calibration parameters
      operationId: deletePerformanceCalibrationSavedParameters
      tags:
        - PerformanceCalibration
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/performance-calibration/wav:
    get:
      summary: Get WAV file
      description: Get the synthetic sample as a WAV file
      operationId: getWavFile
      tags:
        - PerformanceCalibration
      x-middleware:
        - SupportsRange
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: Wav file
          content:
            audio/wav:
              schema:
                type: string
                format: binary
  /api/{projectId}/performance-calibration/files:
    post:
      summary: Upload Performance Calibration Audio files
      description: >-
        Upload a zip files with a wav file and its Label metadata to run
        performance calibration on it.
      operationId: uploadLabeledAudio
      tags:
        - PerformanceCalibration
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/PerformanceCalibrationUploadLabeledAudioRequest
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PerformanceCalibrationUploadLabeledAudioResponse
  /api/{projectId}/performance-calibration/clear:
    post:
      summary: Clear Performance Calibration state
      description: >-
        Deletes all state related to performance calibration (used in tests for
        example).
      operationId: clearPerformanceCalibrationState
      tags:
        - PerformanceCalibration
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/post-processing/{postProcessingId}:
    get:
      summary: Get post-processing block config
      description: >-
        Retrieve the configuration parameters for a post-processing block. Use
        the impulse functions to retrieve all post-processing blocks.
      operationId: getPostProcessingConfig
      tags:
        - PostProcessing
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/PostProcessingIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostProcessingConfigResponse'
    post:
      summary: Set post-processing block config
      description: >-
        Set configuration parameters for a post-processing block. Only values
        set in the body will be overwritten.
      operationId: setPostProcessingConfig
      tags:
        - PostProcessing
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/PostProcessingIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostProcessingConfigRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/post-processing/{postProcessingId}/samples/{sampleId}:
    post:
      summary: Check post-processing results for sample
      description: >-
        Retrieve post-processing results for a specific sample, e.g. whether it
        has generated features already.
      operationId: getPostProcessingResultsForSample
      tags:
        - PostProcessing
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/PostProcessingIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostProcessingFeaturesForSampleRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPostProcessingResultsForSampleResponse'
  /api/{projectId}/post-processing/{postProcessingId}/samples/{sampleId}/classify:
    post:
      summary: Classify sample with post-processing
      description: >-
        Classify a sample using post-processing parameters. Sample should be in
        the post-processing dataset.
      operationId: generatePostProcessingFeaturesForSample
      tags:
        - PostProcessing
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/PostProcessingIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostProcessingFeaturesForSampleRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: >-
                      #/components/schemas/GetPostProcessingFeaturesForSampleResponse
                  - $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/jobs/post-processing:
    post:
      summary: Post-processing
      description: Begins post processing job
      operationId: startPostProcessingJob
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartPostProcessingRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/deployment/targets:
    get:
      summary: Deployment targets
      description: List deployment targets for a project
      operationId: listDeploymentTargetsForProject
      x-oauth-scopes:
        - deployments:read
      tags:
        - Deployment
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectDeploymentTargetsResponse'
  /api/{projectId}/deployment/targets/data-sources:
    get:
      summary: Deployment targets (data sources)
      description: >-
        List deployment targets for a project from data sources page  (it shows
        some things like all Linux deploys, and hides 'fake' deploy targets like
        mobile phone / computer)
      operationId: listDeploymentTargetsForProjectDataSources
      x-oauth-scopes:
        - deployments:read
      tags:
        - Deployment
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeploymentTargetsResponse'
  /api/{projectId}/deployment/evaluate:
    get:
      summary: Evaluate job result
      description: >-
        Get evaluate job result, containing detailed performance statistics for
        every possible variant of the impulse.
      operationId: getEvaluateJobResult
      x-oauth-scopes:
        - deployments:read
      tags:
        - Deployment
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EvaluateJobResponse'
  /api/{projectId}/deployment/evaluate/cache:
    get:
      summary: Check evaluate job result (cache)
      description: >-
        Get evaluate job result, containing detailed performance statistics for
        every possible variant of the impulse. This only checks cache, and
        throws an error if there is no data in cache.
      operationId: getEvaluateJobResultCache
      x-oauth-scopes:
        - deployments:read
      tags:
        - Deployment
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EvaluateJobResponse'
  /api/{projectId}/deployment:
    get:
      summary: Get deployment info
      description: Gives information on whether a deployment was already built for a type
      operationId: getDeployment
      x-oauth-scopes:
        - deployments:read
      tags:
        - Deployment
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DeploymentTypeParameter'
        - $ref: '#/components/parameters/ModelTypeParameter'
        - $ref: '#/components/parameters/ModelEngineParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDeploymentResponse'
  /api/{projectId}/deployment/download:
    get:
      summary: Download
      description: >-
        DEPRECATED, use downloadHistoricDeployment instead. Download the build
        artefacts for a project.
      operationId: downloadBuild
      x-oauth-scopes:
        - deployments:read
      tags:
        - Deployment
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DeploymentTypeParameter'
        - $ref: '#/components/parameters/ModelTypeParameter'
        - $ref: '#/components/parameters/ModelEngineParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: ZIP or BIN file
          content:
            application/zip:
              schema:
                type: string
                format: binary
  /api/{projectId}/deployment/last:
    get:
      summary: Get information on the last deployment build
      description: >-
        Get information on the result of the last successful deployment job,
        including info on the build e.g. whether it is still valid.
      operationId: getLastDeploymentBuild
      x-oauth-scopes:
        - deployments:read
      tags:
        - Deployment
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetLastDeploymentBuildResponse'
  /api/{projectId}/deployment/syntiant/posterior:
    get:
      summary: Get Syntiant posterior parameters
      description: Get the current posterior parameters for the Syntiant deployment target
      operationId: getSyntiantPosterior
      x-oauth-scopes:
        - deployments:read
      tags:
        - Deployment
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSyntiantPosteriorResponse'
    post:
      summary: Set Syntiant posterior parameters
      description: Set the current posterior parameters for the Syntiant deployment target
      operationId: setSyntiantPosterior
      x-oauth-scopes:
        - deployments:update
      tags:
        - Deployment
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetSyntiantPosteriorRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/jobs/find-syntiant-posterior:
    post:
      summary: Find Syntiant posterior parameters
      description: >-
        Automatically find the current posterior parameters for the Syntiant
        deployment target
      operationId: findSyntiantPosterior
      tags:
        - Deployment
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FindSyntiantPosteriorRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/deployment/history:
    get:
      summary: List deployment history
      description: Lists all successfully built deployments.
      operationId: listDeploymentHistory
      x-oauth-scopes:
        - deployments:read
      tags:
        - Deployment
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/FilterByImpulseIdParameter'
        - $ref: '#/components/parameters/LimitResultsParameter'
        - $ref: '#/components/parameters/OffsetResultsParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListDeploymentHistoryResponse'
  /api/{projectId}/deployment/history/{deploymentVersion}:
    get:
      summary: Get historic deployment
      description: Get info about a previously built deployment.
      operationId: getHistoricDeployment
      x-oauth-scopes:
        - deployments:read
      tags:
        - Deployment
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DeploymentVersionParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDeploymentHistoryResponse'
  /api/{projectId}/deployment/history/{deploymentVersion}/download:
    get:
      summary: Download historic deployment
      description: >-
        Download a previously built deployment (use listDeploymentHistory to see
        all deployments).
      operationId: downloadHistoricDeployment
      x-oauth-scopes:
        - deployments:read
      tags:
        - Deployment
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DeploymentVersionParameter'
      responses:
        '200':
          description: ZIP or BIN file
          content:
            application/zip:
              schema:
                type: string
                format: binary
  /api/{projectId}/jobs/data-explorer-features:
    post:
      summary: Generate data explorer features
      description: Generate features for the data explorer
      operationId: generateDataExplorerFeatures
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/jobs/data-quality-metrics:
    post:
      summary: Calculate data quality metrics. Only available for EI staff.
      description: Calculate data quality metrics for the dataset
      operationId: calculateDataQualityMetrics
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CalculateDataQualityMetricsRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/jobs/retry-migrate-impulse:
    post:
      summary: Retry impulse migration
      description: >-
        If an impulse migration previously failed, use this function to retry
        the job.
      operationId: retryImpulseMigration
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/jobs/synthetic-data:
    post:
      summary: Create synthetic data
      description: Generate new synthetic data
      operationId: createSyntheticDataJob
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSyntheticDataRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/jobs/ai-actions/{actionId}/preview:
    post:
      summary: Create preview AI Actions job
      description: >-
        Do a dry-run of an AI Actions job over a subset of data. This will
        instruct the block to propose changes to data items (via
        "setSampleProposedChanges") rather than apply the changes directly.
      operationId: createPreviewAIActionsJob
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/ActionIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePreviewAIActionsJobRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/jobs/ai-actions/{actionId}:
    post:
      summary: Create AI Actions job
      description: >-
        Run an AI Actions job over a subset of data. This will instruct the
        block to apply the changes directly to your dataset. To preview, use
        "createPreviewAIActionsJob". To set the config use `updateAIAction`.
      operationId: createAIActionsJob
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/ActionIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/optimize/runs:
    get:
      summary: List all tuner runs
      description: List all the tuner runs for a project.
      operationId: listTunerRuns
      tags:
        - Optimization
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTunerRunsResponse'
  /api/{projectId}/optimize/config:
    get:
      summary: Get config
      description: Get config
      operationId: getConfig
      tags:
        - Optimization
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OptimizeConfigResponse'
    post:
      summary: Update config
      description: Update config
      operationId: updateConfig
      tags:
        - Optimization
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OptimizeConfig'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/optimize/all-learn-blocks:
    get:
      summary: Get all available learn blocks
      description: Get all available learn blocks
      operationId: getAllLearnBlocks
      tags:
        - Optimization
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllLearnBlocksResponse'
  /api/{projectId}/optimize/window-settings:
    get:
      summary: Get window settings
      description: Get window settings
      operationId: getWindowSettings
      tags:
        - Optimization
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WindowSettingsResponse'
  /api/{projectId}/optimize/{jobId}/create-trial:
    post:
      summary: Create trial
      description: Create trial
      operationId: createTrial
      tags:
        - Optimization
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/JobIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TunerCreateTrialImpulse'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/optimize/{jobId}/complete-search:
    post:
      summary: Complete EON tuner run
      description: Complete EON tuner run and mark it as succesful
      operationId: completeSearch
      tags:
        - Optimization
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/JobIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TunerCompleteSearch'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/optimize/space:
    get:
      summary: Search space
      description: Search space
      operationId: getSpace
      tags:
        - Optimization
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OptimizeSpaceResponse'
  /api/{projectId}/optimize/state:
    get:
      summary: Retrieves the EON tuner state
      description: Retrieves the EON tuner state
      operationId: getState
      tags:
        - Optimization
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: Current EON tuner state
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OptimizeStateResponse'
    delete:
      summary: Delete EON tuner state
      description: Completely clears the EON tuner state for this project.
      operationId: deleteState
      tags:
        - Optimization
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/optimize/dsp-parameters:
    get:
      summary: Retrieves DSP block parameters
      description: Retrieves DSP block parameters
      operationId: getDspParameters
      tags:
        - Optimization
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptimizeOrganizationIdParameter'
        - $ref: '#/components/parameters/OptimizeOrganizationDspIdParameter'
      responses:
        '200':
          description: DSP parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OptimizeDSPParametersResponse'
  /api/{projectId}/optimize/transfer-learning-models:
    get:
      summary: Retrieves available transfer learning models
      description: Retrieves available transfer learning models
      operationId: getTransferLearningModels
      tags:
        - Optimization
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OptimizeTransferLearningModelsResponse'
  /api/{projectId}/optimize/all-blocks:
    get:
      summary: Get impulse blocks
      description: >-
        Lists all possible blocks that can be used in the impulse, including any
        additional information required by the EON tuner that the
        getImpulseBlocks endpoint does not return
      operationId: getAllBlocks
      tags:
        - Optimization
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllBlocksResponse'
  /api/{projectId}/jobs/optimize:
    post:
      summary: Optimize model
      description: Evaluates optimal model architecture
      operationId: optimizeJob
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/TunerExtendedFromJobIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/jobs/set-tuner-primary-job:
    post:
      summary: Sets EON tuner primary model
      description: Sets EON tuner primary model
      operationId: setTunerPrimaryJob
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/TrialIdQueryParameter'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetTunerPrimaryJobRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/optimize/trial/{trialId}/stdout:
    get:
      summary: Get trial logs
      description: Get the logs for a trial.
      operationId: getTrialLogs
      tags:
        - Optimization
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/TrialIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogStdoutResponse'
  /api/{projectId}/optimize//{jobId}/trial/{trialId}/end-trial:
    get:
      summary: End EON tuner trial
      description: >-
        End an EON trial early. This can for example be used to implement early
        stopping.
      operationId: endTrial
      tags:
        - Optimization
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/JobIdParameter'
        - $ref: '#/components/parameters/TrialIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/optimize/{tunerCoordinatorJobId}/state:
    get:
      summary: Retrieves EON tuner state for a run.
      description: Retrieves the EON tuner state for a specific run.
      operationId: getTunerRunState
      tags:
        - Optimization
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/TunerCoordinatorJobIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OptimizeStateResponse'
  /api/{projectId}/optimize/{tunerCoordinatorJobId}:
    post:
      summary: Update EON tuner state
      description: Updates the EON tuner state for a specific run.
      operationId: updateTunerRun
      tags:
        - Optimization
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/TunerCoordinatorJobIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTunerRunRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/export/get-url:
    get:
      summary: Get URL of export
      description: Get the URL to the exported artefacts for an export job of a project.
      operationId: getExportUrl
      tags:
        - Export
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExportGetUrlResponse'
  /api/{projectId}/jobs:
    get:
      summary: List active jobs
      description: Get all active jobs for this project
      operationId: listActiveJobs
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OnlyRootJobsParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListJobsResponse'
  /api/{projectId}/jobs/history:
    get:
      summary: List finished jobs
      description: Get all finished jobs for this project
      operationId: listFinishedJobs
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalStartDateParameter'
        - $ref: '#/components/parameters/OptionalEndDateParameter'
        - $ref: '#/components/parameters/LimitResultsParameter'
        - $ref: '#/components/parameters/OffsetResultsParameter'
        - $ref: '#/components/parameters/OnlyRootJobsParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListJobsResponse'
  /api/{projectId}/jobs/all:
    get:
      summary: List all jobs
      description: Get all jobs for this project
      operationId: listAllJobs
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalStartDateParameter'
        - $ref: '#/components/parameters/OptionalEndDateParameter'
        - $ref: '#/components/parameters/LimitResultsParameter'
        - $ref: '#/components/parameters/OffsetResultsParameter'
        - $ref: '#/components/parameters/OnlyRootJobsParameter'
        - $ref: '#/components/parameters/OptionalJobsKeyParameter'
        - $ref: '#/components/parameters/OptionalJobsCategoryParameter'
        - $ref: '#/components/parameters/OptionalJobsFinishedParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListJobsResponse'
  /api/{projectId}/jobs/summary:
    get:
      summary: Job summary
      description: >-
        Get a summary of jobs, grouped by key. Used to report to users how much
        compute they've used.
      operationId: getJobsSummary
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/RequiredStartDateParameter'
        - $ref: '#/components/parameters/RequiredEndDateParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobSummaryResponse'
  /api/{projectId}/jobs/impulse-migration/status:
    get:
      summary: Get impulse migration status
      description: >-
        Get the status for the multi-impulse migration job in this project. This
        is a separate route so public projects can access it. If no
        multi-impulse migration jobs are present, an error will be thrown.
      operationId: getImpulseMigrationJobStatus
      tags:
        - Jobs
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetJobResponse'
  /api/{projectId}/jobs/impulse-migration/stdout:
    get:
      summary: Get impulse migration logs
      description: >-
        Get the logs for the multi-impulse migration job in this project. This
        is a separate route so public projects can access it. If no
        multi-impulse migration jobs are present, an error will be thrown.
      operationId: getImpulseMigrationJobsLogs
      tags:
        - Jobs
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/LimitResultsParameter'
        - $ref: '#/components/parameters/LogLevelParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogStdoutResponse'
  /api/{projectId}/jobs/{jobId}/update:
    post:
      summary: Update job
      description: Update a job.
      operationId: updateJob
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/JobIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateJobRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/jobs/{jobId}/status:
    get:
      summary: Get job status
      description: Get the status for a job.
      operationId: getJobStatus
      tags:
        - Jobs
      x-oauth-scopes:
        - jobs:read
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/JobIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetJobResponse'
  /api/{projectId}/jobs/{jobId}/stdout:
    get:
      summary: Get logs
      description: Get the logs for a job.
      operationId: getJobsLogs
      x-oauth-scopes:
        - jobs:read
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/JobIdParameter'
        - $ref: '#/components/parameters/LimitResultsParameter'
        - $ref: '#/components/parameters/LogLevelParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogStdoutResponse'
  /api/{projectId}/jobs/{jobId}/stdout/download:
    get:
      summary: Download logs
      description: Download the logs for a job (as a text file).
      operationId: downloadJobsLogs
      x-oauth-scopes:
        - jobs:read
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/JobIdParameter'
        - $ref: '#/components/parameters/LimitResultsParameter'
        - $ref: '#/components/parameters/LogLevelParameter'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                type: string
  /api/{projectId}/jobs/{jobId}/cancel:
    post:
      summary: Cancel job
      description: Cancel a running job.
      operationId: cancelJob
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/JobIdParameter'
        - $ref: '#/components/parameters/ForceCancelParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/jobs/generate-features:
    post:
      summary: Generate features
      description: >-
        Take the raw training set and generate features from them. Updates are
        streamed over the websocket API.
      operationId: generateFeaturesJob
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateFeaturesRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/jobs/autotune-dsp:
    post:
      summary: Autotune DSP parameters
      description: >-
        Autotune DSP block parameters. Updates are streamed over the websocket
        API.
      operationId: autotuneDspJob
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AutotuneDspRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/jobs/train/keras/{learnId}:
    post:
      summary: Train model (Keras)
      description: >-
        Take the output from a DSP block and train a neural network using Keras.
        Updates are streamed over the websocket API.
      operationId: trainKerasJob
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/LearnIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetKerasParameterRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/jobs/train/anomaly/{learnId}:
    post:
      summary: Train model (Anomaly)
      description: >-
        Take the output from a DSP block and train an anomaly detection model
        using K-means or GMM. Updates are streamed over the websocket API.
      operationId: trainAnomalyJob
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/LearnIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartTrainingRequestAnomaly'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/jobs/train/keras/{learnId}/export:
    post:
      summary: Export Keras block
      description: >-
        Export the training pipeline of a Keras block. Updates are streamed over
        the websocket API.
      operationId: exportKerasBlock
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/LearnIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/jobs/train/keras/{learnId}/data:
    post:
      summary: Export Keras block data
      description: >-
        Export the data of a Keras block (already split in train/validate data).
        Updates are streamed over the websocket API.
      operationId: exportKerasBlockData
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/LearnIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExportKerasBlockDataRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/jobs/build-ondevice-model:
    post:
      summary: Build on-device model
      description: >-
        Generate code to run the impulse on an embedded device. When this step
        is complete use `downloadHistoricDeployment` to download the artefacts.
        Updates are streamed over the websocket API.
      operationId: buildOnDeviceModelJob
      tags:
        - Jobs
      x-oauth-scopes:
        - deployments:create
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/DeploymentTypeParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BuildOnDeviceModelRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BuildOnDeviceModelResponse'
  /api/{projectId}/jobs/build-ondevice-model/organization:
    post:
      summary: Build organizational on-device model
      description: >-
        Generate code to run the impulse on an embedded device using an
        organizational deployment block. When this step is complete use
        `downloadHistoricDeployment` to download the artefacts.  Updates are
        streamed over the websocket API.
      operationId: buildOrganizationOnDeviceModelJob
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BuildOrganizationOnDeviceModelRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BuildOnDeviceModelResponse'
  /api/{projectId}/jobs/export/original:
    post:
      summary: Export original data
      description: >-
        Export all the data in the project as it was uploaded to Edge Impulse. 
        Updates are streamed over the websocket API.
      operationId: startOriginalExportJob
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExportOriginalDataRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/jobs/export/wav:
    post:
      summary: Export data as WAV
      description: >-
        Export all the data in the project in WAV format.  Updates are streamed
        over the websocket API.
      operationId: startWavExportJob
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExportWavDataRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/jobs/retrain:
    post:
      summary: Retrain
      description: >-
        Retrains the current impulse with the last known parameters. Updates are
        streamed over the websocket API.
      operationId: startRetrainJob
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/jobs/classify:
    post:
      summary: Classify
      description: >-
        Classifies all items in the testing dataset against the current impulse.
        Updates are streamed over the websocket API.
      operationId: startClassifyJob
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartClassifyJobRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/jobs/performance-calibration:
    post:
      summary: Performance Calibration
      description: Simulates real world usage and returns performance metrics.
      operationId: startPerformanceCalibrationJob
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartPerformanceCalibrationRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/jobs/evaluate:
    post:
      summary: Evaluate
      description: >-
        Evaluates every variant of the current impulse. Updates are streamed
        over the websocket API.
      operationId: startEvaluateJob
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/jobs/version:
    post:
      summary: Version project
      description: >-
        Create a new version of the project. This stores all data and
        configuration offsite. If you have access to the enterprise version of
        Edge Impulse you can store your data in your own storage buckets (only
        through JWT token authentication).
      operationId: startVersionJob
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectVersionRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/jobs/restore:
    post:
      summary: Restore project to version
      description: >-
        Restore a project to a certain version. This can only applied to a
        project without data, and will overwrite your impulse and all settings.
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: startRestoreJob
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RestoreProjectRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/jobs/restore/from-public:
    post:
      summary: Restore project to public version
      description: >-
        Restore a project to a certain public version. This can only applied to
        a project without data, and will overwrite your impulse and all
        settings.
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: startRestoreJobFromPublic
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RestoreProjectFromPublicRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/jobs/versions/{versionId}/make-public:
    post:
      summary: Make a version public
      description: >-
        Make a version of a project public. This makes all data and state
        available (read-only) on a public URL, and allows users to clone this
        project.
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/VersionIdParameter'
      operationId: startMakeVersionPublicJob
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/jobs/keywords-noise:
    post:
      summary: Add keywords and noise
      description: Add keywords and noise data to a project (for getting started guide)
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: startKeywordsNoiseJob
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/jobs/profile-tflite:
    post:
      summary: Profile TFLite model
      description: >-
        Takes in a TFLite model and returns the latency, RAM and ROM used for
        this model. Updates are streamed over the websocket API (or can be
        retrieved through the /stdout endpoint). Use getProfileTfliteJobResult
        to get the results when the job is completed.
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: startProfileTfliteJob
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProfileTfLiteRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/jobs/deploy-pretrained-model:
    post:
      summary: Deploy pretrained model
      description: >-
        Takes in a TFLite file and builds the model and SDK. Updates are
        streamed over the websocket API (or can be retrieved through the /stdout
        endpoint). Use getProfileTfliteJobResult to get the results when the job
        is completed.
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      operationId: startDeployPretrainedModelJob
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeployPretrainedModelRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/jobs/profile-tflite/{jobId}/result:
    get:
      summary: Get TFLite profile result (GET)
      description: >-
        Get the results from a job started from startProfileTfliteJob (via a GET
        request).
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/JobIdParameter'
      operationId: getProfileTfliteJobResult
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProfileTfLiteResponse'
    post:
      summary: Get TFLite profile result (POST)
      description: >-
        Get the results from a job started from startProfileTfliteJob (via a
        POST request).
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/JobIdParameter'
      operationId: getProfileTfliteJobResultViaPostRequest
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProfileTfLiteResponse'
  /api/{projectId}/jobs/import-data-from-project:
    post:
      summary: Import data from another project
      description: >-
        Adds all data from an existing project into this project. This function
        is only available through a JWT token; and you can only add data from
        projects that you're a collaborator on.
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: startImportDataFromProjectJob
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImportDataFromAnotherProjectJobRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/integrations/tensorboard/start:
    post:
      summary: Start TensorBoard integration
      description: Start a TensorBoard session for the requested learn blocks
      operationId: startTensorBoardSession
      tags:
        - Integrations
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartTensorBoardSessionRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartIntegrationSessionResponse'
  /api/{projectId}/integrations/tensorboard/{resourceId}:
    get:
      summary: Get TensorBoard session status
      description: Get the status of a TensorBoard session
      operationId: getTensorBoardSessionStatus
      tags:
        - Integrations
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/IntegrationResourceIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetIntegrationSessionStatusResponse'
  /api/organizations:
    get:
      summary: List active organizations
      x-skip-route: true
      description: >-
        Retrieve list of organizations that a user is a part of. If
        authenticating using JWT token this lists all the organizations the user
        has access to, if authenticating using an API key, this only lists that
        organization.
      tags:
        - Organizations
      operationId: listOrganizations
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOrganizationsResponse'
  /api/organizations/{organizationId}:
    get:
      summary: Organization information
      description: List all information about this organization.
      tags:
        - Organizations
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: getOrganizationInfo
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationInfoResponse'
    post:
      summary: Update organization
      description: Update organization properties such as name and logo.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: updateOrganization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrganizationRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
    delete:
      summary: Remove organization
      description: >-
        Remove the current organization, and all data associated with it. This
        is irrevocable!
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: deleteOrganization
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/trial/request-extension:
    post:
      summary: Request trial extension
      description: Request an extension for an enterprise trial.
      tags:
        - Organizations
      operationId: requestEnterpriseTrialExtension
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnterpriseUpgradeOrTrialExtensionRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/metrics:
    get:
      summary: Organization metrics
      description: Get general metrics for this organization.
      tags:
        - Organizations
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/ExcludeEdgeImpulseUsersParameter'
        - $ref: '#/components/parameters/ProjectVisibilityParameter'
      operationId: getOrganizationMetrics
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationMetricsResponse'
  /api/organizations/{organizationId}/request-hr-block-license:
    post:
      summary: Request HR block license
      description: >-
        Request a license required for the deployment of an impulse containing
        the Edge Impulse HR block.
      tags:
        - Organizations
      operationId: requestEnterpriseHrBlockLicense
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/limits-request:
    post:
      summary: Request organization limits increase
      description: >-
        Request an increase in the limits for this organization. Available
        limits are: users, projects, compute, storage.
      tags:
        - Organizations
      operationId: requestEnterpriseLimitsIncrease
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnterpriseLimitsIncreaseRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/whitelabel:
    get:
      summary: White Label Admin - Get white label information
      description: White label admin only API to get the white label information.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminGetInfo
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetWhitelabelResponse'
    put:
      summary: White Label Admin - Update white label information
      description: White label admin only API to update the white label information.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: whitelabelAdminUpdateInfo
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWhitelabelRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/whitelabel/deploymentTargets:
    post:
      summary: White Label Admin - Update deployment targets
      description: >-
        White label admin only API to update some or all of the deployment
        targets enabled for this white label.
      operationId: whitelabelAdminUpdateDeploymentTargets
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWhitelabelDeploymentTargetsRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/whitelabel/deploymentTargets/default:
    post:
      summary: White Label Admin - Update default deployment target
      description: >-
        White label admin only API to update the default deployment target for
        this white label.
      operationId: whitelabelAdminUpdateDefaultDeploymentTarget
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/UpdateWhitelabelDefaultDeploymentTargetRequest
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/whitelabel/deploymentOptionsOrder:
    post:
      summary: >-
        White Label Admin - Update the order of deployment options in the
        deployment view
      description: >-
        White label admin only API to customize the order of deployment options
        in the deployment view for this white label.
      operationId: whitelabelAdminUpdateDeploymentOptionsOrder
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/UpdateWhitelabelDeploymentOptionsOrderRequest
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/whitelabel/learningBlocks:
    post:
      summary: White Label Admin - Update learning blocks
      description: >-
        White label admin only API to update some or all of the learning blocks
        enabled for this white label.
      operationId: whitelabelAdminUpdateLearningBlocks
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWhitelabelLearningBlocksRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/whitelabel/theme/logo:
    post:
      summary: White Label Admin - Update theme logo
      description: White label admin only API to update the white label theme logo.
      operationId: whitelabelAdminUpdateThemeLogo
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadAssetRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadAssetResponse'
  /api/organizations/{organizationId}/whitelabel/theme/deviceLogo:
    post:
      summary: White Label Admin - Update theme device logo
      description: White label admin only API to update the white label theme device logo.
      operationId: whitelabelAdminUpdateThemeDeviceLogo
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadAssetRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadAssetResponse'
  /api/organizations/{organizationId}/whitelabel/theme/colors:
    post:
      summary: White Label Admin - Update theme colors
      description: White label admin only API to update some or all theme colors.
      operationId: whitelabelAdminUpdateThemeColors
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateThemeColorsRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/whitelabel/theme/favicon:
    post:
      summary: White Label Admin - Update theme favicon
      description: White label admin only API to update the theme favicon.
      operationId: whitelabelAdminUpdateThemeFavicon
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadImageRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/whitelabel/metrics:
    get:
      summary: White Label Admin - Get global white label metrics
      description: White label admin only API to get global metrics.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminGetMetrics
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminGetMetricsResponse'
  /api/organizations/{organizationId}/whitelabel/users:
    get:
      summary: White Label Admin - Get all white label users
      description: White label admin only API to get the list of all registered users.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminGetUsers
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/FiltersActiveParameter'
        - $ref: '#/components/parameters/FiltersTierParameter'
        - $ref: '#/components/parameters/FieldsParameter'
        - $ref: '#/components/parameters/SortQueryParameter'
        - $ref: '#/components/parameters/FiltersQueryParameter'
        - $ref: '#/components/parameters/LimitResultsParameter'
        - $ref: '#/components/parameters/OffsetResultsParameter'
        - $ref: '#/components/parameters/SearchQueryParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminGetUsersResponse'
  /api/organizations/{organizationId}/whitelabel/users/{userId}:
    get:
      summary: White Label Admin - Get a white label user
      description: White label admin only API to get information about a user.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminGetUser
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/UserIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminGetUserResponse'
    post:
      summary: White Label Admin - Update white label user
      description: White label admin only API to update user properties.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminUpdateUser
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/UserIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdminUpdateUserRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
    delete:
      summary: Delete a user
      description: White label admin only API to delete a user.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminDeleteUser
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/UserIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/whitelabel/users/{userId}/metrics:
    get:
      summary: White Label Admin - Get white label user metrics
      description: White label admin only API to get marketing metrics about a user.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminGetUserMetrics
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/UserIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminGetUserMetricsResponse'
  /api/organizations/{organizationId}/whitelabel/users/{userId}/jobs:
    get:
      summary: White Label Admin - Get user jobs
      description: >-
        White label admin only  API to get the list of all project jobs for a
        user.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminGetUserJobs
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/UserIdParameter'
        - $ref: '#/components/parameters/LimitResultsParameter'
        - $ref: '#/components/parameters/OffsetResultsParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListJobsResponse'
  /api/organizations/{organizationId}/whitelabel/projects:
    get:
      summary: White Label Admin - Get all white label projects
      description: White label admin only API to get the list of all projects.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminGetProjects
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/FiltersActiveParameter'
        - $ref: '#/components/parameters/SortQueryParameter'
        - $ref: '#/components/parameters/FiltersQueryParameter'
        - $ref: '#/components/parameters/LimitResultsParameter'
        - $ref: '#/components/parameters/OffsetResultsParameter'
        - $ref: '#/components/parameters/SearchQueryParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminListProjectsResponse'
    post:
      summary: White Label Admin - Create a new project within white label context.
      description: >-
        Create a new free tier project. This is an API only available to white
        label admins.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminCreateProject
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdminCreateProjectRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateProjectResponse'
  /api/organizations/{organizationId}/whitelabel/projects/{projectId}:
    get:
      summary: White Label Admin - Get a white label project
      description: White label admin only API to get project information.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminGetProject
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminProjectInfoResponse'
    post:
      summary: White Label Admin - Update white label project
      description: White label admin only API to update project properties.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminUpdateProject
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/ProjectIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateProjectRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
    delete:
      summary: White Label Admin - Delete a project
      description: White label admin only API to delete a project.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminDeleteProject
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/ProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/organizations/{organizationId}/whitelabel/projects/{projectId}/apiKeys:
    post:
      summary: White Label Admin - Add Project API key
      description: >-
        White label admin only API to add an API key to a project. Add a
        temporary API key that can be used to make Projects API
        (/api/projects/{projectId}/) requests on behalf of the project admin.
        These API keys are not visible to the project itself and have a
        customizable TTL defaulting to 1 minute.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminAddProjectApiKey
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/ProjectIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdminAddProjectApiKeyRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddApiKeyResponse'
  /api/organizations/{organizationId}/whitelabel/projects/{projectId}/members:
    post:
      summary: White Label Admin - Add user to a project
      description: >-
        DEPRECATED. White label admin only API to add a user to a project. If no
        user is provided, the current user is used.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: whitelabelAdminAddUserToProject
      deprecated: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdminAddProjectUserRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/whitelabel/projects/{projectId}/members/{userId}:
    delete:
      summary: White Label Admin - Remove user from a project
      description: DEPRECATED. White label admin only API to remove a user from a project.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/UserIdParameter'
      operationId: whitelabelAdminRemoveUserFromProject
      deprecated: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/whitelabel/projects/{projectId}/jobs:
    get:
      summary: White Label Admin - Get project jobs
      description: White label admin only API to get the list of all jobs for a project.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/LimitResultsParameter'
        - $ref: '#/components/parameters/OffsetResultsParameter'
      operationId: whitelabelAdminGetProjectJobs
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListJobsResponse'
  /api/organizations/{organizationId}/whitelabel/development-boards:
    post:
      summary: White Label Admin - Add a development board to a whitelabel
      description: White label admin only API to add a development board.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: whitelabelAdminAddDevelopmentBoard
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DevelopmentBoardRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityCreatedResponse'
  /api/organizations/{organizationId}/whitelabel/development-boards/{developmentBoardId}:
    put:
      summary: White Label Admin - Update a development board in a whitelabel
      description: White label admin only API to update a development board.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/DevelopmentBoardIdParameter'
      operationId: whitelabelAdminUpdateDevelopmentBoard
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DevelopmentBoardRequestUpdate'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
    delete:
      summary: White Label Admin - Remove a development board from a whitelabel
      description: White label admin only API to remove a development board.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/DevelopmentBoardIdParameter'
      operationId: whitelabelAdminRemoveDevelopmentBoard
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/whitelabel/development-boards/{developmentBoardId}/image:
    post:
      summary: White Label Admin - Update the image of a whitelabel development board
      description: White label admin only API to update the image of a development board.
      operationId: whitelabelAdminUpdateDevelopmentBoardImage
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/DevelopmentBoardIdParameter'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadAssetRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadAssetResponse'
  /api/organizations/{organizationId}/whitelabel/organizations:
    get:
      summary: White Label Admin - Get all organizations within a white label
      description: White label admin only API to get the list of all organizations.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminGetOrganizations
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/FiltersActiveParameter'
        - $ref: '#/components/parameters/FiltersIncludeDeletedParameter'
        - $ref: '#/components/parameters/SortQueryParameter'
        - $ref: '#/components/parameters/FiltersQueryParameter'
        - $ref: '#/components/parameters/LimitResultsParameter'
        - $ref: '#/components/parameters/OffsetResultsParameter'
        - $ref: '#/components/parameters/SearchQueryParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminGetOrganizationsResponse'
    post:
      summary: White Label Admin - Create new organization within white label context
      description: >-
        Create a new organization. This is an API only available to white label
        admins
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminCreateOrganization
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WhitelabelAdminCreateOrganizationRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateOrganizationResponse'
  /api/organizations/{organizationId}/whitelabel/organizations/{innerOrganizationId}/usage/computeTime:
    get:
      summary: White Label Admin - Get organization compute time usage
      description: >-
        Get compute time usage for an organization over a period of time. This
        is an API only available to white label admins
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminGetOrganizationComputeTimeUsage
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/InnerOrganizationIdParameter'
        - $ref: '#/components/parameters/RequiredStartDateParameter'
        - $ref: '#/components/parameters/RequiredEndDateParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/AdminGetOrganizationComputeTimeUsageResponse
  /api/organizations/{organizationId}/whitelabel/organizations/{innerOrganizationId}/usage/reports:
    get:
      summary: White Label Admin - Get all usage reports
      description: >-
        Get all usage reports for an organization. This is an API only available
        to white label admins.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminGetOrganizationUsageReports
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/InnerOrganizationIdParameter'
        - $ref: '#/components/parameters/LimitResultsParameter'
        - $ref: '#/components/parameters/OffsetResultsParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminGetReportsResponse'
    post:
      summary: White Label Admin - Creates a new usage report
      description: >-
        Create a new usage report for an organization. A job is created to
        process the report request and the job details are returned in the
        response. This is an API only available to white label admins.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminCreateOrganizationUsageReport
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/InnerOrganizationIdParameter'
        - $ref: '#/components/parameters/RequiredStartDateParameter'
        - $ref: '#/components/parameters/RequiredEndDateParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/organizations/{organizationId}/whitelabel/organizations/{innerOrganizationId}/usage/reports/{reportId}:
    get:
      summary: White Label Admin - Get usage report
      description: >-
        Get a usage report for an organization. This is an API only available to
        white label admins.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminGetOrganizationUsageReport
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/InnerOrganizationIdParameter'
        - $ref: '#/components/parameters/ReportIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminGetReportResponse'
    delete:
      summary: White Label Admin - Delete usage report
      description: >-
        Delete a usage report for an organization. This is an API only available
        to white label admins.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminDeleteOrganizationUsageReport
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/InnerOrganizationIdParameter'
        - $ref: '#/components/parameters/ReportIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/whitelabel/organizations/{innerOrganizationId}/usage/reports/{reportId}/download:
    get:
      summary: White Label Admin - Download usage report
      description: >-
        Download a usage report for an organization. This is an API only
        available to white label admins.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminDownloadOrganizationUsageReport
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/InnerOrganizationIdParameter'
        - $ref: '#/components/parameters/ReportIdParameter'
      responses:
        '302':
          description: A redirect to the CSV file
  /api/organizations/{organizationId}/whitelabel/organizations/{innerOrganizationId}/exports:
    get:
      summary: White Label Admin - Get all organization data exports
      description: >-
        Get all data exports for an organization. This is an API only available
        to white label admins.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminGetOrganizationExports
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/InnerOrganizationIdParameter'
        - $ref: '#/components/parameters/LimitResultsParameter'
        - $ref: '#/components/parameters/OffsetResultsParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOrganizationDataExportsResponse'
    post:
      summary: White Label Admin - Create a new organization data export
      description: >
        Create a new data export for an organization.

        A job is created to process the export request and the job details are
        returned in the response.

        This is an API only available to white label admins.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminCreateOrganizationExport
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/InnerOrganizationIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdminCreateOrganizationDataExportRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/organizations/{organizationId}/whitelabel/organizations/{innerOrganizationId}/exports/{exportId}:
    get:
      summary: White Label Admin - Get organization data export
      description: >-
        Get a data export for an organization. This is an API only available to
        white label admins.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminGetOrganizationExport
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/InnerOrganizationIdParameter'
        - $ref: '#/components/parameters/ExportIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOrganizationDataExportResponse'
    delete:
      summary: White Label Admin - Delete organization data export
      description: >-
        Delete a data export for an organization. This is an API only available
        to white label admins.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminDeleteOrganizationExport
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/InnerOrganizationIdParameter'
        - $ref: '#/components/parameters/ExportIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
    put:
      summary: White Label Admin - Update organization data export
      description: >-
        Update a data export for an organization. This is an API only available
        to white label admins.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminUpdateOrganizationExport
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/InnerOrganizationIdParameter'
        - $ref: '#/components/parameters/ExportIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdminUpdateOrganizationDataExportRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/whitelabel/organizations/{innerOrganizationId}/apiKeys:
    post:
      summary: White Label Admin - Add organization API key
      description: >-
        White label admin only API to add an API key to an organization. Add a
        temporary API key that can be used to make Organizations API
        (/api/organizations/{organizationId}/) requests on behalf of the
        organization. These API keys are not visible to the organization itself
        and have a customizable TTL defaulting to 1 minute.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminAddOrganizationApiKey
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/InnerOrganizationIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdminAddOrganizationApiKeyRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddApiKeyResponse'
  /api/organizations/{organizationId}/whitelabel/organizations/{innerOrganizationId}/members:
    post:
      summary: White Label Admin - Add user to an organization
      description: >-
        DEPRECATED. White label admin only API to add a user to an organization.
        If no user is provided, the current user is used.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/InnerOrganizationIdParameter'
      operationId: whitelabelAdminAddUserToOrganization
      deprecated: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdminAddOrganizationUserRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/whitelabel/organizations/{innerOrganizationId}/members/{userId}:
    delete:
      summary: White Label Admin - Remove user from an organization
      description: >-
        DEPRECATED. White label admin only API to remove a user from an
        organization.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/InnerOrganizationIdParameter'
        - $ref: '#/components/parameters/UserIdParameter'
      operationId: whitelabelAdminRemoveUserFromOrganization
      deprecated: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/whitelabel/organizations/{innerOrganizationId}:
    get:
      summary: White Label Admin - Get organization information
      description: >-
        White label admin only API to list all information about an
        organization.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminGetOrganizationInfo
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/InnerOrganizationIdParameter'
        - $ref: '#/components/parameters/FiltersIncludeDeletedParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminOrganizationInfoResponse'
    post:
      summary: White Label Admin - Update organization
      description: >-
        White label admin only API to update organization properties such as
        name and logo.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminUpdateOrganization
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/InnerOrganizationIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdminUpdateOrganizationRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
    delete:
      summary: White Label Admin - Delete an organization
      description: White label admin only API to delete an organization.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminDeleteOrganization
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/InnerOrganizationIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/organizations/{organizationId}/whitelabel/organizations/{innerOrganizationId}/restore:
    get:
      summary: White Label Admin - Restore an organization
      description: >
        White label admin only API to restore a deleted organization. All
        organization projects sharing the same deletion date as that of the
        organization will also be restored. If this is a trial organization that
        was never upgraded to a paid plan then the organization will be restored
        to its original trial state.
      tags:
        - Organizations
      operationId: whitelabelAdminRestoreOrganization
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/InnerOrganizationIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/whitelabel/organizations/{innerOrganizationId}/projects:
    post:
      summary: White Label Admin - Create a new organization project
      description: White label admin only API to create a new project for an organization.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminCreateOrganizationProject
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/InnerOrganizationIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdminCreateProjectRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateProjectResponse'
  /api/organizations/{organizationId}/whitelabel/organizations/{innerOrganizationId}/jobs:
    get:
      summary: White Label Admin - Get organization jobs
      description: >-
        White label admin only API to get the list of all jobs for a
        organization.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationRequiresWhitelabelAdmin
      operationId: whitelabelAdminGetOrganizationJobs
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/InnerOrganizationIdParameter'
        - $ref: '#/components/parameters/LimitResultsParameter'
        - $ref: '#/components/parameters/OffsetResultsParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListJobsResponse'
  /api/organizations/{organizationId}/logo:
    post:
      summary: Upload organization logo
      description: Uploads and updates the organization logo
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: uploadOrganizationLogo
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadAssetRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadAssetResponse'
  /api/organizations/{organizationId}/header:
    post:
      summary: Upload organization header image
      description: Uploads and updates the organization header image
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: uploadOrganizationHeader
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadAssetRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadAssetResponse'
  /api/organizations/{organizationId}/test-admin:
    get:
      summary: Admin endpoint
      description: Test endpoint that can only be reached with admin rights.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: testOrganizationAdmin
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/projects:
    get:
      summary: Get projects
      description: Retrieve all projects for the organization.
      tags:
        - Organizations
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: listOrganizationProjects
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListProjectsResponse'
  /api/organizations/{organizationId}/apikeys:
    get:
      summary: Get API keys
      description: >-
        Retrieve all API keys. This does **not** return the full API key, but
        only a portion (for security purposes).
      tags:
        - Organizations
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: listOrganizationApiKeys
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOrganizationApiKeysResponse'
    post:
      summary: Add API key
      description: Add an API key.
      tags:
        - Organizations
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: addOrganizationApiKey
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddOrganizationApiKeyRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddApiKeyResponse'
  /api/organizations/{organizationId}/apikeys/{apiKeyId}:
    delete:
      summary: Revoke API key
      description: Revoke an API key.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/ApiKeyIdParameter'
      operationId: revokeOrganizationApiKey
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/members/add:
    post:
      summary: Add member
      description: Add a member to an organization.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: addOrganizationMember
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddMemberRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityCreatedResponse'
  /api/organizations/{organizationId}/members/invite:
    post:
      summary: Invite member
      description: Invite a member to an organization.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: inviteOrganizationMember
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InviteOrganizationMemberRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/members/remove:
    post:
      summary: Remove member
      description: >-
        Remove a member from an organization. Note that you cannot invoke this
        function if only a single member is present to the organization.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: removeOrganizationMember
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RemoveMemberRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/members/{memberId}/role:
    post:
      summary: Set member role
      description: Change the role of a member in an organization.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/MemberIdParameter'
      operationId: setOrganizationMemberRole
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetMemberRoleRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/members/{memberId}/datasets:
    post:
      summary: Set member datasets
      description: Set the datasets a guest member has access to in an organization.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/MemberIdParameter'
      operationId: setOrganizationMemberDatasets
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetMemberDatasetsRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/members/{memberId}/resend-invite:
    post:
      summary: Resend invitation
      description: Resend an invitation to a member in an organization.
      tags:
        - Organizations
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/MemberIdParameter'
      operationId: resendOrganizationMemberInvite
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/readme/upload-image:
    post:
      summary: Upload image for readme
      description: Uploads an image to the user CDN and returns the path.
      tags:
        - Organizations
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: uploadOrganizationReadmeImage
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadImageRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadReadmeImageResponse'
  /api/organizations/{organizationId}/multi-project-deployment/start:
    post:
      summary: Create multi-project deployment
      description: WIP
      tags:
        - Organizations
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: createMultiProjectDeployment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMultiProjectDeploymentRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/organizations/{organizationId}/multi-project-deployment/jobs/{jobId}/download:
    get:
      summary: Download multi-project deployment
      description: WIP
      tags:
        - Organizations
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/JobIdParameter'
      operationId: downloadMultiProjectDeployment
      responses:
        '200':
          description: TAR file
          content:
            application/x-tar:
              schema:
                type: string
                format: binary
  /api/organizations/{organizationId}/buckets:
    get:
      summary: List storage buckets
      description: >-
        Retrieve all configured storage buckets. This does not list the secret
        key.
      tags:
        - OrganizationData
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: listOrganizationBuckets
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOrganizationBucketsResponse'
    post:
      summary: Add a storage bucket
      description: Add a storage bucket.
      tags:
        - OrganizationData
      x-middleware:
        - OrganizationRequiresAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: addOrganizationBucket
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddOrganizationBucketRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityCreatedResponse'
  /api/organizations/{organizationId}/buckets/verify:
    post:
      summary: Verify bucket connectivity
      description: >
        Verify connectivity to a storage bucket and optionally list its
        contents. This endpoint allows you to:

        1. Check if the provided bucket credentials are valid and the bucket is
        accessible.

        2. Optionally list files in the bucket up to a specified limit.

        3. Validate the bucket configuration before adding it to the
        organization.


        The request can include details such as the bucket name, region,
        credentials, and listing options.

        The response provides information about the bucket's accessibility and,
        if requested, a list of files in the bucket.


        Important note on verification process:

        - For S3-compatible storage backends: Verification is expected to be
        immediate.

        - For Azure buckets: Verification takes longer. Users are required to
        poll this endpoint

        until the connectionStatus changes from 'connecting' to 'connected'.


        When dealing with Azure buckets, implement a polling mechanism to check
        the status

        periodically until it's confirmed as connected.
      tags:
        - OrganizationData
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: verifyOrganizationBucket
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VerifyOrganizationBucketRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerifyOrganizationBucketResponse'
  /api/organizations/{organizationId}/buckets/{bucketId}:
    get:
      summary: Get storage bucket
      description: Get storage bucket details.
      tags:
        - OrganizationData
      x-middleware:
        - OrganizationRequiresAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/BucketIdParameter'
      operationId: getOrganizationBucket
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOrganizationBucketResponse'
    post:
      summary: Update storage bucket
      description: >
        Updates storage bucket details. This only updates fields that were set
        in the request body.

        Before updating the bucket details, it is required to verify the
        connection using the

        POST /api/organizations/{organizationId}/buckets/verify endpoint.


        The verification process:

        1. Call the verify endpoint with the new bucket details.

        2. Poll the verify endpoint until it responds with `connectionStatus:
        connected`.

        3. If the endpoint responds with `connectionStatus: error`, the
        verification has failed.


        Only proceed with updating the bucket details after receiving a
        `connected` status.

        The polling interval and timeout should be determined based on your
        application's requirements.
      tags:
        - OrganizationData
      x-middleware:
        - OrganizationRequiresAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/BucketIdParameter'
      operationId: updateOrganizationBucket
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrganizationBucketRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
    delete:
      summary: Remove storage bucket
      description: >-
        Remove a storage bucket and associated datasets. This will render any
        data in this storage bucket unreachable.
      tags:
        - OrganizationData
      x-middleware:
        - OrganizationRequiresAdmin
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/BucketIdParameter'
      operationId: removeOrganizationBucket
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/buckets/{bucketId}/verify:
    post:
      summary: Verify existing bucket connectivity
      description: Verify whether we can reach a bucket before adding it.
      tags:
        - OrganizationData
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/BucketIdParameter'
      operationId: verifyExistingOrganizationBucket
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VerifyOrganizationExistingBucketRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerifyOrganizationBucketResponse'
  /api/organizations/{organizationId}/data:
    get:
      summary: List data
      description: Lists all data items. This can be filtered by the ?filter parameter.
      tags:
        - OrganizationData
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDatasetParameter'
        - $ref: '#/components/parameters/OrganizationDataFilterParameter'
        - $ref: '#/components/parameters/LimitResultsParameter'
        - $ref: '#/components/parameters/OffsetResultsParameter'
      operationId: listOrganizationData
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOrganizationDataResponse'
  /api/organizations/{organizationId}/data/add:
    post:
      summary: Add new data
      description: >-
        Add a new data item. You can add a maximum of 10000 files directly
        through this API. Use `addOrganizationDataFile` to add additional files.
      tags:
        - OrganizationData
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/OrganizationAddDataItemRequest'
      operationId: addOrganizationDataItem
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityCreatedResponse'
  /api/organizations/{organizationId}/data/add-folder:
    post:
      summary: Add data items from bucket
      description: >-
        Bulk adds data items that already exist in a storage bucket. The bucket
        path specified should contain folders. Each folder is added as a data
        item in Edge Impulse.
      tags:
        - OrganizationData
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizationAddDataFolderRequest'
      operationId: addOrganizationDataFolder
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/organizations/{organizationId}/data/download:
    get:
      summary: Download data
      description: >-
        Download all data for selected data items. This function does not query
        the underlying bucket.
      operationId: downloadOrganizationDataItem
      tags:
        - OrganizationData
      x-middleware:
        - OrganizationAllowGuestAccess
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDatasetParameter'
        - $ref: '#/components/parameters/OrganizationDataIdsParameter'
        - $ref: '#/components/parameters/OrganizationDataFilterParameter'
      responses:
        '200':
          description: TAR file
          content:
            application/x-tar:
              schema:
                type: string
                format: binary
  /api/organizations/{organizationId}/data/delete:
    post:
      summary: Delete data
      description: >-
        Delete all data for selected data items. This removes all data in the
        underlying data bucket.
      operationId: deleteOrganizationDataItems
      tags:
        - OrganizationData
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDatasetParameter'
        - $ref: '#/components/parameters/OrganizationDataIdsParameter'
        - $ref: '#/components/parameters/OrganizationDataFilterParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/organizations/{organizationId}/data/clear-checklist:
    post:
      summary: Clear checklist for data
      description: Clear all checklist flags for selected data items.
      operationId: clearChecklistOrganizationDataItems
      tags:
        - OrganizationData
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDatasetParameter'
        - $ref: '#/components/parameters/OrganizationDataIdsParameter'
        - $ref: '#/components/parameters/OrganizationDataFilterParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/organizations/{organizationId}/data/change-dataset:
    post:
      summary: Change dataset
      description: Change the dataset for selected data items.
      operationId: changeDatasetOrganizationDataItems
      tags:
        - OrganizationData
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDatasetParameter'
        - $ref: '#/components/parameters/OrganizationDataIdsParameter'
        - $ref: '#/components/parameters/OrganizationDataFilterParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetOrganizationDataDatasetRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/organizations/{organizationId}/data/files:
    get:
      summary: List files
      description: Lists all files included by the filter.
      tags:
        - OrganizationData
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDatasetParameter'
        - $ref: '#/components/parameters/OrganizationDataFilterParameter'
        - $ref: '#/components/parameters/LimitResultsParameter'
        - $ref: '#/components/parameters/OffsetResultsParameter'
      operationId: listOrganizationFiles
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOrganizationFilesResponse'
  /api/organizations/{organizationId}/data/refresh:
    post:
      summary: Refresh data
      description: >-
        Update all data items. HEADs all underlying buckets to retrieve the last
        file information. Use this API after uploading data directly to S3. If
        your dataset has bucketId and bucketPath set then this will also remove
        items that have been removed from S3.
      tags:
        - OrganizationData
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDatasetRequiredParameter'
      operationId: refreshOrganizationData
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/organizations/{organizationId}/data/bulk-metadata:
    post:
      summary: Bulk update metadata
      description: >-
        Bulk update the metadata of many data items in one go. This requires you
        to submit a CSV file with headers, one of which the columns should be
        named 'name'. The other columns are used as metadata keys.
      tags:
        - OrganizationData
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/OrganizationBulkMetadataRequest'
      operationId: organizationBulkUpdateMetadata
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/organizations/{organizationId}/data/{dataId}:
    get:
      summary: Get data metadata
      description: >-
        Get a data item. This will HEAD the underlying bucket to retrieve the
        last file information.
      tags:
        - OrganizationData
      x-middleware:
        - OrganizationAllowGuestAccess
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDataIdParameter'
        - $ref: '#/components/parameters/OrganizationDataFilterParameter'
      operationId: getOrganizationDataItem
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOrganizationDataItemResponse'
    post:
      summary: Update data metadata
      description: Update the data item metadata.
      tags:
        - OrganizationData
      x-middleware:
        - OrganizationAllowGuestAccess
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDataIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrganizationDataItemRequest'
      operationId: updateOrganizationDataItem
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
    delete:
      summary: Delete data
      description: >-
        Delete a data item. This will remove items the items from the underlying
        storage if your dataset has "bucketPath" set.
      tags:
        - OrganizationData
      x-middleware:
        - OrganizationAllowGuestAccess
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDataIdParameter'
      operationId: deleteOrganizationDataItem
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/data/{dataId}/add:
    post:
      summary: Add files
      description: Add a new file to an existing data item.
      tags:
        - OrganizationData
      x-middleware:
        - OrganizationAllowGuestAccess
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDataIdParameter'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/OrganizationAddDataFileRequest'
      operationId: addOrganizationDataFile
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/data/{dataId}/download:
    get:
      summary: Download data
      description: Download all data for this data item.
      operationId: downloadOrganizationSingleDataItem
      tags:
        - OrganizationData
      x-middleware:
        - OrganizationAllowGuestAccess
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDataIdParameter'
        - $ref: '#/components/parameters/OrganizationDataFilterParameter'
      responses:
        '200':
          description: ZIP file
          content:
            application/zip:
              schema:
                type: string
                format: binary
    delete:
      summary: Delete file
      description: Delete a single file from a data item.
      operationId: deleteOrganizationDataFile
      tags:
        - OrganizationData
      x-middleware:
        - OrganizationAllowGuestAccess
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDataIdParameter'
        - $ref: '#/components/parameters/OrganizationFileNameParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/data/{dataId}/files/download:
    get:
      summary: Download file
      description: Download a single file from a data item.
      operationId: downloadOrganizationDataFile
      tags:
        - OrganizationData
      x-middleware:
        - OrganizationAllowGuestAccess
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDataIdParameter'
        - $ref: '#/components/parameters/OrganizationFileNameParameter'
      responses:
        '200':
          description: File
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
  /api/organizations/{organizationId}/data/{dataId}/files/preview:
    get:
      summary: Preview file
      description: >-
        Preview a single file from a data item (same as
        downloadOrganizationDataFile but w/ content-disposition inline and could
        be truncated).
      operationId: previewOrganizationDataFile
      tags:
        - OrganizationData
      x-middleware:
        - ContentDispositionInline
        - OrganizationAllowGuestAccess
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDataIdParameter'
        - $ref: '#/components/parameters/OrganizationFileNameParameter'
      responses:
        '200':
          description: File
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
  /api/organizations/{organizationId}/data/{dataId}/transformation-jobs:
    get:
      summary: Get transformation jobs for data item
      description: >-
        Get all transformation jobs that ran for a data item. If limit / offset
        is not provided then max. 20 results are returned.
      tags:
        - OrganizationData
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDataIdParameter'
        - $ref: '#/components/parameters/LimitResultsParameter'
        - $ref: '#/components/parameters/OffsetResultsParameter'
      operationId: getOrganizationDataItemTransformJobs
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetOrganizationDataItemTransformJobsResponse
  /api/organizations/{organizationId}/dataset:
    post:
      summary: Add dataset
      description: Add a new research dataset
      operationId: addOrganizationDataset
      tags:
        - OrganizationData
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizationAddDatasetRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/organizations/{organizationId}/dataset/{dataset}:
    get:
      summary: Get dataset
      description: Get information about a dataset
      operationId: getOrganizationDataset
      tags:
        - OrganizationData
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDatasetPathParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOrganizationDatasetResponse'
    post:
      summary: Update dataset
      description: Set information about a dataset
      operationId: updateOrganizationDataset
      tags:
        - OrganizationData
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDatasetPathParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrganizationDatasetRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/dataset/{dataset}/hide:
    post:
      summary: Hide dataset
      description: Hide a dataset (does not remove underlying data)
      operationId: hideOrganizationDataset
      tags:
        - OrganizationData
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDatasetPathParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/dataset/{dataset}/upload-link:
    post:
      summary: Create pre-signed S3 upload link
      description: >-
        Creates a signed link to securely upload data to s3 bucket directly from
        the client.
      tags:
        - OrganizationData
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDatasetPathParameter'
      operationId: createSignedUploadLinkDataset
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSignedUploadLinkRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSignedUploadLinkResponse'
  /api/organizations/{organizationId}/dataset/{dataset}/verify:
    post:
      summary: Verify dataset
      description: >-
        Verify whether we can reach a dataset (and return some random files,
        used for data sources)
      tags:
        - OrganizationData
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDatasetPathParameter'
      operationId: verifyDataset
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerifyOrganizationBucketResponse'
  /api/organizations/{organizationId}/dataset/{dataset}/files:
    post:
      summary: List files in dataset
      description: List all files and directories in specified prefix.
      tags:
        - OrganizationData
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDatasetPathParameter'
      operationId: listDatasetFilesInFolder
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListPortalFilesInFolderRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPortalFilesInFolderResponse'
  /api/organizations/{organizationId}/dataset/{dataset}/files/delete:
    post:
      summary: Delete file from dataset
      description: Delete a file from a dataset
      tags:
        - OrganizationData
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDatasetPathParameter'
      operationId: deleteDatasetFile
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeletePortalFileRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/dataset/{dataset}/files/rename:
    post:
      summary: Rename file from dataset
      description: Rename a file in a dataset
      tags:
        - OrganizationData
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDatasetPathParameter'
      operationId: renameDatasetFile
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RenamePortalFileRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/dataset/{dataset}/files/download:
    post:
      summary: Download file from dataset
      description: Download a file from a dataset. Will return a signed URL to the bucket.
      tags:
        - OrganizationData
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDatasetPathParameter'
      operationId: downloadDatasetFile
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DownloadPortalFileRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DownloadPortalFileResponse'
  /api/organizations/{organizationId}/dataset/{dataset}/files/download-folder:
    get:
      summary: Download folder from dataset
      description: >-
        Download all files in the given folder in a dataset, ignoring any
        subdirectories.
      operationId: downloadDatasetFolder
      tags:
        - OrganizationData
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDatasetPathParameter'
        - $ref: '#/components/parameters/OrganizationPathInDatasetParameter'
      responses:
        '200':
          description: ZIP file
          content:
            application/zip:
              schema:
                type: string
                format: binary
  /api/organizations/{organizationId}/dataset/{dataset}/files/view:
    get:
      summary: View file from dataset
      description: >-
        View a file that's located in a dataset (requires JWT auth). File might
        be converted (e.g. Parquet) or truncated (e.g. CSV).
      tags:
        - OrganizationData
      x-middleware:
        - ContentDispositionInline
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDatasetPathParameter'
        - $ref: '#/components/parameters/PortalPathParameter'
      operationId: viewDatasetFile
      responses:
        '200':
          description: OK
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
  /api/organizations/{organizationId}/dataset/{dataset}/files/preview:
    post:
      summary: Preview files in a default dataset
      description: >-
        Preview files and directories in a default dataset for the given prefix,
        with support for wildcards. This is an internal API used when starting a
        transformation job.
      tags:
        - OrganizationData
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDatasetPathParameter'
      operationId: previewDefaultFilesInFolder
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PreviewDefaultFilesInFolderRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreviewDefaultFilesInFolderResponse'
  /api/organizations/{organizationId}/create-project:
    get:
      summary: List transformation jobs
      description: Get list of transformation jobs.
      operationId: getOrganizationCreateProjects
      tags:
        - OrganizationCreateProject
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/LimitResultsParameter'
        - $ref: '#/components/parameters/OffsetResultsParameter'
        - $ref: '#/components/parameters/IncludePipelineJobsParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationGetCreateProjectsResponse'
    post:
      summary: Start transformation job
      description: >-
        Start a transformation job to fetch data from the organization and put
        it in a project, or transform into new data.
      operationId: organizationCreateProject
      tags:
        - OrganizationCreateProject
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizationCreateProjectRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationCreateProjectResponse'
  /api/organizations/{organizationId}/create-project/{createProjectId}:
    get:
      summary: Get transformation job status
      description: Get the current status of a transformation job job.
      operationId: getOrganizationCreateProjectStatus
      tags:
        - OrganizationCreateProject
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationCreateProjectIdParameter'
        - $ref: '#/components/parameters/TransformLimitResultsParameter'
        - $ref: '#/components/parameters/TransformOffsetResultsParameter'
        - $ref: '#/components/parameters/TransformSelectionParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationCreateProjectStatusResponse'
    post:
      summary: Update transformation job
      description: Update the properties of a transformation job.
      operationId: updateOrganizationCreateProject
      tags:
        - OrganizationCreateProject
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationCreateProjectIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrganizationCreateProjectRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
    delete:
      summary: Delete transformation job
      description: Remove a transformation job. This will stop all running jobs.
      operationId: deleteOrganizationCreateProject
      tags:
        - OrganizationCreateProject
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationCreateProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/create-project/{createProjectId}/transform/retry:
    post:
      summary: Retry failed transform jobs
      description: >-
        Retry all failed transform job from a transformation job. Only jobs that
        have failed will be retried.
      operationId: retryOrganizationTransform
      tags:
        - OrganizationCreateProject
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationCreateProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/create-project/{createProjectId}/transform/clear:
    post:
      summary: Clear failed transform jobs
      description: >-
        Clear all failed transform job from a create project job. Only jobs that
        have failed will be cleared.
      operationId: clearOrganizationTransform
      tags:
        - OrganizationCreateProject
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationCreateProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/create-project/{createProjectId}/upload/retry:
    post:
      summary: Retry transformation upload job
      description: >-
        Retry the upload job from a transformation job. Only jobs that have
        failed can be retried.
      operationId: retryOrganizationUpload
      tags:
        - OrganizationCreateProject
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationCreateProjectIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/create-project/{createProjectId}/files/{createProjectFileId}:
    delete:
      summary: Delete create project file
      description: >-
        Remove a file from a create project job. Only files for which no jobs
        are running can be deleted.
      operationId: deleteOrganizationCreateProjectFile
      tags:
        - OrganizationCreateProject
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationCreateProjectIdParameter'
        - $ref: '#/components/parameters/OrganizationCreateProjectFileIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/create-project/{createProjectId}/files/{createProjectFileId}/retry:
    post:
      summary: Retry transformation file
      description: >-
        Retry a transformation action on a file from a transformation job. Only
        files that have failed can be retried.
      operationId: retryOrganizationCreateProjectFile
      tags:
        - OrganizationCreateProject
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationCreateProjectIdParameter'
        - $ref: '#/components/parameters/OrganizationCreateProjectFileIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/transformation:
    get:
      summary: Get transformation blocks
      description: Retrieve all transformation blocks.
      tags:
        - OrganizationBlocks
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: listOrganizationTransformationBlocks
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ListOrganizationTransformationBlocksResponse
    post:
      summary: Add transformation block
      description: Adds a transformation block.
      tags:
        - OrganizationBlocks
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: addOrganizationTransformationBlock
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddOrganizationTransformationBlockRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityCreatedResponse'
  /api/organizations/{organizationId}/transformation/public:
    get:
      summary: List public transformation blocks
      description: >-
        Retrieve all transformation blocks published by other organizations,
        available for all organizations.
      tags:
        - OrganizationBlocks
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: listPublicOrganizationTransformationBlocks
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ListPublicOrganizationTransformationBlocksResponse
  /api/organizations/{organizationId}/transformation/public/{transformationId}:
    get:
      summary: Get public transformation block
      description: >-
        Retrieve a transformation blocks published by other organizations,
        available for all organizations.
      tags:
        - OrganizationBlocks
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/TransformationIdParameter'
      operationId: getPublicOrganizationTransformationBlock
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetPublicOrganizationTransformationBlockResponse
  /api/organizations/{organizationId}/transformation/{transformationId}:
    get:
      summary: Get transformation block
      description: Get a transformation block.
      tags:
        - OrganizationBlocks
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/TransformationIdParameter'
      operationId: getOrganizationTransformationBlock
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetOrganizationTransformationBlockResponse
    post:
      summary: Update transformation block
      description: Updates a transformation block. Only values in the body will be updated.
      tags:
        - OrganizationBlocks
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/TransformationIdParameter'
      operationId: updateOrganizationTransformationBlock
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/UpdateOrganizationTransformationBlockRequest
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
    delete:
      summary: Delete transformation block
      description: Deletes a transformation block.
      tags:
        - OrganizationBlocks
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/TransformationIdParameter'
      operationId: deleteOrganizationTransformationBlock
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/transformation/{transformationId}/export:
    post:
      summary: Export transformation block
      description: Download the source code for this block.
      tags:
        - OrganizationBlocks
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/TransformationIdParameter'
      operationId: exportOrganizationTransformationBlock
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExportBlockResponse'
  /api/organizations/{organizationId}/custom-block:
    post:
      summary: Upload a custom block
      description: >-
        Upload a zip file containing a custom transformation or deployment
        block.
      tags:
        - OrganizationCreateProject
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: uploadCustomBlock
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadCustomBlockRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/organizations/{organizationId}/deploy:
    get:
      summary: Get deploy blocks
      description: Retrieve all deploy blocks.
      tags:
        - OrganizationBlocks
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: listOrganizationDeployBlocks
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOrganizationDeployBlocksResponse'
    post:
      summary: Add deploy block
      description: Adds a deploy block.
      tags:
        - OrganizationBlocks
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: addOrganizationDeployBlock
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AddOrganizationDeployBlockRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityCreatedResponse'
  /api/organizations/{organizationId}/deploy/{deployId}:
    get:
      summary: Get deploy block
      description: Gets a deploy block.
      tags:
        - OrganizationBlocks
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/DeployIdParameter'
      operationId: getOrganizationDeployBlock
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOrganizationDeployBlockResponse'
    post:
      summary: Update deploy block
      description: Updates a deploy block. Only values in the body will be updated.
      tags:
        - OrganizationBlocks
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/DeployIdParameter'
      operationId: updateOrganizationDeployBlock
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UpdateOrganizationDeployBlockRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
    delete:
      summary: Delete deploy block
      description: Deletes a deploy block.
      tags:
        - OrganizationBlocks
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/DeployIdParameter'
      operationId: deleteOrganizationDeployBlock
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/deploy/{deployId}/export:
    post:
      summary: Export deploy block
      description: Download the source code for this block.
      tags:
        - OrganizationBlocks
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/DeployIdParameter'
      operationId: exportOrganizationDeployBlock
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExportBlockResponse'
  /api/organizations/{organizationId}/dsp:
    get:
      summary: Get dsp blocks
      description: Retrieve all dsp blocks.
      tags:
        - OrganizationBlocks
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: listOrganizationDspBlocks
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOrganizationDspBlocksResponse'
    post:
      summary: Add dsp block
      description: Adds a dsp block.
      tags:
        - OrganizationBlocks
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: addOrganizationDspBlock
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddOrganizationDspBlockRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityCreatedResponse'
  /api/organizations/{organizationId}/dsp/{dspId}:
    get:
      summary: Get dsp block
      description: Gets a dsp block.
      tags:
        - OrganizationBlocks
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/DspIdParameter'
      operationId: getOrganizationDspBlock
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOrganizationDspBlockResponse'
    post:
      summary: Update dsp block
      description: Updates a dsp block. Only values in the body will be updated.
      tags:
        - OrganizationBlocks
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/DspIdParameter'
      operationId: updateOrganizationDspBlock
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrganizationDspBlockRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
    delete:
      summary: Delete dsp block
      description: Deletes a dsp block.
      tags:
        - OrganizationBlocks
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/DspIdParameter'
      operationId: deleteOrganizationDspBlock
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/dsp/{dspId}/export:
    post:
      summary: Export dsp block
      description: Download the source code for this block.
      tags:
        - OrganizationBlocks
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/DspIdParameter'
      operationId: exportOrganizationDspBlock
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExportBlockResponse'
  /api/organizations/{organizationId}/dsp/{dspId}/retry:
    post:
      summary: Retry connection to dsp block
      description: Retry launch a dsp block.
      tags:
        - OrganizationBlocks
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/DspIdParameter'
      operationId: retryOrganizationDspBlock
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/transfer-learning:
    get:
      summary: Get transfer learning blocks
      description: Retrieve all transfer learning blocks.
      tags:
        - OrganizationBlocks
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: listOrganizationTransferLearningBlocks
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ListOrganizationTransferLearningBlocksResponse
    post:
      summary: Add transfer learning block
      description: Adds a transfer learning block.
      tags:
        - OrganizationBlocks
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: addOrganizationTransferLearningBlock
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddOrganizationTransferLearningBlockRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityCreatedResponse'
  /api/organizations/{organizationId}/transfer-learning/{transferLearningId}:
    get:
      summary: Get transfer learning block
      description: Gets a transfer learning block.
      tags:
        - OrganizationBlocks
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/TransferLearningIdParameter'
      operationId: getOrganizationTransferLearningBlock
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetOrganizationTransferLearningBlockResponse
    post:
      summary: Update transfer learning block
      description: >-
        Updates a transfer learning block. Only values in the body will be
        updated.
      tags:
        - OrganizationBlocks
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/TransferLearningIdParameter'
      operationId: updateOrganizationTransferLearningBlock
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/UpdateOrganizationTransferLearningBlockRequest
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
    delete:
      summary: Delete transfer learning block
      description: Deletes a transfer learning block.
      tags:
        - OrganizationBlocks
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/TransferLearningIdParameter'
      operationId: deleteOrganizationTransferLearningBlock
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/transfer-learning/{transferLearningId}/export:
    post:
      summary: Export transfer learning block
      description: Download the source code for this block.
      tags:
        - OrganizationBlocks
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/TransferLearningIdParameter'
      operationId: exportOrganizationTransferLearningBlock
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExportBlockResponse'
  /api/organizations/{organizationId}/secrets:
    get:
      summary: Get secrets
      description: Retrieve all secrets.
      tags:
        - OrganizationBlocks
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: listOrganizationSecrets
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOrganizationSecretsResponse'
    post:
      summary: Add secret
      description: Adds a secret.
      tags:
        - OrganizationBlocks
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: addOrganizationSecret
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddOrganizationSecretRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityCreatedResponse'
  /api/organizations/{organizationId}/secrets/{secretId}:
    delete:
      summary: Delete secret
      description: Deletes a secret
      tags:
        - OrganizationBlocks
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/SecretIdParameter'
      operationId: deleteOrganizationSecret
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/new-project:
    post:
      summary: Create new empty project
      description: Create a new empty project within an organization.
      operationId: organizationCreateEmptyProject
      tags:
        - OrganizationCreateProject
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrganizationCreateEmptyProjectRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateProjectResponse'
  /api/organizations/{organizationId}/add-project-collaborator:
    post:
      summary: Add a collaborator to a project within an organisation
      description: Add a new collaborator to a project owned by an organisation.
      operationId: organizationAddCollaborator
      tags:
        - OrganizationCreateProject
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrganizationAddCollaboratorRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/jobs:
    get:
      summary: List active jobs
      description: Get all active jobs for this organization
      operationId: listActiveOrganizationJobs
      tags:
        - OrganizationJobs
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OnlyRootJobsParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListJobsResponse'
  /api/organizations/{organizationId}/jobs/history:
    get:
      summary: List finished jobs
      description: Get all finished jobs for this organization
      operationId: listFinishedOrganizationJobs
      tags:
        - OrganizationJobs
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OptionalStartDateParameter'
        - $ref: '#/components/parameters/OptionalEndDateParameter'
        - $ref: '#/components/parameters/LimitResultsParameter'
        - $ref: '#/components/parameters/OffsetResultsParameter'
        - $ref: '#/components/parameters/OnlyRootJobsParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListJobsResponse'
  /api/organizations/{organizationId}/jobs/all:
    get:
      summary: List all jobs
      description: Get all jobs for this organization
      operationId: listAllOrganizationJobs
      tags:
        - OrganizationJobs
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OptionalStartDateParameter'
        - $ref: '#/components/parameters/OptionalEndDateParameter'
        - $ref: '#/components/parameters/LimitResultsParameter'
        - $ref: '#/components/parameters/OffsetResultsParameter'
        - $ref: '#/components/parameters/ExcludePipelineTransformationJobsParameter'
        - $ref: '#/components/parameters/OnlyRootJobsParameter'
        - $ref: '#/components/parameters/OptionalJobsKeyParameter'
        - $ref: '#/components/parameters/OptionalJobsCategoryParameter'
        - $ref: '#/components/parameters/OptionalJobsFinishedParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListJobsResponse'
  /api/organizations/{organizationId}/jobs/{jobId}/cancel:
    post:
      summary: Cancel job
      description: Cancel a running job.
      operationId: cancelOrganizationJob
      tags:
        - OrganizationJobs
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/JobIdParameter'
        - $ref: '#/components/parameters/ForceCancelParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/jobs/{jobId}/status:
    get:
      summary: Get job status
      description: Get the status for a job.
      operationId: getOrganizationJobStatus
      tags:
        - OrganizationJobs
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/JobIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetJobResponse'
  /api/organizations/{organizationId}/jobs/{jobId}/stdout:
    get:
      summary: Get logs
      description: Get the logs for a job.
      operationId: getOrganizationJobsLogs
      tags:
        - OrganizationJobs
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/JobIdParameter'
        - $ref: '#/components/parameters/LimitResultsParameter'
        - $ref: '#/components/parameters/LogLevelParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogStdoutResponse'
  /api/organizations/{organizationId}/jobs/{jobId}/stdout/download:
    get:
      summary: Download logs
      description: Download the logs for a job (as a text file).
      operationId: downloadOrganizationJobsLogs
      tags:
        - OrganizationJobs
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/JobIdParameter'
        - $ref: '#/components/parameters/LimitResultsParameter'
        - $ref: '#/components/parameters/LogLevelParameter'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                type: string
  /api/organizations/{organizationId}/socket-token:
    get:
      summary: Get socket token for an organization
      description: Get a token to authenticate with the web socket interface.
      tags:
        - OrganizationJobs
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: getOrganizationSocketToken
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SocketTokenResponse'
  /api/organizations/{organizationId}/pipelines:
    get:
      summary: List pipelines
      description: Retrieve all organizational pipelines
      tags:
        - OrganizationPipelines
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/ListPipelinesProjectIdParameter'
      operationId: listOrganizationPipelines
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOrganizationPipelinesResponse'
    post:
      summary: Create pipeline
      description: Create an organizational pipelines
      tags:
        - OrganizationPipelines
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: createOrganizationPipeline
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizationUpdatePipelineBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityCreatedResponse'
  /api/organizations/{organizationId}/pipelines/archived:
    get:
      summary: List archived pipelines
      description: Retrieve all archived organizational pipelines
      tags:
        - OrganizationPipelines
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/ListPipelinesProjectIdParameter'
      operationId: listArchivedOrganizationPipelines
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOrganizationPipelinesResponse'
  /api/organizations/{organizationId}/pipelines/{pipelineId}:
    get:
      summary: Get pipeline
      description: Retrieve an organizational pipelines
      tags:
        - OrganizationPipelines
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationPipelineIdParameter'
      operationId: getOrganizationPipeline
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOrganizationPipelinesResponse'
    post:
      summary: Update pipeline
      description: Update an organizational pipelines
      tags:
        - OrganizationPipelines
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationPipelineIdParameter'
      operationId: updateOrganizationPipeline
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizationUpdatePipelineBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
    delete:
      summary: Delete pipeline
      description: Delete an organizational pipelines
      tags:
        - OrganizationPipelines
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationPipelineIdParameter'
      operationId: deleteOrganizationPipeline
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/pipelines/{pipelineId}/run:
    post:
      summary: Run pipeline
      description: Run an organizational pipeline
      tags:
        - OrganizationPipelines
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationPipelineIdParameter'
        - $ref: '#/components/parameters/IgnoreLastSuccessfulRunQueryParameter'
      operationId: runOrganizationPipeline
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunOrganizationPipelineResponse'
  /api/organizations/{organizationId}/pipelines/{pipelineId}/stop:
    post:
      summary: Stop a running pipeline
      description: Stops the pipeline, and marks it as failed.
      tags:
        - OrganizationPipelines
      x-middleware:
        - OrganizationAllowDeveloperProfile
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationPipelineIdParameter'
      operationId: stopOrganizationPipeline
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/campaign-dashboards:
    get:
      summary: Get data campaign dashboards
      description: List all data campaign dashboards
      operationId: getOrganizationDataCampaignDashboards
      tags:
        - OrganizationDataCampaigns
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetOrganizationDataCampaignDashboardsResponse
    post:
      summary: Add data campaign dashboard
      description: Add a new data campaign dashboard
      operationId: addOrganizationDataCampaignDashboard
      tags:
        - OrganizationDataCampaigns
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddOrganizationDataCampaignDashboardRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/AddOrganizationDataCampaignDashboardResponse
  /api/organizations/{organizationId}/campaign-dashboard/{campaignDashboardId}:
    get:
      summary: Get data campaign dashboard
      description: Get a data campaign dashboard
      operationId: getOrganizationDataCampaignDashboard
      tags:
        - OrganizationDataCampaigns
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: >-
            #/components/parameters/OrganizationDataCampaignDashboardIdPathParameter
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetOrganizationDataCampaignDashboardResponse
    post:
      summary: Update data campaign dashboard
      description: Update a data campaign dashboard
      operationId: updateOrganizationDataCampaignDashboard
      tags:
        - OrganizationDataCampaigns
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: >-
            #/components/parameters/OrganizationDataCampaignDashboardIdPathParameter
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/UpdateOrganizationDataCampaignDashboardRequest
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
    delete:
      summary: Delete data campaign dashboard
      description: Delete a data campaign dashboard
      operationId: deleteOrganizationDataCampaignDashboard
      tags:
        - OrganizationDataCampaigns
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: >-
            #/components/parameters/OrganizationDataCampaignDashboardIdPathParameter
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/campaign-dashboard/{campaignDashboardId}/campaigns:
    get:
      summary: Get data campaigns
      description: Get a list of all data campaigns for a dashboard
      operationId: getOrganizationDataCampaignsForDashboard
      tags:
        - OrganizationDataCampaigns
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: >-
            #/components/parameters/OrganizationDataCampaignDashboardIdPathParameter
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOrganizationDataCampaignsResponse'
  /api/organizations/{organizationId}/campaigns:
    post:
      summary: Add a data campaign
      description: Add a new data campaign to a data campaign dashboard
      operationId: addOrganizationDataCampaign
      tags:
        - OrganizationDataCampaigns
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddOrganizationDataCampaignRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddOrganizationDataCampaignResponse'
  /api/organizations/{organizationId}/campaigns/{campaignId}:
    get:
      summary: Get data campaign
      description: Get a data campaign
      operationId: getOrganizationDataCampaign
      tags:
        - OrganizationDataCampaigns
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDataCampaignIdPathParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOrganizationDataCampaignResponse'
    post:
      summary: Update data campaign
      description: Update a data campaign
      operationId: updateOrganizationDataCampaign
      tags:
        - OrganizationDataCampaigns
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDataCampaignIdPathParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrganizationDataCampaignRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
    delete:
      summary: Delete data campaign
      description: Delete a data campaign
      operationId: deleteOrganizationDataCampaign
      tags:
        - OrganizationDataCampaigns
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDataCampaignIdPathParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/campaigns/{campaignId}/diff:
    post:
      summary: Get diff for data campaign
      description: >-
        Get which items have changed for a data campaign. You post the data
        points and we'll return which data items are different in the past day.
      operationId: getOrganizationDataCampaignDiff
      tags:
        - OrganizationDataCampaigns
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/OrganizationDataCampaignIdPathParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizationDataCampaignDiffRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationDataCampaignDiffResponse'
  /api/organizations/{organizationId}/exports:
    get:
      summary: Get all organization data exports
      description: Get all data exports for an organization.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
      operationId: getOrganizationDataExports
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/LimitResultsParameter'
        - $ref: '#/components/parameters/OffsetResultsParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOrganizationDataExportsResponse'
  /api/organizations/{organizationId}/exports/{exportId}:
    get:
      summary: Get organization data export
      description: Get a data export for an organization.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
      operationId: getOrganizationDataExport
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/ExportIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOrganizationDataExportResponse'
  /api/organizations/{organizationId}/exports/{exportId}/download:
    get:
      summary: Download organization data export
      description: Download a data export for an organization.
      tags:
        - Organizations
      x-middleware:
        - OrganizationRequiresAdmin
      operationId: downloadOrganizationDataExport
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/ExportIdParameter'
      responses:
        '302':
          description: A redirect to the ZIP file
  /api/{projectId}:
    get:
      summary: Project information
      description: List all information about this project.
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      operationId: getProjectInfo
      x-oauth-scopes:
        - projects:read
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectInfoResponse'
    post:
      summary: Update project
      description: Update project properties such as name and logo.
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: updateProject
      x-oauth-scopes:
        - projects:update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateProjectRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
    delete:
      summary: Remove project
      description: >-
        Remove the current project, and all data associated with it. This is
        irrevocable!
      tags:
        - Projects
      x-middleware:
        - ProjectRequiresAdmin
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: deleteProject
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/public-info:
    get:
      summary: Public project information
      description: List a summary about this project - available for public projects.
      tags:
        - Projects
      x-middleware:
        - AllowsReadOnly
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
      operationId: getProjectInfoSummary
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectInfoSummaryResponse'
  /api/portals/{portalId}:
    get:
      summary: Portal info
      description: Get information about a portal
      tags:
        - UploadPortal
      parameters:
        - $ref: '#/components/parameters/PortalIdParameter'
      operationId: getPortalInfo
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PortalInfoResponse'
  /api/portals/{portalId}/upload-link:
    post:
      summary: Create pre-signed S3 upload link
      description: >-
        Creates a signed link to securely upload data to s3 bucket directly from
        the client.
      tags:
        - UploadPortal
      parameters:
        - $ref: '#/components/parameters/PortalIdParameter'
      operationId: createSignedUploadLink
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSignedUploadLinkRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSignedUploadLinkResponse'
  /api/portals/{portalId}/files:
    post:
      summary: List files in portal
      description: List all files and directories in specified prefix.
      tags:
        - UploadPortal
      parameters:
        - $ref: '#/components/parameters/PortalIdParameter'
      operationId: listPortalFilesInFolder
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListPortalFilesInFolderRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPortalFilesInFolderResponse'
  /api/portals/{portalId}/files/delete:
    post:
      summary: Delete file from portal
      description: Delete a file from an upload portal (requires JWT auth).
      tags:
        - UploadPortal
      parameters:
        - $ref: '#/components/parameters/PortalIdParameter'
      operationId: deletePortalFile
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeletePortalFileRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/portals/{portalId}/files/rename:
    post:
      summary: Rename file from portal
      description: Rename a file on an upload portal (requires JWT auth).
      tags:
        - UploadPortal
      parameters:
        - $ref: '#/components/parameters/PortalIdParameter'
      operationId: renamePortalFile
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RenamePortalFileRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/portals/{portalId}/files/download:
    post:
      summary: Download file from portal
      description: >-
        Download a file from an upload portal (requires JWT auth). Will return a
        signed URL to the bucket.
      tags:
        - UploadPortal
      parameters:
        - $ref: '#/components/parameters/PortalIdParameter'
      operationId: downloadPortalFile
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DownloadPortalFileRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DownloadPortalFileResponse'
  /api/portals/{portalId}/files/view:
    get:
      summary: View file from portal
      description: >-
        View a file that's located in an upload portal (requires JWT auth). File
        might be converted (e.g. Parquet) or truncated (e.g. CSV).
      tags:
        - UploadPortal
      x-middleware:
        - ContentDispositionInline
      parameters:
        - $ref: '#/components/parameters/PortalIdParameter'
        - $ref: '#/components/parameters/PortalPathParameter'
      operationId: viewPortalFile
      responses:
        '200':
          description: OK
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
  /api/organizations/{organizationId}/portals:
    get:
      summary: List upload portals
      description: Retrieve all configured upload portals.
      tags:
        - OrganizationPortals
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: listOrganizationPortals
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOrganizationPortalsResponse'
  /api/organizations/{organizationId}/portals/{portalId}:
    get:
      summary: Retrieve upload portal information
      description: Retrieve a single upload portals identified by ID.
      tags:
        - OrganizationPortals
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/PortalIdParameter'
      operationId: getOrganizationPortal
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOrganizationPortalResponse'
  /api/organizations/{organizationId}/portals/{portalId}/verify:
    get:
      summary: Verify upload portal information
      description: >-
        Retrieve a subset of files from the portal, to be used in the data
        source wizard.
      tags:
        - OrganizationPortals
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/PortalIdParameter'
      operationId: verifyOrganizationPortal
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerifyOrganizationBucketResponse'
  /api/organizations/{organizationId}/portals/create:
    post:
      summary: Create upload portal
      description: Creates a new upload portal for the organization.
      tags:
        - OrganizationPortals
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      operationId: createOrganizationPortal
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrganizationPortalRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateOrganizationPortalResponse'
  /api/organizations/{organizationId}/portals/{portalId}/update:
    put:
      summary: Update upload portal
      description: Updates an upload portal for the organization.
      tags:
        - OrganizationPortals
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/PortalIdParameter'
      operationId: updateOrganizationPortal
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrganizationPortalRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateOrganizationPortalResponse'
  /api/organizations/{organizationId}/portals/{portalId}/rotate-token:
    delete:
      summary: Rotate upload portal token
      description: Rotates the token for an upload portal.
      tags:
        - OrganizationPortals
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/PortalIdParameter'
      operationId: rotateOrganizationPortalToken
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/organizations/{organizationId}/portals/{portalId}/delete:
    delete:
      summary: Delete upload portal
      description: Deletes an upload portal for the organization.
      tags:
        - OrganizationPortals
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
        - $ref: '#/components/parameters/PortalIdParameter'
      operationId: deleteOrganizationPortal
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/emails/validate:
    post:
      summary: Validate email for account sign-up
      security: []
      description: >-
        Validate whether an email is valid for sign up. Using an email that
        fails this check can result in the associated account missing
        communications and features that are distributed through email.
      tags:
        - EmailVerification
      operationId: validateEmail
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmailValidationRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateEmailResponse'
components:
  securitySchemes:
    ApiKeyAuthentication:
      type: apiKey
      in: header
      name: x-api-key
    JWTAuthentication:
      type: apiKey
      in: cookie
      name: jwt
    JWTHttpHeaderAuthentication:
      type: apiKey
      in: header
      name: x-jwt-token
    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: /v1/oauth/authorize
          tokenUrl: /v1/oauth/token
          scopes:
            openid: Access to basic profile information
            email: Access to email address
            profile: Access to full profile information
        implicit:
          authorizationUrl: /v1/oauth/authorize
          scopes:
            openid: Access to basic profile information
            email: Access to email address
            profile: Access to full profile information
        password:
          tokenUrl: /v1/oauth/token
          scopes:
            openid: Access to basic profile information
            email: Access to email address
            profile: Access to full profile information
        clientCredentials:
          tokenUrl: /v1/oauth/token
          scopes:
            openid: Access to basic profile information
            email: Access to email address
            profile: Access to full profile information
  parameters:
    ProjectIdParameter:
      name: projectId
      in: path
      required: true
      description: Project ID
      schema:
        type: integer
    IntegrationResourceIdParameter:
      name: resourceId
      in: path
      required: true
      description: |
        Unique resource ID for an integration session.
        When an integration is launched we create a new session for it.
        Each session is uniquely identifiable by the project ID and resource ID.
      example: learn-3-2-1
      schema:
        type: string
    BlockIdParameter:
      name: blockId
      in: path
      required: true
      description: Block ID
      schema:
        type: integer
    AuthIdParameter:
      name: authId
      in: path
      required: true
      description: Auth ID
      schema:
        type: integer
    DeviceIdParameter:
      name: deviceId
      in: path
      required: true
      description: Device ID
      schema:
        type: string
    SampleIdParameter:
      name: sampleId
      in: path
      required: true
      description: Sample ID
      schema:
        type: integer
    SampleWindowIndexParameter:
      name: windowIndex
      in: path
      required: true
      description: Sample window index
      schema:
        type: integer
    DspIdParameter:
      name: dspId
      in: path
      required: true
      description: DSP Block ID, use the impulse functions to retrieve the ID
      schema:
        type: integer
    PostProcessingIdParameter:
      name: postProcessingId
      in: path
      required: true
      description: Post-processing Block ID, use the impulse functions to retrieve the ID
      schema:
        type: integer
    TransferLearningIdParameter:
      name: transferLearningId
      in: path
      required: true
      description: Transfer learning ID
      schema:
        type: integer
    SecretIdParameter:
      name: secretId
      in: path
      required: true
      description: Secret ID
      schema:
        type: integer
    LearnIdParameter:
      name: learnId
      in: path
      required: true
      description: Learn Block ID, use the impulse functions to retrieve the ID
      schema:
        type: integer
    OptionalVlmConfigIdParameter:
      name: configId
      in: query
      required: false
      description: Optional VLM configuration ID
      schema:
        type: integer
    ModelDownloadIdParameter:
      name: modelDownloadId
      in: path
      required: true
      description: Model download ID, which can be obtained from the project information
      schema:
        type: string
    RawDataCategoryParameter:
      name: category
      in: path
      required: true
      description: Which of the three acquisition categories to download data from
      schema:
        $ref: '#/components/schemas/RawDataCategory'
    DspArtifactKeyParameter:
      name: key
      in: path
      required: true
      description: DSP artifact file key
      schema:
        type: string
    ModelVariantParameter:
      name: variant
      in: query
      required: false
      description: Keras model variant
      schema:
        $ref: '#/components/schemas/KerasModelVariantEnum'
    ModelVariantsListParameter:
      name: variants
      in: query
      required: true
      description: List of keras model variants, given as a JSON string
      schema:
        type: string
        example: '["int8", "float32"]'
    IncludeDisabledParameter:
      name: includeDisabled
      in: query
      required: false
      description: Whether to include disabled samples. Defaults to true
      schema:
        type: boolean
    IncludeNotProcessedParameter:
      name: includeNotProcessed
      in: query
      required: false
      description: Whether to include non-processed samples. Defaults to true
      schema:
        type: boolean
    DSPDataRawParameter:
      name: raw
      in: query
      required: false
      description: >-
        Whether to download raw data or processed data. Processed data is the
        default.
      schema:
        type: boolean
    RawDataCategoryQueryParameter:
      name: category
      in: query
      required: true
      description: Which of the three acquisition categories to retrieve data from
      schema:
        $ref: '#/components/schemas/RawDataFilterCategory'
    JobIdParameter:
      name: jobId
      in: path
      required: true
      description: Job ID
      schema:
        type: integer
    ParentTypeParameter:
      name: parentType
      in: query
      required: true
      description: Job parent type (project, organization, or standalone)
      schema:
        $ref: '#/components/schemas/JobParentTypeEnum'
    IncludeChildrenJobsParameter:
      name: includeChildrenJobs
      in: query
      required: false
      description: Include the details of each of the children jobs (recursively)
      schema:
        type: boolean
    TrialIdParameter:
      name: trialId
      in: path
      required: true
      description: trial ID
      schema:
        type: string
    TrialIdQueryParameter:
      name: trialId
      in: query
      required: true
      description: trial ID
      schema:
        type: string
    HmacIdParameter:
      name: hmacId
      in: path
      required: true
      description: Hmac key ID
      schema:
        type: integer
    ApiKeyIdParameter:
      name: apiKeyId
      in: path
      required: true
      description: API key ID
      schema:
        type: integer
    UserIdParameter:
      name: userId
      in: path
      required: true
      description: User ID
      schema:
        type: integer
    UserUUIDParameter:
      name: userUUID
      in: path
      required: true
      description: User UUID
      schema:
        type: string
    LimitPayloadValues:
      name: limitPayloadValues
      in: query
      required: false
      description: Limit the number of payload values in the response
      schema:
        type: integer
    ZoomStart:
      name: zoomStart
      in: query
      required: false
      description: Zoom into the sample, with the focus starting at this index
      schema:
        type: integer
    ZoomEnd:
      name: zoomEnd
      in: query
      required: false
      description: Zoom into the sample, with the focus ending at this index
      schema:
        type: integer
    AxisIndexParameter:
      name: axisIx
      in: query
      required: true
      description: Axis index
      schema:
        type: integer
    SliceStartParameter:
      name: sliceStart
      in: query
      required: true
      description: Begin index of the slice
      schema:
        type: integer
    OptionalSliceStartParameter:
      name: sliceStart
      in: query
      required: false
      description: Begin index of the slice. If not given, the whole sample is used.
      schema:
        type: integer
    OptionalSliceEndParameter:
      name: sliceEnd
      in: query
      required: false
      description: End index of the slice. If not given, the whole sample is used.
      schema:
        type: integer
    OptionalSliceEndDefaultToWindowLengthParameter:
      name: sliceEnd
      in: query
      required: false
      description: >-
        End index of the slice. If not given, the sample will be sliced to the
        same length as the impulse input block window length.
      schema:
        type: integer
    DeploymentTypeParameter:
      name: type
      in: query
      required: true
      description: >-
        The name of the built target. You can find this by listing all
        deployment targets through `listDeploymentTargetsForProject` (via `GET
        /v1/api/{projectId}/deployment/targets`) and see the `format` type.
      schema:
        type: string
    ModelTypeParameter:
      name: modelType
      in: query
      required: false
      description: >-
        Optional model type of the build (if not, it uses the settings in the
        Keras block)
      schema:
        $ref: '#/components/schemas/KerasModelTypeEnum'
    ModelEngineParameter:
      name: engine
      in: query
      required: false
      description: >-
        Optional engine for the build (if not, it uses the default engine for
        the deployment target)
      schema:
        $ref: '#/components/schemas/DeploymentTargetEngine'
    DiscourseSsoParameter:
      name: sso
      in: query
      required: true
      description: Single sign-on token
      schema:
        type: string
    DiscourseSigParameter:
      name: sig
      in: query
      required: true
      description: Verification signature
      schema:
        type: string
    CDNPathParameter:
      name: path
      in: query
      required: true
      description: CDN Path
      schema:
        type: string
    RequiredStartDateParameter:
      name: startDate
      in: query
      required: true
      description: Start date
      schema:
        type: string
        format: date-time
    RequiredEndDateParameter:
      name: endDate
      in: query
      required: true
      description: End date
      schema:
        type: string
        format: date-time
    OptionalStartDateParameter:
      name: startDate
      in: query
      required: false
      description: Start date
      schema:
        type: string
        format: date-time
    OptionalEndDateParameter:
      name: endDate
      in: query
      required: false
      description: End date
      schema:
        type: string
        format: date-time
    OrganizationIdParameter:
      name: organizationId
      in: path
      required: true
      description: Organization ID
      schema:
        type: integer
    InnerOrganizationIdParameter:
      name: innerOrganizationId
      in: path
      required: true
      description: Organization ID within the context of a white label
      schema:
        type: integer
    SchedulePermanentEntityDeletionParameter:
      name: fullDeletion
      in: query
      required: false
      description: Set to true to schedule permanent deletion
      schema:
        type: boolean
    SkipUserNotificationParameter:
      name: skipUserNotification
      in: query
      required: false
      description: >
        If set to true, skips sending email notifications to users about their
        account/entity deletion.

        This is typically used for maintenance activities where notification is
        not needed or desired.
      schema:
        type: boolean
    OptimizeOrganizationIdParameter:
      name: organizationId
      in: query
      required: true
      description: Organization ID
      schema:
        type: integer
    OptimizeOrganizationDspIdParameter:
      name: organizationDspId
      in: query
      required: true
      description: Organization DSP ID
      schema:
        type: integer
    PortalIdParameter:
      name: portalId
      in: path
      required: true
      description: Portal ID
      schema:
        type: integer
    MemberIdParameter:
      name: memberId
      in: path
      required: true
      description: Member ID
      schema:
        type: integer
    BucketIdParameter:
      name: bucketId
      in: path
      required: true
      description: Bucket ID
      schema:
        type: integer
    OrganizationDatasetParameter:
      name: dataset
      in: query
      required: false
      description: Selected dataset
      example: activity data
      schema:
        type: string
    OrganizationDatasetRequiredParameter:
      name: dataset
      in: query
      required: true
      description: Selected dataset
      example: activity data
      schema:
        type: string
    OrganizationDataFilterParameter:
      name: filter
      in: query
      required: false
      description: >-
        Data filter in SQL WHERE format, where you can reference 'dataset',
        'bucket', 'name', 'total_file_count', 'total_file_size', 'created' and
        any metadata label through 'metadata->' (dots are replaced by
        underscore).
      example: >-
        dataset = 'activity data' AND (label = 'running' OR metadata->user =
        'Jan Jongboom')
      schema:
        type: string
    OrganizationDataIdParameter:
      name: dataId
      in: path
      required: true
      description: Data ID
      schema:
        type: integer
    OrganizationDatasetPathParameter:
      name: dataset
      in: path
      required: true
      description: Dataset name
      schema:
        type: string
    OrganizationPathInDatasetParameter:
      name: path
      in: query
      required: true
      description: Path, relative to dataset
      schema:
        type: string
    OrganizationFileNameParameter:
      name: fileName
      in: query
      required: true
      description: File name
      schema:
        type: string
    OrganizationDataIdsParameter:
      name: dataIds
      in: query
      required: true
      description: Data IDs as an Array
      example:
        - 3
        - 7
      schema:
        type: string
    LimitResultsParameter:
      name: limit
      in: query
      required: false
      description: Maximum number of results
      schema:
        type: integer
    LogsLimitParameter:
      name: limit
      in: query
      required: true
      description: Maximum number of logs
      schema:
        type: integer
    LogsOffsetParameter:
      name: offset
      in: query
      required: true
      description: Start fetching logs from this offset
      schema:
        type: integer
    LogLevelParameter:
      name: logLevel
      in: query
      required: false
      description: Log level (error, warn, info, debug)
      schema:
        type: string
        enum:
          - error
          - warn
          - info
          - debug
    SearchQueryParameter:
      name: search
      in: query
      required: false
      description: Search query
      schema:
        example: <id> <name>
        type: string
    OffsetResultsParameter:
      name: offset
      in: query
      required: false
      description: >-
        Offset in results, can be used in conjunction with LimitResultsParameter
        to implement paging.
      schema:
        type: integer
    FeatureExplorerOnlyParameter:
      name: featureExplorerOnly
      in: query
      required: false
      description: >-
        Whether to get only the classification results relevant to the feature
        explorer.
      schema:
        type: boolean
    IncludeDebugInfoParameter:
      name: includeDebugInfo
      in: query
      required: false
      description: Whether to return the debug information from FOMO classification.
      schema:
        type: boolean
    ExcludeSensorsParameter:
      name: excludeSensors
      in: query
      required: false
      description: >-
        Whether to exclude sensors in the response (as these can slow down
        requests when you have large pages).
      schema:
        type: boolean
    FiltersLabelsParameter:
      name: labels
      in: query
      required: false
      description: >-
        Only include samples with a label within the given list of labels, given
        as a JSON string
      schema:
        example: '["idle", "snake"]'
        type: string
    FiltersFilenameParameter:
      name: filename
      in: query
      required: false
      description: Only include samples whose filename includes the given filename
      schema:
        type: string
    FiltersMaxLengthParameter:
      name: maxLength
      in: query
      required: false
      description: Only include samples shorter than the given length, in milliseconds
      schema:
        type: integer
    FiltersMinLengthParameter:
      name: minLength
      in: query
      required: false
      description: Only include samples longer than the given length, in milliseconds
      schema:
        type: integer
    FiltersMinFrequencyParameter:
      name: minFrequency
      in: query
      required: false
      description: >-
        Only include samples with higher frequency than given frequency, in
        hertz
      schema:
        type: number
    FiltersMaxFrequencyParameter:
      name: maxFrequency
      in: query
      required: false
      description: Only include samples with lower frequency than given frequency, in hertz
      schema:
        type: number
    FiltersSignatureParameter:
      name: signatureValidity
      in: query
      required: false
      description: Include samples with either valid or invalid signatures
      schema:
        type: string
        enum:
          - both
          - valid
          - invalid
    FiltersDisabledParameter:
      name: includeDisabled
      in: query
      required: false
      description: Include only enabled or disabled samples (or both)
      schema:
        type: string
        enum:
          - both
          - enabled
          - disabled
    FiltersIdsParameter:
      name: ids
      in: query
      required: false
      description: >-
        Only include samples with an ID within the given list of IDs, given as a
        JSON string
      schema:
        example: '[1, 2, 3]'
        type: string
    FiltersExcludeIdsParameter:
      name: excludeIds
      in: query
      required: false
      description: >-
        Exclude samples with an ID within the given list of IDs, given as a JSON
        string
      schema:
        example: '[4, 5, 6]'
        type: string
    FiltersMinLabelParameter:
      name: minLabel
      in: query
      required: false
      description: Only include samples with a label >= this value
      schema:
        type: number
    FiltersMaxLabelParameter:
      name: maxLabel
      in: query
      required: false
      description: Only include samples with a label < this value
      schema:
        type: number
    FiltersDataTypeParameter:
      name: dataType
      in: query
      required: false
      description: Include only samples with a particular data type
      schema:
        type: string
        enum:
          - audio
          - image
    FiltersMinIdParameter:
      name: minId
      in: query
      required: false
      description: Include only samples with an ID >= this value
      schema:
        type: integer
    FiltersMaxIdParameter:
      name: maxId
      in: query
      required: false
      description: Include only samples with an ID < this value
      schema:
        type: integer
    FiltersMetadataParameter:
      name: metadata
      in: query
      required: false
      description: >
        Filter samples by metadata key-value pairs, provided as a JSON string.

        Each item in the filter list is an object with the following properties:
            - "key": Metadata key to filter on.
            - "op": Operator ("eq" for positive match, "neq" for negative match).
            - "values": (optional) Array of values to match/exclude. If omitted or empty, matches/excludes all values for the key.
        In addition to filter objects, the following option objects can be
        specified:
            - { "no_metadata": boolean } - If true, include samples without any metadata
            - { "filters_combinator": ("and" | "or") } - Specifies the combinator and matching mode:
                - "and": All filter items must match (logical AND).
                - "or": Any filter item may match (logical OR); samples with metadata keys not present in the filters are included.
      schema:
        example: >
          Example 1: returns samples where metadata key "foo" is 'bar' or 'baz'
          AND

          metadata key "k" is "v".

          [
              { "no_metadata": true },
              { "filters_combinator": "and" },
              { "key": "foo", "op": "eq", "values": ["bar", "baz"] },
              { "key": "k", "op": "eq", "values": ["v"] }
          ]


          Example 2: returns samples where metadata key "foo" is not 'bar'.
          Samples

          without any metadata are filtered out.

          [
              { "no_metadata": false },
              { "filters_combinator": "or" },
              { "key": "foo", "op": "neq", "values": ["bar"] }
          ]
        type: string
    FiltersMaxDateParameter:
      name: maxDate
      in: query
      required: false
      description: Only include samples that were added before the date given
      schema:
        type: string
        format: date-time
        example: '2024-12-31T00:00:00.000Z'
    FiltersMinDateParameter:
      name: minDate
      in: query
      required: false
      description: Only include samples that where added after the date given
      schema:
        type: string
        format: date-time
        example: '2023-01-01T00:00:00.000Z'
    TransformationIdParameter:
      name: transformationId
      in: path
      required: true
      description: Transformation block ID.
      schema:
        type: integer
    DeployIdParameter:
      name: deployId
      in: path
      required: true
      description: Deploy block ID.
      schema:
        type: integer
    OrganizationCreateProjectIdParameter:
      name: createProjectId
      in: path
      required: true
      description: Create project job ID.
      schema:
        type: integer
    OrganizationCreateProjectFileIdParameter:
      name: createProjectFileId
      in: path
      required: true
      description: Create project job file ID.
      schema:
        type: integer
    ForceCancelParameter:
      name: forceCancel
      in: query
      required: false
      description: >-
        If set to 'true', we won't wait for the job cluster to cancel the job,
        and will mark the job as finished.
      schema:
        type: string
    TransformLimitResultsParameter:
      name: transformLimit
      in: query
      required: true
      description: Maximum number of results of transformation jobs
      schema:
        type: integer
    TransformOffsetResultsParameter:
      name: transformOffset
      in: query
      required: true
      description: >-
        Offset in results of transformation jobs, can be used in conjunction
        with TransformLimitResultsParameter to implement paging.
      schema:
        type: integer
    TransformSelectionParameter:
      name: selection
      in: query
      required: false
      description: >-
        Type of selected rows, either 'all', 'created', 'in-progress' or
        'failed' (defaults to 'all')
      schema:
        type: string
    FindUserQueryParameter:
      name: query
      in: query
      required: true
      description: Part of e-mail address or username
      schema:
        type: string
    VersionIdParameter:
      name: versionId
      in: path
      required: true
      description: Version ID
      schema:
        type: integer
    BlockTypeParameter:
      name: blockType
      in: path
      required: true
      description: Type of block
      schema:
        type: string
    FeatureAx1Parameter:
      name: featureAx1
      in: query
      required: true
      description: Feature axis 1
      schema:
        type: integer
    FeatureAx2Parameter:
      name: featureAx2
      in: query
      required: true
      description: Feature axis 2
      schema:
        type: integer
    FeatureAx3Parameter:
      name: featureAx3
      in: query
      required: true
      description: Feature axis 3
      schema:
        type: integer
    AllowDimensionalityReductionParameter:
      name: allowDimensionalityReduction
      in: query
      required: true
      description: Whether to allow dimensionality reduction in the response
      schema:
        type: boolean
    AfterInputBlockParameter:
      name: afterInputBlock
      in: query
      required: false
      description: Whether to process the image through the input block first
      schema:
        type: boolean
    HealthCheckRequesterParameter:
      name: requester
      in: query
      required: false
      description: Health check requester
      schema:
        type: string
    OrganizationPipelineIdParameter:
      name: pipelineId
      in: path
      required: true
      description: Pipeline ID
      schema:
        type: integer
    ThemeIdParameter:
      name: themeId
      in: path
      required: true
      description: Theme ID
      schema:
        type: integer
    WhitelabelIdParameter:
      name: whitelabelIdentifier
      in: path
      required: true
      description: Whitelabel ID
      schema:
        type: integer
    UsernameOrEmailParameter:
      name: usernameOrEmail
      in: path
      required: true
      description: Username or email
      schema:
        type: string
    EmailParameter:
      name: email
      in: path
      required: true
      description: Email address
      schema:
        type: string
    EmailIdParameter:
      name: emailId
      in: path
      required: true
      description: Unique identifier for an email verification request
      schema:
        type: integer
    RequestedUrlParameter:
      name: requestedUrl
      in: query
      required: true
      description: Full url (host included) that is requested
      schema:
        type: string
    ExcludePipelineTransformationJobsParameter:
      name: excludePipelineTransformJobs
      in: query
      required: false
      description: Whether to exclude pipeline / transformation jobs
      schema:
        type: boolean
    OnlyRootJobsParameter:
      name: rootOnly
      in: query
      required: false
      description: >-
        Whether to exclude jobs with a parent ID (so jobs started as part of
        another job)
      schema:
        type: boolean
    OptionalJobsKeyParameter:
      name: key
      in: query
      required: false
      description: Job key to filter on
      schema:
        type: string
    OptionalJobsCategoryParameter:
      name: category
      in: query
      required: false
      description: Job category to filter on
      schema:
        type: string
    OptionalJobsFinishedParameter:
      name: finished
      in: query
      required: false
      description: Job finish status to filter on
      schema:
        type: string
        enum:
          - successful
          - failed
          - all
    FiltersProjectNameParameter:
      name: project
      in: query
      required: false
      description: Only include projects where the name or owner contains this string
      schema:
        type: string
    FiltersProjectTypesParameter:
      name: projectTypes
      in: query
      required: false
      description: >-
        Comma separated list of project types to filter on. Supported values are
        'audio', 'object-detection', 'image', 'accelerometer', 'other'.
      schema:
        type: string
      example: accelerometer,audio,object-detection
    PortalPathParameter:
      name: path
      in: query
      required: true
      description: Path to file in portal
      schema:
        type: string
    UsernameOrEmailQueryParameter:
      name: user
      in: query
      required: false
      description: Part of e-mail address or username
      schema:
        type: string
    NameQueryParameter:
      name: name
      in: query
      required: false
      description: Part of an entity name (could be a project, an org...)
      schema:
        type: string
    FiltersActiveParameter:
      name: active
      in: query
      required: false
      description: Whether to search for entities (users, orgs) active in the last X days
      schema:
        type: integer
    FiltersIncludeDeletedParameter:
      name: includeDeleted
      in: query
      required: false
      description: Whether to include deleted entities (users, projects, orgs)
      schema:
        type: boolean
    FiltersTierParameter:
      name: tier
      in: query
      required: false
      description: >-
        Whether to search for free, community plus, professional, or enterprise
        entities (users, projects)
      schema:
        $ref: '#/components/schemas/UserTierEnum'
    FieldsParameter:
      name: fields
      in: query
      required: false
      description: Comma separated list of fields to fetch in a query
      schema:
        type: string
        example: id,name
    SortQueryParameter:
      name: sort
      in: query
      required: false
      description: Fields and order to sort query by
      schema:
        type: string
        description: >-
          Comma separated list of fields to sort query by. Prefix with a minus
          (-) sign to indicate descending order. Default order is ascending
        example: id,-name
    FiltersQueryParameter:
      name: filters
      in: query
      required: false
      schema:
        type: string
        description: |
          Comma separated list of filters to apply to the query.
          Filters should be in the format 'field:value'.
        example: billable:true
    IgnoreLastSuccessfulRunQueryParameter:
      name: ignoreLastSuccessfulRun
      in: query
      required: false
      description: >-
        If set then `EI_LAST_SUCCESSFUL_RUN` is not set. You can use this to
        re-run a pipeline from scratch.
      schema:
        type: boolean
    ListPipelinesProjectIdParameter:
      name: projectId
      in: query
      required: false
      description: If set, filters on pipelines which are attached to this project.
      schema:
        type: integer
    DomainNameParameter:
      name: domainName
      in: path
      required: true
      description: Email domain name
      schema:
        type: string
    OrganizationDataCampaignDashboardIdPathParameter:
      name: campaignDashboardId
      in: path
      required: true
      schema:
        type: integer
    OrganizationDataCampaignIdPathParameter:
      name: campaignId
      in: path
      required: true
      schema:
        type: integer
    MigrationIdParameter:
      name: migrationId
      in: path
      required: true
      description: Data migration ID
      schema:
        type: string
    PretrainedModelDownloadParameter:
      name: pretrainedModelDownloadType
      in: path
      required: true
      schema:
        type: string
        enum:
          - tflite_float32
          - tflite_int8
          - onnx
          - saved_model
    EnterpriseTrialIdParameter:
      name: enterpriseTrialId
      in: path
      required: true
      description: Enterprise trial ID
      schema:
        type: integer
    ExcludeIncludedSamplesParameter:
      name: excludeIncludedSamples
      in: query
      required: false
      description: >-
        Whether to exclude 'includedSamples' in the response (as these can slow
        down requests significantly).
      schema:
        type: boolean
    FeatureIdParameter:
      name: featureId
      in: path
      required: true
      description: Feature ID.
      schema:
        $ref: '#/components/schemas/Feature'
    ConfigKeyParameter:
      name: configKey
      in: path
      required: true
      description: Config Key
      schema:
        type: string
    IncludePipelineJobsParameter:
      name: includePipelineJobs
      in: query
      required: false
      description: If enabled, also includes jobs that are part of a pipeline
      schema:
        type: boolean
    ExcludeEdgeImpulseUsersParameter:
      name: excludeEdgeImpulseUsers
      in: query
      required: false
      description: >-
        Whether to exclude Edge Impulse users when counting enterprise
        entitlements usage
      schema:
        type: boolean
    ProjectVisibilityParameter:
      name: projectVisibility
      in: query
      required: false
      description: >-
        What project visibility type to include when counting enterprise
        entitlements usage
      schema:
        $ref: '#/components/schemas/ProjectVisibility'
    DevelopmentBoardIdParameter:
      name: developmentBoardId
      in: path
      required: true
      description: Development board ID.
      schema:
        type: integer
    TunerCoordinatorJobIdParameter:
      name: tunerCoordinatorJobId
      in: path
      required: true
      description: Tuner coordinator job ID
      schema:
        type: integer
    TunerExtendedFromJobIdParameter:
      name: extendedFromJobId
      in: query
      required: false
      description: >-
        Tuner coordinator job ID for the direct descendant job to extend this
        search from
      schema:
        type: integer
    ReportIdParameter:
      name: reportId
      in: path
      required: true
      description: Report ID
      schema:
        type: integer
    CacheKeyParameter:
      name: cacheKey
      in: query
      required: false
      description: >-
        If set, then a long cache header is sent. If this is omitted then a
        no-cache header is sent. You can use this if you f.e. know the last
        modified date of a sample. Stick the last modified date in the cache
        key, so the sample can be stored in browser cache (and will
        automatically be invalidated if the modified date changes).
      schema:
        type: string
    ExportIdParameter:
      name: exportId
      in: path
      required: true
      description: Export ID
      schema:
        type: integer
    ImpulseIdParameter:
      name: impulseId
      in: path
      required: true
      description: Impulse ID
      schema:
        type: integer
    OptionalImpulseIdParameter:
      name: impulseId
      in: query
      required: false
      description: Impulse ID. If this is unset then the default impulse is used.
      schema:
        type: integer
    FilterByImpulseIdParameter:
      name: impulseId
      in: query
      required: false
      description: Impulse ID. If this is unset, data for all impulses is returned.
      schema:
        type: integer
    DetailedImpulsesFormatParameter:
      name: format
      in: query
      required: false
      description: >-
        Format of the detailed impulses response, either 'json' or 'csv'. If not
        set, defaults to 'json'.
      schema:
        type: string
        enum:
          - json
          - csv
    OptionalDeploymentIdParameter:
      name: deploymentId
      in: query
      required: false
      schema:
        type: integer
    DeploymentIdParameter:
      name: deploymentId
      in: query
      required: true
      schema:
        type: integer
    StartTimestampParameter:
      name: startTimestamp
      in: query
      required: true
      schema:
        type: integer
    OptionalStartTimestampParameter:
      name: startTimestamp
      in: query
      required: false
      schema:
        type: integer
    EndTimestampParameter:
      name: endTimestamp
      in: query
      required: true
      schema:
        type: integer
    OptionalEndTimestampParameter:
      name: endTimestamp
      in: query
      required: false
      schema:
        type: integer
    OptionalDeviceFiltersParameter:
      name: devices
      description: Optional list of devices to filter by, given as a JSON string
      in: query
      required: false
      schema:
        type: string
    InferenceHistoryFormatParameter:
      name: format
      description: Data export format
      in: query
      required: true
      schema:
        type: string
        enum:
          - row-per-summary
          - row-per-value
    ActionIdParameter:
      name: actionId
      in: path
      required: true
      description: AI Action ID
      schema:
        type: integer
    ProposedActionsJobIdParameter:
      name: proposedActionsJobId
      in: query
      required: false
      description: >-
        Pass this parameter when querying samples from inside an AI Action job.
        If you pass this parameter in a multi-stage AI Action, previous proposed
        changes (from an earlier step) will be applied to the returned dataset.
      schema:
        type: integer
    TruncateStructuredLabelsParameter:
      name: truncateStructuredLabels
      in: query
      required: false
      description: >-
        If true, only a slice of labels will be returned for samples with
        multiple labels.
      schema:
        type: boolean
    UseCachedUpsampledDataParameter:
      name: useCachedUpsampledData
      in: query
      required: false
      description: >-
        If true, upsampled data will be fetched from cache, returning the
        original sample data when limitPayloadValues > sample length.
      schema:
        type: boolean
    SamplesSortByParameter:
      name: sortBy
      in: query
      required: false
      description: If not specified, "id-desc" is used.
      schema:
        type: string
        enum:
          - id-desc
          - random
    UserExcludeProjectsParameter:
      name: excludeProjects
      in: query
      required: false
      description: >-
        If set to "true", the "projects" field is left empty (will be faster if
        you call this function a lot). Use `getCurrentUserProjects` to get the
        project list in a separate call.
      schema:
        type: boolean
    ExcludeLabelsParameter:
      name: excludeLabels
      in: query
      required: false
      description: >-
        If set to "true", the "labels" field is left empty (which can be big on
        e.g. regression projects).
      schema:
        type: boolean
    FilePrefixParameter:
      name: prefix
      in: query
      required: false
      description: |
        Directory path prefix to filter results. For example:
        - Empty string or "/" lists files in the root directory
        - "docs/" lists files in the docs directory
        - "docs/images/" lists files in the docs/images subdirectory
      schema:
        type: string
        example: docs/images/
    ContinuationTokenParameter:
      name: continuationToken
      in: query
      required: false
      description: >
        Token for paginating through results. When a list operation returns more
        results

        than can fit in a single response, the response will include a
        continuationToken.

        Pass this token in your next request to get the next page of results.


        If not provided, returns the first page of results.

        When there are no more results, the response will not include a
        continuationToken.


        Note: When backed by S3, this maps directly to S3's
        NextContinuationToken.
      schema:
        type: string
        example: 1ueGcxLPRx1Tr/XYExHnhbYLgveDs2J/OIsj2S2YEd2RQbjxqw==
    TrashSourceBucketParameter:
      name: sourceBucket
      in: query
      required: true
      description: |
        Specifies which source bucket to list deleted files from. Options are:
        - ingestion: Files uploaded through data ingestion
        - cdn: Files stored in the CDN
        - user-data: User-generated or uploaded content
      schema:
        type: string
        enum:
          - ingestion
          - cdn
          - user-data
    OptionalDSPCategoryParameter:
      name: category
      in: query
      required: false
      description: Which of the acquisition categories to get metadata from
      schema:
        type: string
        enum:
          - training
          - testing
          - all
    FrameIndexParameter:
      name: frameIndex
      in: query
      required: true
      description: Frame number
      schema:
        type: integer
    ClientIdParameter:
      name: clientId
      in: path
      required: true
      description: Client ID
      schema:
        type: integer
    VlmModelIdParameter:
      name: modelId
      in: path
      required: true
      description: The ID of the VLM model to retrieve
      schema:
        type: integer
    DeploymentVersionParameter:
      name: deploymentVersion
      in: path
      required: true
      description: Deployment version ID
      schema:
        type: integer
  schemas:
    GenericApiResponse:
      type: object
      required:
        - success
      properties:
        success:
          type: boolean
          description: Whether the operation succeeded
        error:
          type: string
          description: Optional error description (set if 'success' was false)
    WindowSettings:
      type: object
      required:
        - windowSizeMs
        - windowIncreaseMs
        - windowIncreasePct
        - zeroPadPercentage
        - windowCount
        - balanceScore
        - valid
      properties:
        windowSizeMs:
          type: number
        windowIncreaseMs:
          type: number
        windowIncreasePct:
          type: number
        zeroPadPercentage:
          type: number
        windowCount:
          type: integer
        balanceScore:
          type: number
        valid:
          type: boolean
    CreateSignedUploadLinkResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          properties:
            url:
              type: string
              description: S3 Upload Link
            ETag:
              type: string
              description: S3 File Tag
    CreateSignedUploadLinkRequest:
      type: object
      required:
        - fileName
        - fileSize
        - fileHash
      properties:
        fileName:
          type: string
          description: file name
        fileSize:
          type: integer
          description: file size in bytes
        fileHash:
          type: string
          description: hash to identify file changes
    PortalFile:
      type: object
      required:
        - name
        - path
        - type
      properties:
        name:
          type: string
        addedDate:
          type: string
          format: date-time
          example: '2019-07-21T17:32:28Z'
        size:
          type: integer
        ETag:
          type: string
        path:
          type: string
        type:
          type: string
          enum:
            - folder
            - file
    ListPortalFilesInFolderResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - files
          properties:
            files:
              type: array
              items:
                $ref: '#/components/schemas/PortalFile'
            continuationToken:
              type: string
    ListPortalFilesInFolderRequest:
      type: object
      required:
        - prefix
      properties:
        prefix:
          type: string
          description: S3 prefix
        continuationToken:
          type: string
          description: >-
            Only one S3 page (1000 items typically) is returned. Pass in the
            continuationToken on the next request to receive the next page.
        onlyFetchFolders:
          type: boolean
          description: If set, then no files will be returned
    PreviewDefaultFilesInFolderResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - files
          properties:
            files:
              type: array
              items:
                $ref: '#/components/schemas/PortalFile'
            isTruncated:
              type: boolean
              description: True if results are truncated.
            truncationReason:
              type: string
              description: >
                Explains why results are truncated; only present in the response
                if isTruncated is true. Results can be truncated if there are
                too many results (more than 500 matches), or if searching for
                more results is too expensive (for example, the dataset contains
                many items but very few match the given wildcard).
              enum:
                - too-many-results
                - too-expensive-search
    PreviewDefaultFilesInFolderRequest:
      type: object
      required:
        - prefix
        - itemsToList
      properties:
        prefix:
          type: string
          description: S3 prefix
        itemsToList:
          description: Return either files or folders matching the specified prefix
          type: string
          enum:
            - files
            - folders
    DeletePortalFileRequest:
      type: object
      required:
        - path
      properties:
        path:
          type: string
          description: S3 path (within the portal)
    RenamePortalFileRequest:
      type: object
      required:
        - oldPath
        - newPath
      properties:
        oldPath:
          type: string
          description: S3 path (within the portal)
        newPath:
          type: string
          description: S3 path (within the portal)
    DownloadPortalFileRequest:
      type: object
      required:
        - path
      properties:
        path:
          type: string
          description: S3 path (within the portal)
    DownloadPortalFileResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - url
          properties:
            url:
              type: string
              description: Signed URL to download the file
    LoginResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - token
          properties:
            token:
              type: string
              description: >-
                JWT token, to be used to log in in the future through
                JWTAuthentication
    GetJWTRequest:
      type: object
      required:
        - username
        - password
      properties:
        username:
          type: string
          description: Username or e-mail address
          example: edge-user-01
        password:
          type: string
          description: Password
        uuid:
          type: string
          description: Evaluation user UUID
        ssoType:
          type: string
          enum:
            - browser
            - cli
        sessionId:
          type: string
          description: Session ID
        totpToken:
          type: string
          description: >-
            TOTP Token. Required if a user has multi-factor authentication with
            a TOTP token enabled. If a user has MFA enabled, but no totpToken is
            submitted; then an error starting with "ERR_TOTP_TOKEN IS REQUIRED"
            is returned. Use this to then prompt for an MFA token and re-login.
    GetJWTResponse:
      example: '`{ "success": true, "token": "A372jdhe.ad3r4gfrg" }`'
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          properties:
            token:
              type: string
              description: >-
                JWT token, to be used to log in in the future through
                JWTAuthentication
            redirectUrl:
              type: string
              description: Redirect URL to follow to complete login
    ProjectPublicData:
      type: object
      required:
        - id
        - name
        - description
        - created
        - owner
        - publicUrl
        - projectType
        - pageViewCount
        - cloneCount
        - tags
      properties:
        id:
          type: integer
          example: 1
        name:
          type: string
          example: Water hammer detection
        description:
          type: string
        created:
          type: string
          format: date-time
          example: '2019-07-21T17:32:28Z'
        owner:
          type: string
          description: User or organization that owns the project
        ownerAvatar:
          type: string
          description: URL to the project owner avatar, if any
        publicUrl:
          type: string
          description: URL of the latest public version of the project, if any
          example: https://studio.edgeimpulse.com/public/40479/latest
        projectType:
          $ref: '#/components/schemas/ProjectType'
        pageViewCount:
          type: integer
        cloneCount:
          type: integer
        totalSamplesCount:
          type: string
        trainingAccuracy:
          type: number
          description: Accuracy on training set.
        testAccuracy:
          type: number
          description: Accuracy on test set.
        readme:
          type: object
          description: Present if a readme is set for this project
          required:
            - markdown
            - html
          properties:
            markdown:
              type: string
            html:
              type: string
        tags:
          type: array
          items:
            type: string
          description: List of project tags
          example:
            - FOMO
            - birds
    ProjectPrivateData:
      type: object
      required:
        - metadata
        - isEnterpriseProject
        - whitelabelId
      properties:
        lastAccessed:
          type: string
          format: date-time
          example: '2019-07-21T17:32:28Z'
        metadata:
          type: object
          description: Metadata about the project
        dataExplorerScreenshot:
          type: string
        isEnterpriseProject:
          type: boolean
          description: Whether this is an enterprise project
        collaborators:
          type: array
          items:
            $ref: '#/components/schemas/ProjectCollaborator'
        whitelabelId:
          type: integer
          nullable: true
          description: >-
            Unique identifier of the white label this project belongs to, if
            any.
    Project:
      type: object
      required:
        - id
        - name
        - description
        - created
        - owner
        - collaborators
        - labelingMethod
        - metadata
        - isEnterpriseProject
        - whitelabelId
        - tier
        - hasPublicVersion
        - isPublic
        - allowsLivePublicAccess
        - ownerIsDeveloperProfile
        - indPauseProcessingSamples
        - publicProjectListed
      properties:
        id:
          type: integer
          example: 1
        name:
          type: string
          example: Water hammer detection
        description:
          type: string
        created:
          type: string
          format: date-time
          example: '2019-07-21T17:32:28Z'
        owner:
          type: string
          description: User or organization that owns the project
        lastAccessed:
          type: string
          format: date-time
          example: '2019-07-21T17:32:28Z'
        lastModified:
          type: string
          format: date-time
          example: '2019-07-21T17:32:28Z'
        lastModificationDetails:
          type: string
          description: Details about the last modification
          example: Data sample added
        logo:
          type: string
          description: Custom logo for this project (not available for all projects)
        ownerUserId:
          type: integer
        ownerOrganizationId:
          type: integer
        ownerAvatar:
          type: string
          description: URL of the project owner avatar, if any.
        ownerIsDeveloperProfile:
          type: boolean
        developerProfileUserId:
          type: integer
          description: User ID of the developer profile, if any.
        collaborators:
          type: array
          items:
            $ref: '#/components/schemas/ProjectCollaborator'
        labelingMethod:
          $ref: '#/components/schemas/ProjectLabelingMethod'
        metadata:
          type: object
          description: Metadata about the project
        dataExplorerScreenshot:
          type: string
        isEnterpriseProject:
          type: boolean
          description: Whether this is an enterprise project
        whitelabelId:
          type: integer
          nullable: true
          description: >-
            Unique identifier of the white label this project belongs to, if
            any.
        whitelabelName:
          type: string
          description: Name of the white label this project belongs to, if any.
        tags:
          type: array
          items:
            type: string
          description: List of project tags
          example:
            - FOMO
            - beers
        category:
          type: string
          description: Project category
          enum:
            - Accelerometer
            - Audio
            - Images
            - Keyword spotting
            - Object detection
            - Other
        license:
          $ref: '#/components/schemas/PublicProjectLicense'
          description: Public project license, if any.
        tier:
          $ref: '#/components/schemas/ProjectTierEnum'
        hasPublicVersion:
          type: boolean
          description: Whether this project has been published or not.
        isPublic:
          type: boolean
          description: >
            Whether this is a public version of a project. A version is a
            snapshot of a project at a certain point in time, which can be used
            to periodically save the state of a project. Versions can be private
            (just for internal use and reference) or public, available to
            everyone. A public version can be cloned by anyone, restoring the
            state of the project at the time into a new, separate project.
        allowsLivePublicAccess:
          type: boolean
          description: >
            Whether this project allows live, public access. Unlike a public
            version, a live public project is not fixed in time, and always
            includes the latest project changes. Similar to public versions, a
            live public project can be cloned by anyone, creating a new,
            separate project.
        indPauseProcessingSamples:
          type: boolean
        publicProjectListed:
          type: boolean
          description: >
            If the project allows public access, whether to list it the public
            projects overview response. If not listed, the project is still
            accessible via direct link. If the project does not allow public
            access, this field has no effect.
        deletedDate:
          type: string
          format: date-time
        fullDeletionDate:
          type: string
          format: date-time
        scheduledFullDeletionDate:
          type: string
          format: date-time
    StaffInfo:
      type: object
      required:
        - isStaff
        - hasSudoRights
      properties:
        isStaff:
          type: boolean
        hasSudoRights:
          type: boolean
        companyName:
          type: string
    UtmParameter:
      type: object
      additionalProperties: true
    User:
      type: object
      required:
        - id
        - username
        - name
        - email
        - created
        - staffInfo
        - pending
        - activated
        - mfaConfigured
      properties:
        id:
          type: integer
          example: 1
        username:
          type: string
          example: janjongboom
        name:
          type: string
          example: Jan Jongboom
        email:
          type: string
          example: quijote@edgeimpulse.com
        photo:
          type: string
          example: https://usercdn.edgeimpulse.com/photos/1.jpg
        created:
          type: string
          format: date-time
          example: '2019-08-31T17:32:28Z'
        lastSeen:
          type: string
          format: date-time
          example: '2019-08-31T17:32:28Z'
        staffInfo:
          $ref: '#/components/schemas/StaffInfo'
        pending:
          type: boolean
        jobTitle:
          type: string
          example: Software Engineer
        permissions:
          description: List of permissions the user has
          type: array
          items:
            $ref: '#/components/schemas/Permission'
        companyName:
          type: string
          example: Edge Impulse Inc.
        activated:
          type: boolean
          description: Whether the user has activated their account or not.
        mfaConfigured:
          type: boolean
          description: Whether the user has configured multi-factor authentication
        stripeCustomerId:
          type: string
          description: Stripe customer ID, if any.
        hasPendingPayments:
          type: boolean
          description: Whether the user has pending payments.
        tier:
          $ref: '#/components/schemas/UserTierEnum'
        idps:
          type: array
          description: >-
            List of identity providers (e.g. Google, GitHub) that the user has
            used to sign in with
          items:
            type: string
    UserExperiment:
      type: object
      required:
        - type
        - title
        - enabled
        - showToUser
      properties:
        type:
          type: string
        title:
          type: string
        help:
          type: string
        enabled:
          type: boolean
        showToUser:
          type: boolean
    UserOrganization:
      type: object
      required:
        - id
        - name
        - isDeveloperProfile
        - whitelabelId
        - isAdmin
        - created
        - trialId
        - trialExpiredDate
        - trialUpgradedDate
        - entitlementLimits
        - userCount
        - adminCount
        - privateProjectCount
        - publicProjectLicense
      properties:
        id:
          type: integer
        name:
          type: string
        logo:
          type: string
        isDeveloperProfile:
          type: boolean
        whitelabelId:
          type: integer
          nullable: true
          description: >-
            Unique identifier of the white label this project belongs to, if
            any.
        isAdmin:
          type: boolean
          description: Whether the user is admin of this organization or not.
        created:
          type: string
          format: date-time
          description: When the organization was created.
          example: '2019-08-31T17:32:28Z'
        trialId:
          type: number
          nullable: true
          description: Unique identifier of the trial this organization belongs to, if any.
          example: 1
        trialExpiredDate:
          type: string
          format: date-time
          nullable: true
          description: >-
            Date when the trial expired, if any. A expired trial has a grace
            period of 30 days before it's associated organization is deleted.
          example: '2019-08-31T17:32:28Z'
        trialUpgradedDate:
          type: string
          format: date-time
          nullable: true
          description: >-
            Date when the trial was upgraded to a full enterprise account, if
            any.
          example: '2019-08-31T17:32:28Z'
        entitlementLimits:
          $ref: '#/components/schemas/EntitlementLimits'
        userCount:
          type: integer
          description: The total number of users that are a member of this organization.
        adminCount:
          type: integer
          description: The number of admin users for this organization.
        privateProjectCount:
          type: integer
          description: The number of private projects for this organization.
        lastAccessed:
          type: string
          format: date-time
          description: Last time this user accessed this organization.
        publicProjectLicense:
          type: object
          description: Default license for new public projects under this organization.
          required:
            - name
            - link
          properties:
            name:
              type: string
            link:
              type: string
    AdminApiUser:
      allOf:
        - $ref: '#/components/schemas/User'
        - type: object
          required:
            - email
            - activated
            - organizations
            - projects
            - experiments
            - tier
            - suspended
            - trials
          properties:
            email:
              type: string
            activated:
              type: boolean
            organizations:
              type: array
              description: >-
                Organizations that the user is a member of. Only filled when
                requesting information about yourself.
              items:
                $ref: '#/components/schemas/UserOrganization'
            projects:
              type: array
              items:
                $ref: '#/components/schemas/Project'
            experiments:
              type: array
              description: >-
                Experiments the user has access to. Enabling experiments can
                only be done through a JWT token.
              items:
                $ref: '#/components/schemas/UserExperiment'
            evaluation:
              type: boolean
              description: Whether this is an ephemeral evaluation account.
            ambassador:
              type: boolean
              description: Whether this user is an ambassador.
            tier:
              $ref: '#/components/schemas/UserTierEnum'
            lastSeen:
              type: string
              format: date-time
            suspended:
              type: boolean
              description: Whether the user is suspended.
            trials:
              type: array
              description: Current or past enterprise trials.
              items:
                $ref: '#/components/schemas/EnterpriseTrial'
            dailyMetrics:
              type: array
              description: Metrics for the last 365 days
              nullable: true
              items:
                $ref: '#/components/schemas/DailyMetricsRecord'
    AdminApiOrganization:
      allOf:
        - $ref: '#/components/schemas/Organization'
        - type: object
          required:
            - projects
          properties:
            projects:
              type: array
              description: Array with organizational projects
              items:
                $ref: '#/components/schemas/Project'
    ListProjects:
      type: object
      required:
        - projects
      properties:
        projects:
          type: array
          description: Array with projects
          items:
            $ref: '#/components/schemas/Project'
    ListProjectsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - $ref: '#/components/schemas/ListProjects'
    ListPublicProjects:
      type: object
      required:
        - projects
        - totalProjectCount
      properties:
        projects:
          type: array
          description: Array with public projects
          items:
            $ref: '#/components/schemas/ProjectPublicData'
        totalProjectCount:
          type: integer
    ListPublicProjectsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - $ref: '#/components/schemas/ListPublicProjects'
    ListPublicProjectTypes:
      type: object
      required:
        - projectTypes
      properties:
        projectTypes:
          type: array
          description: Array with project types
          items:
            type: object
            required:
              - value
              - label
            properties:
              value:
                $ref: '#/components/schemas/ProjectType'
              label:
                type: string
    ListPublicProjectTypesResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - $ref: '#/components/schemas/ListPublicProjectTypes'
    DevelopmentKeys:
      type: object
      properties:
        apiKey:
          type: string
          description: API Key
        hmacKey:
          type: string
          description: HMAC Key
    DevelopmentKeysResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - $ref: '#/components/schemas/DevelopmentKeys'
    CreateDeviceRequest:
      type: object
      required:
        - deviceId
        - deviceType
        - ifNotExists
      properties:
        deviceId:
          type: string
          description: Globally unique device identifier (e.g. MAC address)
          example: ac:87:a3:0a:2d:1b
        deviceType:
          type: string
          description: >-
            Device type, for example the exact model of the device. Should be
            the same for all similar devices
          example: DISCO_L475VG_IOT01A
        ifNotExists:
          type: boolean
          description: Whether to throw an error when this device already exists.
    RenameDeviceRequest:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          description: New name for this device
          example: Jan's development board
    DeviceNameResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          properties:
            name:
              type: string
              description: Device name
    DatasetRatioData:
      type: object
      required:
        - ratio
      properties:
        ratio:
          type: object
          properties:
            training:
              type: integer
              description: number of training samples after rebalance
            testing:
              type: integer
              description: >-
                number of testing samples after rebalance. This ignores test
                data with a label that's not in the training dataset.
    RawSampleData:
      type: object
      required:
        - sample
        - payload
        - totalPayloadLength
      properties:
        sample:
          $ref: '#/components/schemas/Sample'
        payload:
          $ref: '#/components/schemas/RawSamplePayload'
        totalPayloadLength:
          type: integer
          description: Total number of payload values
    ProjectSampleMetadata:
      type: object
      description: Project sample metadata
      required:
        - metadata
      properties:
        metadata:
          type: array
          description: Array with all available sample metadata.
          items:
            $ref: '#/components/schemas/SampleMetadata'
    SampleMetadata:
      type: object
      required:
        - id
        - metadata
      properties:
        id:
          type: integer
          description: Sample ID
        metadata:
          type: object
          description: Sample free form associated metadata
          additionalProperties:
            type: string
    RawSamplePayload:
      type: object
      description: Sensor readings and metadata
      required:
        - device_type
        - sensors
        - values
      properties:
        device_name:
          type: string
          description: >-
            Unique identifier for this device. **Only** set this when the device
            has a globally unique identifier (e.g. MAC address).
          example: ac:87:a3:0a:2d:1b
        device_type:
          type: string
          description: >-
            Device type, for example the exact model of the device. Should be
            the same for all similar devices.
          example: DISCO-L475VG-IOT01A
        sensors:
          type: array
          description: Array with sensor axes
          items:
            $ref: '#/components/schemas/Sensor'
        values:
          type: array
          description: >
            Array of sensor values. One array item per interval, and as many
            items in this array as there are sensor axes. This type is returned
            if there are multiple axes.
          items:
            type: array
            items:
              type: number
        cropStart:
          type: integer
          description: New start index of the cropped sample
          example: 0
        cropEnd:
          type: integer
          description: New end index of the cropped sample
          example: 128
    Sensor:
      type: object
      required:
        - name
        - units
      properties:
        name:
          type: string
          description: Name of the axis
          example: accX
        units:
          type: string
          description: >-
            Type of data on this axis. Needs to comply to SenML units (see
            https://www.iana.org/assignments/senml/senml.xhtml).
    RenameSampleRequest:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          description: New name for this sample
          example: faulty-machine2.A3de
    EditSampleLabelRequest:
      type: object
      properties:
        label:
          type: string
          description: New label for this sample
          example: water-hammer
    BatchEditBoundingBoxesRequest:
      type: object
      required:
        - oldLabels
        - newLabel
      properties:
        oldLabels:
          description: >-
            List of labels to edit. All bounding boxes with this label will be
            edited.
          type: array
          items:
            type: string
        newLabel:
          description: New label. Set to an empty string to remove the bounding boxes.
          type: string
    CropSampleRequest:
      type: object
      required:
        - cropStart
        - cropEnd
      properties:
        cropStart:
          type: integer
          description: New start index of the sample
          example: 0
        cropEnd:
          type: integer
          description: New end index of the sample
          example: 128
    SplitSampleInFramesRequest:
      type: object
      properties:
        fps:
          type: integer
          description: Frames per second to extract from this video.
    StoreSegmentLengthRequest:
      type: object
      required:
        - segmentLength
      properties:
        segmentLength:
          type: number
          description: Last segment length in milliseconds.
          example: 1000
    ClassifySampleResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - classifications
            - sample
            - windowSizeMs
            - windowIncreaseMs
            - alreadyInDatabase
          properties:
            classifications:
              type: array
              items:
                $ref: '#/components/schemas/ClassifySampleResponseClassification'
            sample:
              $ref: '#/components/schemas/RawSampleData'
            windowSizeMs:
              type: integer
              description: >-
                Size of the sliding window (as set by the impulse) in
                milliseconds.
              example: 2996
            windowIncreaseMs:
              type: integer
              description: >-
                Number of milliseconds that the sliding window increased with
                (as set by the impulse)
              example: 10
            alreadyInDatabase:
              type: boolean
              description: Whether this sample is already in the training database
            warning:
              type: string
    GetInferenceMetricsRequest:
      type: object
      required:
        - metrics
      properties:
        metrics:
          type: array
          items:
            type: object
            required:
              - metricKey
            properties:
              metricKey:
                type: string
                description: Metric data to fetch, e.g. "classificationCounter"
              filters:
                type: string
                description: >
                  Filters, given as a JSON string.

                  Example 1; a basic filter condition (deviceId == 1):
                      '{"key":"deviceId","condition":"EQ","value":"1"}'
                  Example 2; a complex filter combining multiple conditions
                  (deviceId == 1 OR class != "can"):
                      '{"queries":[{"key":"deviceId","condition":"EQ","value":"1"},{"key":"class","condition":"NEQ","value":"can"}],"combinator":"OR"}'
              aggregate:
                type: object
                description: Aggregation criteria
                properties:
                  aggregation:
                    type: string
                    description: Aggregation function to apply
                    enum:
                      - avg
                      - min
                      - max
                      - sum
                  byMetricKeys:
                    type: array
                    description: >
                      Metric keys to aggregate by; if empty, will aggregate over
                      all metrics. Examples:
                          - [ "deviceId" ] => aggregates per-device, returning a set of data for each device
                          - [ "deviceId", "class" ] => aggregates per-device and per-class, returning |classes| x |devices| sets of data
                    items:
                      type: string
        splitBy:
          type: string
          description: >-
            Custom data "split", e.g. querying 28 days of data split by week
            will return 4 sets of weekly data
          enum:
            - daily
            - weekly
            - monthly
    InferenceHistoryTimestamp:
      type: object
      required:
        - index
        - timestamp
      properties:
        index:
          type: number
        timestamp:
          type: number
    InferenceHistoryEntry:
      type: object
      required:
        - label
        - value
      properties:
        label:
          type: string
        value:
          type: number
    StoreInferenceHistoryRequest:
      type: object
      required:
        - summaries
      properties:
        summaries:
          type: array
          items:
            type: object
            required:
              - start
              - end
              - classificationCounter
              - mean
              - standardDeviation
              - metrics
            properties:
              start:
                $ref: '#/components/schemas/InferenceHistoryTimestamp'
              end:
                $ref: '#/components/schemas/InferenceHistoryTimestamp'
              classificationCounter:
                type: array
                items:
                  $ref: '#/components/schemas/InferenceHistoryEntry'
              mean:
                type: array
                items:
                  $ref: '#/components/schemas/InferenceHistoryEntry'
              standardDeviation:
                type: array
                items:
                  $ref: '#/components/schemas/InferenceHistoryEntry'
              metrics:
                type: object
    GetInferenceMetricsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - data
            - timestamps
          properties:
            data:
              type: array
              description: >-
                Metric data, with one entry per metric, aggregate group, and
                split.
              items:
                type: object
                required:
                  - key
                  - data
                properties:
                  key:
                    type: string
                  data:
                    type: array
                    items:
                      type: number
            timestamps:
              description: Set of all timestamps for which this data spans
              type: array
              items:
                type: number
    GetInferenceHistoryResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - summaryByTime
            - summaryByDevice
            - allClasses
            - allMetrics
            - allDevices
          properties:
            summaryByTime:
              type: array
              items:
                type: object
                required:
                  - startTimestamp
                  - endTimestamp
                  - data
                properties:
                  startTimestamp:
                    type: number
                  endTimestamp:
                    type: number
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/InferenceHistoryAggregate'
            summaryByDevice:
              type: array
              items:
                $ref: '#/components/schemas/InferenceHistoryAggregate'
            allClasses:
              type: array
              items:
                type: string
            allDevices:
              type: array
              items:
                type: object
                required:
                  - deviceId
                  - deviceName
                properties:
                  deviceId:
                    type: string
                  deviceName:
                    type: string
            allMetrics:
              type: array
              items:
                type: string
    InferenceSummaryMetrics:
      type: object
      required:
        - key
        - value
      properties:
        key:
          type: string
        value:
          type: number
    InferenceHistoryAggregate:
      type: object
      required:
        - deviceId
        - deviceName
        - totalInferences
        - totalClassifications
        - means
        - standardDeviations
        - metrics
      properties:
        deviceId:
          type: string
        deviceName:
          type: string
        totalInferences:
          type: number
        totalClassifications:
          type: array
          items:
            $ref: '#/components/schemas/InferenceSummaryMetrics'
        means:
          type: array
          items:
            $ref: '#/components/schemas/InferenceSummaryMetrics'
        standardDeviations:
          type: array
          items:
            $ref: '#/components/schemas/InferenceSummaryMetrics'
        metrics:
          type: array
          items:
            $ref: '#/components/schemas/InferenceSummaryMetrics'
    ClassifySampleResponseMultipleVariants:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - classifications
            - sample
            - windowSizeMs
            - windowIncreaseMs
            - alreadyInDatabase
          properties:
            results:
              type: array
              items:
                $ref: '#/components/schemas/ClassifySampleResponseVariantResults'
            sample:
              $ref: '#/components/schemas/RawSampleData'
            windowSizeMs:
              type: integer
              description: >-
                Size of the sliding window (as set by the impulse) in
                milliseconds.
              example: 2996
            windowIncreaseMs:
              type: integer
              description: >-
                Number of milliseconds that the sliding window increased with
                (as set by the impulse)
              example: 10
            alreadyInDatabase:
              type: boolean
              description: Whether this sample is already in the training database
    ClassifySampleResponseVariantResults:
      type: object
      required:
        - variant
        - classifications
      properties:
        variant:
          description: The model variant
          $ref: '#/components/schemas/KerasModelVariantEnum'
        classifications:
          type: array
          items:
            $ref: '#/components/schemas/ClassifySampleResponseClassification'
    AnomalyResult:
      type: object
      properties:
        boxes:
          type: array
          description: >-
            For visual anomaly detection. An array of bounding box objects, (x,
            y, width, height, score, label), one per detection in the image.
            Filtered by the minimum confidence rating of the learn block.
          items:
            $ref: '#/components/schemas/BoundingBoxWithScore'
        scores:
          type: array
          description: >-
            2D array of shape (n, n) with raw anomaly scores for visual anomaly
            detection, where n can be calculated as ((1/8 of image input size)/2
            - 1). The scores corresponds to each grid cell in the image's
            spatial matrix.
          items:
            type: array
            items:
              type: number
        meanScore:
          type: number
          description: Mean value of the scores.
        maxScore:
          type: number
          description: Maximum value of the scores.
    StructuredClassifyResult:
      type: object
      required:
        - boxes
        - scores
        - mAP
        - f1
        - precision
        - recall
      properties:
        boxes:
          type: array
          description: >-
            For object detection. An array of bounding box arrays, (x, y, width,
            height), one per detection in the image.
          items:
            type: array
            items:
              type: number
        labels:
          type: array
          description: >-
            For object detection. An array of labels, one per detection in the
            image.
          items:
            type: string
        scores:
          type: array
          description: >-
            For object detection. An array of probability scores, one per
            detection in the image.
          items:
            type: number
        mAP:
          type: number
          description: >-
            For object detection. A score that indicates accuracy compared to
            the ground truth, if available.
        f1:
          type: number
          description: >-
            For FOMO. A score that combines the precision and recall of a
            classifier into a single metric, if available.
        precision:
          type: number
          description: >-
            A measure of how many of the positive predictions made are correct
            (true positives).
        recall:
          type: number
          description: >-
            A measure of how many of the positive cases the classifier correctly
            predicted, over all the positive cases.
        debugInfoJson:
          type: string
          description: Debug info in JSON format
          example: |
            {
                "y_trues": [
                    {"x": 0.854, "y": 0.453125, "label": 1},
                    {"x": 0.197, "y": 0.53125, "label": 2}
                ],
                "y_preds": [
                    {"x": 0.916, "y": 0.875, "label": 1},
                    {"x": 0.25, "y": 0.541, "label": 2}
                ],
                "assignments": [
                    {"yp": 1, "yt": 1, "label": 2, "distance": 0.053}
                ],
                "normalised_min_distance": 0.2,
                "all_pairwise_distances": [
                    [0, 0, 0.426],
                    [1, 1, 0.053]
                ],
                "unassigned_y_true_idxs": [0],
                "unassigned_y_pred_idxs": [0]
            }
    ClassifySampleResponseClassification:
      type: object
      required:
        - learnBlock
        - result
        - expectedLabels
        - minimumConfidenceRating
        - thresholds
      properties:
        learnBlock:
          $ref: '#/components/schemas/ImpulseLearnBlock'
        result:
          type: array
          description: Classification result, one item per window.
          example:
            - idle: 0.0002
              wave: 0.9998
              anomaly: -0.42
          items:
            type: object
            description: >-
              Classification value per label. For a neural network this will be
              the confidence, for anomalies the anomaly score.
            additionalProperties:
              type: number
        anomalyResult:
          type: array
          description: >-
            Anomaly scores and computed metrics for visual anomaly detection,
            one item per window.
          items:
            $ref: '#/components/schemas/AnomalyResult'
        structuredResult:
          type: array
          description: >-
            Results of inferencing that returns structured data, such as object
            detection
          items:
            $ref: '#/components/schemas/StructuredClassifyResult'
        minimumConfidenceRating:
          type: number
          description: >-
            DEPRECATED, see "thresholds" instead. The minimum confidence rating
            for this block. For regression, this is the absolute error (which
            can be larger than 1).
        details:
          type: array
          description: >-
            Structured outputs and computed metrics for some model types (e.g.
            object detection), one item per window.
          items:
            $ref: '#/components/schemas/ClassifySampleResponseClassificationDetails'
        objectDetectionLastLayer:
          $ref: '#/components/schemas/ObjectDetectionLastLayer'
        expectedLabels:
          type: array
          description: An array with an expected label per window.
          items:
            $ref: '#/components/schemas/StructuredLabel'
        expectedAnomalyOutcome:
          type: array
          description: >
            An array with the expected anomaly outcome for each window — either
            “anomaly” or “no anomaly”. The outcome is determined by which labels
            are marked as anomalous in the project setup, or by the sample label
            if no such configuration is defined.
          items:
            $ref: '#/components/schemas/StructuredLabel'
        thresholds:
          type: array
          description: List of configurable thresholds for this block.
          items:
            $ref: '#/components/schemas/BlockThreshold'
        isMultiLabel:
          type: boolean
    ClassifySampleResponseClassificationDetails:
      type: object
      properties:
        boxes:
          type: array
          description: Bounding boxes predicted by localization model
          items:
            type: array
            items:
              type: number
        labels:
          type: array
          description: Labels predicted by localization model
          items:
            type: number
        scores:
          type: array
          description: Scores predicted by localization model
          items:
            type: number
        mAP:
          type: number
          description: >-
            For object detection, the COCO mAP computed for the predictions on
            this image
        f1:
          type: number
          description: For FOMO, the F1 score computed for the predictions on this image
    ClassifyJobResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - result
            - predictions
            - accuracy
            - additionalMetricsByLearnBlock
            - availableVariants
          properties:
            result:
              type: array
              items:
                $ref: '#/components/schemas/ModelResult'
            predictions:
              type: array
              items:
                $ref: '#/components/schemas/ModelPrediction'
            accuracy:
              type: object
              required:
                - totalSummary
                - summaryPerClass
                - confusionMatrixValues
                - rows
                - allLabels
              properties:
                totalSummary:
                  type: object
                  required:
                    - good
                    - bad
                  properties:
                    good:
                      type: integer
                    bad:
                      type: integer
                summaryPerClass:
                  type: object
                  additionalProperties:
                    type: object
                    required:
                      - good
                      - bad
                    properties:
                      good:
                        type: integer
                      bad:
                        type: integer
                confusionMatrixValues:
                  type: object
                  additionalProperties:
                    type: object
                    additionalProperties:
                      type: number
                allLabels:
                  type: array
                  items:
                    type: string
                accuracyScore:
                  type: number
                balancedAccuracyScore:
                  type: number
                anomalyAccuracyScore:
                  type: number
                noAnomalyAccuracyScore:
                  type: number
                mseScore:
                  type: number
            additionalMetricsByLearnBlock:
              type: array
              items:
                type: object
                required:
                  - learnBlockId
                  - learnBlockName
                  - additionalMetrics
                properties:
                  learnBlockId:
                    type: integer
                  learnBlockName:
                    type: string
                  additionalMetrics:
                    type: array
                    items:
                      $ref: '#/components/schemas/AdditionalMetric'
            availableVariants:
              type: array
              description: >-
                List of all model variants for which classification results
                exist
              items:
                $ref: '#/components/schemas/KerasModelVariantEnum'
            noResultsBecauseThresholdsChanged:
              type: string
              description: >
                If set to true, there are currently no results because
                thresholds were changed (e.g. on live classification);

                and what action you can run to get new results the quickest.

                If the value is "can_regenerate_model_summary" you can run
                'regenerateModelTestingSummary'.

                If the value is "should_rerun_full_job", you need to run
                'startClassifyJob' or 'startEvaluateJob'.
              enum:
                - can_regenerate_model_summary
                - should_rerun_full_job
    ClassifyJobResponsePage:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - result
            - predictions
            - totalCount
          properties:
            result:
              type: array
              items:
                $ref: '#/components/schemas/ModelResult'
            predictions:
              type: array
              items:
                $ref: '#/components/schemas/ModelPrediction'
            totalCount:
              type: integer
              description: Total sample count
    MetricsAllVariantsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          properties:
            metrics:
              type: array
              items:
                $ref: '#/components/schemas/MetricsForModelVariant'
    MetricsForModelVariant:
      type: object
      required:
        - variant
      properties:
        variant:
          description: The model variant
          $ref: '#/components/schemas/KerasModelVariantEnum'
        accuracy:
          description: The overall accuracy for the given model variant
          type: number
    EvaluateResultValue:
      type: object
      properties:
        raw:
          description: The value based on the model alone
          type: number
        withAnomaly:
          description: The value including the result of anomaly detection
          type: number
    ModelVariantStats:
      type: object
      required:
        - modelType
        - learnBlockType
        - learnBlockId
        - confusionMatrix
        - confusionMatrixRowHeaders
        - confusionMatrixColumnHeaders
        - accuracy
        - trainingLabels
        - classificationLabels
      properties:
        modelType:
          description: The type of model
          $ref: '#/components/schemas/KerasModelTypeEnum'
        learnBlockId:
          description: The learning block this model variant is from
          type: integer
        learnBlockType:
          $ref: '#/components/schemas/LearnBlockType'
        confusionMatrix:
          description: >-
            A map from actual labels to predicted labels, where actual labels
            are listed in `trainingLabels` and possible predicted labels are
            listed in `classificationLabels`.
          type: object
          additionalProperties:
            type: object
            additionalProperties:
              type: object
              $ref: '#/components/schemas/EvaluateResultValue'
        trainingLabels:
          description: >-
            The labels present in the model's training data. These are all
            present in the first dimension of the confusion matrix.
          type: array
          items:
            type: string
        classificationLabels:
          description: >-
            The possible labels resulting from classification. These may be
            present in the second dimension of the confusion matrix.
          type: array
          items:
            type: string
        totalWindowCount:
          description: The total number of windows that were evaluated
          type: integer
        totalCorrectWindowCount:
          description: The total number of windows that the model classified correctly
          $ref: '#/components/schemas/EvaluateResultValue'
        accuracy:
          description: The model's accuracy as a percentage
          $ref: '#/components/schemas/EvaluateResultValue'
    EvaluateJobResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - result
          properties:
            result:
              type: array
              items:
                $ref: '#/components/schemas/ModelVariantStats'
    TargetConstraints:
      type: object
      required:
        - targetDevices
        - applicationBudgets
      properties:
        selectedTargetBasedOn:
          type: string
          description: >-
            A type explaining how the target was chosen. If updating this
            manually, use the 'user-configured' type
          enum:
            - user-configured
            - default
            - default-accepted
            - recent-project
            - connected-device
        targetDevices:
          type: array
          description: >-
            The potential targets for the project, where each entry captures
            hardware attributes that allow target guidance throughout the Studio
            workflow. The first target in the list is considered as the selected
            target for the project.
          items:
            $ref: '#/components/schemas/TargetConstraintsDevice'
        applicationBudgets:
          type: array
          description: >-
            A list of application budgets to be configured based on target
            device. An application budget enables guidance on performance and
            resource usage. The first application budget in the list is
            considered as the selected budget for the project.
          items:
            $ref: '#/components/schemas/ApplicationBudget'
    TargetConstraintsDevice:
      type: object
      properties:
        processors:
          type: array
          description: Target processors
          items:
            $ref: '#/components/schemas/TargetProcessor'
        board:
          type: string
          description: The exact dev board part number, if available
        name:
          type: string
          description: Display name in Studio
        latencyDevice:
          type: string
          description: MCU identifier, if available
          example: cortex-m4f-80mhz
    TargetProcessor:
      type: object
      properties:
        part:
          type: string
          description: The exact part number, if available
        format:
          type: string
          description: >-
            Processor type, serving as a broad descriptor for the intended
            use-case
          example: low-end MCU
        architecture:
          type: string
          description: >-
            Processor family, informing about the processor's instruction set
            and core design
          example: Cortex-M
        specificArchitecture:
          type: string
          description: >-
            Processor architecture, informing about the specific processor, if
            known
          example: Cortex-M0+
        accelerator:
          type: string
          description: Target accelerator, if any
          example: Arm Cortex-U55
        fpu:
          type: boolean
          description: Does the target processor have a floating point unit
        clockRateMhz:
          description: Clock rate of the processor
          $ref: '#/components/schemas/ResourceRange'
        memory:
          $ref: '#/components/schemas/TargetMemory'
    ApplicationBudget:
      type: object
      description: >-
        Specifies limits for your specific application, as available RAM and ROM
        for the model's operation and the maximum allowed latency.
      properties:
        latencyPerInferenceMs:
          $ref: '#/components/schemas/ResourceRange'
        energyPerInferenceJoules:
          $ref: '#/components/schemas/ResourceRange'
        memoryOverhead:
          $ref: '#/components/schemas/TargetMemory'
    ResourceRange:
      type: object
      description: Describes range of expected availability for an arbitrary resource
      properties:
        minimum:
          type: number
        maximum:
          type: number
    TargetMemory:
      type: object
      description: RAM and ROM specifications of target
      properties:
        ram:
          $ref: '#/components/schemas/MemorySpec'
        rom:
          $ref: '#/components/schemas/MemorySpec'
    MemorySpec:
      type: object
      description: Describes performance characteristics of a particular memory type
      properties:
        fastBytes:
          $ref: '#/components/schemas/ResourceRange'
        slowBytes:
          $ref: '#/components/schemas/ResourceRange'
    AllProjectModelVariants:
      type: array
      description: All model variants relevant for all learn blocks in the project
      items:
        $ref: '#/components/schemas/ProjectModelVariant'
    ProjectModelVariant:
      type: object
      required:
        - variant
        - isReferenceVariant
        - isEnabled
        - isSelected
      properties:
        variant:
          $ref: '#/components/schemas/KerasModelVariantEnum'
        isReferenceVariant:
          type: boolean
          description: >-
            True if this model variant is the default or "reference variant" for
            this project
        isEnabled:
          type: boolean
          description: >-
            True if profiling for this model variant is enabled for the current
            project
        isSelected:
          type: boolean
          description: >-
            True if this is the selected model variant for this project, used to
            keep the same view after refreshing. Update this via
            defaultProfilingVariant in UpdateProjectRequest.
    CreateImpulseRequest:
      type: object
      required:
        - inputBlocks
        - dspBlocks
        - learnBlocks
      properties:
        name:
          type: string
          description: >-
            Name for this impulse (optional). If no name is provided one is
            created based on your blocks.
        inputBlocks:
          type: array
          description: Input Blocks that are part of this impulse
          items:
            $ref: '#/components/schemas/ImpulseInputBlock'
        dspBlocks:
          type: array
          description: DSP Blocks that are part of this impulse
          items:
            $ref: '#/components/schemas/ImpulseDspBlock'
        learnBlocks:
          type: array
          description: Learning Blocks that are part of this impulse
          items:
            $ref: '#/components/schemas/ImpulseLearnBlock'
        postProcessingBlocks:
          type: array
          description: Post-processing blocks that are part of this impulse
          items:
            $ref: '#/components/schemas/ImpulsePostProcessingBlock'
        type:
          $ref: '#/components/schemas/ImpulseType'
    CreateImpulseResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - id
          properties:
            id:
              type: integer
              description: ID of the new impulse
    CreateNewEmptyImpulseRequest:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ImpulseType'
    CreateNewEmptyImpulseResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - id
            - redirectUrl
          properties:
            id:
              type: integer
              description: ID of the new impulse
            redirectUrl:
              type: string
              description: Link to redirect the user to afterwards
    Impulse:
      type: object
      required:
        - id
        - name
        - inputBlocks
        - dspBlocks
        - learnBlocks
        - postProcessingBlocks
        - type
      properties:
        id:
          type: integer
          description: ID for this impulse.
        name:
          type: string
          description: Name for this impulse.
        inputBlocks:
          type: array
          description: Input Blocks that are part of this impulse
          items:
            $ref: '#/components/schemas/ImpulseInputBlock'
        dspBlocks:
          type: array
          description: DSP Blocks that are part of this impulse
          items:
            $ref: '#/components/schemas/ImpulseDspBlock'
        learnBlocks:
          type: array
          description: Learning Blocks that are part of this impulse
          items:
            $ref: '#/components/schemas/ImpulseLearnBlock'
        postProcessingBlocks:
          type: array
          description: Post-processing blocks that are part of this impulse
          items:
            $ref: '#/components/schemas/ImpulsePostProcessingBlock'
        type:
          $ref: '#/components/schemas/ImpulseType'
    ImpulseType:
      type: string
      description: >
        Specifies the type of impulse. Options include: - default: Standard Edge
        Impulse pipeline. - BYOM: Impulse that includes a pretrained model. -
        VLM: Impulse created as part of a Vision Learning Model (VLM) workflow.
      enum:
        - default
        - BYOM
        - VLM
    ImpulseInputBlockDatasetSubset:
      type: object
      description: >-
        Only generate features for samples where (sample_id + datasetSubsetSeed)
        % datasetSubset) == 0
      required:
        - includePercentage
      properties:
        includePercentage:
          description: >-
            Number between 0 and 100, with the % of data that should be
            _included_
          type: number
        seed:
          description: Seed number (optional). If not specified, the seed is set to 0.
          type: integer
    ImpulseInputBlock:
      type: object
      required:
        - id
        - type
        - name
        - title
      properties:
        id:
          type: integer
          minimum: 1
          description: >-
            Identifier for this block. Make sure to up this number when creating
            a new block via `getNewBlockId`, and don't re-use identifiers. If
            the block hasn't changed, keep the ID as-is. ID must be unique
            across the project and greather than zero (>0).
        type:
          type: string
          description: Block type (either time-series, image or features)
          example: time-series
          enum:
            - time-series
            - image
            - features
        name:
          type: string
          description: Block name, will be used in menus
          example: Time series
        title:
          type: string
          description: Block title, used in the impulse UI
          example: Time series
        windowSizeMs:
          type: integer
          description: Size of the sliding window in milliseconds
          example: 2004
        windowIncreaseMs:
          type: integer
          description: >-
            We use a sliding window to go over the raw data. How many
            milliseconds to increase the sliding window with for each step.
        frequencyHz:
          type: number
          description: (Input only) Frequency of the input data in Hz
          example: 60
        classificationWindowIncreaseMs:
          type: integer
          description: >-
            We use a sliding window to go over the raw data. How many
            milliseconds to increase the sliding window with for each step in
            classification mode.
        padZeros:
          type: boolean
          description: Whether to zero pad data when a data item is too short
        labelingMethodMultiLabel:
          type: object
          description: How to pick the label for multi-label samples
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - end-of-window
                - anywhere-in-window
            labels:
              description: >-
                Required when choosing "anywhere-in-window". The list of classes
                that should trigger detection (e.g. "interference").
              type: array
              items:
                type: string
        imageWidth:
          type: integer
          description: Width all images are resized to before training
          example: 28
        imageHeight:
          type: integer
          description: Width all images are resized to before training
          example: 28
        resizeMode:
          $ref: '#/components/schemas/ImageInputResizeMode'
        resizeMethod:
          type: string
          description: Resize method to use when resizing images
          example: squash
          enum:
            - lanczos3
            - nearest
        cropAnchor:
          type: string
          description: If images are resized using a crop, choose where to anchor the crop
          example: middle-center
          enum:
            - top-left
            - top-center
            - top-right
            - middle-left
            - middle-center
            - middle-right
            - bottom-left
            - bottom-center
            - bottom-right
        createdBy:
          type: string
          description: >-
            The system component that created the block version (createImpulse |
            clone | tuner). Cannot be set via API.
          example: createImpulse
        createdAt:
          type: string
          format: date-time
          description: >-
            The datetime that the block version was created. Cannot be set via
            API.
        datasetSubset:
          $ref: '#/components/schemas/ImpulseInputBlockDatasetSubset'
    ImpulseDspBlock:
      type: object
      required:
        - id
        - type
        - name
        - axes
        - title
        - implementationVersion
      properties:
        id:
          minimum: 1
          type: integer
          description: >-
            Identifier for this block. Make sure to up this number when creating
            a new block via `getNewBlockId`, and don't re-use identifiers. If
            the block hasn't changed, keep the ID as-is. ID must be unique
            across the project and greather than zero (>0).
        type:
          type: string
          description: Block type
          example: spectral-analysis
        name:
          type: string
          description: Block name, will be used in menus
          example: Spectral features
        axes:
          type: array
          description: Input axes, identified by the name in the name of the axis
          items:
            type: string
            example: accX
        title:
          type: string
          description: Block title, used in the impulse UI
          example: Spectral Analysis
        valuesPerAxis:
          type: integer
          description: >-
            Number of features this DSP block outputs per axis. This is only set
            when the DSP block is configured.
          example: 11
        input:
          type: integer
          description: The ID of the Input block a DSP block is connected to
          example: 1
        createdBy:
          type: string
          description: >-
            The system component that created the block version (createImpulse |
            clone | tuner). Cannot be set via API.
          example: createImpulse
        createdAt:
          type: string
          format: date-time
          description: >-
            The datetime that the block version was created. Cannot be set via
            API.
        implementationVersion:
          type: integer
          description: Implementation version of the block
        organization:
          type: object
          required:
            - id
            - dspId
          properties:
            id:
              type: integer
            dspId:
              type: integer
        customUrl:
          type: string
          description: Required for type 'custom'
        namedAxes:
          type: array
          description: Named axes for the block
          items:
            type: object
            required:
              - name
            properties:
              name:
                type: string
                description: Name of the axis
              description:
                type: string
                description: Description of the axis
              required:
                type: boolean
                description: Whether the axis is required
              selectedAxis:
                type: string
                description: The selected axis for the block
    ImpulseLearnBlock:
      type: object
      required:
        - id
        - type
        - name
        - dsp
        - title
      properties:
        id:
          type: integer
          minimum: 1
          description: >-
            Identifier for this block. Make sure to up this number when creating
            a new block via `getNewBlockId`, and don't re-use identifiers. If
            the block hasn't changed, keep the ID as-is. ID must be unique
            across the project and greather than zero (>0).
        type:
          $ref: '#/components/schemas/LearnBlockType'
        name:
          type: string
          description: >-
            Block name, will be used in menus. If a block has a baseBlockId,
            this field is ignored and the base block's name is used instead.
          example: NN Classifier
        dsp:
          type: array
          description: DSP dependencies, identified by DSP block ID
          items:
            type: integer
            example: 27
        title:
          type: string
          description: Block title, used in the impulse UI
          example: Classification (Keras)
        createdBy:
          type: string
          description: >-
            The system component that created the block version (createImpulse |
            clone | tuner). Cannot be set via API.
          example: createImpulse
        createdAt:
          type: string
          format: date-time
          description: >-
            The datetime that the block version was created. Cannot be set via
            API.
    ImpulsePostProcessingBlock:
      type: object
      required:
        - id
        - type
        - name
        - title
        - implementationVersion
      properties:
        id:
          minimum: 1
          type: integer
          description: >-
            Identifier for this block. Make sure to up this number when creating
            a new block via `getNewBlockId`, and don't re-use identifiers. If
            the block hasn't changed, keep the ID as-is. ID must be unique
            across the project and greather than zero (>0).
        type:
          type: string
          description: Block type
          example: object-tracking
        name:
          type: string
          description: Block name, will be used in menus
          example: Object tracking
        title:
          type: string
          description: Block title, used in the impulse UI
          example: Object tracking
        createdBy:
          type: string
          description: >-
            The system component that created the block version (createImpulse |
            clone | tuner). Cannot be set via API.
          example: createImpulse
        createdAt:
          type: string
          format: date-time
          description: >-
            The datetime that the block version was created. Cannot be set via
            API.
        implementationVersion:
          type: integer
          description: Implementation version of the block
    DspRunRequestWithFeatures:
      type: object
      required:
        - features
        - params
        - drawGraphs
        - requestPerformance
      properties:
        features:
          type: array
          description: >-
            Array of features. If you have multiple axes the data should be
            interleaved (e.g. [ax0_val0, ax1_val0, ax2_val0, ax0_val1, ax1_val1,
            ax2_val1]).
          items:
            type: integer
        params:
          type: object
          description: DSP parameters with values
          example:
            scale-axes: '10'
          additionalProperties:
            type: string
            nullable: true
        drawGraphs:
          type: boolean
          description: Whether to generate graphs (will take longer)
        requestPerformance:
          type: boolean
          description: Whether to request performance info (will take longer unless cached)
    DspRunRequestWithoutFeatures:
      type: object
      required:
        - params
        - store
      properties:
        params:
          type: object
          description: DSP parameters with values
          example:
            scale-axes: '10'
          additionalProperties:
            type: string
            nullable: true
        store:
          type: boolean
          description: Whether to store the DSP parameters as the new default parameters.
    DspRunRequestWithoutFeaturesReadOnly:
      type: object
      required:
        - params
      properties:
        params:
          type: object
          description: DSP parameters with values
          example:
            scale-axes: '10'
          additionalProperties:
            type: string
            nullable: true
    DspRunResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - features
            - graphs
          properties:
            features:
              type: array
              description: >-
                Array of processed features. Laid out according to the names in
                'labels'
              items:
                type: number
            graphs:
              type: array
              description: Graphs to plot to give an insight in how the DSP process ran
              items:
                $ref: '#/components/schemas/DspRunGraph'
            labels:
              type: array
              description: Labels of the feature axes
              items:
                type: string
            state_string:
              type: string
              description: String representation of the DSP state returned
            performance:
              $ref: '#/components/schemas/DspPerformance'
    DspRunResponseWithSample:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - features
            - graphs
            - sample
            - canProfilePerformance
          properties:
            features:
              type: array
              description: >-
                Array of processed features. Laid out according to the names in
                'labels'
              items:
                type: number
            graphs:
              type: array
              description: Graphs to plot to give an insight in how the DSP process ran
              items:
                $ref: '#/components/schemas/DspRunGraph'
            labels:
              type: array
              description: Labels of the feature axes
              items:
                type: string
            state_string:
              type: string
              description: String representation of the DSP state returned
            labelAtEndOfWindow:
              description: >-
                DEPRECATED. Label at the end of the window (only present for
                time-series data)
              type: string
            labelForWindow:
              description: >-
                Label for the window. How the label is chosen is dependent on
                the value of "labelingMethodMultiLabel" in the input block.
              type: string
            sample:
              $ref: '#/components/schemas/RawSampleData'
            performance:
              $ref: '#/components/schemas/DspPerformance'
            canProfilePerformance:
              type: boolean
    DspPerformance:
      type: object
      required:
        - latency
        - ram
      properties:
        latency:
          type: integer
        ram:
          type: integer
        customDspString:
          type: string
          description: >-
            If the project latencyDevice has custom DSP hardware, this value
            contains a device specific latency metric (eg. cycles)
    DspRunGraph:
      type: object
      required:
        - name
        - type
      properties:
        name:
          type: string
          description: Name of the graph
          example: Frequency domain
        image:
          type: string
          description: Base64 encoded image, only present if type is 'image'
        imageMimeType:
          type: string
          description: >-
            Mime type of the Base64 encoded image, only present if type is
            'image'
        X:
          type: object
          description: >-
            Values on the x-axis per plot. Key is the name of the raw feature.
            Present if type is 'logarithmic' or 'linear'.
          example:
            accX:
              - 3
              - 5
              - 7
            accY:
              - 2
              - 1
              - 5
          additionalProperties:
            type: array
            items:
              type: number
        'y':
          type: array
          description: Values of the y-axis. Present if type is 'logarithmic' or 'linear'.
          example:
            - 0
            - 0.5
            - 1
          items:
            type: number
        suggestedXMin:
          type: number
          description: Suggested minimum value of x-axis
        suggestedXMax:
          type: number
          description: Suggested maxium value of x-axis
        suggestedYMin:
          type: number
          description: Suggested minimum value of y-axis
        suggestedYMax:
          type: number
          description: Suggested maximum value of y-axis
        type:
          type: string
          description: Type of graph (either `logarithmic`, `linear` or `image`)
        lineWidth:
          type: number
          description: >-
            Width of the graph line (if type is `logarithmic` or `linear`).
            Default 3.
        smoothing:
          type: boolean
          description: Whether to apply smoothing to the graph.
        axisLabels:
          type: object
          description: Labels for the graph x and y axes.
          required:
            - X
            - 'y'
          properties:
            X:
              type: string
            'y':
              type: string
        highlights:
          type: object
          description: Indices of points to highlight, per axis.
          additionalProperties:
            type: array
            items:
              type: number
    DspFeatureLabelsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - labels
          properties:
            labels:
              type: array
              example: '`[ "accX RMS", "accX Peak 1 Freq" ]`'
              items:
                type: string
    DspTrainedFeaturesResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - totalSampleCount
            - data
            - skipFirstFeatures
          properties:
            totalSampleCount:
              type: integer
              description: Total number of windows in the data set
            data:
              type: array
              items:
                type: object
                required:
                  - X
                  - 'y'
                  - yLabel
                properties:
                  X:
                    type: object
                    description: Data by feature index for this window
                    example: '`{ 0: 9.81, 11: 0.32, 22: 0.79 }`'
                    additionalProperties:
                      type: number
                  'y':
                    type: integer
                    description: Training label index
                  yLabel:
                    type: string
                    description: Training label string
                  structuredYLabel:
                    type: object
                    additionalProperties:
                      type: string
                    description: >-
                      All key/value label pairs for samples with multiple labels
                      (i.e. label map datasets).
                  sample:
                    type: object
                    required:
                      - id
                      - name
                      - startMs
                      - endMs
                    properties:
                      id:
                        type: number
                      name:
                        type: string
                      startMs:
                        type: number
                      endMs:
                        type: number
            skipFirstFeatures:
              type: integer
              description: >-
                When showing the processed features, skip the first X features.
                This is used in dimensionality reduction where artificial
                features are introduced in the response (on the first few
                positions).
    DspSampleFeaturesResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - totalSampleCount
            - data
            - skipFirstFeatures
          properties:
            totalSampleCount:
              type: integer
              description: Total number of windows in the data set
            data:
              type: array
              items:
                type: object
                required:
                  - X
                  - 'y'
                  - yLabel
                properties:
                  X:
                    type: array
                    description: Feature data for this window
                    example: '`{ 9.81, 0.32, 0.79 }`'
                    items:
                      type: number
                  'y':
                    type: integer
                    description: Training label index
                  yLabel:
                    type: string
                    description: Training label string
                  sample:
                    type: object
                    required:
                      - id
                      - name
                      - startMs
                      - endMs
                    properties:
                      id:
                        type: integer
                      name:
                        type: string
                      startMs:
                        type: number
                      endMs:
                        type: number
            skipFirstFeatures:
              type: integer
              description: >-
                When showing the processed features, skip the first X features.
                This is used in dimensionality reduction where artificial
                features are introduced in the response (on the first few
                positions).
    GetDataExplorerFeaturesResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - hasFeatures
            - data
          properties:
            hasFeatures:
              type: boolean
            data:
              type: array
              items:
                type: object
                required:
                  - X
                  - 'y'
                  - yLabel
                properties:
                  X:
                    type: object
                    description: Data by feature index for this window
                    example: '`{ 0: 9.81, 11: 0.32, 22: 0.79 }`'
                    additionalProperties:
                      type: number
                  'y':
                    type: integer
                    description: Training label index
                  yLabel:
                    type: string
                    description: Training label string
                  sample:
                    type: object
                    required:
                      - id
                      - name
                      - startMs
                      - endMs
                      - category
                    properties:
                      id:
                        type: number
                      name:
                        type: string
                      startMs:
                        type: number
                      endMs:
                        type: number
                      category:
                        type: string
                        enum:
                          - training
                          - testing
            inputBlock:
              $ref: '#/components/schemas/ImpulseInputBlock'
    HasDataExplorerFeaturesResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - hasFeatures
          properties:
            hasFeatures:
              type: boolean
            inputBlock:
              $ref: '#/components/schemas/ImpulseInputBlock'
    GetDiversityDataResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          properties:
            data:
              type: array
              items:
                type: object
                required:
                  - clusterInfos
                  - maxDistance
                properties:
                  labelId:
                    type: number
                  maxDistance:
                    type: number
                  clusterInfos:
                    type: array
                    items:
                      type: object
                      description: Information about a cluster of samples
                      required:
                        - idx
                        - indexes
                        - windows
                        - vendiScore
                        - vendiRatio
                        - count
                        - distance
                        - leftIdx
                        - rightIdx
                      properties:
                        idx:
                          type: integer
                          description: Unique index of the cluster
                        indexes:
                          type: array
                          items:
                            type: integer
                          description: >-
                            Indexes of all windows contained in the cluster (for
                            debugging)
                        windows:
                          type: array
                          items:
                            type: array
                            items:
                              type: integer
                          description: >-
                            The sample ID and window start and end of every
                            window in the cluster
                        samples:
                          type: array
                          items:
                            $ref: '#/components/schemas/Sample'
                          description: Details of every sample in the cluster
                        vendiScore:
                          type: number
                          description: Raw vendi score
                        vendiRatio:
                          type: number
                          description: Vendi score expressed as ratio from 0 to 1
                        count:
                          type: integer
                          description: The number if windows in the cluster
                        distance:
                          type: number
                          description: The distance of the cluster from the origin
                        leftIdx:
                          type: integer
                          nullable: true
                          description: The cluster id on the left branch of the dendrogram
                        rightIdx:
                          type: integer
                          nullable: true
                          description: The cluster id on the right branch of the dendrogram
    GetLabelNoiseDataResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - data
          properties:
            data:
              type: object
              properties:
                cosineSimilarity:
                  $ref: '#/components/schemas/CosineSimilarityData'
                neighbors:
                  $ref: '#/components/schemas/NeighborsData'
                crossValidation:
                  $ref: '#/components/schemas/CrossValidationData'
    NeighborsData:
      type: object
      description: >-
        Describes the results of running the nearest neighbors label noise
        detection method.
      required:
        - scoresAndNeighbors
        - numNeighbors
      properties:
        scoresAndNeighbors:
          type: array
          items:
            $ref: '#/components/schemas/NeighborsScore'
          description: >-
            The label noise score and nearest neighbors for each window of data
            in the project that shows a potential label noise issue.
        numNeighbors:
          type: integer
          description: The number of neighbors used in the nearest neighbors algorithm.
    NeighborsScore:
      type: object
      description: >-
        Describes the label noise score and nearest neighbors for a single
        window of data in the project that shows a potential label noise issue.
      required:
        - id
        - windowStart
        - windowEnd
        - score
        - neighborWindows
      properties:
        id:
          type: integer
          description: The ID of the sample this window belongs to
        sample:
          $ref: '#/components/schemas/Sample'
          description: Detailed information about the sample this window belongs to
        windowStart:
          type: integer
          description: The start time of this window in milliseconds
        windowEnd:
          type: integer
          description: The end time of this window in milliseconds
        score:
          type: number
          description: >-
            The label noise score for this window, from 0 to the total number of
            windows.
        neighborWindows:
          type: array
          description: Details of the nearest neighbors to this window
          items:
            type: object
            required:
              - id
              - windowStart
              - windowEnd
            properties:
              id:
                type: integer
                description: The ID of the sample this window belongs to
              sample:
                $ref: '#/components/schemas/Sample'
                description: Detailed information about the sample this window belongs to
              windowStart:
                type: integer
                description: The start time of this window in milliseconds
              windowEnd:
                type: integer
                description: The end time of this window in milliseconds
    CrossValidationData:
      type: object
      description: >-
        Describes the results of running the cross validation label noise
        detection method.
      required:
        - scores
      properties:
        scores:
          type: array
          items:
            type: object
            required:
              - id
              - windowStart
              - windowEnd
              - label
              - probability
              - score
            properties:
              id:
                type: integer
                description: The ID of the sample this window belongs to
              sample:
                $ref: '#/components/schemas/Sample'
                description: Detailed information about the sample this window belongs to
              windowStart:
                type: integer
                description: The start time of this window in milliseconds
              windowEnd:
                type: integer
                description: The end time of this window in milliseconds
              label:
                type: integer
                description: The label of this window, in index form
              probability:
                type: number
                description: >-
                  The probability of this window being the label it was
                  assigned, as estimated by a classifier trained on the whole
                  dataset.
              score:
                type: number
                description: >-
                  The z-score of the probability with respect to other class
                  members, so that outliers (i.e. windows whose probability is
                  low) can be easily spotted. This assumes that most correctly
                  labelled class members will have a high probability.
    CosineSimilarityData:
      type: object
      description: >-
        Describes the results of running the cosine similarity label noise
        detection method.
      required:
        - similarButDifferentLabel
        - differentButSameLabel
      properties:
        similarButDifferentLabel:
          type: array
          description: >-
            A list of samples that have windows that are similar to windows of
            other samples that have a different label.
          items:
            $ref: '#/components/schemas/CosineSimilarityIssue'
        differentButSameLabel:
          type: array
          description: >-
            A list of samples that have windows that are dissimilar to windows
            of other samples that have the same label.
          items:
            $ref: '#/components/schemas/CosineSimilarityIssue'
    CosineSimilarityIssue:
      type: object
      description: >-
        Describes a sample that has potential issues as identified by the cosine
        similarity label noise detection method.
      required:
        - id
        - label
        - issues
      properties:
        id:
          type: integer
          description: The ID of this sample
        sample:
          $ref: '#/components/schemas/Sample'
          description: Detailed information about the sample
        label:
          type: integer
          description: The label of this sample, in index form
        issues:
          type: array
          description: >-
            A list of samples that have windows that are symptomatic of this
            issue.
          items:
            type: object
            required:
              - id
              - label
              - windows
            properties:
              id:
                type: integer
                description: The ID of this sample
              sample:
                $ref: '#/components/schemas/Sample'
                description: Detailed information about the sample
              label:
                type: integer
                description: The label of this sample, in index form
              windows:
                type: array
                description: The windows in this sample that are symptomatic of this issue.
                items:
                  type: object
                  required:
                    - windowStart
                    - windowEnd
                    - score
                  properties:
                    windowStart:
                      type: integer
                      description: The start time of this window in milliseconds
                    windowEnd:
                      type: integer
                      description: The end time of this window in milliseconds
                    score:
                      type: number
                      description: >-
                        The cosine similarity score between this window and a
                        window from the sample in the parent object.
    KerasModelLayer:
      type: object
      required:
        - input
        - output
      properties:
        input:
          type: object
          required:
            - shape
            - name
            - type
          properties:
            shape:
              type: integer
              description: Input size
              example: 33
            name:
              type: string
              description: TensorFlow name
              example: x_input:0
            type:
              type: string
              description: TensorFlow type
              example: '<dtype: ''float32''>'
        output:
          type: object
          required:
            - shape
            - name
            - type
          properties:
            shape:
              type: integer
              description: Output size
              example: 20
            name:
              type: string
              description: TensorFlow name
              example: dense_1/Relu:0
            type:
              type: string
              description: TensorFlow type
              example: '<dtype: ''float32''>'
    AdditionalMetric:
      type: object
      required:
        - name
        - value
        - fullPrecisionValue
      properties:
        name:
          type: string
        value:
          type: string
        fullPrecisionValue:
          type: number
        tooltipText:
          type: string
        link:
          type: string
    KerasModelMetadataMetrics:
      type: object
      required:
        - type
        - loss
        - confusionMatrix
        - report
        - onDevicePerformance
        - visualization
        - isSupportedOnMcu
        - additionalMetrics
      properties:
        type:
          description: The type of model
          $ref: '#/components/schemas/KerasModelTypeEnum'
        loss:
          type: number
          description: The model's loss on the validation set after training
        accuracy:
          type: number
          description: The model's accuracy on the validation set after training
        confusionMatrix:
          type: array
          example:
            - - 31
              - 1
              - 0
            - - 2
              - 27
              - 3
            - - 1
              - 0
              - 39
          items:
            type: array
            items:
              type: number
        report:
          type: object
          description: Precision, recall, F1 and support scores
        onDevicePerformance:
          type: array
          items:
            type: object
            required:
              - mcu
              - name
              - isDefault
              - latency
              - tflite
              - eon
              - hasPerformance
            properties:
              mcu:
                type: string
              name:
                type: string
              isDefault:
                type: boolean
              latency:
                type: number
              tflite:
                type: object
                required:
                  - ramRequired
                  - romRequired
                  - arenaSize
                  - modelSize
                properties:
                  ramRequired:
                    type: integer
                  romRequired:
                    type: integer
                  arenaSize:
                    type: integer
                  modelSize:
                    type: integer
              eon:
                type: object
                required:
                  - ramRequired
                  - romRequired
                  - arenaSize
                  - modelSize
                properties:
                  ramRequired:
                    type: integer
                  romRequired:
                    type: integer
                  arenaSize:
                    type: integer
                  modelSize:
                    type: integer
              eon_ram_optimized:
                type: object
                required:
                  - ramRequired
                  - romRequired
                  - arenaSize
                  - modelSize
                properties:
                  ramRequired:
                    type: integer
                  romRequired:
                    type: integer
                  arenaSize:
                    type: integer
                  modelSize:
                    type: integer
              customMetrics:
                description: Custom, device-specific performance metrics
                type: array
                items:
                  $ref: '#/components/schemas/KerasCustomMetric'
              hasPerformance:
                description: If false, then no metrics are available for this target
                type: boolean
              profilingError:
                description: Specific error during profiling (e.g. model not supported)
                type: string
        predictions:
          type: array
          items:
            $ref: '#/components/schemas/ModelPrediction'
        visualization:
          type: string
          enum:
            - featureExplorer
            - dataExplorer
            - none
        isSupportedOnMcu:
          type: boolean
        mcuSupportError:
          type: string
        profilingJobId:
          description: >-
            If this is set, then we're still profiling this model. Subscribe to
            job updates to see when it's done (afterward the metadata will be
            updated).
          type: integer
        profilingJobFailed:
          description: >-
            If this is set, then the profiling job failed (get the status by
            getting the job logs for 'profilingJobId').
          type: boolean
        additionalMetrics:
          type: array
          items:
            $ref: '#/components/schemas/AdditionalMetric'
    KerasModelMode:
      type: string
      enum:
        - classification
        - regression
        - object-detection
        - visual-anomaly
        - anomaly-gmm
        - freeform
        - anomaly
    KerasModelMetadata:
      type: object
      required:
        - created
        - layers
        - classNames
        - availableModelTypes
        - recommendedModelType
        - modelValidationMetrics
        - hasTrainedModel
        - mode
        - imageInputScaling
        - labels
        - thresholds
      properties:
        created:
          type: string
          format: date-time
          description: Date when the model was trained
        layers:
          type: array
          description: Layers of the neural network
          items:
            $ref: '#/components/schemas/KerasModelLayer'
        classNames:
          type: array
          description: Labels for the output layer
          items:
            type: string
        labels:
          type: array
          description: >-
            Original labels in the dataset when features were generated, e.g.
            used to render the feature explorer.
          items:
            type: string
        availableModelTypes:
          type: array
          description: The types of model that are available
          items:
            $ref: '#/components/schemas/KerasModelTypeEnum'
        recommendedModelType:
          description: The model type that is recommended for use
          $ref: '#/components/schemas/KerasModelTypeEnum'
        modelValidationMetrics:
          type: array
          description: Metrics for each of the available model types
          items:
            $ref: '#/components/schemas/KerasModelMetadataMetrics'
        hasTrainedModel:
          type: boolean
        mode:
          $ref: '#/components/schemas/KerasModelMode'
        objectDetectionLastLayer:
          $ref: '#/components/schemas/ObjectDetectionLastLayer'
        imageInputScaling:
          $ref: '#/components/schemas/ImageInputScaling'
        thresholds:
          type: array
          description: List of configurable thresholds for this block.
          items:
            $ref: '#/components/schemas/BlockThreshold'
        tensorboardGraphs:
          description: List of TensorBoard graphs associated with this model
          $ref: '#/components/schemas/TensorboardGraphs'
    TensorboardGraphs:
      type: array
      items:
        $ref: '#/components/schemas/KerasModelMetadataGraph'
    KerasModelMetadataGraph:
      type: object
      required:
        - title
        - data
      properties:
        title:
          description: Graph title
          type: string
        xLabel:
          description: X-axis title
          type: string
        yLabel:
          description: Y-axis title
          type: string
        description:
          description: A description for the graph
          type: string
        hideInUI:
          description: Whether this graph should be hidden by default in the Studio UI
          type: boolean
        data:
          type: array
          items:
            $ref: '#/components/schemas/KerasModelMetadataGraphSeries'
    KerasModelMetadataGraphSeries:
      type: object
      required:
        - title
        - values
      properties:
        title:
          type: string
        values:
          type: array
          items:
            type: number
    KerasModelMetadataResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - $ref: '#/components/schemas/KerasModelMetadata'
    UploadKerasFilesRequest:
      type: object
      required:
        - zip
      properties:
        zip:
          type: string
          format: binary
    AddKerasFilesRequest:
      type: object
      required:
        - zip
      properties:
        zip:
          type: string
          format: binary
    SetLegacyImpulseStateInternalRequest:
      type: object
      required:
        - zip
        - impulse
        - config
      properties:
        zip:
          type: string
          format: binary
        impulse:
          type: string
          format: binary
        config:
          type: string
          format: binary
    UploadVersionArchiveRequest:
      type: object
      required:
        - zip
      properties:
        zip:
          type: string
          format: binary
    AnomalyModelMetadata:
      type: object
      required:
        - created
        - scale
        - mean
        - clusters
        - axes
        - defaultMinimumConfidenceRating
        - thresholds
      properties:
        created:
          type: string
          format: date-time
          description: Date when the model was trained
        scale:
          type: array
          description: >-
            Scale input for StandardScaler. Values are scaled like this (where
            `ix` is axis index): `input[ix] = (input[ix] - mean[ix]) /
            scale[ix];`
          items:
            type: number
        mean:
          type: array
          description: >-
            Mean input for StandardScaler. Values are scaled like this (where
            `ix` is axis index): `input[ix] = (input[ix] - mean[ix]) /
            scale[ix];`
          items:
            type: number
        clusters:
          type: array
          description: Trained K-means clusters
          items:
            type: object
            required:
              - center
              - maxError
            properties:
              center:
                type: array
                description: Center of each cluster (one value per axis)
                items:
                  type: number
              maxError:
                type: number
                description: Size of the cluster
        axes:
          type: array
          description: Which axes were included during training (by index)
          example: '`[ 0, 11, 22 ]`'
          items:
            type: integer
        defaultMinimumConfidenceRating:
          type: number
          description: >-
            DEPRECATED, see "thresholds" instead. Default minimum confidence
            rating required before tagging as anomaly, based on scores of
            training data (GMM only).
        availableModelTypes:
          type: array
          description: The types of model that are available
          items:
            $ref: '#/components/schemas/KerasModelTypeEnum'
        recommendedModelType:
          description: The model type that is recommended for use
          $ref: '#/components/schemas/KerasModelTypeEnum'
        modelValidationMetrics:
          type: array
          description: Metrics for each of the available model types
          items:
            $ref: '#/components/schemas/KerasModelMetadataMetrics'
        hasTrainedModel:
          type: boolean
        thresholds:
          type: array
          description: List of configurable thresholds for this block.
          items:
            $ref: '#/components/schemas/BlockThreshold'
    AnomalyModelMetadataResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - $ref: '#/components/schemas/AnomalyModelMetadata'
    AnomalyGmmMetadata:
      type: object
      required:
        - means
        - covariances
        - weights
      properties:
        means:
          type: array
          items:
            type: array
            items:
              type: number
          description: 2D array of shape (n, m)
        covariances:
          type: array
          items:
            type: array
            items:
              type: array
              items:
                type: number
          description: 3D array of shape (n, m, m)
        weights:
          type: array
          items:
            type: number
          description: 1D array of shape (n,)
    AnomalyGmmMetadataResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - $ref: '#/components/schemas/AnomalyGmmMetadata'
    AnomalyTrainedFeaturesResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - totalSampleCount
            - data
          properties:
            totalSampleCount:
              type: integer
              description: Total number of windows in the data set
            data:
              type: array
              items:
                type: object
                required:
                  - X
                properties:
                  X:
                    type: object
                    description: >-
                      Data by feature index for this window. Note that this data
                      was scaled by the StandardScaler, use the anomaly metadata
                      to unscale if needed.
                    example:
                      '0': -2.17
                      '11': 1.21
                      '22': 0.79
                    additionalProperties:
                      type: number
                  label:
                    type: number
                    description: >-
                      Label used for datapoint colorscale in anomaly explorer
                      (for gmm only). Is currently the result of the scoring
                      function.
    GenerateFeaturesRequest:
      type: object
      required:
        - dspId
      properties:
        dspId:
          type: integer
          description: DSP block ID to generate features for
        calculateFeatureImportance:
          type: boolean
          description: Whether to generate feature importance (only when available)
        skipFeatureExplorer:
          type: boolean
          description: If set, skips feature explorer (used in tests)
        normalizeData:
          description: >-
            Data normalization method to use on the generated features. This
            only applies if canNormalizeData is true.
          $ref: '#/components/schemas/DSPNormalizeData'
    AutotuneDspRequest:
      type: object
      required:
        - dspId
      properties:
        dspId:
          type: integer
          description: DSP block ID to autotune parameters of
    ListModelsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - projectId
          properties:
            id:
              type: integer
              description: projectId
              example: 12873488112
    StartTrainingRequestAnomaly:
      type: object
      required:
        - axes
        - minimumConfidenceRating
      properties:
        axes:
          type: array
          description: Which axes (indexes from DSP script) to include in the training set
          example:
            - 0
            - 11
            - 22
          items:
            type: integer
        clusterCount:
          type: integer
          description: Number of clusters for K-means, or number of components for GMM
          example: 32
        minimumConfidenceRating:
          type: number
          description: >-
            DEPRECATED, use "thresholds" instead. Minimum confidence rating
            required before tagging as anomaly
          example: 0.3
        skipEmbeddingsAndMemory:
          type: boolean
          description: >-
            If set, skips creating embeddings and measuring memory (used in
            tests)
        thresholds:
          type: array
          description: List of configurable thresholds for this block.
          items:
            $ref: '#/components/schemas/BlockThreshold'
    StartJobResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - id
          properties:
            id:
              type: integer
              description: Job identifier. Status updates will include this identifier.
              example: 12873488112
    StartIntegrationSessionResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - id
          properties:
            id:
              type: string
              description: >-
                Unique integration resource identifier. Pass this to
                getIntegrationSessionStatus to check the status of the
                integration session.
              example: learn-3-2-1
    Download:
      type: object
      required:
        - name
        - type
        - link
      properties:
        id:
          type: string
          example: The ID of the download, if available
        name:
          type: string
          example: Training data
        type:
          type: string
          example: NPY file
        size:
          type: string
          example: 73 items
        link:
          type: string
          example: /api/1/raw-data/training/x
        impulseId:
          type: number
          example: The ID of the impulse associated with this download, if available
    Device:
      type: object
      required:
        - id
        - deviceId
        - created
        - lastSeen
        - name
        - deviceType
        - sensors
        - remote_mgmt_connected
        - supportsSnapshotStreaming
        - remoteMgmtMode
      properties:
        id:
          type: integer
          example: 1
        deviceId:
          type: string
          description: Unique identifier (such as MAC address) for a device
          example: 38:f9:d3:d7:62:03
        created:
          type: string
          format: date-time
          example: '2019-07-21T17:32:28Z'
        lastSeen:
          type: string
          format: date-time
          example: '2019-08-31T17:32:28Z'
          description: Last message that was received from the device (ignoring keep-alive)
        name:
          type: string
          example: m6d.1 desk sensor
        deviceType:
          type: string
          example: DISCO-L475VG
        sensors:
          type: array
          items:
            type: object
            required:
              - name
              - maxSampleLengthS
              - frequencies
            properties:
              name:
                type: string
                example: Built-in accelerometer
              maxSampleLengthS:
                type: integer
                description: Maximum supported sample length in seconds
              frequencies:
                type: array
                description: Supported frequencies for this sensor in Hz.
                example:
                  - 62.5
                  - 100
                items:
                  type: number
        remote_mgmt_connected:
          type: boolean
          description: >-
            Whether the device is connected to the remote management interface.
            This property is deprecated, use `remoteMgmtMode` instead.
        remote_mgmt_host:
          type: string
          description: The remote management host that the device is connected to
        supportsSnapshotStreaming:
          type: boolean
        remoteMgmtMode:
          description: >-
            Replaces `remote_mgmt_connected`. Shows whether the device is
            connected to the remote management interface, and in which mode.
          type: string
          enum:
            - disconnected
            - ingestion
            - inference
        inferenceInfo:
          type: object
          description: >-
            If `remoteMgmtMode` is set to `inference` this object shows
            information about the model that's ran on device.
          required:
            - projectId
            - projectOwner
            - projectName
            - deployedVersion
          properties:
            projectId:
              type: integer
            projectOwner:
              type: string
            projectName:
              type: string
            deployedVersion:
              type: integer
            modelType:
              type: string
              enum:
                - classification
                - objectDetection
                - constrainedObjectDetection
    ProjectDataSummary:
      type: object
      required:
        - totalLengthMs
        - labels
        - dataCount
      properties:
        totalLengthMs:
          type: number
          description: Total length (in ms.) of all data in the training set
          example: '726336'
        labels:
          type: array
          description: Labels in the training set
          items:
            type: string
        dataCount:
          type: integer
          example: Number of files in the training set
    LatencyDevice:
      type: object
      required:
        - mcu
        - name
        - selected
        - int8Latency
        - int8ConvLatency
        - float32Latency
        - float32ConvLatency
        - helpText
      properties:
        mcu:
          type: string
        name:
          type: string
        selected:
          type: boolean
        int8Latency:
          type: number
        int8ConvLatency:
          type: number
        float32Latency:
          type: number
        float32ConvLatency:
          type: number
        helpText:
          type: string
    AdminProjectInfoResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - project
          properties:
            project:
              $ref: '#/components/schemas/Project'
    TutorialType:
      type: string
      description: >-
        The type of in-product guided tutorial to show in the getting started
        wizard
      enum:
        - kws
        - cv
    ProjectInfoResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - project
            - downloads
            - developmentKeys
            - impulse
            - devices
            - dataSummary
            - dataSummaryPerCategory
            - computeTime
            - acquisitionSettings
            - collaborators
            - deploySettings
            - experiments
            - latencyDevices
            - urls
            - showCreateFirstImpulse
            - showGettingStartedWizard
            - performance
            - trainJobNotificationUids
            - dspJobNotificationUids
            - modelTestingJobNotificationUids
            - exportJobNotificationUids
            - hasNewTrainingData
            - studioUrl
            - inPretrainedModelFlow
            - showSensorDataInAcquisitionGraph
            - notifications
          properties:
            project:
              $ref: '#/components/schemas/Project'
            developmentKeys:
              description: >-
                Only available through JWT token authentication, if you
                authenticate with an API key then all keys will return undefined
                (this is changed behavior since 28 January 2026).
              $ref: '#/components/schemas/DevelopmentKeys'
            impulse:
              type: object
              required:
                - created
                - configured
                - complete
              properties:
                created:
                  type: boolean
                  description: Whether an impulse was created
                configured:
                  type: boolean
                  description: Whether an impulse was configured
                complete:
                  type: boolean
                  description: Whether an impulse was fully trained and configured
            devices:
              type: array
              items:
                $ref: '#/components/schemas/Device'
            dataSummary:
              $ref: '#/components/schemas/ProjectDataSummary'
            dataSummaryPerCategory:
              type: object
              required:
                - training
                - testing
                - postProcessing
              properties:
                training:
                  $ref: '#/components/schemas/ProjectDataSummary'
                testing:
                  $ref: '#/components/schemas/ProjectDataSummary'
                postProcessing:
                  $ref: '#/components/schemas/ProjectDataSummary'
            computeTime:
              type: object
              required:
                - periodStartDate
                - periodEndDate
                - timeUsedMs
                - timeLeftMs
              properties:
                periodStartDate:
                  type: string
                  format: date-time
                  description: Start of the current time period.
                periodEndDate:
                  type: string
                  format: date-time
                  description: >-
                    End of the current time period. This is the date when the
                    compute time resets again.
                timeUsedMs:
                  type: integer
                  description: The amount of compute used for the current time period.
                timeLeftMs:
                  type: integer
                  description: The amount of compute left for the current time period.
            acquisitionSettings:
              type: object
              required:
                - intervalMs
                - lengthMs
                - segmentShift
                - defaultPageSize
                - viewType
                - gridColumnCount
                - gridColumnCountDetailed
                - showExactSampleLength
                - inlineEditBoundingBoxes
              properties:
                intervalMs:
                  type: number
                  description: >-
                    Interval during the last acquisition, or the recommended
                    interval based on the data set.
                lengthMs:
                  type: integer
                  description: >-
                    Length of the last acquisition, or a recommended interval
                    based on the data set.
                sensor:
                  type: string
                  description: Sensor that was used during the last acquisition.
                label:
                  type: string
                  description: Label that was used during the last acquisition.
                segmentLength:
                  type: number
                  description: >-
                    Length of the last sample segment after segmenting a larger
                    sample.
                segmentShift:
                  type: boolean
                  description: Whether to auto-shift segments
                defaultPageSize:
                  type: integer
                  description: Default page size on data acquisition
                viewType:
                  type: string
                  description: Default view type on data acquisition
                  enum:
                    - list
                    - grid
                gridColumnCount:
                  type: integer
                  description: Number of grid columns in non-detailed view
                gridColumnCountDetailed:
                  type: integer
                  description: Number of grid columns in detailed view
                showExactSampleLength:
                  type: boolean
                  description: >-
                    If enabled, does not round sample length to
                    hours/minutes/seconds, but always displays sample length in
                    milliseconds. E.g. instead of 1m 32s, this'll say 92,142ms.
                inlineEditBoundingBoxes:
                  type: boolean
                  description: >-
                    If enabled, allows editing bounding box labels directly from
                    the acquisition UI.
            collaborators:
              type: array
              items:
                $ref: '#/components/schemas/User'
            deploySettings:
              type: object
              required:
                - eonCompiler
                - sensor
                - arduinoLibraryName
                - tinkergenLibraryName
                - particleLibraryName
              properties:
                eonCompiler:
                  type: boolean
                sensor:
                  type: string
                  enum:
                    - accelerometer
                    - microphone
                    - camera
                    - positional
                    - environmental
                    - fusion
                    - unknown
                arduinoLibraryName:
                  type: string
                tinkergenLibraryName:
                  type: string
                particleLibraryName:
                  type: string
                lastDeployModelEngine:
                  type: string
                  $ref: '#/components/schemas/ModelEngineShortEnum'
                  description: Model engine for last deploy
            experiments:
              type: array
              description: >-
                Experiments that the project has access to. Enabling experiments
                can only be done through a JWT token.
              items:
                type: object
                required:
                  - type
                  - title
                  - enabled
                  - showToUser
                properties:
                  type:
                    type: string
                  title:
                    type: string
                  help:
                    type: string
                  enabled:
                    type: boolean
                  showToUser:
                    type: boolean
            latencyDevices:
              type: array
              items:
                $ref: '#/components/schemas/LatencyDevice'
            urls:
              type: object
              properties:
                mobileClient:
                  description: >-
                    Base URL for the mobile client. If this is undefined then no
                    development API key is set.
                  type: string
                mobileClientComputer:
                  description: >-
                    Base URL for collecting data with the mobile client from a
                    computer. If this is undefined then no development API key
                    is set.
                  type: string
                mobileClientInference:
                  description: >-
                    Base URL for running inference with the mobile client. If
                    this is undefined then no development API key is set.
                  type: string
            showCreateFirstImpulse:
              type: boolean
            showGettingStartedWizard:
              type: object
              required:
                - showWizard
                - step
              properties:
                showWizard:
                  type: boolean
                step:
                  type: integer
                  description: Current step of the getting started wizard
                tutorial:
                  $ref: '#/components/schemas/TutorialType'
                  description: >-
                    The type of in-product guided tutorial used in the getting
                    started wizard
                classes:
                  type: array
                  description: Classes or labels used in the getting started wizard
                  items:
                    type: string
                  maxItems: 2
            performance:
              type: object
              required:
                - gpu
                - jobLimitM
                - dspFileSizeMb
                - enterprisePerformance
                - trainJobRamMb
              properties:
                gpu:
                  type: boolean
                jobLimitM:
                  type: integer
                  description: >-
                    Compute time limit per job in minutes (applies only to DSP
                    and learning jobs).
                dspFileSizeMb:
                  type: integer
                  description: Maximum size for DSP file output
                enterprisePerformance:
                  type: boolean
                trainJobRamMb:
                  type: integer
                  description: Amount of RAM allocated to training jobs
            readme:
              type: object
              description: Present if a readme is set for this project
              required:
                - markdown
                - html
              properties:
                markdown:
                  type: string
                html:
                  type: string
            trainJobNotificationUids:
              type: array
              description: >-
                The IDs of users who should be notified when a Keras or retrain
                job is finished.
              items:
                type: integer
            dspJobNotificationUids:
              type: array
              description: >-
                The IDs of users who should be notified when a DSP job is
                finished.
              items:
                type: integer
            modelTestingJobNotificationUids:
              type: array
              description: >-
                The IDs of users who should be notified when a model testing job
                is finished.
              items:
                type: integer
            exportJobNotificationUids:
              type: array
              description: >-
                The IDs of users who should be notified when an export job is
                finished.
              items:
                type: integer
            hasNewTrainingData:
              type: boolean
            csvImportConfig:
              type: object
              description: Config file specifying how to process CSV files.
            studioUrl:
              type: string
            inPretrainedModelFlow:
              type: boolean
              description: >-
                DEPRECATED. To enable the pretrained model flow, set the impulse
                type property to "BYOM" instead.
            dspPageSize:
              type: integer
            showSensorDataInAcquisitionGraph:
              description: >-
                Whether to show the actual sensor data in acquisition charts
                (only applies when you have structured labels)
              type: boolean
            targetConstraints:
              $ref: '#/components/schemas/TargetConstraints'
            notifications:
              type: array
              description: List of notifications to show within the project
              items:
                type: string
            defaultImpulseId:
              type: integer
              description: Default selected impulse (by ID).
            lastShownModelEngine:
              description: >-
                Last shown model engine on the Keras/DSP/BYOM/Anomaly screens.
                Used to keep the same view after refreshing.
              $ref: '#/components/schemas/ModelEngineShortEnum'
            versioningStorageSizeMib:
              type: integer
            anomalyLabelsConfig:
              description: >
                Labels to be treated as anomalous or non-anomalous. Defaults to
                "anomaly" / "no anomaly" if not specified.

                Useful when you want to override these default labels. Only
                relevant when there is an anomaly block in your impulse.
              $ref: '#/components/schemas/AnomalyLabelsConfig'
    ListDevicesResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - devices
          properties:
            devices:
              type: array
              items:
                $ref: '#/components/schemas/Device'
    GetDeviceResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          properties:
            device:
              $ref: '#/components/schemas/Device'
    StructuredLabel:
      type: object
      description: >-
        A structured label contains a label, and the range for which this label
        is valid. `endIndex` is inclusive. E.g. `{ startIndex: 10, endIndex: 13,
        label: 'running' }` means that the values at index 10, 11, 12, 13 are
        labeled 'running'. To get time codes you can multiple by the sample's
        `intervalMs` property.
      required:
        - startIndex
        - endIndex
        - label
      properties:
        startIndex:
          type: integer
          description: Start index of the label (e.g. 0)
        endIndex:
          type: integer
          description: >-
            End index of the label (e.g. 3). This value is inclusive, so {
            startIndex: 0, endIndex: 3 } covers 0, 1, 2, 3.
        label:
          type: string
          description: The label for this section.
        labelMap:
          $ref: '#/components/schemas/SampleLabelMapLabels'
    Sample:
      type: object
      required:
        - id
        - filename
        - signatureValidate
        - created
        - lastModified
        - category
        - coldstorageFilename
        - label
        - intervalMs
        - frequency
        - originalIntervalMs
        - originalFrequency
        - deviceType
        - sensors
        - valuesCount
        - added
        - boundingBoxes
        - boundingBoxesType
        - chartType
        - isDisabled
        - isProcessing
        - processingError
        - isCropped
        - projectId
        - sha256Hash
      properties:
        id:
          type: integer
          example: 2
        filename:
          type: string
          example: idle01.d8Ae
        signatureValidate:
          type: boolean
          description: Whether signature validation passed
          example: true
        signatureMethod:
          type: string
          example: HS256
        signatureKey:
          type: string
          description: >-
            Either the shared key or the public key that was used to validate
            the sample
        created:
          type: string
          format: date-time
          description: >-
            Timestamp when the sample was created on device, or if no accurate
            time was known on device, the time that the file was processed by
            the ingestion service.
        lastModified:
          type: string
          format: date-time
          description: Timestamp when the sample was last modified.
        category:
          example: training
          $ref: '#/components/schemas/RawDataCategory'
        coldstorageFilename:
          type: string
        label:
          type: string
          example: healthy-machine
        intervalMs:
          type: number
          description: >-
            Interval between two windows (1000 / frequency). If the data was
            resampled, then this lists the resampled interval.
          example: 16
        frequency:
          type: number
          description: >-
            Frequency of the sample. If the data was resampled, then this lists
            the resampled frequency.
          example: 62.5
        originalIntervalMs:
          type: number
          description: >-
            Interval between two windows (1000 / frequency) in the source data
            (before resampling).
          example: 16
        originalFrequency:
          type: number
          description: Frequency of the sample in the source data (before resampling).
          example: 62.5
        deviceName:
          type: string
        deviceType:
          type: string
        sensors:
          type: array
          items:
            $ref: '#/components/schemas/Sensor'
        valuesCount:
          type: integer
          description: Number of readings in this file
        totalLengthMs:
          type: number
          description: Total length (in ms.) of this file
        added:
          type: string
          format: date-time
          description: >-
            Timestamp when the sample was added to the current acquisition
            bucket.
        boundingBoxes:
          type: array
          items:
            $ref: '#/components/schemas/BoundingBox'
        boundingBoxesType:
          type: string
          enum:
            - object_detection
            - constrained_object_detection
        chartType:
          type: string
          enum:
            - chart
            - image
            - video
            - table
        thumbnailVideo:
          type: string
        thumbnailVideoFull:
          type: string
        isDisabled:
          type: boolean
          description: True if the current sample is excluded from use
        isProcessing:
          type: boolean
          description: True if the current sample is still processing (e.g. for video)
        processingJobId:
          type: integer
          description: Set when sample is processing and a job has picked up the request
        processingError:
          type: boolean
          description: Set when processing this sample failed
        processingErrorString:
          type: string
          description: Error (only set when processing this sample failed)
        isCropped:
          type: boolean
          description: >-
            Whether the sample is cropped from another sample (and has crop
            start / end info)
        metadata:
          type: object
          description: Sample free form associated metadata
          additionalProperties:
            type: string
        projectId:
          type: integer
          description: Unique identifier of the project this sample belongs to
        projectOwnerName:
          type: string
          description: Name of the owner of the project this sample belongs to
        projectName:
          type: string
          description: Name of the project this sample belongs to
        projectLabelingMethod:
          description: What labeling flow the project this sample belongs to uses
          $ref: '#/components/schemas/ProjectLabelingMethod'
        sha256Hash:
          type: string
          description: Data sample SHA 256 hash (including CBOR envelope if applicable)
        structuredLabels:
          type: array
          items:
            $ref: '#/components/schemas/StructuredLabel'
        structuredLabelsList:
          type: array
          items:
            type: string
        createdBySyntheticDataJobId:
          type: integer
          description: >-
            If this sample was created by a synthetic data job, it's referenced
            here.
        imageDimensions:
          type: object
          required:
            - width
            - height
          properties:
            width:
              type: integer
            height:
              type: integer
        videoUrl:
          type: string
          description: Video link, cropped and in original resolution.
        videoUrlFull:
          type: string
          description: Video link in original resolution.
        labelMap:
          $ref: '#/components/schemas/SampleLabelMapLabels'
    SampleLabelMapLabels:
      description: >
        Structured sample labels in the form of a key-value map.

        This property is optional and only defined for samples with key-value
        labels.
      discriminator:
        propertyName: type
        mapping:
          key-values: '#/components/schemas/SampleKeyValueLabels'
      oneOf:
        - $ref: '#/components/schemas/SampleKeyValueLabels'
    SampleKeyValueLabels:
      type: object
      required:
        - type
        - labels
      properties:
        type:
          type: string
          enum:
            - key-values
        labels:
          type: object
          additionalProperties:
            type: string
    GetSampleResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - $ref: '#/components/schemas/RawSampleData'
    GetSampleMetadataResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - $ref: '#/components/schemas/ProjectSampleMetadata'
    GetSampleMetadataFilterOptionsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - $ref: '#/components/schemas/MetadataFilterOptions'
    ListSamplesResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - samples
            - totalCount
          properties:
            samples:
              type: array
              items:
                $ref: '#/components/schemas/Sample'
            totalCount:
              type: integer
    CountSamplesResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - count
          properties:
            count:
              type: integer
    RebalanceDatasetResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - $ref: '#/components/schemas/DatasetRatioData'
    DSPGroupItem:
      type: object
      required:
        - name
        - type
        - param
        - defaultValue
        - readonly
        - shouldShow
        - required
        - showClickToSet
      properties:
        name:
          type: string
          example: Scale axes
        value:
          type: string
        defaultValue:
          type: string
        type:
          type: string
          example: text
        help:
          type: string
          example: Divide axes by this number
        param:
          type: string
          example: scale-axes
        selectOptions:
          type: array
          items:
            type: object
            properties:
              value:
                type: string
                description: >-
                  What is the string that will be set if this option is
                  selected?
              selected:
                type: boolean
              optionLabel:
                type: string
                description: >-
                  What is the label that will be shown to the user for this
                  option?
              priority:
                type: number
                description: >-
                  The following options are optional.  See Learn Block Auto
                  Config in Notion. Higher priority will get chosen based on
                  limits below.
              romEstimate:
                type: number
                description: >-
                  Estimated ROM footprint for this choice.  Will be tested
                  against ROM budget in Studio.
              needsOps:
                type: array
                items:
                  type: string
                  description: ML operator needed by this choice.
              needsFeatures:
                type: array
                items:
                  type: string
                  description: Feature needed by this choice. (non op related)
        readonly:
          type: boolean
        shouldShow:
          type: boolean
        showIf:
          type: object
          required:
            - parameter
            - operator
            - value
          properties:
            parameter:
              type: string
            operator:
              type: string
              enum:
                - eq
                - neq
            value:
              type: string
        invalidText:
          type: string
        section:
          type: string
          description: Interface section to render parameter in.
          enum:
            - advanced
            - augmentation
            - modelProfiling
        multiline:
          type: boolean
          description: Only valid for type "string". Will render a multiline text area.
        required:
          type: boolean
        hint:
          type: string
          description: If set, shows a hint below the input.
        placeholder:
          type: string
          description: >-
            Sets the placeholder text on the input element (for types "string",
            "int", "float" and "secret")
        showClickToSet:
          type: boolean
          description: If enabled, render a disabled input element with 'Click to set'
        valid:
          type: array
          items:
            type: object
          description: Valid values for parameter.
        items:
          type: object
          description: Recursive definition for items of a parameter with type 'array'.
        properties:
          type: object
          description: Recursive definition for a parameter with type 'object'.
        minVal:
          type: number
          description: Minimum value for parameters of type 'int' or 'float'.
        maxVal:
          type: number
          description: Maximum value for parameters of type 'int' or 'float'.
    DSPGroup:
      type: object
      required:
        - group
        - items
      properties:
        group:
          type: string
          example: Scaling
        items:
          type: array
          items:
            $ref: '#/components/schemas/DSPGroupItem'
    DSPInfo:
      type: object
      required:
        - id
        - name
        - windowLength
        - type
        - classes
        - features
        - expectedWindowCount
        - inputAxes
        - canCalculateFeatureImportance
        - calculateFeatureImportance
        - canNormalizeData
        - normalizeData
      properties:
        id:
          type: integer
          example: 1
        name:
          type: string
          example: Spectral features
        windowLength:
          type: integer
          example: 3000
        type:
          type: string
          example: spectral-analysis
        classes:
          type: array
          items:
            type: string
        features:
          type: object
          required:
            - generated
          properties:
            generated:
              type: boolean
              description: Whether this block has generated features
            count:
              type: integer
              description: Number of generated features
            labels:
              type: array
              description: Names of the features
              items:
                type: string
            classes:
              type: array
              description: Classes that the features were generated on
              items:
                type: string
        expectedWindowCount:
          type: integer
          description: Expected number of windows that would be generated
        inputAxes:
          type: array
          description: Axes that this block depends on.
          items:
            type: string
        performance:
          $ref: '#/components/schemas/DspPerformance'
        canCalculateFeatureImportance:
          type: boolean
        calculateFeatureImportance:
          type: boolean
        canNormalizeData:
          type: boolean
          description: >-
            Whether this DSP block supports data normalization after features
            were generated. This is true unless "dontAllowDataNormalization" is
            set to true in the DSP block's parameters.json.
        normalizeData:
          $ref: '#/components/schemas/DSPNormalizeData'
          description: Data normalization that was last selected for this block.
        hasAutoTune:
          description: Whether this type of DSP block supports autotuning.
          type: boolean
        minimumVersionForAutotune:
          description: >-
            For DSP blocks that support autotuning, this value specifies the
            minimum block implementation version for which autotuning is
            supported.
          type: number
        hasAutotunerResults:
          description: Whether autotune results exist for this DSP block.
          type: boolean
        usesState:
          description: Whether this DSP block uses state.
          type: boolean
    DSPNormalizeData:
      type: string
      enum:
        - none
        - normalize-channel-standard-scaler
    DSPConfig:
      type: object
      required:
        - dsp
      properties:
        dsp:
          $ref: '#/components/schemas/DSPInfo'
        config:
          type: array
          items:
            $ref: '#/components/schemas/DSPGroup'
        configError:
          type: string
    DSPConfigResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - $ref: '#/components/schemas/DSPConfig'
    DSPConfigRequest:
      type: object
      required:
        - config
      properties:
        config:
          type: object
          additionalProperties:
            type: string
    PostProcessingConfig:
      type: object
      required:
        - enabled
        - parameters
      properties:
        enabled:
          type: boolean
        parameters:
          type: array
          items:
            $ref: '#/components/schemas/DSPGroupItem'
    PostProcessingConfigResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - $ref: '#/components/schemas/PostProcessingConfig'
    PostProcessingFeaturesForSampleRequest:
      type: object
      required:
        - config
        - variant
      properties:
        config:
          $ref: '#/components/schemas/PostProcessingConfigRequest'
        variant:
          $ref: '#/components/schemas/KerasModelVariantEnum'
    PostProcessingConfigRequest:
      type: object
      required:
        - enabled
        - parameters
      properties:
        enabled:
          type: boolean
        parameters:
          type: object
          additionalProperties:
            type: string
    PreviewProcessingConfigRequest:
      type: object
      required:
        - enabled
        - parameters
      properties:
        enabled:
          type: boolean
        parameters:
          type: object
          additionalProperties:
            type: string
    GetAllImpulsesResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - impulses
          properties:
            impulses:
              type: array
              items:
                $ref: '#/components/schemas/Impulse'
    DetailedImpulseMetricCategory:
      type: string
      enum:
        - impulseMetrics
        - inputBlockConfig
        - dspBlockConfig
        - learnBlockConfig
        - learnBlockMetrics
        - postProcessingBlockConfig
    DetailedImpulseMetric:
      type: object
      required:
        - name
        - type
        - category
        - description
        - value
      properties:
        name:
          type: string
        type:
          type: string
          enum:
            - core
            - additional
        filteringType:
          $ref: '#/components/schemas/DetailedImpulseMetricFilteringType'
        category:
          $ref: '#/components/schemas/DetailedImpulseMetricCategory'
        description:
          type: string
        value:
          oneOf:
            - type: string
            - type: boolean
        title:
          type: string
        valueForSorting:
          type: integer
        valueHint:
          type: string
          description: Additional help explaining the value for this metric
    DetailedImpulseMetricFilteringType:
      type: object
      required:
        - type
        - options
      properties:
        type:
          type: string
          enum:
            - numeric
            - string
            - select
            - boolean
            - list
        options:
          type: array
          items:
            type: string
    DetailedImpulse:
      type: object
      required:
        - impulse
        - metrics
        - dspBlockConfigs
        - learnBlockKerasConfigs
        - learnBlockAnomalyConfigs
        - postProcessingBlockConfigs
        - configured
        - complete
        - isStale
        - tags
      properties:
        impulse:
          $ref: '#/components/schemas/Impulse'
        metrics:
          type: array
          items:
            $ref: '#/components/schemas/DetailedImpulseMetric'
        dspBlockConfigs:
          type: array
          items:
            type: object
            required:
              - blockId
              - config
            properties:
              blockId:
                type: integer
              config:
                description: >-
                  This returns a DSPConfig object, but "dsp.classes" and
                  "dsp.features.classes" will be set to an empty array (use
                  getDspConfig to retrieve these).
                $ref: '#/components/schemas/DSPConfig'
              metadata:
                description: >-
                  This returns a DSPMetadata object, but "labels" will be set to
                  an empty array (use getDspMetadata to retrieve these).
                $ref: '#/components/schemas/DSPMetadata'
        learnBlockKerasConfigs:
          items:
            type: object
            required:
              - blockId
              - config
            properties:
              blockId:
                type: integer
              config:
                description: >-
                  This returns a KerasConfig object, but
                  "transferLearningModels" and "dependencies.classes" will be
                  set to an empty array (use getKeras to retrieve these).
                $ref: '#/components/schemas/KerasConfig'
              metadata:
                description: >-
                  This returns a KerasModelMetadata object, but 1) non-default
                  "onDevicePerformance", 2) "predictions", 3) "labels"; are
                  omitted (use getKerasMetadata to retrieve these).
                $ref: '#/components/schemas/KerasModelMetadata'
        learnBlockAnomalyConfigs:
          items:
            type: object
            required:
              - blockId
              - config
            properties:
              blockId:
                type: integer
              config:
                $ref: '#/components/schemas/AnomalyConfig'
              metadata:
                description: >-
                  This returns a AnomalyModelMetadata object, but 1) non-default
                  "onDevicePerformance", 2) "predictions" are omitted (use
                  getAnomalyMetadata to retrieve these).
                $ref: '#/components/schemas/AnomalyModelMetadata'
              gmmMetadata:
                $ref: '#/components/schemas/AnomalyGmmMetadata'
        postProcessingBlockConfigs:
          items:
            type: object
            required:
              - blockId
              - config
            properties:
              blockId:
                type: integer
              config:
                $ref: '#/components/schemas/PostProcessingConfig'
        pretrainedModelInfo:
          type: object
          required:
            - fileName
          properties:
            fileName:
              type: string
        isStale:
          type: boolean
          description: >-
            Whether this impulse contains blocks with "stale" features (i.e. the
            dataset has changed since features were generated)
        configured:
          type: boolean
          description: Whether this impulse is configured
        complete:
          type: boolean
          description: Whether this impulse is fully trained and configured
        tags:
          type: array
          items:
            type: string
          description: Tags associated with this impulse
        createdFromTunerTrialId:
          type: number
          description: >-
            The source EON Tuner trial ID for impulses created from the EON
            Tuner
        createdByUser:
          description: The user who originally created this impulse.
          $ref: '#/components/schemas/CreatedUpdatedByUser'
    GetAllDetailedImpulsesResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - impulses
            - metricKeysByCategory
            - extraTableColumns
          properties:
            impulses:
              type: array
              items:
                $ref: '#/components/schemas/DetailedImpulse'
            metricKeysByCategory:
              type: array
              items:
                type: object
                required:
                  - category
                  - metricKeys
                properties:
                  category:
                    $ref: '#/components/schemas/DetailedImpulseMetricCategory'
                  metricKeys:
                    type: array
                    items:
                      type: object
                      required:
                        - name
                        - description
                        - type
                        - showInTable
                      properties:
                        name:
                          type: string
                        description:
                          type: string
                        type:
                          type: string
                          enum:
                            - core
                            - additional
                        filteringType:
                          $ref: >-
                            #/components/schemas/DetailedImpulseMetricFilteringType
                        showInTable:
                          type: boolean
            extraTableColumns:
              type: array
              description: >-
                Which extra impulse information should be shown in the impulses
                table.
              items:
                type: string
    GetImpulseResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          properties:
            impulse:
              $ref: '#/components/schemas/Impulse'
    GetTargetConstraintsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          properties:
            targetConstraints:
              $ref: '#/components/schemas/TargetConstraints'
    GetModelVariantsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - modelVariants
          properties:
            modelVariants:
              $ref: '#/components/schemas/AllProjectModelVariants'
    InputBlock:
      type: object
      required:
        - type
        - title
        - author
        - description
        - name
        - blockType
      properties:
        type:
          type: string
          enum:
            - time-series
            - image
            - features
        title:
          type: string
          example: Time series
        author:
          type: string
          example: Edge Impulse Inc.
        description:
          type: string
        name:
          type: string
          example: Time series
        blockType:
          $ref: '#/components/schemas/BlockType'
    DSPNamedAxis:
      type: object
      required:
        - name
        - description
        - required
      properties:
        name:
          type: string
        description:
          type: string
        required:
          type: boolean
    DSPBlock:
      type: object
      required:
        - type
        - title
        - author
        - description
        - name
        - recommended
        - experimental
        - latestImplementationVersion
        - blockType
        - variants
      properties:
        type:
          type: string
          example: spectral-analysis
        title:
          type: string
          example: Spectral features
        author:
          type: string
          example: Edge Impulse Inc.
        description:
          type: string
        name:
          type: string
          example: Spectral analysis
        recommended:
          type: boolean
        experimental:
          type: boolean
        latestImplementationVersion:
          type: integer
        organizationId:
          type: integer
        organizationDspId:
          type: integer
        blockType:
          $ref: '#/components/schemas/BlockType'
        namedAxes:
          type: array
          items:
            $ref: '#/components/schemas/DSPNamedAxis'
        supportedTargets:
          description: >-
            List of target devices that support this DSP block. If undefined
            this block works on all targets.
          type: array
          items:
            type: string
            example: brainchip-akd1000
    BlockType:
      type: string
      enum:
        - official
        - personal
        - enterprise
        - community
    LearnBlock:
      type: object
      required:
        - type
        - title
        - author
        - description
        - name
        - recommended
        - blockType
      properties:
        type:
          type: string
          example: spectral-analysis
        title:
          type: string
          example: Spectral features
        author:
          type: string
          example: Edge Impulse Inc.
        description:
          type: string
        name:
          type: string
          example: Spectral analysis
        recommended:
          type: boolean
        organizationModelId:
          type: integer
        publicProjectTierAvailability:
          $ref: '#/components/schemas/PublicProjectTierAvailability'
        isPublicEnterpriseOnly:
          type: boolean
          description: Whether this block is publicly available to only enterprise users
        blockType:
          $ref: '#/components/schemas/BlockType'
        displayCategory:
          $ref: '#/components/schemas/BlockDisplayCategory'
        supportedTargets:
          description: >-
            List of target devices that support this learn block. If undefined
            this block works on all targets.
          type: array
          items:
            type: string
            example: brainchip-akd1000
    PostProcessingBlock:
      type: object
      required:
        - type
        - title
        - author
        - description
        - name
        - recommended
        - experimental
        - latestImplementationVersion
        - blockType
        - defaultParameters
      properties:
        type:
          type: string
          example: object-tracking
        title:
          type: string
          example: Object tracking
        author:
          type: string
          example: Edge Impulse Inc.
        description:
          type: string
        name:
          type: string
          example: Object tracking
        recommended:
          type: boolean
        experimental:
          type: boolean
        latestImplementationVersion:
          type: integer
        blockType:
          $ref: '#/components/schemas/BlockType'
        supportedTargets:
          description: >-
            List of target devices that support this DSP block. If undefined
            this block works on all targets.
          type: array
          items:
            type: string
            example: brainchip-akd1000
        defaultParameters:
          type: array
          items:
            $ref: '#/components/schemas/DSPGroupItem'
    GetImpulseBlocksResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - inputBlocks
            - dspBlocks
            - learnBlocks
            - postProcessingBlocks
          properties:
            inputBlocks:
              type: array
              items:
                $ref: '#/components/schemas/InputBlock'
            dspBlocks:
              type: array
              items:
                $ref: '#/components/schemas/DSPBlock'
            learnBlocks:
              type: array
              items:
                $ref: '#/components/schemas/LearnBlock'
            postProcessingBlocks:
              type: array
              items:
                $ref: '#/components/schemas/PostProcessingBlock'
    AnomalyConfig:
      type: object
      required:
        - name
        - axes
        - trained
        - dependencies
        - selectedAxes
        - minimumConfidenceRating
        - thresholds
      properties:
        dependencies:
          $ref: '#/components/schemas/DependencyData'
        name:
          type: string
        axes:
          type: array
          description: Selectable axes for the anomaly detection block
          items:
            type: object
            required:
              - ix
              - label
              - selected
              - favourite
            properties:
              ix:
                type: integer
              label:
                type: string
              selected:
                type: boolean
              favourite:
                type: boolean
        trained:
          type: boolean
          description: Whether the block is trained
        clusterCount:
          type: integer
          description: >-
            Number of clusters for K-means, or number of components for GMM (in
            config)
        selectedAxes:
          type: array
          items:
            type: integer
          description: Selected clusters (in config)
        minimumConfidenceRating:
          type: number
          description: >-
            DEPRECATED, see "thresholds" instead. Minimum confidence rating for
            this block, scores above this number will be flagged as anomaly.
        thresholds:
          type: array
          description: List of configurable thresholds for this block.
          items:
            $ref: '#/components/schemas/BlockThreshold'
    AnomalyConfigResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - $ref: '#/components/schemas/AnomalyConfig'
    AnomalyLabelsConfig:
      type: object
      required:
        - anomalyLabels
        - noAnomalyLabels
      properties:
        anomalyLabels:
          type: array
          description: >-
            Labels to treat as anomalous during classification or model testing
            in Studio, defaults to ['anomaly']
          items:
            type: string
        noAnomalyLabels:
          type: array
          description: >-
            Labels to treat as non-anomalous during classification or model
            testing in Studio, defaults to ['no anomaly']
          items:
            type: string
    DependencyData:
      type: object
      required:
        - classes
        - blockNames
        - featureCount
        - sampleCount
        - outputClasses
      properties:
        classes:
          type: array
          description: Set of all labels present in data feeding into this model
          items:
            type: string
        blockNames:
          type: array
          items:
            type: string
        featureCount:
          type: integer
        sampleCount:
          type: integer
        outputClasses:
          type: array
          description: Set of output classes for this model
          items:
            type: string
    UserTierEnum:
      type: string
      description: The user account tier.
      enum:
        - free
        - community-plus
        - professional
        - enterprise
    ProjectTierEnum:
      type: string
      description: >-
        The project tier. This is "enterprise" for all organization projects, or
        the user tier for all user projects.
      enum:
        - free
        - community-plus
        - professional
        - enterprise
    OrganizationDatasetTypeEnum:
      type: string
      enum:
        - clinical
        - files
    KerasModelTypeEnum:
      type: string
      enum:
        - int8
        - float32
        - akida
        - requiresRetrain
    ModelEngineShortEnum:
      type: string
      enum:
        - tflite-eon
        - tflite-eon-ram-optimized
        - tflite
    KerasModelVariantEnum:
      type: string
      enum:
        - int8
        - float32
        - akida
    JobParentTypeEnum:
      type: string
      enum:
        - project
        - organization
        - standalone
    AugmentationPolicyImageEnum:
      type: string
      description: The data augmentation policy to use with image input
      enum:
        - none
        - all
    AugmentationPolicySpectrogram:
      type: object
      required:
        - enabled
      properties:
        enabled:
          type: boolean
          description: >-
            True if spectrogram augmentation is enabled. Other properties will
            be ignored if this is false.
        warping:
          type: boolean
          description: True if warping along the time axis is enabled.
        freqMasking:
          type: string
          enum:
            - none
            - low
            - high
          description: The amount of frequency masking to apply.
        timeMasking:
          type: string
          enum:
            - none
            - low
            - high
          description: The amount of time masking to apply.
        gaussianNoise:
          type: string
          enum:
            - none
            - low
            - high
          description: The amount of Gaussian noise to add.
    AkidaEdgeLearningConfig:
      type: object
      required:
        - enabled
      properties:
        enabled:
          type: boolean
          description: >-
            True if Akida Edge Learning model creation is enabled. Other
            properties will be ignored if this is false.
        additionalClasses:
          type: number
          description: >-
            Number of additional classes that will be added to the Edge Learning
            model.
        neuronsPerClass:
          type: number
          description: >-
            Number of neurons in each class on the last layer in the Edge
            Learning model.
    LearnBlockType:
      type: string
      description: >-
        The type of learning block (anomaly, keras, keras-transfer-image,
        keras-transfer-kws, keras-object-detection, keras-regression,
        keras-freeform). Each behaves differently.
      enum:
        - anomaly
        - anomaly-gmm
        - keras
        - keras-transfer-image
        - keras-transfer-kws
        - keras-object-detection
        - keras-regression
        - keras-akida
        - keras-akida-transfer-image
        - keras-akida-object-detection
        - keras-visual-anomaly
        - keras-freeform
        - keras-anomaly
        - vlm
    KerasConfig:
      type: object
      required:
        - dependencies
        - trained
        - name
        - script
        - minimumConfidenceRating
        - selectedModelType
        - mode
        - trainingCycles
        - learningRate
        - defaultBatchSize
        - visualLayers
        - augmentationPolicyImage
        - transferLearningModels
        - shape
        - profileInt8
        - skipEmbeddingsAndMemory
        - showAdvancedTrainingSettings
        - showAugmentationTrainingSettings
        - thresholds
      properties:
        dependencies:
          $ref: '#/components/schemas/DependencyData'
        trained:
          type: boolean
          description: Whether the block is trained
        name:
          type: string
        type:
          $ref: '#/components/schemas/LearnBlockType'
        script:
          type: string
          description: The Keras script. This script might be empty if the mode is visual.
        minimumConfidenceRating:
          type: number
          description: >-
            DEPRECATED, see "thresholds" instead. Minimum confidence rating
            required for the neural network. Scores below this confidence are
            tagged as uncertain.
        selectedModelType:
          description: The model type that is currently selected.
          $ref: '#/components/schemas/KerasModelTypeEnum'
        mode:
          type: string
          description: The mode (visual or expert) to use for editing this network.
          enum:
            - visual
            - expert
        visualLayers:
          type: array
          description: >-
            The visual layers (if in visual mode) for the neural network. This
            will be an empty array when in expert mode.
          items:
            $ref: '#/components/schemas/KerasVisualLayer'
        trainingCycles:
          type: integer
          description: Number of training cycles. If in expert mode this will be 0.
        learningRate:
          type: number
          description: Learning rate (between 0 and 1). If in expert mode this will be 0.
        batchSize:
          type: integer
          description: The batch size used during training.
        defaultBatchSize:
          type: integer
          description: The default batch size if a value is not configured.
        shape:
          type: string
          description: Python-formatted tuple of input axes
        trainTestSplit:
          type: number
          description: Train/test split (between 0 and 1)
        autoClassWeights:
          type: boolean
          description: >-
            Whether to automatically balance class weights, use this for skewed
            datasets.
        useLearnedOptimizer:
          type: boolean
          description: Use learned optimizer and ignore learning rate.
        augmentationPolicyImage:
          $ref: '#/components/schemas/AugmentationPolicyImageEnum'
        augmentationPolicySpectrogram:
          $ref: '#/components/schemas/AugmentationPolicySpectrogram'
        transferLearningModels:
          type: array
          items:
            $ref: '#/components/schemas/TransferLearningModel'
        profileInt8:
          type: boolean
          description: Whether to profile the i8 model (might take a very long time)
        skipEmbeddingsAndMemory:
          type: boolean
          description: >-
            If set, skips creating embeddings and measuring memory (used in
            tests)
        akidaEdgeLearningConfig:
          $ref: '#/components/schemas/AkidaEdgeLearningConfig'
        customValidationMetadataKey:
          type: string
          description: >-
            This metadata key is used to prevent group data leakage between
            train and validation datasets.
        showAdvancedTrainingSettings:
          type: boolean
          description: >-
            Whether the 'Advanced training settings' UI element should be
            expanded.
        showAugmentationTrainingSettings:
          type: boolean
          description: >-
            Whether the 'Augmentation training settings' UI element should be
            expanded.
        customParameters:
          type: object
          description: >-
            Training parameters, this list depends on the list of parameters
            that the model exposes.
          additionalProperties:
            type: string
            nullable: true
        anomalyCapacity:
          description: >-
            Capacity level for visual anomaly detection (GMM). Determines which
            set of default configurations to use. The higher capacity, the
            higher number of (Gaussian) components, and the more adapted the
            model becomes to the original distribution
          $ref: '#/components/schemas/AnomalyCapacity'
        lastShownModelVariant:
          $ref: '#/components/schemas/KerasModelVariantEnum'
          description: >-
            Last shown variant on the Keras screen. Used to keep the same view
            after refreshing.
        blockParameters:
          $ref: '#/components/schemas/BlockParameters'
          description: >-
            Training parameters specific to the type of the learn block.
            Parameters may be adjusted depending on the model defined in the
            visual layers. Used for our built-in blocks.
        thresholds:
          type: array
          description: List of configurable thresholds for this block.
          items:
            $ref: '#/components/schemas/BlockThreshold'
    KerasResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - $ref: '#/components/schemas/KerasConfig'
    DSPMetadata:
      type: object
      required:
        - created
        - generated
        - dspConfig
        - labels
        - featureCount
        - windowCount
        - includedSamples
        - windowSizeMs
        - windowIncreaseMs
        - padZeros
        - frequency
        - outputConfig
      properties:
        created:
          type: string
          format: date-time
          description: Date when the features were created
        generated:
          type: boolean
          description: Whether features were generated
        dspConfig:
          type: object
          additionalProperties:
            type: string
        labels:
          type: array
          description: Labels in the dataset when generator ran
          items:
            type: string
        featureLabels:
          type: array
          description: >-
            Names of the generated features. Only set if axes have explicit
            labels.
          items:
            type: string
        windowCount:
          type: integer
        featureCount:
          type: integer
          description: Number of features for this DSP block
        includedSamples:
          type: array
          description: >-
            The included samples in this DSP block. Note that these are sorted
            in the same way as the `npy` files are laid out. So with the
            `windowCount` parameter you can exactly search back to see which
            file contributed to which windows there.
          items:
            type: object
            required:
              - id
              - windowCount
            properties:
              id:
                type: integer
              windowCount:
                type: integer
        windowSizeMs:
          type: integer
          description: Length of the sliding window when generating features.
        windowIncreaseMs:
          type: integer
          description: Increase of the sliding window when generating features.
        padZeros:
          type: boolean
          description: Whether data was zero-padded when generating features.
        frequency:
          type: number
          description: Frequency of the original data in Hz.
        outputConfig:
          type: object
          description: Information about the output of the DSP block
          required:
            - type
            - shape
          properties:
            type:
              type: string
              description: Output type of the DSP block
              enum:
                - image
                - spectrogram
                - flat
            shape:
              type: object
              description: The shape of the block output
              required:
                - width
              properties:
                width:
                  description: >-
                    Available on all types. Denotes the width of an 'image' or
                    'spectrogram', or the number of features in a 'flat' block.
                  type: integer
                height:
                  description: Only available for type 'image' and 'spectrogram'
                  type: integer
                channels:
                  description: Only available for type 'image'
                  type: integer
                frames:
                  description: Number of frames, only available for type 'image'
                  type: integer
        fftUsed:
          type: array
          items:
            type: integer
        resamplingAlgorithmVersion:
          type: number
          description: >-
            The version number of the resampling algorithm used (for resampled
            time series data only)
        featureExplorerJobId:
          type: integer
          description: >-
            When specified, a job is running (asynchronously) to generate the
            feature explorer.
        featureExplorerJobFailed:
          description: >-
            If this is set, then the feature explorer job failed (get the status
            by getting the job logs for 'featureExplorerJobId').
          type: boolean
        featureImportanceJobId:
          type: integer
          description: >-
            When specified, a job is running (asynchronously) to generate
            feature importance.
        featureImportanceJobFailed:
          description: >-
            If this is set, then the feature importance job failed (get the
            status by getting the job logs for 'featureImportanceJobId').
          type: boolean
    DSPMetadataResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - $ref: '#/components/schemas/DSPMetadata'
    JobDetailsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          properties:
            jobs:
              type: array
              items:
                $ref: '#/components/schemas/JobDetails'
    JobDetails:
      allOf:
        - $ref: '#/components/schemas/Job'
        - type: object
          required:
            - states
          properties:
            childrenIds:
              type: array
              description: List of jobs children isd triggered by this job
              items:
                type: integer
            states:
              type: array
              description: List of states the job went through
              items:
                $ref: '#/components/schemas/JobState'
            spec:
              type: object
              description: >-
                Job specification (Kubernetes specification or other underlying
                engine)
    JobState:
      type: object
      required:
        - version
        - timestamp
        - step
      properties:
        version:
          type: integer
          description: version number (indicates the order of the state)
        timestamp:
          type: string
          format: date-time
          description: timestamp when the job transistioned to this new step
        executionDetails:
          $ref: '#/components/schemas/JobStateExecutionDetails'
        step:
          $ref: '#/components/schemas/JobStep'
    JobStep:
      type: object
      required:
        - ordinal
        - name
      properties:
        ordinal:
          type: number
          description: ordinal number representing the step
        progress:
          type: number
          description: >
            progress percentage inside the same step example for "scheduled"
            step, we have the following values: 0%: pod scheduled to some node
            (but node creation may not be finished yet) 50%: image pulling
            started 90%: image pulled
        name:
          type: string
          description: short name describing the step
        attempt:
          type: integer
          description: execution attempt (starts at 0)
        failureDetails:
          $ref: '#/components/schemas/JobFailureDetails'
          description: failure details
    JobFailureDetails:
      type: object
      properties:
        reason:
          type: string
          description: short code describing the reason of the failure
        message:
          type: string
          description: full description of the failure
        exitCode:
          type: integer
          description: exit code of the failed job process
    JobStateExecutionDetails:
      type: object
      properties:
        podName:
          type: string
          description: Kubernetes pod name
    Job:
      type: object
      required:
        - id
        - key
        - created
        - category
        - categoryKey
        - jobNotificationUids
      properties:
        id:
          type: integer
          description: >-
            Job id, use this to refer back to the job. The web socket API also
            uses this ID.
        category:
          type: string
          description: User-friendly category (e.g. "Training model")
        categoryKey:
          type: string
          description: Machine-readable category (e.g. "learn-train-studio-wrapper")
        key:
          type: string
          description: >
            External job identifier, this can be used to categorize jobs, and
            recover job status. E.g. set this to 'keras-192' for a Keras
            learning block with ID 192. When a user refreshes the page you can
            check whether a job is active for this ID and re-attach.
        created:
          type: string
          format: date-time
          description: When the job was created.
        started:
          type: string
          format: date-time
          description: When the job was started.
        finished:
          type: string
          format: date-time
          description: When the job was finished.
        finishedSuccessful:
          type: boolean
          description: Whether the job finished successfully.
        jobNotificationUids:
          type: array
          description: The IDs of users who should be notified when a job is finished.
          items:
            type: integer
        additionalInfo:
          type: string
          description: Additional metadata associated with this job.
        computeTime:
          type: number
          description: >-
            Job duration time in seconds from start to finished, measured by k8s
            job watcher.
        createdByUser:
          description: The user who started this job.
          $ref: '#/components/schemas/CreatedUpdatedByUser'
        categoryCount:
          type: integer
          description: >-
            Some job categories keep a counter on the job number, e.g. in
            synthetic data, so we know what the 1st, 2nd etc. job was in the UI.
        metadata:
          type: object
          description: Structured job metadata
    ListJobsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - jobs
            - totalJobCount
          properties:
            jobs:
              type: array
              description: Active jobs
              items:
                $ref: '#/components/schemas/Job'
            totalJobCount:
              type: integer
    CreateUserRequest:
      type: object
      required:
        - name
        - username
        - email
        - privacyPolicy
        - turnstileResponse
      properties:
        name:
          type: string
          description: Your name
          example: Jan Jongboom
        username:
          type: string
          description: >-
            Username, minimum 4 and maximum 30 characters. May contain
            alphanumeric characters, hyphens, underscores and dots. Validated
            according to
            `^(?=.{4,30}$)(?![_.])(?!.*[_.]{2})[a-zA-Z0-9._-]+(?<![_.])$`.
          example: janjongboom
        email:
          type: string
          description: >-
            E-mail address. Will need to be validated before the account will
            become active.
          example: jan@edgeimpulse.com
        password:
          type: string
          description: Password, minimum length 8 characters.
        projectName:
          type: string
          description: >-
            A project will automatically be created. Sets the name of the first
            project. If not set, this will be derived from the username.
        privacyPolicy:
          type: boolean
          description: Whether the user accepted the privacy policy
        activationToken:
          type: string
          description: Activation token for users created via SSO
        identityProvider:
          type: string
          description: >-
            Unique identifier of the identity provider asserting the identity of
            this user
        jobTitle:
          type: string
          description: Job title of the user. Optional field
        sessionId:
          type: string
          description: Session ID. Optional field
        companyName:
          type: string
          description: ACME Inc.
        utmParams:
          type: array
          description: List of UTM parameters.
          items:
            $ref: '#/components/schemas/UtmParameter'
        ignoreEmailValidation:
          type: boolean
          description: >-
            If true, allows signup to proceed despite a potentially invalid
            email. Note that this will enforce email verification post-signup
        turnstileResponse:
          type: string
          description: CloudFlare Turnstile response token
        dateOfBirth:
          type: string
          format: date
          description: Date of birth of the user in YYYY-MM-DD format. Optional field.
        approverEmail:
          type: string
          description: Email address to be used for signup approval. Optional field.
    CreateProTierUserRequest:
      allOf:
        - $ref: '#/components/schemas/CreateUserRequest'
        - type: object
          properties:
            redirectUrlOrigin:
              type: string
              description: >-
                Origin of the redirect URL returned as result of creating the
                professional user.
              example: https://studio.edgeimpulse.com
            redirectUrlQueryParams:
              type: string
              description: >-
                Query parameters to be appended to the redirect URL returned as
                result of creating the professional user.
              example: utm_source=google&utm_medium=cpc&utm_campaign=trial
    CreateUserResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          properties:
            redirectUrl:
              type: string
              description: URL to redirect user to.
            id:
              type: integer
              description: User unique identifier
    ConvertUserRequest:
      type: object
      required:
        - name
        - username
        - email
        - password
        - privacyPolicy
        - turnstileResponse
      properties:
        name:
          type: string
          description: Your name
          example: Jan Jongboom
        username:
          type: string
          description: >-
            Username, minimum 4 and maximum 30 characters. May contain
            alphanumeric characters, hyphens, underscores and dots. Validated
            according to
            `^(?=.{4,30}$)(?![_.])(?!.*[_.]{2})[a-zA-Z0-9._-]+(?<![_.])$`.
          example: janjongboom
        email:
          type: string
          description: >-
            E-mail address. Will need to be validated before the account will
            become active.
          example: jan@edgeimpulse.com
        password:
          type: string
          description: Password, minimum length 8 characters.
        projectName:
          type: string
          description: >-
            A project will automatically be created. Sets the name of the first
            project. If not set, this will be derived from the username.
        privacyPolicy:
          type: boolean
          description: Whether the user accepted the privacy policy
        turnstileResponse:
          type: string
          description: CloudFlare Turnstile response token
    CreateProjectRequest:
      type: object
      required:
        - projectName
      properties:
        projectName:
          type: string
          example: EEG trials
          description: The name of the first project.
        projectVisibility:
          $ref: '#/components/schemas/ProjectVisibility'
        originalProjectVersionId:
          type: integer
          description: The ID of the version that was used to restore this project.
        showGettingStartedWizard:
          type: boolean
          description: >-
            Whether to show the getting started wizard use-case chooser screen
            after the project is created
        tutorialKey:
          $ref: '#/components/schemas/TutorialType'
          description: Optional in-product tutorial to launch after the project is created
    CreateProjectResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - id
            - apiKey
          properties:
            id:
              type: integer
              description: Project ID for the new project
            apiKey:
              type: string
              description: API key for the new project
    OptimizeConfig:
      type: object
      required:
        - targetDevice
        - targetLatency
      properties:
        name:
          type: string
        targetLatency:
          type: integer
          description: Target latency in MS
          example: 0
        targetDevice:
          type: object
          required:
            - name
          description: Target device
          properties:
            name:
              type: string
              example: cortex-m4f-80mhz
            ram:
              type: integer
              example: 1024
            rom:
              type: integer
              example: 1024
        compiler:
          type: array
          items:
            type: string
        precision:
          type: array
          items:
            type: string
        trainingCycles:
          type: integer
          description: Maximum number of training cycles
          example: 5
        tuningMaxTrials:
          type: integer
          description: Maximum number of trials
          example: 2
        tuningWorkers:
          type: integer
          description: Maximum number of parallel workers/jobs
          example: 1
        initialTrials:
          type: integer
          description: Number of initial trials
          example: 5
        optimizationRounds:
          type: integer
          description: Number of optimization rounds
          example: 3
        trialsPerOptimizationRound:
          type: integer
          description: Number of trials per optimization round
          example: 3
        minMACCS:
          type: number
        maxMACCS:
          type: number
        tuningAlgorithm:
          type: string
          description: Tuning algorithm to use to search hyperparameter space
          enum:
            - random
            - hyperband
            - bayesian
            - custom
        notificationOnCompletion:
          type: boolean
        importProjectMetrics:
          type: boolean
          description: >-
            Whether to import metrics for previous EON tuner runs in the same
            project to accelerate the hyperparameter search process
        importResourceMetrics:
          type: boolean
          description: >-
            Whether to import resource usage (RAM/ROM/latency) metrics to
            accelerate the hyperparameter search process
        numImportProjectMetrics:
          type: number
          description: Number of project trials to import
        numImportResourceMetrics:
          type: number
          description: Number of resource usage trials to import
        enableSEM:
          type: boolean
          description: Enable standard error of the mean (SEM)
        accuracySEM:
          type: number
          description: Standard error of the trial accuracy mean
        latencySEM:
          type: number
          description: Standard error of the trial latency mean
        optimizationObjectives:
          type: array
          description: Hyperparameter optimization objectives and corresponding weights
          items:
            type: object
            required:
              - objective
              - label
              - weight
            properties:
              objective:
                type: string
                description: Objective to optimize
              label:
                type: string
                description: Label of the objective
              weight:
                type: number
                description: Weight of the objective
        rawObjectives:
          type: string
          description: Hyperparameter optimization objectives + weights in string format
        optimizationPrecision:
          type: string
          description: Model variant to optimize for
          enum:
            - float32
            - int8
        earlyStopping:
          type: boolean
          description: >-
            Enable trial level early stopping based on loss metrics during
            training
        earlyStoppingWindowSize:
          type: number
          description: >-
            Stops the EON tuner if the feasible (mean) objective has not
            improved over the past “window_size” iterations
        earlyStoppingImprovementBar:
          type: number
          description: >-
            Threshold (in [0,1]) for considering relative improvement over the
            best point.
        MOMF:
          type: boolean
          description: Enable Multi-fidelity Multi-Objective optimization
        verboseLogging:
          type: boolean
          description: Enable verbose logging
        disableConstraints:
          type: boolean
          description: Disable search constraints
        disableDeduplicate:
          type: boolean
          description: Disable trial deduplication
        maxTotalTrainingTime:
          type: number
          description: Maximum total training time in seconds
        tunerSpaceOptions:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        space:
          type: array
          description: List of impulses specifying the EON Tuner search space
          items:
            $ref: '#/components/schemas/TunerSpaceImpulse'
        searchSpaceTemplate:
          type: object
          description: Search space template
          required:
            - identifier
          properties:
            identifier:
              type: string
              description: Search space template identifier
              enum:
                - speech_keyword
                - speech_continuous
                - audio_event
                - audio_continuous
                - visual
                - motion_event
                - motion_continuous
                - audio_syntiant
                - object_detection_bounding_boxes
                - object_detection_centroids
                - visual_ad
                - object_detection_yolo_pro
            classification:
              type: boolean
              description: >-
                Whether a classification block should be added to the search
                space
            anomaly:
              type: boolean
              description: Whether an anomaly block should be added to the search space
            regression:
              type: boolean
              description: Whether a regression block should be added to the search space
        searchSpaceSource:
          type: object
          description: Search space source
          required:
            - type
          properties:
            type:
              type: string
              description: Search space source type
              enum:
                - template
                - run
                - impulse
                - custom
            templateTitle:
              type: string
              description: Search space source template title
            runTitle:
              type: string
              description: Search space source run title
            impulseTitle:
              type: string
              description: Search space source impulse title
    OptimizeSpaceResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - impulse
          properties:
            impulse:
              type: array
              description: List of impulses specifying the EON Tuner search space
              items:
                $ref: '#/components/schemas/TunerSpaceImpulse'
    TunerTrial:
      type: object
      required:
        - id
        - name
        - status
        - blocks
        - impulse
      properties:
        id:
          type: string
        name:
          type: string
        status:
          type: string
          enum:
            - pending
            - running
            - completed
            - failed
        lastCompletedEpoch:
          type: string
          format: date-time
        lastCompletedTraining:
          type: string
          format: date-time
        retries:
          type: integer
        currentEpoch:
          type: integer
        workerId:
          type: string
        blocks:
          type: array
          items:
            type: object
            required:
              - id
              - type
              - retries
              - status
              - blockId
            properties:
              id:
                type: integer
              lastActive:
                type: string
                format: date-time
              retries:
                type: integer
              status:
                type: string
                enum:
                  - pending
                  - running
                  - completed
                  - failed
              type:
                type: string
                enum:
                  - input
                  - dsp
                  - learn
              modelBlockIndex:
                type: integer
                description: >-
                  Index of corresponding DSP/learn block in the impulse model
                  passed to createTrial()
        impulse:
          $ref: '#/components/schemas/TunerTrialImpulse'
        experiment:
          type: string
        original_trial_id:
          type: string
        model:
          type: object
          additionalProperties: true
        dspJobId:
          type: object
          properties:
            training:
              type: number
            testing:
              type: number
        learnJobId:
          type: number
        devicePerformance:
          type: object
          additionalProperties: true
        optimizationRound:
          type: number
        progress:
          type: object
          required:
            - epoch
            - loss
            - val_loss
            - accuracy
            - val_accuracy
          properties:
            epoch:
              type: number
            loss:
              type: number
            val_loss:
              type: number
            accuracy:
              type: number
            val_accuracy:
              type: number
        metrics:
          type: object
          properties:
            test:
              type: object
              properties:
                float32:
                  $ref: '#/components/schemas/KerasModelMetadataMetrics'
                int8:
                  $ref: '#/components/schemas/KerasModelMetadataMetrics'
            train:
              type: object
              properties:
                float32:
                  $ref: '#/components/schemas/KerasModelMetadataMetrics'
                int8:
                  $ref: '#/components/schemas/KerasModelMetadataMetrics'
            validation:
              type: object
              properties:
                float32:
                  $ref: '#/components/schemas/KerasModelMetadataMetrics'
                int8:
                  $ref: '#/components/schemas/KerasModelMetadataMetrics'
        impulseAddedToProject:
          type: object
          required:
            - impulseId
            - link
          properties:
            impulseId:
              type: integer
            link:
              type: string
        createdInPostProcessing:
          type: boolean
    OptimizeConfigResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - $ref: '#/components/schemas/OptimizeConfig'
        - type: object
          properties:
            device:
              type: object
    OptimizeDSPParametersResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - parameters
          properties:
            parameters:
              type: object
    TunerBlock:
      type: object
      required:
        - type
        - title
        - blockType
      properties:
        type:
          type: string
        title:
          type: string
        blockType:
          $ref: '#/components/schemas/BlockType'
        author:
          type: string
        description:
          type: string
        name:
          type: string
        recommended:
          type: boolean
        organizationModelId:
          type: number
        params:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/DSPGroupItem'
        defaultConfig:
          type: object
        variants:
          type: object
          additionalProperties:
            type: object
            properties:
              title:
                type: string
              key:
                type: string
              regression:
                type: boolean
              objectDetection:
                type: boolean
              projectDataType:
                type: string
              searchSpaceTemplates:
                type: array
                items:
                  type: object
                  properties:
                    template:
                      type: string
                    group:
                      type: string
                    blocks:
                      type: object
                      properties:
                        input:
                          type: object
                          properties:
                            type:
                              type: string
                            variant:
                              type: string
                            params:
                              type: object
                        dsp:
                          type: object
                          properties:
                            type:
                              type: string
                            variant:
                              type: string
                            params:
                              type: object
                        learn:
                          type: object
                          properties:
                            type:
                              type: string
                            variant:
                              type: string
                            params:
                              type: object
              params:
                type: object
                additionalProperties:
                  type: array
                  items:
                    type: object
    AllBlocksResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - input
            - dsp
            - learn
          properties:
            input:
              type: array
              items:
                $ref: '#/components/schemas/TunerBlock'
            dsp:
              type: array
              items:
                $ref: '#/components/schemas/TunerBlock'
            learn:
              type: array
              items:
                $ref: '#/components/schemas/TunerBlock'
    OptimizeTransferLearningModelsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - models
          properties:
            models:
              type: object
              required:
                - image
                - objectDetection
                - kws
                - regression
                - classification
              properties:
                image:
                  type: array
                  items:
                    $ref: '#/components/schemas/TransferLearningModel'
                objectDetection:
                  type: array
                  items:
                    $ref: '#/components/schemas/TransferLearningModel'
                kws:
                  type: array
                  items:
                    $ref: '#/components/schemas/TransferLearningModel'
                regression:
                  type: array
                  items:
                    $ref: '#/components/schemas/TransferLearningModel'
                classification:
                  type: array
                  items:
                    $ref: '#/components/schemas/TransferLearningModel'
                anomaly:
                  type: array
                  items:
                    $ref: '#/components/schemas/TransferLearningModel'
    OptimizeStateResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - config
            - status
            - trials
            - workers
            - projectDataType
            - tunerJobIsRunning
            - nextRunIndex
            - canExtendSearch
            - isWhitelabel
            - totalTrainingTimeExceeded
          properties:
            config:
              $ref: '#/components/schemas/OptimizeConfig'
            status:
              type: object
              required:
                - numPendingTrials
                - numRunningTrials
                - numCompletedTrials
                - numFailedTrials
                - numReadyWorkers
                - numBusyWorkers
                - numPendingWorkers
                - status
              properties:
                numPendingTrials:
                  type: integer
                numRunningTrials:
                  type: integer
                numCompletedTrials:
                  type: integer
                numFailedTrials:
                  type: integer
                numReadyWorkers:
                  type: integer
                numBusyWorkers:
                  type: integer
                numPendingWorkers:
                  type: integer
                status:
                  type: string
                  enum:
                    - creating
                    - ready
                    - running
                    - completed
            tunerJobId:
              description: >-
                Actual tuner process, job message events will be tagged with
                this ID
              type: integer
            tunerCoordinatorJobId:
              description: >-
                The coordinator pod, attach the job runner to this process for
                finished events
              type: integer
            continuationJobId:
              description: >-
                Job ID for the initial job this job continuous the
                hyperparameter search process for.
              type: integer
            tuningAlgorithm:
              type: string
              description: Tuning algorithm to use to search hyperparameter space
              enum:
                - random
                - hyperband
                - bayesian
                - custom
            tunerJobIsRunning:
              description: Whether the job is active (if false => finished)
              type: boolean
            trials:
              type: array
              items:
                $ref: '#/components/schemas/TunerTrial'
            projectDataType:
              type: string
              enum:
                - audio
                - image
                - motion
                - other
            jobError:
              type: string
            workers:
              type: array
              items:
                type: object
                required:
                  - workerId
                  - status
                properties:
                  workerId:
                    type: string
                  status:
                    type: string
                    enum:
                      - pending
                      - ready
                      - busy
            nextRunIndex:
              type: integer
              description: >-
                Index of the next run to be created. Used to pre-populate the
                name of the next run.
            canExtendSearch:
              type: boolean
              description: >-
                Whether the search can be extended to evaluate more candidate
                models. Extending is possible if the search space contains
                candidate models that are expected to perform better than the
                current best candidate. And extending is also possible if the
                previous run was paused due to the total runtime limit being
                exceeded.
            isWhitelabel:
              type: boolean
            totalTrainingTimeExceeded:
              type: boolean
              description: >-
                Whether the total training time has exceeded the defined limit
                for the current run.
    JobStatus:
      type: string
      enum:
        - cancelled
        - creating
        - failed
        - pending
        - running
        - success
    TunerRun:
      type: object
      required:
        - tunerJobId
        - tunerCoordinatorJobId
        - index
        - created
        - jobStatus
        - visible
      properties:
        tunerJobId:
          type: integer
        tunerCoordinatorJobId:
          type: integer
        index:
          type: integer
        name:
          type: string
        created:
          type: string
          format: date-time
        jobStatus:
          $ref: '#/components/schemas/JobStatus'
        continuationJobId:
          type: integer
        space:
          type: array
          description: List of impulses specifying the EON Tuner search space
          items:
            $ref: '#/components/schemas/TunerSpaceImpulse'
        visible:
          type: boolean
          description: Whether the run is visible in the UI
    ListTunerRunsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - runs
          properties:
            runs:
              type: array
              items:
                $ref: '#/components/schemas/TunerRun'
    AllLearnBlocksResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - learnBlocks
          properties:
            learnBlocks:
              type: array
              items:
                type: object
                required:
                  - type
                  - title
                  - author
                  - description
                  - name
                properties:
                  type:
                    $ref: '#/components/schemas/LearnBlockType'
                  title:
                    type: string
                  author:
                    type: string
                  description:
                    type: string
                  name:
                    type: string
                  organizationModelId:
                    type: number
                  experiment:
                    type: string
                  displayCategory:
                    $ref: '#/components/schemas/BlockDisplayCategory'
                  publicProjectTierAvailability:
                    $ref: '#/components/schemas/PublicProjectTierAvailability'
    WindowSettingsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - windowSettingsEvent
            - windowSettingsContinuous
          properties:
            windowSettingsEvent:
              type: array
              items:
                $ref: '#/components/schemas/WindowSettings'
            windowSettingsContinuous:
              type: array
              items:
                $ref: '#/components/schemas/WindowSettings'
    ScoreTrialResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - latency
            - ram
            - rom
            - score
          properties:
            score:
              type: number
            latency:
              type: object
              required:
                - dspMips
                - dspMs
                - learnMaccs
                - learnMs
              properties:
                dspMips:
                  type: number
                dspMs:
                  type: number
                learnMaccs:
                  type: number
                learnMs:
                  type: number
            ram:
              type: object
              required:
                - dsp
                - learn
              properties:
                dsp:
                  type: number
                learn:
                  type: number
            rom:
              type: object
              required:
                - dsp
                - learn
              properties:
                dsp:
                  type: number
                learn:
                  type: number
    SetOptimizeSpaceRequest:
      allOf:
        - type: object
          properties:
            space:
              type: object
              required:
                - impulse
              properties:
                impulse:
                  type: array
                  description: List of impulses specifying the EON Tuner search space
                  items:
                    $ref: '#/components/schemas/TunerSpaceImpulse'
    TunerSpaceImpulse:
      type: object
      required:
        - inputBlocks
        - dspBlocks
        - learnBlocks
      properties:
        parameters:
          type: object
          description: >-
            Hyperparameters with potential values that can be used in any block
            in this impulse
        inputBlocks:
          type: array
          description: Input Blocks that are part of this impulse
          items:
            $ref: '#/components/schemas/TunerSpaceInputBlock'
        dspBlocks:
          type: array
          description: DSP Blocks that are part of this impulse
          items:
            $ref: '#/components/schemas/TunerSpaceDSPBlock'
        learnBlocks:
          type: array
          description: Learning Blocks that are part of this impulse
          items:
            type: array
            items:
              $ref: '#/components/schemas/TunerSpaceLearnBlock'
    TunerSpaceInputBlock:
      type: object
      additionalProperties: true
    TunerSpaceDSPBlock:
      type: object
      additionalProperties: true
    TunerSpaceLearnBlock:
      type: object
      additionalProperties: true
    TunerCompleteSearch:
      type: object
      required:
        - success
      properties:
        success:
          type: boolean
    TunerCreateTrialImpulse:
      type: object
      required:
        - inputBlock
        - dspBlock
        - learnBlock
      properties:
        id:
          type: string
        experiment:
          type: string
        original_trial_id:
          type: string
        optimizationRound:
          type: number
        inputBlocks:
          type: array
          items:
            $ref: '#/components/schemas/TunerCreateTrialInputBlock'
        dspBlocks:
          type: array
          items:
            $ref: '#/components/schemas/TunerCreateTrialDSPBlock'
        learnBlocks:
          type: array
          items:
            $ref: '#/components/schemas/TunerCreateTrialLearnBlock'
    TunerTrialImpulse:
      type: object
      required:
        - inputBlock
        - dspBlock
        - learnBlock
      properties:
        inputBlocks:
          type: array
          items:
            $ref: '#/components/schemas/TunerCreateTrialInputBlock'
        dspBlocks:
          type: array
          items:
            $ref: '#/components/schemas/TunerCreateTrialDSPBlock'
        learnBlocks:
          type: array
          items:
            $ref: '#/components/schemas/TunerCreateTrialLearnBlock'
    TunerCreateTrialInputBlock:
      type: object
      additionalProperties: true
    TunerCreateTrialDSPBlock:
      type: object
      additionalProperties: true
    TunerCreateTrialLearnBlock:
      type: object
      additionalProperties: true
    UpdateProjectRequest:
      type: object
      description: Only fields set in this object will be updated.
      properties:
        logo:
          type: string
          description: New logo URL, or set to `null` to remove the logo.
        name:
          type: string
          description: New project name.
        description:
          type: string
        projectVisibility:
          $ref: '#/components/schemas/ProjectVisibility'
        publicProjectListed:
          type: boolean
          description: >
            If the project allows public access, whether to list it the public
            projects overview response. If not listed, the project is still
            accessible via direct link. If the project does not allow public
            access, this field has no effect.
        lastDeployEonCompiler:
          type: boolean
          description: Call this when clicking the Eon compiler setting
        lastDeployModelEngine:
          type: string
          $ref: '#/components/schemas/ModelEngineShortEnum'
          description: Model engine for last deploy
        latencyDevice:
          type: string
          description: MCU used for calculating latency
        experiments:
          type: array
          items:
            type: string
        showCreateFirstImpulse:
          type: boolean
          description: >-
            Whether to show the 'Create your first impulse' section on the
            dashboard
        labelingMethod:
          description: What labeling flow to use
          $ref: '#/components/schemas/ProjectLabelingMethod'
        selectedProjectTypeInWizard:
          type: string
          description: Which option was selected in the project type wizard
          enum:
            - accelerometer
            - audio
            - image_classification
            - object_detection
            - something_else
        gettingStartedStep:
          type: integer
          description: >-
            The next step in the getting started wizard, or set to -1 to clear
            the getting started wizard
        gettingStartedTutorial:
          $ref: '#/components/schemas/TutorialType'
          description: >-
            The type of in-product guided tutorial for the getting started
            wizard
        gettingStartedClasses:
          type: array
          description: Classes or labels used in the getting started wizard
          items:
            type: string
        useGpu:
          type: boolean
          description: Whether to use GPU for training
        computeTimeLimitM:
          type: integer
          description: Job limit in minutes
        dspFileSizeMb:
          type: integer
          description: DSP file size in MB
        enterprisePerformance:
          type: boolean
        trainJobRamMb:
          type: integer
          description: Amount of RAM allocated to training jobs
        metadata:
          type: object
          description: New metadata about the project
        readme:
          type: string
          description: Readme for the project (in Markdown)
        lastAcquisitionLabel:
          type: string
        trainJobNotificationUids:
          type: array
          description: >-
            The IDs of users who should be notified when a Keras or retrain job
            is finished.
          items:
            type: integer
        dspJobNotificationUids:
          type: array
          description: The IDs of users who should be notified when a DSP job is finished.
          items:
            type: integer
        modelTestingJobNotificationUids:
          type: array
          description: >-
            The IDs of users who should be notified when a model testing job is
            finished.
          items:
            type: integer
        exportJobNotificationUids:
          type: array
          description: >-
            The IDs of users who should be notified when an export job is
            finished.
          items:
            type: integer
        csvImportConfig:
          type: object
          description: >-
            Config file specifying how to process CSV files. (set to null to
            clear the config)
        inPretrainedModelFlow:
          type: boolean
          description: >-
            DEPRECATED. To enable the pretrained model flow, set the impulse
            type property to "BYOM" instead.
        dspPageSize:
          description: Set to '0' to disable DSP paging
          type: integer
        indPauseProcessingSamples:
          description: >-
            Used in tests, to ensure samples that need to be processed async are
            not picked up until the flag is set to FALSE again.
          type: boolean
        showSensorDataInAcquisitionGraph:
          description: >-
            Whether to show the actual sensor data in acquisition charts (only
            applies when you have structured labels)
          type: boolean
        lastDeploymentTarget:
          description: >-
            Which deployment target was last selected (used to populate this
            deployment target again the next time you visit the deployment
            page). Should match the _format_ property of the response from
            listDeploymentTargetsForProject.
          type: string
        dataAcquisitionPageSize:
          type: integer
          description: Default page size on data acquisition
        dataAcquisitionViewType:
          type: string
          description: Default view type on data acquisition
          enum:
            - list
            - grid
        dataAcquisitionGridColumnCount:
          type: integer
          description: Number of grid columns in non-detailed view on data acquisition
        dataAcquisitionGridColumnCountDetailed:
          type: integer
          description: Number of grid columns in detailed view on data acquisition
        showExactSampleLength:
          type: boolean
          description: >-
            If enabled, does not round sample length to hours/minutes/seconds,
            but always displays sample length in milliseconds. E.g. instead of
            1m 32s, this'll say 92,142ms.
        inlineEditBoundingBoxes:
          type: boolean
          description: >-
            If enabled, allows editing bounding box labels directly from the
            acquisition UI.
        defaultProfilingVariant:
          $ref: '#/components/schemas/KerasModelVariantEnum'
          description: >-
            Last shown variant on the model testing and live classification
            pages. Used to keep the same view after refreshing.
        enabledModelProfilingVariants:
          type: array
          description: >-
            Set of model variants enabled by default on the model testing and
            live classification pages.
          items:
            $ref: '#/components/schemas/KerasModelVariantEnum'
        impulseListCoreMetricsHiddenColumns:
          type: array
          description: >-
            Which core metrics should be hidden in the impulse list. See
            'GetAllDetailedImpulsesResponse' for a list of all metrics.
          items:
            type: string
        impulseListAdditionalMetricsShownColumns:
          type: array
          description: >-
            Which additional metrics should be shown in the impulse list. See
            'GetAllDetailedImpulsesResponse' for a list of all metrics.
          items:
            type: string
        impulseListExtraColumns:
          type: array
          description: Which extra columns should be shown in the impulse list.
          items:
            type: string
        aiActionsGridColumnCount:
          type: integer
          description: Number of grid columns in AI Actions
        lastShownModelEngine:
          description: >-
            Last shown model engine on the Keras/DSP/BYOM/Anomaly screens. Used
            to keep the same view after refreshing.
          $ref: '#/components/schemas/ModelEngineShortEnum'
        versioningStorageSizeMib:
          type: integer
        anomalyLabelsConfig:
          description: >
            Labels to be treated as anomalous or non-anomalous. Defaults to
            "anomaly" / "no anomaly" if not specified.

            Useful when you want to override these default labels. Only relevant
            when there is an anomaly block in your impulse.
          $ref: '#/components/schemas/AnomalyLabelsConfig'
    BuildOnDeviceModelRequest:
      type: object
      required:
        - engine
      properties:
        engine:
          $ref: '#/components/schemas/DeploymentTargetEngine'
        modelType:
          $ref: '#/components/schemas/KerasModelVariantEnum'
        parameters:
          type: object
          description: >-
            List of custom parameters for this deployment job (see the list of
            parameters that the block exposes in DeploymentTarget#parameters).
          additionalProperties:
            type: string
    BuildOrganizationOnDeviceModelRequest:
      type: object
      required:
        - engine
        - deployBlockId
      properties:
        engine:
          $ref: '#/components/schemas/DeploymentTargetEngine'
        deployBlockId:
          type: integer
        modelType:
          $ref: '#/components/schemas/KerasModelVariantEnum'
        parameters:
          type: object
          description: >-
            List of custom parameters for this deployment job (see the list of
            parameters that the block exposes in DeploymentTarget#parameters).
          additionalProperties:
            type: string
    AddCollaboratorRequest:
      type: object
      required:
        - usernameOrEmail
      properties:
        usernameOrEmail:
          type: string
          description: Username or e-mail address
    RemoveCollaboratorRequest:
      type: object
      required:
        - usernameOrEmail
      properties:
        usernameOrEmail:
          type: string
          description: Username or e-mail address
    ProjectHmacKey:
      type: object
      required:
        - id
        - hmacKey
        - isDevelopmentKey
        - name
        - created
      properties:
        id:
          type: integer
        hmacKey:
          type: string
        isDevelopmentKey:
          type: boolean
        name:
          type: string
        created:
          type: string
          format: date-time
        createdByUser:
          $ref: '#/components/schemas/CreatedUpdatedByUser'
    ListHmacKeysResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - hmacKeys
          properties:
            hmacKeys:
              type: array
              description: List of HMAC keys
              items:
                $ref: '#/components/schemas/ProjectHmacKey'
    ProjectApiKey:
      type: object
      required:
        - id
        - name
        - apiKey
        - isDevelopmentKey
        - created
        - role
      properties:
        id:
          type: integer
        apiKey:
          type: string
        isDevelopmentKey:
          type: boolean
        name:
          type: string
        created:
          type: string
          format: date-time
        role:
          type: string
          enum:
            - admin
            - readonly
            - ingestiononly
            - wladmin
        createdByUser:
          $ref: '#/components/schemas/CreatedUpdatedByUser'
        lastUsed:
          description: When this API key was last used.
          type: object
          required:
            - date
          properties:
            date:
              type: string
              format: date-time
            country:
              type: string
              example: United States
              description: If available, the country from which the API key was last used.
            ipAddress:
              type: string
              description: >-
                If available, the IP address from which the API key was last
                used.
    ListApiKeysResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - apiKeys
          properties:
            apiKeys:
              type: array
              description: List of API keys.
              items:
                $ref: '#/components/schemas/ProjectApiKey'
    AddHmacKeyRequest:
      type: object
      required:
        - name
        - hmacKey
        - isDevelopmentKey
      properties:
        name:
          type: string
          description: Description of the key
        hmacKey:
          type: string
          description: HMAC key.
        isDevelopmentKey:
          type: boolean
          description: Whether this key should be used as a development key.
    AddApiKeyRequest:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          description: Description of the key
        apiKey:
          type: string
          description: >-
            Optional: API key. This needs to start with `ei_` and will need to
            be at least 32 characters long. If this field is not passed in, a
            new API key is generated for you.
    AddProjectApiKeyRequest:
      allOf:
        - $ref: '#/components/schemas/AddApiKeyRequest'
        - type: object
          required:
            - isDevelopmentKey
            - role
          properties:
            isDevelopmentKey:
              type: boolean
              description: Whether this key should be used as a development key.
            role:
              type: string
              enum:
                - admin
                - readonly
                - ingestiononly
    AdminAddProjectApiKeyRequest:
      allOf:
        - $ref: '#/components/schemas/AddApiKeyRequest'
        - type: object
          properties:
            ttl:
              type: integer
              description: >-
                Time to live in seconds. If not set, the key will expire in 1
                minute.
    UserProjectsSortOrder:
      type: string
      enum:
        - created-asc
        - created-desc
        - added-asc
        - added-desc
        - name-asc
        - name-desc
        - last-accessed-desc
    UserEulaName:
      type: string
      enum:
        - brainchip
        - syntiant
    UserEula:
      type: object
      required:
        - name
        - description
        - latestVersion
        - link
        - userIsCompliant
      properties:
        name:
          $ref: '#/components/schemas/UserEulaName'
        description:
          type: string
        latestVersion:
          type: string
        acceptedVersion:
          description: Current accepted version (or undefined if none)
          type: string
        link:
          type: string
        userIsCompliant:
          type: boolean
    GetUserResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - $ref: '#/components/schemas/User'
        - type: object
          required:
            - email
            - activated
            - organizations
            - projects
            - experiments
            - tier
            - suspended
            - notifications
            - passwordConfigured
            - projectsSortOrder
            - hasEnterpriseFeaturesAccess
            - lastAccessedProjects
            - privatePersonalProjectsUsed
            - eulas
          properties:
            email:
              type: string
            activated:
              type: boolean
            organizations:
              type: array
              description: >-
                Organizations that the user is a member of. Only filled when
                requesting information about yourself.
              items:
                $ref: '#/components/schemas/UserOrganization'
            projects:
              description: >-
                List of all projects. This returns all projects for the user
                (regardless of whitelabel)
              type: array
              items:
                $ref: '#/components/schemas/Project'
            experiments:
              type: array
              description: >-
                Experiments the user has access to. Enabling experiments can
                only be done through a JWT token.
              items:
                $ref: '#/components/schemas/UserExperiment'
            evaluation:
              type: boolean
              description: Whether this is an ephemeral evaluation account.
            ambassador:
              type: boolean
              description: Whether this user is an ambassador.
            whitelabels:
              description: List of white labels the user is a member of
              type: array
              items:
                type: object
                required:
                  - id
                  - domain
                  - name
                  - ownerOrganizationId
                  - isAdmin
                properties:
                  id:
                    type: number
                  domain:
                    type: string
                  name:
                    type: string
                  ownerOrganizationId:
                    type: number
                  isAdmin:
                    type: boolean
                    description: Whether the user is an admin of the white label.
            suspended:
              type: boolean
              description: Whether the user is suspended.
            suspensionReason:
              type: string
              description: >
                Detailed explanation of why the user account was suspended.

                This could include violations of terms of service, suspicious
                activity, or administrative actions.
            notifications:
              type: array
              description: List of notifications to show to the user.
              items:
                type: string
            subscriptionCancellationRequestDate:
              type: string
              format: date-time
              description: >-
                The date at which the user has requested to cancel their
                subscription.
            subscriptionDowngradeDate:
              type: string
              format: date-time
              description: >-
                The date at which the user's subscription will be downgraded due
                to cancellation.
            subscriptionTerminationDate:
              type: string
              format: date-time
              description: >-
                The date at which the user's subscription will be automatically
                terminated due to failed payments.
            payAsYouGoSubscriptionPeriodStartDate:
              type: string
              format: date-time
              description: The start date of the current pay-as-you-go subscription period.
            payAsYouGoSubscriptionPeriodEndDate:
              type: string
              format: date-time
              description: The end date of the current pay-as-you-go subscription period.
            passwordConfigured:
              type: boolean
              description: Whether the user has configured a password
            projectsSortOrder:
              description: Default sort order on the projects list
              $ref: '#/components/schemas/UserProjectsSortOrder'
            activeEnterpriseTrial:
              description: >-
                The ongoing free Enterprise trials that the user has created, if
                any.
              $ref: '#/components/schemas/EnterpriseTrial'
            hasEnterpriseFeaturesAccess:
              type: boolean
              description: >-
                Whether the current user has access to enterprise features. This
                is true if the user is an enterprise user, or has an active
                enterprise trial.
            timezone:
              description: Timezone for the user (or undefined if not specified).
              type: string
            lastAccessedProjects:
              description: >-
                Last 5 accessed projects. This _only_ returns projects for the
                current whitelabel ID.
              type: object
              required:
                - projects
                - hasMoreProjects
              properties:
                projects:
                  type: array
                  items:
                    type: object
                    required:
                      - id
                      - name
                      - created
                    properties:
                      id:
                        type: integer
                      name:
                        type: string
                      created:
                        type: string
                        format: date-time
                      lastAccessed:
                        type: string
                        format: date-time
                hasMoreProjects:
                  type: boolean
            privatePersonalProjectsUsed:
              type: integer
              description: Number of private projects created by the current user.
            lastAcceptedTermsOfService:
              type: object
              required:
                - version
                - acceptanceDate
              properties:
                version:
                  type: string
                acceptanceDate:
                  type: string
                  format: date-time
            eulas:
              type: array
              description: >-
                List of all Vendor End-User License Agreements that the user has
                accepted, or could accept.
              items:
                $ref: '#/components/schemas/UserEula'
    GetUserProjectsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - projects
          properties:
            projects:
              type: array
              items:
                $ref: '#/components/schemas/Project'
    UpdateUserRequest:
      type: object
      description: Only fields set in this object will be updated.
      properties:
        name:
          type: string
          description: New full name
          example: Jan Jongboom
        jobTitle:
          type: string
          description: New job title
          example: Embedded Software Engineer
        companyName:
          type: string
          description: New company name
          example: Edge Impulse Inc.
        experiments:
          type: array
          items:
            type: string
          description: List of user experiments
        projectsSortOrder:
          description: Default sort order on the projects list
          $ref: '#/components/schemas/UserProjectsSortOrder'
        timezone:
          description: User timezone.
          type: string
    DeleteUserRequest:
      type: object
      properties:
        password:
          type: string
          description: User's current password. Required if the user has a password set.
        totpToken:
          type: string
          description: >-
            TOTP Token. Required if a user has multi-factor authentication with
            a TOTP token enabled. If a user has MFA enabled, but no totpToken is
            submitted; then an error starting with "ERR_TOTP_TOKEN IS REQUIRED"
            is returned. Use this to then prompt for an MFA token and re-try
            this request.
    ActivateUserOrVerifyEmailRequest:
      type: object
      required:
        - code
      properties:
        code:
          type: string
          description: Activation or verification code (sent via email)
    ListEmailResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - emails
          properties:
            emails:
              type: array
              description: List of emails
              items:
                type: object
                required:
                  - from
                  - to
                  - created
                  - subject
                  - bodyText
                  - bodyHTML
                  - sent
                  - providerResponse
                properties:
                  userId:
                    type: integer
                  projectId:
                    type: integer
                  from:
                    type: string
                  to:
                    type: string
                  created:
                    type: string
                    format: date-time
                  subject:
                    type: string
                  bodyText:
                    type: string
                  bodyHTML:
                    type: string
                  sent:
                    type: boolean
                  providerResponse:
                    type: string
    RequestResetPasswordRequest:
      type: object
      required:
        - email
      properties:
        email:
          type: string
    ResetPasswordRequest:
      type: object
      required:
        - email
        - code
        - newPassword
      properties:
        email:
          type: string
        code:
          type: string
        newPassword:
          type: string
    VerifyResetPasswordRequest:
      type: object
      required:
        - email
        - code
      properties:
        email:
          type: string
        code:
          type: string
    EmailValidationRequest:
      type: object
      required:
        - email
      properties:
        email:
          type: string
          description: E-mail address to validate
          example: jan@edgeimpulse.com
    SetAnomalyParameterRequest:
      type: object
      description: Only fields defined in this object are set
      properties:
        minimumConfidenceRating:
          type: number
          description: >-
            DEPRECATED, use "setImpulseThresholds" instead. Minimum confidence
            score, if the anomaly block scores a sample above this threshold it
            will be flagged as anomaly.
    SetKerasParameterRequest:
      type: object
      description: Only fields defined in this object are set
      properties:
        mode:
          type: string
          description: Whether to use visual or expert mode.
          enum:
            - expert
            - visual
        minimumConfidenceRating:
          type: number
          description: >-
            DEPRECATED, use "setImpulseThresholds" instead. Minimum confidence
            score, if the neural network scores a sample below this threshold it
            will be flagged as uncertain.
        selectedModelType:
          description: The model type to select, as described in the model metadata call.
          $ref: '#/components/schemas/KerasModelTypeEnum'
        script:
          type: string
          description: Raw Keras script (only used in expert mode)
        visualLayers:
          type: array
          description: The visual layers for the neural network (only in visual mode).
          items:
            $ref: '#/components/schemas/KerasVisualLayer'
        trainingCycles:
          type: integer
          description: Number of training cycles (only in visual mode).
        learningRate:
          type: number
          description: Learning rate (between 0 and 1) (only in visual mode).
        batchSize:
          type: number
          description: Batch size used during training (only in visual mode).
        trainTestSplit:
          type: number
          description: Train/test split (between 0 and 1)
        autoClassWeights:
          type: boolean
          description: >-
            Whether to automatically balance class weights, use this for skewed
            datasets.
        useLearnedOptimizer:
          type: boolean
          description: Use learned optimizer and ignore learning rate.
        augmentationPolicyImage:
          $ref: '#/components/schemas/AugmentationPolicyImageEnum'
        augmentationPolicySpectrogram:
          $ref: '#/components/schemas/AugmentationPolicySpectrogram'
        profileInt8:
          type: boolean
          description: Whether to profile the i8 model (might take a very long time)
        skipEmbeddingsAndMemory:
          type: boolean
          description: >-
            If set, skips creating embeddings and measuring memory (used in
            tests)
        akidaEdgeLearningConfig:
          $ref: '#/components/schemas/AkidaEdgeLearningConfig'
        customValidationMetadataKey:
          type: string
          description: >-
            If the 'custom validation split' experiment is enabled, this
            metadata key is used to prevent group data leakage between train and
            validation datasets.
        showAdvancedTrainingSettings:
          type: boolean
          description: >-
            Whether the 'Advanced training settings' UI element should be
            expanded.
        showAugmentationTrainingSettings:
          type: boolean
          description: >-
            Whether the 'Augmentation training settings' UI element should be
            expanded.
        customParameters:
          type: object
          description: >-
            Training parameters, this list depends on the list of parameters
            that the model exposes.
          additionalProperties:
            type: string
            nullable: true
        anomalyCapacity:
          description: >-
            Capacity level for visual anomaly detection. Determines which set of
            default configurations to use. The higher capacity, the higher
            number of (Gaussian) components, and the more adapted the model
            becomes to the original distribution
          $ref: '#/components/schemas/AnomalyCapacity'
        lastShownModelVariant:
          $ref: '#/components/schemas/KerasModelVariantEnum'
          description: >-
            Last shown variant on the Keras screen. Used to keep the same view
            after refreshing.
        blockParameters:
          $ref: '#/components/schemas/BlockParameters'
          description: >-
            Training parameters specific to the type of the learn block.
            Parameters may be adjusted depending on the model defined in the
            visual layers. Used for our built-in blocks.
    MoveRawDataRequest:
      type: object
      required:
        - newCategory
      properties:
        newCategory:
          $ref: '#/components/schemas/RawDataCategory'
    BackToLabelingRequest:
      type: object
      required:
        - labelAction
      properties:
        labelAction:
          type: string
          description: >-
            Defines what should happen to labels during the action. Use
            "clear-labels" to remove all existing labels.
          enum:
            - clear-labels
    UploadUserPhotoRequest:
      type: object
      required:
        - photo
      properties:
        photo:
          type: string
          format: binary
    UploadUserPhotoResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - url
          properties:
            url:
              type: string
    UploadCustomBlockRequest:
      type: object
      required:
        - tar
        - type
        - blockId
      properties:
        tar:
          type: string
          format: binary
        type:
          type: string
          enum:
            - transform
            - deploy
            - dsp
            - transferLearning
        blockId:
          type: integer
    ChangePasswordRequest:
      type: object
      required:
        - currentPassword
        - newPassword
      properties:
        currentPassword:
          type: string
        newPassword:
          type: string
    KerasVisualLayerType:
      type: string
      enum:
        - dense
        - conv1d
        - conv2d
        - reshape
        - flatten
        - dropout
        - batchNormalization
        - transfer_mobilenetv2_a35
        - transfer_mobilenetv2_a1
        - transfer_mobilenetv2_a05
        - transfer_mobilenetv2_160_a1
        - transfer_mobilenetv2_160_a75
        - transfer_mobilenetv2_160_a5
        - transfer_mobilenetv2_160_a35
        - transfer_mobilenetv1_a25_d100
        - transfer_mobilenetv1_a2_d100
        - transfer_mobilenetv1_a1_d100
        - transfer_kws_mobilenetv1_a1_d100
        - transfer_kws_mobilenetv2_a35_d100
        - transfer_kws_syntiant_ndp10x
        - transfer_kws_conv2d_tiny
        - object_ssd_mobilenet_v2_fpnlite_320x320
        - fomo_mobilenet_v2_a01
        - fomo_mobilenet_v2_a35
        - transfer_organization
        - transfer_akidanet_imagenet_160_a100
        - transfer_akidanet_imagenet_160_a50
        - transfer_akidanet_imagenet_160_a25
        - transfer_akidanet_imagenet_224_a100
        - transfer_akidanet_imagenet_224_a50
        - transfer_akidanet_imagenet_224_a25
        - fomo_akidanet_a50
        - fomo_ad_gmm
        - fomo_ad_patchcore
    TransferLearningModel:
      type: object
      required:
        - name
        - shortName
        - description
        - hasNeurons
        - hasDropout
        - type
        - learnBlockType
        - author
        - blockType
        - hasExpertMode
      properties:
        name:
          type: string
        shortName:
          type: string
        abbreviatedName:
          type: string
        description:
          type: string
        hasNeurons:
          type: boolean
        hasDropout:
          type: boolean
        defaultNeurons:
          type: integer
        defaultDropout:
          type: number
        defaultLearningRate:
          type: number
        defaultTrainingCycles:
          type: number
        hasImageAugmentation:
          type: boolean
        type:
          $ref: '#/components/schemas/KerasVisualLayerType'
        learnBlockType:
          $ref: '#/components/schemas/LearnBlockType'
        organizationModelId:
          type: integer
        implementationVersion:
          type: integer
        repositoryUrl:
          type: string
          description: URL to the source code of this custom learn block.
        author:
          type: string
        blockType:
          $ref: '#/components/schemas/BlockType'
        customParameters:
          type: array
          items:
            $ref: '#/components/schemas/DSPGroupItem'
        displayCategory:
          $ref: '#/components/schemas/BlockDisplayCategory'
        blockNoLongerAvailable:
          type: object
          description: >-
            If this object is set, then you can no longer train this block. The
            reason (or a migration path) is in the `reasonMarkdown` and
            `reasonHtml` properties.
          required:
            - reasonMarkdown
            - reasonHtml
          properties:
            reasonMarkdown:
              description: >-
                Reason or migration path for current users of this block, in
                Markdown format.
              type: string
            reasonHtml:
              description: >-
                Reason or migration path for current users of this block, in
                HTML format.
              type: string
        hasExpertMode:
          description: Whether this block can be switched to expert mode.
          type: boolean
    BlockDisplayCategory:
      description: Category to display this block in the UI.
      type: string
      enum:
        - classical
        - tao
        - developer-preview
    PublicProjectTierAvailability:
      description: >-
        For public blocks, this indicates the project tiers for which this block
        is available.
      type: string
      enum:
        - enterprise-only
        - all-projects
        - all-projects-including-whitelabels
    KerasVisualLayer:
      type: object
      required:
        - type
      properties:
        type:
          $ref: '#/components/schemas/KerasVisualLayerType'
        neurons:
          type: integer
          description: >-
            Number of neurons or filters in this layer (only for dense, conv1d,
            conv2d) or in the final conv2d layer (only for transfer layers)
        kernelSize:
          type: integer
          description: Kernel size for the convolutional layers (only for conv1d, conv2d)
        dropoutRate:
          type: number
          description: >-
            Fraction of input units to drop (only for dropout) or in the final
            layer dropout (only for transfer layers)
        columns:
          type: integer
          description: Number of columns for the reshape operation (only for reshape)
        stack:
          type: integer
          description: >-
            Number of convolutional layers before the pooling layer (only for
            conv1d, conv2d)
        enabled:
          type: boolean
        organizationModelId:
          type: integer
          description: >-
            Custom transfer learning model ID (when type is set to
            transfer_organization)
    OrganizationTransferLearningBlockCustomVariant:
      type: object
      required:
        - key
        - name
        - inferencingEntrypoint
      properties:
        key:
          type: string
          description: Unique identifier or key for this custom variant
        name:
          type: string
          description: Custom variant display name
        inferencingEntrypoint:
          type: string
          description: >-
            The entrypoint command to run custom inferencing for this model
            variant, via the learn block container
        profilingEntrypoint:
          type: string
          description: >-
            The entrypoint command to run custom profiling for this model
            variant, via the learn block container
        modelFiles:
          type: array
          items:
            $ref: '#/components/schemas/OrganizationTransferLearningBlockModelFile'
    OrganizationTransferLearningBlockModelFile:
      type: object
      required:
        - id
        - name
        - type
        - description
      properties:
        id:
          type: string
          description: Output artifact unique file ID, in kebab case
        name:
          type: string
          description: Output artifact file name
        type:
          type: string
          description: Output artifact file type
          enum:
            - binary
            - json
            - text
        description:
          type: string
          description: Output artifact file description
    JobSummaryResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - summary
          properties:
            summary:
              type: array
              items:
                type: object
                required:
                  - category
                  - lengthMs
                properties:
                  category:
                    type: string
                  lengthMs:
                    type: integer
                    description: Length per category in milliseconds
    GetPerformanceCalibrationStatusResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - available
          properties:
            available:
              type: boolean
            unsupportedProjectError:
              type: string
              description: >-
                If the current project is unsupported by performance
                calibration, this field explains the reason why. Otherwise, it
                is undefined.
            options:
              $ref: '#/components/schemas/StartPerformanceCalibrationRequest'
    PerformanceCalibrationGroundTruth:
      type: object
      required:
        - type
        - labelIdx
        - labelString
        - start
        - length
      properties:
        type:
          type: string
          description: >-
            Whether this region is a single sample, a region of background
            noise, or a region of background noise that contains samples.
          enum:
            - sample
            - noise
            - combined_noise
        labelIdx:
          type: integer
          description: Index of the label in the array of all labels
        labelString:
          type: string
          description: String label of the sample
        start:
          type: integer
          description: The start time of the region in milliseconds
        length:
          type: integer
          description: The length of the region in milliseconds
        samples:
          type: array
          description: If the region contains samples, all the samples within this region
          items:
            type: object
            required:
              - id
              - start
              - length
              - idx
            properties:
              id:
                type: integer
                description: The ID of the samples in Studio
              start:
                type: number
                description: The start time of the sample in milliseconds
              length:
                type: number
                description: The length of the sample in milliseconds
              idx:
                type: integer
                description: >-
                  For debugging. The index of the sample in the original Y
                  array.
    GetPerformanceCalibrationGroundTruthResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - samples
          properties:
            samples:
              type: array
              items:
                $ref: '#/components/schemas/PerformanceCalibrationGroundTruth'
    PerformanceCalibrationRawDetection:
      type: object
      required:
        - start
        - end
        - result
      properties:
        start:
          type: integer
          description: The start time of the detected window in milliseconds
        end:
          type: integer
          description: The end time of the detected window in milliseconds
        result:
          type: array
          items:
            type: number
    GetPerformanceCalibrationRawResultResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - detections
          properties:
            detections:
              type: array
              items:
                $ref: '#/components/schemas/PerformanceCalibrationRawDetection'
    PerformanceCalibrationDetection:
      type: object
      required:
        - time
        - label
      properties:
        time:
          type: integer
          description: The time of the detection in milliseconds
        label:
          type: string
          description: The label that was detected
    PerformanceCalibrationFalsePositive:
      type: object
      required:
        - type
        - detectionTime
      properties:
        type:
          type: string
          enum:
            - incorrect
            - duplicate
            - spurious
          description: >-
            The type of false positive. Incorrect is when a detection matches
            the wrong ground truth. Duplicate is when the same ground truth was
            detected more than once. The first correct detection is considered a
            true positive but subsequent detections are considered false
            positives. Spurious is when the detection was not associated with
            any ground truth.
        detectionTime:
          type: integer
          description: The time of the detection in milliseconds
        groundTruthLabel:
          type: string
          description: The label of any associated ground truth
        groundTruthStart:
          type: number
          description: The start time of any associated ground truth
        sampleIds:
          type: array
          description: All of the sample IDs in the affected region
          items:
            type: integer
    PerformanceCalibrationParameterSet:
      type: object
      required:
        - detections
        - isBest
        - labels
        - stats
        - aggregateStats
        - params
        - windowSizeMs
      properties:
        detections:
          type: array
          description: All of the detections using this parameter set
          items:
            $ref: '#/components/schemas/PerformanceCalibrationDetection'
        isBest:
          type: boolean
          description: Whether this is considered the best parameter set
        labels:
          type: array
          description: All of the possible labels in the detections array
          items:
            type: string
        aggregateStats:
          type: object
          required:
            - falsePositiveRate
            - falseNegativeRate
          properties:
            falsePositiveRate:
              type: number
            falseNegativeRate:
              type: number
        stats:
          type: array
          items:
            type: object
            required:
              - label
              - truePositives
              - falsePositives
              - falseNegatives
              - trueNegatives
              - falsePositiveRate
              - falseNegativeRate
              - wrongMatches
              - falsePositiveTimes
              - falseNegativeTimes
            properties:
              label:
                type: string
              truePositives:
                type: integer
              falsePositives:
                type: integer
              falseNegatives:
                type: integer
              trueNegatives:
                type: integer
              falsePositiveRate:
                type: number
              falseNegativeRate:
                type: number
              falsePositiveDetails:
                type: array
                description: The details of every false positive detection.
                items:
                  $ref: '#/components/schemas/PerformanceCalibrationFalsePositive'
              falseNegativeTimes:
                type: array
                description: >-
                  The times in ms at which false negatives occurred. These
                  correspond to specific items in the ground truth.
                items:
                  type: number
        params:
          $ref: '#/components/schemas/PerformanceCalibrationParameters'
        windowSizeMs:
          type: number
          description: The size of the input block window in milliseconds.
    GetPerformanceCalibrationParameterSetsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - parameterSets
          properties:
            parameterSets:
              type: array
              items:
                $ref: '#/components/schemas/PerformanceCalibrationParameterSet'
    GetPerformanceCalibrationParametersResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          properties:
            params:
              $ref: '#/components/schemas/PerformanceCalibrationParameters'
    PerformanceCalibrationUploadLabeledAudioRequest:
      type: object
      required:
        - zip
      properties:
        zip:
          type: string
          format: binary
    PerformanceCalibrationUploadLabeledAudioResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - uploadKey
          properties:
            uploadKey:
              type: string
    PerformanceCalibrationSaveParameterSetRequest:
      type: object
      required:
        - params
      properties:
        params:
          $ref: '#/components/schemas/PerformanceCalibrationParameters'
    PerformanceCalibrationParameters:
      type: object
      required:
        - type
        - version
      properties:
        type:
          type: string
          description: The post-processing algorithm type.
          enum:
            - standard
        version:
          type: integer
          description: The version number of the post-processing algorithm.
          example: 1
        parametersStandard:
          $ref: '#/components/schemas/PerformanceCalibrationParametersStandard'
    PerformanceCalibrationParametersStandard:
      type: object
      required:
        - averageWindowDurationMs
        - detectionThreshold
        - suppressionMs
      properties:
        averageWindowDurationMs:
          type: number
          description: The length of the averaging window in milliseconds.
          example: 1000
        detectionThreshold:
          type: number
          description: The minimum threshold for detection, from 0-1.
          example: 0.8
        suppressionMs:
          type: number
          description: >-
            The amount of time new matches will be ignored after a positive
            result.
          example: 500
    StartTensorBoardSessionRequest:
      type: object
      required:
        - blockIds
      properties:
        blockIds:
          description: IDs of learn blocks to compare in a TensorBoard session
          type: array
          items:
            type: number
    GetIntegrationSessionStatusResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - sessionStatus
          properties:
            sessionStatus:
              $ref: '#/components/schemas/IntegrationSessionStatus'
    IntegrationSessionStatus:
      type: object
      required:
        - status
      properties:
        status:
          description: Integration session status
          type: string
          enum:
            - pending
            - active
            - error
            - stopped
        additionalInfo:
          description: >-
            Any relevant additional information, e.g. the reason the session has
            stopped or any error messages.
          type: string
    GetPostProcessingResultsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - variableNames
            - objectiveNames
            - variables
            - objectives
          properties:
            variableNames:
              type: array
              description: The names of the variables being tuned, in column order.
              items:
                type: string
            objectiveNames:
              type: array
              description: The names of the objectives being minimized, in column order.
              items:
                type: string
            variables:
              type: array
              description: >-
                The variable values representing the pareto front of optimal
                solutions.
              items:
                type: array
                items:
                  type: number
            objectives:
              type: array
              description: The objective values that correspond with the variables.
              items:
                type: array
                items:
                  type: number
    OrganizationUser:
      allOf:
        - $ref: '#/components/schemas/User'
        - type: object
          required:
            - added
            - role
            - projectCount
            - datasets
          properties:
            added:
              type: string
              format: date-time
              example: '2019-08-31T17:32:28Z'
            role:
              $ref: '#/components/schemas/OrganizationMemberRole'
            projectCount:
              type: integer
            datasets:
              type: array
              items:
                type: string
            lastAccessToOrganization:
              type: string
              format: date-time
              description: Date when the user last accessed the organization data.
            lastOrganizationProjectAccessed:
              type: integer
              description: ID of the last project accessed by the user in the organization.
    Organization:
      type: object
      required:
        - id
        - name
        - users
        - isDeveloperProfile
        - whitelabelId
        - trialId
        - trialExpiredDate
        - trialUpgradedDate
        - created
        - showHeaderImgMask
      properties:
        id:
          type: integer
        name:
          type: string
          description: EdgeImpulse Inc.
        logo:
          type: string
          example: https://usercdn.edgeimpulse.com/logos/1.jpg
        headerImg:
          type: string
          example: https://usercdn.edgeimpulse.com/leaders/1.jpg
        showHeaderImgMask:
          type: boolean
        users:
          type: array
          items:
            $ref: '#/components/schemas/OrganizationUser'
        isDeveloperProfile:
          type: boolean
        whitelabelId:
          type: integer
          nullable: true
          description: >-
            Unique identifier of the white label this organization belongs to,
            if any.
        whitelabelName:
          type: string
          description: Name of the white label this organization belongs to, if any.
        projects:
          type: array
          items:
            $ref: '#/components/schemas/Project'
        trialId:
          type: integer
          nullable: true
          description: Unique identifier of the trial this organization belongs to, if any.
        trialExpiredDate:
          type: string
          format: date-time
          nullable: true
          description: >-
            Date when the trial expired, if any. A expired trial has a grace
            period of 30 days before it's associated organization is deleted.
        trialUpgradedDate:
          type: string
          format: date-time
          nullable: true
          description: >-
            Date when the trial was upgraded to a full enterprise account, if
            any.
        created:
          type: string
          format: date-time
          description: Date when the organization was created.
        contractStartDate:
          type: string
          format: date-time
          nullable: true
          description: Date when the current contract started, if any.
        deletedDate:
          type: string
          format: date-time
          description: >-
            The date in which the organization was deleted. If the organization
            is not deleted, this field is not set.
    ListOrganizationsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - organizations
          properties:
            organizations:
              type: array
              description: Array with organizations
              items:
                $ref: '#/components/schemas/Organization'
    OrganizationDatasetBucket:
      type: object
      required:
        - id
        - bucket
        - path
        - fullBucketPathDescription
        - dataItemNamingLevelsDeep
      properties:
        id:
          description: Bucket ID
          type: integer
        bucket:
          type: string
        path:
          description: Path in the bucket
          type: string
        fullBucketPathDescription:
          description: >-
            Full bucket path, incl. protocol (e.g. s3://bucket/path) - to be
            used in the UI
          type: string
        dataItemNamingLevelsDeep:
          description: >-
            Number of levels deep for data items, e.g. if you have folder
            "test/abc", with value 1 "test" will be a data item, with value 2
            "test/abc" will be a data item. Only used for "clinical" type.
          type: integer
    OrganizationDataset:
      type: object
      required:
        - dataset
        - lastFileCreated
        - totalFileSize
        - totalFileCount
        - totalItemCount
        - totalItemCountChecklistOK
        - totalItemCountChecklistFailed
        - tags
        - type
      properties:
        dataset:
          type: string
        lastFileCreated:
          type: string
          format: date-time
        totalFileSize:
          type: integer
        totalFileCount:
          type: integer
        totalItemCount:
          type: integer
        totalItemCountChecklistOK:
          type: integer
        totalItemCountChecklistFailed:
          type: integer
        tags:
          type: array
          items:
            type: string
        category:
          type: string
        bucket:
          $ref: '#/components/schemas/OrganizationDatasetBucket'
        type:
          $ref: '#/components/schemas/OrganizationDatasetTypeEnum'
        bucketPath:
          type: string
          description: Location of the dataset within the bucket
    OrganizationMetricsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - metrics
          properties:
            metrics:
              type: object
              required:
                - totalJobsComputeTime
                - jobsComputeTimeCurrentYear
                - jobsComputeTimeCurrentYearSince
                - cpuComputeTimeCurrentContract
                - gpuComputeTimeCurrentContract
                - totalStorage
                - projectCount
                - userCount
              properties:
                totalJobsComputeTime:
                  type: number
                  description: >-
                    Total compute time of all organizational jobs since the
                    creation of the organization (including organizational
                    project jobs). Compute time is the amount of computation
                    time spent in jobs, in minutes used by an organization over
                    a 12 month period, calculated as CPU + GPU minutes.
                jobsComputeTimeCurrentYear:
                  type: number
                  description: >-
                    Total compute time of all organizational jobs in the current
                    contract (including organizational project jobs). Compute
                    time is the amount of computation time spent in jobs, in
                    minutes used by an organization over a 12 month period,
                    calculated as CPU + GPU minutes.
                jobsComputeTimeCurrentYearSince:
                  type: string
                  format: date-time
                  description: >-
                    The date from which the compute time for the running
                    contract is calculated.
                cpuComputeTimeCurrentContract:
                  type: number
                  description: >-
                    CPU compute time of all jobs in the organization in the
                    current contract (including organizational project jobs).
                gpuComputeTimeCurrentContract:
                  type: number
                  description: >-
                    GPU compute time of all jobs in the organization in the
                    current contract (including organizational project jobs).
                totalStorage:
                  type: number
                  description: Total storage used by the organization.
                projectCount:
                  type: integer
                  description: Total number of projects owned by the organization.
                userCount:
                  type: integer
                  description: Total number of users in the organization.
    OrganizationInfoResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - organization
            - datasets
            - defaultComputeLimits
            - experiments
            - cliLists
            - performance
          properties:
            organization:
              $ref: '#/components/schemas/Organization'
            datasets:
              type: array
              items:
                $ref: '#/components/schemas/OrganizationDataset'
            defaultComputeLimits:
              type: object
              required:
                - requestsCpu
                - requestsMemory
                - limitsCpu
                - limitsMemory
              properties:
                requestsCpu:
                  type: number
                requestsMemory:
                  type: number
                limitsCpu:
                  type: number
                limitsMemory:
                  type: number
            entitlementLimits:
              $ref: '#/components/schemas/EntitlementLimits'
            experiments:
              type: array
              description: >-
                Experiments that the organization has access to. Enabling
                experiments can only be done through a JWT token.
              items:
                type: object
                required:
                  - type
                  - title
                  - enabled
                  - showToUser
                properties:
                  type:
                    type: string
                  title:
                    type: string
                  help:
                    type: string
                  enabled:
                    type: boolean
                  showToUser:
                    type: boolean
            readme:
              type: object
              description: Present if a readme is set for this project
              required:
                - markdown
                - html
              properties:
                markdown:
                  type: string
                html:
                  type: string
            whitelabelId:
              type: integer
            cliLists:
              type: object
              required:
                - objectDetectionLastLayerOptions
                - imageInputScalingOptions
              properties:
                objectDetectionLastLayerOptions:
                  type: array
                  items:
                    type: object
                    required:
                      - label
                      - value
                    properties:
                      label:
                        type: string
                      value:
                        $ref: '#/components/schemas/ObjectDetectionLastLayer'
                imageInputScalingOptions:
                  type: array
                  items:
                    type: object
                    required:
                      - label
                      - value
                    properties:
                      label:
                        type: string
                      value:
                        $ref: '#/components/schemas/ImageInputScaling'
            performance:
              type: object
              required:
                - jobLimitM
              properties:
                jobLimitM:
                  type: integer
                  description: >-
                    Compute time limit per job in minutes (for
                    non-transformation jobs).
    UpdateOrganizationRequest:
      type: object
      description: Only fields set in this object will be updated.
      properties:
        logo:
          type: string
          description: New logo URL, or set to `null` to remove the logo.
        headerImg:
          type: string
          description: New leader image URL, or set to `null` to remove the leader.
        showHeaderImgMask:
          type: boolean
        name:
          type: string
          description: New organization name.
        experiments:
          type: array
          items:
            type: string
        readme:
          type: string
          description: Readme for the organization (in Markdown)
        jobLimitM:
          type: integer
          description: New job limit in seconds.
    CreateOrganizationRequest:
      type: object
      required:
        - organizationName
      properties:
        organizationName:
          type: string
          example: EdgeImpulse Inc.
          description: The name of the organization.
    WhitelabelAdminCreateOrganizationRequest:
      type: object
      required:
        - organizationName
      properties:
        organizationName:
          type: string
          example: EdgeImpulse Inc.
          description: The name of the organization.
        adminId:
          type: integer
          example: 1
          description: Unique identifier of the administrator of the new organization.
        adminEmail:
          type: string
          example: jan@edgeimpulse.com
          description: Email of the administrator of the new organization.
    CreateOrganizationResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - id
            - apiKey
          properties:
            id:
              type: integer
              description: Organization ID for the new organization
            apiKey:
              type: string
              description: API key for the new organization (this is shown only once)
    AdminCreateProjectRequest:
      type: object
      required:
        - projectName
      properties:
        projectName:
          type: string
          example: My project
          description: The name of the project.
        projectVisibility:
          $ref: '#/components/schemas/ProjectVisibility'
        ownerId:
          type: integer
          example: 1
          description: >-
            Unique identifier of the owner of the new project. Either this
            parameter or ownerEmail must be set.
        ownerEmail:
          type: string
          example: groucho@marxbros.com
          description: >-
            Email of the owner of the new project. Either this parameter or
            ownerId must be set.
    CreateOrganizationPortalRequest:
      type: object
      required:
        - name
        - bucketId
        - bucketPath
      properties:
        name:
          type: string
          example: EdgeImpulse Inc.
          description: The name of the upload portal.
        description:
          type: string
          example: EdgeImpulse Inc. Portal description
          description: The purpose and description of the upload portal.
        bucketId:
          type: integer
          example: 1
          description: >-
            The S3 bucket id to store the uploaded data. Set to '0' to select a
            bucket hosted by Edge Impulse.
        bucketPath:
          type: string
          example: /path/in/bucket
          description: The path in the bucket the upload portal will write to.
    CreateOrganizationPortalResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - id
            - url
          properties:
            id:
              type: integer
              description: Portal ID for the new upload portal
            url:
              type: string
              description: URL to the portal
            signedUrl:
              type: string
              description: pre-signed upload URL. Only set if using a non-built-in bucket.
            bucketBucket:
              type: string
              description: Only set if using a non-built-in bucket.
    UpdateOrganizationPortalResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - url
          properties:
            url:
              type: string
              description: URL to the portal
            signedUrl:
              type: string
              description: >-
                pre-signed upload URL, only set if not using the Edge Impulse
                hosted bucket.
            bucketBucket:
              type: string
              description: Only set if not using the Edge Impulse hosted bucket.
    GetOrganizationPortalResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - id
            - name
            - url
            - token
            - bucketName
            - bucketPath
          properties:
            id:
              type: integer
              description: Portal ID for the new upload portal
            name:
              type: string
              example: EdgeImpulse Inc.
              description: The name of the upload portal.
            description:
              type: string
              example: EdgeImpulse Inc. Portal description
              description: The purpose and description of the upload portal.
            url:
              type: string
              example: edgeImpulse
              description: The url postfix of the upload portal.
            token:
              type: string
              example: SECRET_TOKEN
              description: The token used to validate access to the upload portal.
            bucketName:
              type: string
              example: my-s3-bucket
              description: The S3 bucket name to store the uploaded data.
            bucketId:
              type: integer
              example: 1
              description: >-
                S3 bucket ID. If missing, then this is using the Edge Impulse
                hosted bucket.
            bucketPath:
              type: string
              example: /path/to/bucket
              description: The S3 bucket path where uploaded data is stored.
            bucketUrl:
              type: string
              example: s3://bucketname/path/to/bucket
              description: The full S3 bucket path where uploaded data is stored.
            storageProvider:
              type: string
              example: s3
              description: The storage provider type (s3, azure, google, other).
    ListOrganizationPortalsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - portals
          properties:
            portals:
              type: array
              items:
                type: object
                required:
                  - id
                  - name
                  - url
                  - token
                  - bucketId
                  - bucketName
                  - bucketPath
                  - bucketUrl
                  - created
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  description:
                    type: string
                  url:
                    type: string
                  bucketId:
                    type: integer
                  bucketName:
                    type: string
                  bucketPath:
                    type: string
                  bucketUrl:
                    type: string
                  storageProvider:
                    type: string
                  created:
                    type: string
                    format: date-time
    AddOrganizationApiKeyRequest:
      allOf:
        - $ref: '#/components/schemas/AddApiKeyRequest'
        - type: object
          required:
            - role
          properties:
            role:
              type: string
              enum:
                - admin
                - member
    AdminAddOrganizationApiKeyRequest:
      allOf:
        - $ref: '#/components/schemas/AddOrganizationApiKeyRequest'
        - type: object
          properties:
            ttl:
              type: integer
              description: >-
                Time to live in seconds. If not set, the key will expire in 1
                minute.
    OrganizationApiKey:
      type: object
      required:
        - id
        - name
        - apiKey
        - created
        - role
        - isTransformationJobKey
      properties:
        id:
          type: integer
        apiKey:
          type: string
        name:
          type: string
        created:
          type: string
          format: date-time
        role:
          type: string
          enum:
            - admin
            - member
        isTransformationJobKey:
          type: boolean
        createdByUser:
          $ref: '#/components/schemas/CreatedUpdatedByUser'
        lastUsed:
          description: When this API key was last used.
          type: object
          required:
            - date
          properties:
            date:
              type: string
              format: date-time
            country:
              type: string
              example: United States
              description: If available, the country from which the API key was last used.
            ipAddress:
              type: string
              description: >-
                If available, the IP address from which the API key was last
                used.
    ListOrganizationApiKeysResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - apiKeys
          properties:
            apiKeys:
              type: array
              description: List of API keys.
              items:
                $ref: '#/components/schemas/OrganizationApiKey'
    AddMemberRequest:
      type: object
      required:
        - usernameOrEmail
        - role
        - datasets
      properties:
        usernameOrEmail:
          type: string
          description: Username or e-mail address
        role:
          $ref: '#/components/schemas/OrganizationMemberRole'
        datasets:
          description: >-
            Only used for 'guest' users. Limits the datasets the user has access
            to.
          type: array
          items:
            type: string
    InviteOrganizationMemberRequest:
      type: object
      required:
        - email
        - role
        - datasets
      properties:
        email:
          type: string
          description: E-mail address
        role:
          $ref: '#/components/schemas/OrganizationMemberRole'
        datasets:
          description: >-
            Only used for 'guest' users. Limits the datasets the user has access
            to.
          type: array
          items:
            type: string
    RemoveMemberRequest:
      type: object
      required:
        - id
      properties:
        id:
          type: integer
    OrganizationMemberRole:
      type: string
      enum:
        - admin
        - member
        - guest
    SetMemberRoleRequest:
      type: object
      required:
        - role
      properties:
        role:
          $ref: '#/components/schemas/OrganizationMemberRole'
    SetMemberDatasetsRequest:
      type: object
      required:
        - datasets
      properties:
        datasets:
          type: array
          items:
            type: string
    VerifyOrganizationBucketRequest:
      type: object
      required:
        - accessKey
        - endpoint
        - bucket
      properties:
        storageProvider:
          $ref: '#/components/schemas/StorageProvider'
          description: |
            The type of storage backend to use. Supported options are:
            - 's3': Amazon S3
            - 'google': Google Cloud Storage
            - 'azure': Azure Blob Storage
            - 'other': Other S3-compatible storage
            If not specified, defaults to 's3'
        accessKey:
          type: string
          description: |
            Access key for the storage service:
            - For S3 and GCS: Use the access key.
            - For Azure: Use the Storage Account Name.
        secretKey:
          type: string
          description: >
            Secret key for the storage service:

            - For S3 and GCS: Use the secret key.

            - For Azure: Use the Storage Account Access Key.

            Note: You should either pass a `secretKey` value or a `bucketId`
            value.
        bucketId:
          type: integer
          description: >
            ID of an existing bucket. If provided, the credentials from this
            bucket

            will be used unless overridden by the `secretKey` property.
        bucket:
          type: string
          description: Name of the storage bucket or container.
        endpoint:
          type: string
          description: |
            Endpoint URL for the storage service.
            For S3-compatible services, Azure, or custom endpoints.
        region:
          type: string
          description: Optional region of the storage service (if applicable).
        prefix:
          type: string
          description: >
            Optional prefix within the bucket.

            Set this if you don't have access to the full bucket or want to
            limit the scope.
    VerifyOrganizationBucketResponse:
      description: >
        Response object for verifying an organization's bucket connectivity.


        Workflow:

        1. The client initiates verification by sending a GET request to
        /api/organizations/{organizationId}/buckets/verify with bucket and
        credential details.

        2. The server responds with this VerifyOrganizationBucketResponse
        object.

        3. The client checks the connectionStatus:
           - If "connected": Verification is complete. Other properties (files, hasInfoLabelsFile, signedUrl) are available.
           - If "connecting": Verification is in progress. The client should continue polling. Other properties are not yet available.
           - If "error": Verification failed. Check connectionError for details. Other properties are not available.
        4. If connectionStatus is "connecting", the client should periodically
        poll the endpoint until the status changes to "connected" or "error".
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - connectionStatus
          properties:
            connectionStatus:
              type: string
              description: >
                Indicates the current state of the connectivity verification
                process.

                - "connected": Verification successful, other properties are
                available.

                - "connecting": Verification in progress, continue polling.

                - "error": Verification failed, check connectionError for
                details.
              enum:
                - connected
                - connecting
                - error
            connectionError:
              type: string
              nullable: true
              description: >
                Provides additional details if connectionStatus is "error".
                Helps diagnose verification failures.
            connectionStatusSince:
              type: string
              format: date-time
              nullable: true
              description: |
                Timestamp of when the connectionStatus last changed.
            files:
              type: array
              description: >-
                Random files from the bucket. Only available when
                connectionStatus is "connected".
              items:
                type: object
                required:
                  - name
                  - size
                  - folderName
                properties:
                  name:
                    type: string
                    description: The name of the file.
                  size:
                    type: integer
                    description: The size of the file in bytes.
                  folderName:
                    type: string
                    description: The name of the folder containing the file.
            hasInfoLabelsFile:
              type: boolean
              description: >
                Indicates whether there are any info.labels files in this
                bucket.

                If so, those are used for category/labels.

                Only available when connectionStatus is "connected".
            signedUrl:
              type: string
              description: >
                A signed URL that allows you to PUT an item, to check whether
                CORS headers are set up correctly for this bucket.

                Only available when connectionStatus is "connected".
            endpoint:
              type: string
              description: >
                An alternative endpoint URL. Only returned and required for
                Azure storage accounts,

                where the endpoint must be reformatted. This field will be
                undefined for other storage providers.
    AddOrganizationBucketRequest:
      type: object
      required:
        - accessKey
        - secretKey
        - endpoint
        - bucket
        - region
      properties:
        accessKey:
          type: string
          description: >-
            Access key for the storage service (e.g., S3 access key, GCS access
            key)
        secretKey:
          type: string
          description: >-
            Secret key for the storage service (e.g., S3 secret key, GCS secret
            key)
        endpoint:
          type: string
          description: >
            Endpoint URL for the storage service (e.g., S3 endpoint, custom
            endpoint for other services)
        bucket:
          type: string
          description: Name of the storage bucket
        region:
          type: string
          description: Region of the storage service (if applicable)
        checkConnectivityPrefix:
          type: string
          description: |
            Set this if you don't have access to the root of this bucket.
            Only used to verify connectivity to this bucket.
        storageProvider:
          $ref: '#/components/schemas/StorageProvider'
          description: The type of storage provider. Defaults to 's3' if not specified.
    UpdateOrganizationBucketRequest:
      type: object
      properties:
        accessKey:
          type: string
          description: S3 access key
        secretKey:
          type: string
          description: S3 secret key
        endpoint:
          type: string
          description: S3 endpoint
        bucket:
          type: string
          description: S3 bucket
        region:
          type: string
          description: S3 region
        checkConnectivityPrefix:
          type: string
          description: |
            Set this if you don't have access to the root of this bucket.
            Only used to verify connectivity to this bucket.
        storageAccountName:
          type: string
          description: The name of the storage account for Azure Blob Storage
          example: my-storage-account
    OrganizationBucket:
      type: object
      required:
        - id
        - accessKey
        - endpoint
        - bucket
        - region
        - connected
        - storageProvider
      properties:
        id:
          type: integer
          example: 1
        accessKey:
          type: string
          description: Access key for the storage service
          example: AKIAIOSFODNN7EXAMPLE
        endpoint:
          type: string
          description: Endpoint URL for the storage service
          example: https://s3.amazonaws.com
        bucket:
          type: string
          description: Name of the storage bucket
          example: my-organization-bucket
        region:
          type: string
          description: Region of the storage service (if applicable)
          example: us-west-2
        connected:
          type: boolean
          description: Whether we can reach the bucket
          example: true
        checkConnectivityPrefix:
          type: string
          description: >
            Optional prefix used for connectivity verification when root bucket
            access is restricted.
          example: data/
        storageProvider:
          $ref: '#/components/schemas/StorageProvider'
          description: The type of storage provider for this bucket
          example: s3
        storageAccountName:
          type: string
          description: The name of the storage account for Azure Blob Storage
          example: my-storage-account
    ListOrganizationBucketsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - buckets
          properties:
            buckets:
              type: array
              items:
                $ref: '#/components/schemas/OrganizationBucket'
    GetOrganizationBucketResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - bucket
          properties:
            bucket:
              $ref: '#/components/schemas/OrganizationBucket'
    ListOrganizationDataResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          properties:
            filterParseError:
              type: string
            data:
              type: array
              items:
                type: object
                required:
                  - id
                  - name
                  - bucketId
                  - bucketName
                  - bucketPath
                  - fullBucketPath
                  - dataset
                  - totalFileCount
                  - totalFileSize
                  - created
                  - metadata
                  - metadataStringForCLI
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  bucketId:
                    type: integer
                  bucketName:
                    type: string
                  bucketPath:
                    type: string
                  fullBucketPath:
                    type: string
                  dataset:
                    type: string
                  totalFileCount:
                    type: integer
                  totalFileSize:
                    type: integer
                  created:
                    type: string
                    format: date-time
                  metadata:
                    type: object
                    additionalProperties:
                      type: string
                  metadataStringForCLI:
                    type: string
                    description: >-
                      String that's passed in to a transformation block in
                      `--metadata` (the metadata + a `dataItemInfo` object)
            totalFileCount:
              type: integer
            totalDataItemCount:
              type: integer
    OrganizationAddDataItemRequest:
      type: object
      required:
        - name
        - dataset
        - metadata
        - files[]
      properties:
        name:
          type: string
        bucketId:
          type: integer
        bucketName:
          type: string
          description: Name of the bucket name (as an Edge Impulse name)
        dataset:
          type: string
        bucketPath:
          type: string
          description: >-
            Optional path in the bucket to create this data item (files are
            created under this path).
        metadata:
          type: string
          description: Key-value pair of metadata (in JSON format)
        files[]:
          type: array
          items:
            type: string
            format: binary
    OrganizationDataItem:
      type: object
      required:
        - id
        - name
        - bucketId
        - bucketName
        - bucketPath
        - dataset
        - totalFileCount
        - totalFileSize
        - created
        - metadata
        - files
      properties:
        id:
          type: integer
        name:
          type: string
        bucketId:
          type: integer
        bucketName:
          type: string
        bucketPath:
          type: string
        dataset:
          type: string
        totalFileCount:
          type: integer
        totalFileSize:
          type: integer
        created:
          type: string
          format: date-time
        metadata:
          type: object
          additionalProperties:
            type: string
        files:
          type: array
          items:
            type: object
            required:
              - name
              - bucketPath
              - size
            properties:
              name:
                type: string
              bucketPath:
                type: string
              size:
                type: integer
              lastModified:
                type: string
                format: date-time
    GetOrganizationDataItemResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/OrganizationDataItem'
    UpdateOrganizationDataItemRequest:
      type: object
      properties:
        name:
          type: string
        dataset:
          type: string
        metadata:
          type: object
          additionalProperties:
            type: string
    OrganizationAddDataFileRequest:
      type: object
      required:
        - files[]
      properties:
        files[]:
          type: array
          items:
            type: string
            format: binary
    OrganizationCreateProjectRequest:
      type: object
      description: >-
        If uploadType is set to 'project', either projectId, newProjectName or
        projectApiKey is required. projectId and newProjectName are only
        available through JWT tokens. If uploadType is set to 'dataset' then
        outputDatasetName can be set to '' to output in the same dataset, or set
        to a string to create (or append to) a new dataset.
      required:
        - name
      properties:
        name:
          type: string
        filter:
          type: string
          description: >-
            Filter in SQL format, used for creating transformation jobs on
            clinical datasets
        pathFilters:
          type: array
          description: >-
            Set of paths to apply the transformation to, used for creating
            transformation jobs on default datasets. This option is experimental
            and may change in the future.
          items:
            $ref: '#/components/schemas/OrganizationCreateProjectPathFilter'
        uploadType:
          type: string
          enum:
            - project
            - dataset
        projectId:
          type: integer
        projectVisibility:
          $ref: '#/components/schemas/ProjectVisibility'
        newProjectName:
          type: string
        projectApiKey:
          type: string
        projectHmacKey:
          type: string
        transformationBlockId:
          type: integer
        builtinTransformationBlock:
          type: object
        category:
          type: string
          enum:
            - training
            - testing
            - split
        outputDatasetName:
          type: string
        outputDatasetBucketId:
          type: integer
        outputDatasetBucketPath:
          description: >-
            Path of new dataset within the bucket; used only when creating a new
            dataset.
          type: string
        outputPathInDataset:
          description: >-
            Path within the selected dataset to upload transformed files into.
            Used only when uploading into a default (non-clinical) dataset.
          type: string
        outputDatasetPathRule:
          $ref: '#/components/schemas/OrganizationCreateProjectOutputDatasetPathRule'
        label:
          type: string
        emailRecipientUids:
          type: array
          items:
            type: integer
        transformationParallel:
          description: Number of parallel jobs to start
          type: integer
        extraCliArguments:
          description: Optional extra arguments for this transformation block
          type: string
        parameters:
          type: object
          description: >-
            List of custom parameters for this transformation job (see the list
            of parameters that the block exposes).
          additionalProperties:
            type: string
    OrganizationCreateProjectPathFilter:
      type: object
      description: >-
        Filter, given as a dataset and path containing wildcards, used for
        creating transformation jobs
      required:
        - dataset
        - filter
      properties:
        dataset:
          type: string
          description: Dataset name of files to transform
        filter:
          type: string
          description: >-
            Path filter with wildcards, relative to the root of the dataset. For
            example, /folder/*.json will transform all JSON files in /folder
            (when operating on files)
    OrganizationCreateProjectOutputDatasetPathRule:
      description: >-
        Defines the folder structure for writing to the output dataset. Used
        only when uploading into a default (non-clinical) dataset.
      type: string
      enum:
        - no-subfolders
        - subfolder-per-item
        - use-full-path
    OrganizationCreateProject:
      type: object
      required:
        - id
        - organizationId
        - name
        - status
        - transformJobStatus
        - uploadJobStatus
        - uploadType
        - category
        - created
        - totalDownloadFileCount
        - totalDownloadFileSize
        - totalDownloadFileSizeString
        - totalUploadFileCount
        - transformationParallel
        - transformationSummary
        - inProgress
        - operatesOn
        - totalTimeSpentSeconds
        - totalTimeSpentString
      properties:
        id:
          type: integer
        organizationId:
          type: integer
        name:
          type: string
        uploadType:
          type: string
          enum:
            - dataset
            - project
        status:
          $ref: '#/components/schemas/TransformationJobStatusEnum'
        transformJobStatus:
          $ref: '#/components/schemas/TransformationJobStatusEnum'
        uploadJobId:
          type: integer
        uploadJobStatus:
          $ref: '#/components/schemas/TransformationJobStatusEnum'
        uploadJobFilesUploaded:
          type: integer
        projectOwner:
          type: string
        projectId:
          type: integer
        projectName:
          type: string
        transformationBlockId:
          type: integer
        builtinTransformationBlock:
          type: object
        transformationBlockName:
          type: string
        category:
          type: string
          enum:
            - training
            - testing
            - split
        created:
          type: string
          format: date-time
        outputDatasetName:
          type: string
        outputDatasetBucketId:
          type: integer
        outputDatasetBucketPath:
          type: string
        totalDownloadFileCount:
          type: integer
        totalDownloadFileSize:
          type: integer
        totalDownloadFileSizeString:
          type: string
        totalUploadFileCount:
          type: integer
        transformationParallel:
          type: integer
          description: Number of transformation jobs that can be ran in parallel
        transformationSummary:
          type: object
          required:
            - startedCount
            - succeededCount
            - finishedCount
            - totalFileCount
            - totalTimeSpentSeconds
          properties:
            startedCount:
              type: integer
            succeededCount:
              type: integer
            finishedCount:
              type: integer
            totalFileCount:
              type: integer
            totalTimeSpentSeconds:
              type: integer
              description: Total amount of compute used for this job (in seconds)
        inProgress:
          type: boolean
        label:
          type: string
        filterQuery:
          type: string
        emailRecipientUids:
          type: array
          items:
            type: integer
        pipelineId:
          type: integer
        pipelineName:
          type: string
        pipelineRunId:
          type: integer
        pipelineStep:
          type: integer
        operatesOn:
          $ref: '#/components/schemas/TransformationJobOperatesOnEnum'
        totalTimeSpentSeconds:
          type: integer
          description: Total amount of compute used for this job (in seconds)
        totalTimeSpentString:
          type: string
          description: Total amount of compute used (friendly string)
        createdByUser:
          $ref: '#/components/schemas/CreatedUpdatedByUser'
    OrganizationCreateProjectWithFiles:
      allOf:
        - $ref: '#/components/schemas/OrganizationCreateProject'
        - type: object
          required:
            - files
            - fileCountForFilter
          properties:
            files:
              type: array
              items:
                type: object
                required:
                  - id
                  - fileName
                  - bucketPath
                  - transformationJobStatus
                  - linkToDataItem
                  - lengthString
                  - sourceDatasetType
                properties:
                  id:
                    type: integer
                  fileName:
                    type: string
                  bucketPath:
                    type: string
                  transformationJobId:
                    type: integer
                  transformationJobStatus:
                    $ref: '#/components/schemas/TransformationJobStatusEnum'
                  linkToDataItem:
                    type: string
                  lengthString:
                    type: string
                    description: Only set after job was finished
                  sourceDatasetType:
                    $ref: '#/components/schemas/OrganizationDatasetTypeEnum'
            fileCountForFilter:
              type: integer
    OrganizationCreateProjectResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - createProjectId
            - apiKey
          properties:
            createProjectId:
              type: integer
              description: Project ID for the new project
            apiKey:
              type: string
              description: >-
                DEPRECATED. API key for the new project. This field will always
                be empty.
    ExportOriginalDataRequest:
      type: object
      required:
        - uploaderFriendlyFilenames
        - retainCrops
      properties:
        uploaderFriendlyFilenames:
          type: boolean
          description: >-
            Whether to rename the exported file names to an uploader friendly
            format (e.g. label.filename.cbor)
        retainCrops:
          type: boolean
          description: >-
            Whether to retain crops and splits (applicable to time-series data
            only). If this is disabled, then the original files are returned (as
            they were uploaded).
    ExportWavDataRequest:
      type: object
      required:
        - retainCrops
      properties:
        retainCrops:
          type: boolean
          description: >-
            Whether to retain crops and splits. If this is disabled, then the
            original files are returned (as they were uploaded).
    StartClassifyJobRequest:
      type: object
      properties:
        modelVariants:
          type: array
          description: Set of model variants to run the classify job against.
          items:
            $ref: '#/components/schemas/KerasModelVariantEnum'
        skipFeatureGeneration:
          type: boolean
          description: >-
            If enabled, skips feature generation altogether. Used e.g. if you
            update thresholds.
    StartPerformanceCalibrationRequest:
      type: object
      required:
        - backgroundNoiseLabel
      properties:
        backgroundNoiseLabel:
          type: string
          description: The label used to signify background noise in the impulse
        otherNoiseLabels:
          type: array
          items:
            type: string
          description: >-
            Any other labels that should be considered equivalent to background
            noise
        uploadKey:
          type: string
          description: >-
            The key of an uploaded sample. If not present, a synthetic sample
            will be created.
        sampleLengthMinutes:
          type: number
          description: The length of sample to create (required for synthetic samples)
    StartPostProcessingRequest:
      type: object
      required:
        - variant
        - dataset
        - algorithm
        - evaluation
      properties:
        variant:
          description: Which model variant to use (int8, float32, etc.)
          $ref: '#/components/schemas/KerasModelVariantEnum'
        dataset:
          description: Which dataset to use
          type: string
          enum:
            - training
            - validation
            - testing
        algorithm:
          description: Which algorithm container to use
          type: string
        evaluation:
          description: Which evaluation container to use
          type: string
        population:
          description: The population size for the genetic algorithm
          type: integer
          default: 100
        maxGenerations:
          description: The maximum number of generations for the genetic algorithm
          type: integer
          default: 100
        designSpaceTolerance:
          description: The tolerance for the design space
          type: number
          default: 0.01
        objectiveSpaceTolerance:
          description: The tolerance for the objective space
          type: number
          default: 0.0025
        terminationPeriod:
          description: >-
            The number of generations the termination criteria are averaged
            across
          type: integer
          default: 5
    VerifyDspBlockUrlRequest:
      type: object
      required:
        - url
      properties:
        url:
          type: string
    VerifyDspBlockUrlResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          properties:
            block:
              type: object
              required:
                - title
                - author
                - description
                - name
                - latestImplementationVersion
              properties:
                title:
                  type: string
                author:
                  type: string
                description:
                  type: string
                name:
                  type: string
                latestImplementationVersion:
                  type: integer
                namedAxes:
                  type: array
                  items:
                    $ref: '#/components/schemas/DSPNamedAxis'
    RawDataCategory:
      type: string
      enum:
        - training
        - testing
        - post-processing
    RawDataFilterCategory:
      type: string
      enum:
        - training
        - testing
        - post-processing
        - all
    SocketTokenResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - token
          properties:
            token:
              type: object
              required:
                - socketToken
                - expires
              properties:
                socketToken:
                  type: string
                expires:
                  type: string
                  format: date-time
    StartSamplingRequest:
      type: object
      required:
        - label
        - lengthMs
        - category
        - intervalMs
      properties:
        label:
          type: string
          description: Label to be used during sampling.
        lengthMs:
          type: integer
          description: Requested length of the sample (in ms).
        category:
          description: Which acquisition category to sample data into.
          $ref: '#/components/schemas/RawDataCategory'
        intervalMs:
          type: number
          description: Interval between samples (can be calculated like `1/hz * 1000`)
        sensor:
          type: string
          description: The sensor to sample from.
        labelColor:
          type: string
          description: >-
            Text color of label displayed on supported clients. Value can be any
            supported CSS color value
        collectedSampleCount:
          type: number
          description: >-
            A hint to supported clients to show the number of samples currently
            collected
        targetSampleCount:
          type: number
          description: >-
            A hint to supported clients to show the desired number of samples to
            be collected
    StartSamplingResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          properties:
            id:
              type: integer
    ProjectDataAxesSummaryResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - dataAxisSummary
          properties:
            dataAxisSummary:
              type: object
              description: Summary of the amount of data (in ms.) per sensor axis
              additionalProperties:
                type: integer
    ProjectTrainingDataSummaryResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - dataSummary
          properties:
            dataSummary:
              type: object
              required:
                - labels
                - dataCount
                - hasTimeseriesDataWithMultipleLabels
              properties:
                labels:
                  type: array
                  description: Labels in the training set
                  items:
                    type: string
                dataCount:
                  type: integer
                  example: Number of files in the training set
                hasTimeseriesDataWithMultipleLabels:
                  type: boolean
                  description: >-
                    Whether there are samples in the training dataset that are
                    both time-series data and have multiple labels
                labelsPerKey:
                  description: >-
                    For labelmap datasets, this property provides a breakdown of
                    labels per attribute or key.
                  type: object
                  additionalProperties:
                    type: array
                    items:
                      type: string
    ProjectDataIntervalResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - intervalMs
          properties:
            intervalMs:
              type: number
    SetProjectComputeTimeRequest:
      type: object
      description: Only parameters set on this object will be updated.
      required:
        - jobLimitM
      properties:
        jobLimitM:
          type: integer
          description: New job limit in seconds.
    SetProjectDspFileSizeRequest:
      type: object
      description: Only parameters set on this object will be updated.
      required:
        - dspFileSizeMb
      properties:
        dspFileSizeMb:
          type: integer
          description: DSP File size in MB (default is 4096 MB)
    EnvironmentVariable:
      type: object
      required:
        - key
      properties:
        key:
          type: string
          description: >-
            Environmental variable key. Needs to adhere to regex
            "^[a-zA-Z_]+[a-zA-Z0-9_]*$".
        value:
          description: >-
            If value is left undefined, only the key is passed in as an
            environmental variable.
          type: string
    AIActionsOperatesOn:
      type: string
      enum:
        - images_object_detection
        - images_single_label
        - audio
        - other
    OrganizationTransformationBlock:
      type: object
      required:
        - id
        - name
        - dockerContainer
        - dockerContainerManagedByEdgeImpulse
        - created
        - description
        - cliArguments
        - indMetadata
        - additionalMountPoints
        - operatesOn
        - allowExtraCliArguments
        - sourceCodeAvailable
        - sourceCodeDownloadStaffOnly
        - showInDataSources
        - showInCreateTransformationJob
        - showInSyntheticData
        - showInAIActions
        - isPublic
        - publicProjectTierAvailability
        - environmentVariables
      properties:
        id:
          type: integer
        name:
          type: string
        dockerContainer:
          type: string
        dockerContainerManagedByEdgeImpulse:
          type: boolean
        created:
          type: string
          format: date-time
        createdByUser:
          $ref: '#/components/schemas/CreatedUpdatedByUser'
        lastUpdated:
          type: string
          format: date-time
        lastUpdatedByUser:
          $ref: '#/components/schemas/CreatedUpdatedByUser'
        userId:
          type: integer
        userName:
          type: string
        description:
          type: string
        cliArguments:
          description: These arguments are passed into the container
          type: string
        indMetadata:
          type: boolean
        requestsCpu:
          type: number
        requestsMemory:
          type: integer
        limitsCpu:
          type: number
        limitsMemory:
          type: integer
        additionalMountPoints:
          type: array
          items:
            $ref: '#/components/schemas/TransformationBlockAdditionalMountPoint'
        operatesOn:
          $ref: '#/components/schemas/TransformationJobOperatesOnEnum'
        allowExtraCliArguments:
          type: boolean
        parameters:
          description: >-
            List of parameters, spec'ed according to
            https://docs.edgeimpulse.com/docs/tips-and-tricks/adding-parameters-to-custom-blocks
          type: array
          items:
            type: object
        parametersUI:
          description: List of parameters to be rendered in the UI
          type: array
          items:
            $ref: '#/components/schemas/DSPGroupItem'
        maxRunningTimeStr:
          type: string
          description: >-
            15m for 15 minutes, 2h for 2 hours, 1d for 1 day. If not set, the
            default is 8 hours.
        sourceCodeAvailable:
          type: boolean
        sourceCodeDownloadStaffOnly:
          type: boolean
          description: Whether the source code is only available for staff users.
        repositoryUrl:
          type: string
          description: URL to the source code of this custom learn block.
        isPublic:
          type: boolean
          description: >-
            Whether this block is publicly available to Edge Impulse users (if
            false, then only for members of the owning organization)
        publicProjectTierAvailability:
          $ref: '#/components/schemas/PublicProjectTierAvailability'
        showInDataSources:
          type: boolean
          description: >-
            Whether to show this block in 'Data sources'. Only applies for
            standalone blocks.
        showInCreateTransformationJob:
          type: boolean
          description: >-
            Whether to show this block in 'Create transformation job'. Only
            applies for standalone blocks.
        showInSyntheticData:
          type: boolean
          description: >-
            Whether to show this block in 'Synthetic data'. Only applies for
            standalone blocks.
        showInAIActions:
          type: boolean
          description: >-
            Whether to show this block in 'AI Labeling'. Only applies for
            standalone blocks.
        environmentVariables:
          type: array
          items:
            $ref: '#/components/schemas/EnvironmentVariable'
          description: >-
            Extra environmental variables that are passed into the
            transformation block (key/value pairs).
        aiActionsOperatesOn:
          type: array
          description: >-
            For AI labeling blocks, this lists the data types that the block
            supports. If this field is empty then there's no information about
            supported data types.
          items:
            $ref: '#/components/schemas/AIActionsOperatesOn'
    PublicOrganizationTransformationBlock:
      type: object
      required:
        - id
        - ownerOrganizationId
        - ownerOrganizationName
        - name
        - created
        - description
        - operatesOn
        - allowExtraCliArguments
        - showInDataSources
        - showInCreateTransformationJob
        - showInSyntheticData
        - showInAIActions
      properties:
        id:
          type: integer
        ownerOrganizationId:
          type: integer
        ownerOrganizationName:
          type: string
        name:
          type: string
        created:
          type: string
          format: date-time
        lastUpdated:
          type: string
          format: date-time
        description:
          type: string
        operatesOn:
          $ref: '#/components/schemas/TransformationJobOperatesOnEnum'
        allowExtraCliArguments:
          type: boolean
        parameters:
          description: >-
            List of parameters, spec'ed according to
            https://docs.edgeimpulse.com/docs/tips-and-tricks/adding-parameters-to-custom-blocks
          type: array
          items:
            type: object
        parametersUI:
          description: List of parameters to be rendered in the UI
          type: array
          items:
            $ref: '#/components/schemas/DSPGroupItem'
        repositoryUrl:
          type: string
          description: URL to the source code of this custom learn block.
        showInDataSources:
          type: boolean
          description: >-
            Whether to show this block in 'Data sources'. Only applies for
            standalone blocks.
        showInCreateTransformationJob:
          type: boolean
          description: >-
            Whether to show this block in 'Create transformation job'. Only
            applies for standalone blocks.
        showInSyntheticData:
          type: boolean
          description: >-
            Whether to show this block in 'Synthetic data'. Only applies for
            standalone blocks.
        showInAIActions:
          type: boolean
          description: >-
            Whether to show this block in 'AI Labeling'. Only applies for
            standalone blocks.
        aiActionsOperatesOn:
          type: array
          description: >-
            For AI labeling blocks, this lists the data types that the block
            supports. If this field is empty then there's no information about
            supported data types.
          items:
            $ref: '#/components/schemas/AIActionsOperatesOn'
    TransformationBlockAdditionalMountPoint:
      type: object
      required:
        - type
        - mountPoint
      properties:
        type:
          type: string
          enum:
            - bucket
            - portal
        bucketId:
          type: integer
        portalId:
          type: integer
        mountPoint:
          type: string
    GetOrganizationTransformationBlockResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - transformationBlock
          properties:
            transformationBlock:
              $ref: '#/components/schemas/OrganizationTransformationBlock'
    ListOrganizationTransformationBlocksResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - transformationBlocks
          properties:
            transformationBlocks:
              type: array
              items:
                $ref: '#/components/schemas/OrganizationTransformationBlock'
    ListPublicOrganizationTransformationBlocksResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - transformationBlocks
          properties:
            transformationBlocks:
              type: array
              items:
                $ref: '#/components/schemas/PublicOrganizationTransformationBlock'
    GetPublicOrganizationTransformationBlockResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - transformationBlock
          properties:
            transformationBlock:
              $ref: '#/components/schemas/PublicOrganizationTransformationBlock'
    AddOrganizationTransformationBlockRequest:
      type: object
      required:
        - name
        - dockerContainer
        - indMetadata
        - description
        - cliArguments
        - additionalMountPoints
        - operatesOn
      properties:
        name:
          type: string
        dockerContainer:
          type: string
        indMetadata:
          description: Whether to pass the `--metadata` parameter to the container.
          type: boolean
        description:
          type: string
        cliArguments:
          type: string
        requestsCpu:
          type: number
        requestsMemory:
          type: integer
        limitsCpu:
          type: number
        limitsMemory:
          type: integer
        additionalMountPoints:
          type: array
          items:
            $ref: '#/components/schemas/TransformationBlockAdditionalMountPoint'
        operatesOn:
          type: string
          enum:
            - file
            - directory
            - dataitem
            - standalone
        allowExtraCliArguments:
          type: boolean
        parameters:
          description: >-
            List of parameters, spec'ed according to
            https://docs.edgeimpulse.com/docs/tips-and-tricks/adding-parameters-to-custom-blocks
          type: array
          items:
            type: object
        maxRunningTimeStr:
          type: string
          description: >-
            15m for 15 minutes, 2h for 2 hours, 1d for 1 day. If not set, the
            default is 8 hours.
        isPublic:
          type: boolean
        publicProjectTierAvailability:
          $ref: '#/components/schemas/PublicProjectTierAvailability'
        repositoryUrl:
          description: URL to the source code of this custom learn block.
          type: string
        showInDataSources:
          type: boolean
          description: >-
            Whether to show this block in 'Data sources'. Only applies for
            standalone blocks. (defaults to 'true' when not provided)
        showInCreateTransformationJob:
          type: boolean
          description: >-
            Whether to show this block in 'Create transformation job'. Only
            applies for standalone blocks.
        showInSyntheticData:
          type: boolean
          description: >-
            Whether to show this block in 'Synthetic data'. Only applies for
            standalone blocks.
        showInAIActions:
          type: boolean
          description: >-
            Whether to show this block in 'AI Labeling'. Only applies for
            standalone blocks.
        environmentVariables:
          type: array
          items:
            $ref: '#/components/schemas/EnvironmentVariable'
        aiActionsOperatesOn:
          type: array
          description: >-
            For AI labeling blocks, this lists the data types that the block
            supports. If this field is empty then there's no information about
            supported data types.
          items:
            $ref: '#/components/schemas/AIActionsOperatesOn'
        sourceCodeDownloadStaffOnly:
          type: boolean
          description: Whether the source code is only available for staff users.
    UpdateOrganizationTransformationBlockRequest:
      type: object
      properties:
        name:
          type: string
        dockerContainer:
          type: string
        indMetadata:
          description: Whether to pass the `--metadata` parameter to the container.
          type: boolean
        description:
          type: string
        cliArguments:
          type: string
        requestsCpu:
          type: number
        requestsMemory:
          type: integer
        limitsCpu:
          type: number
        limitsMemory:
          type: integer
        additionalMountPoints:
          type: array
          items:
            $ref: '#/components/schemas/TransformationBlockAdditionalMountPoint'
        operatesOn:
          $ref: '#/components/schemas/TransformationJobOperatesOnEnum'
        allowExtraCliArguments:
          type: boolean
        parameters:
          description: >-
            List of parameters, spec'ed according to
            https://docs.edgeimpulse.com/docs/tips-and-tricks/adding-parameters-to-custom-blocks
          type: array
          items:
            type: object
        maxRunningTimeStr:
          type: string
          description: >-
            15m for 15 minutes, 2h for 2 hours, 1d for 1 day. If not set, the
            default is 8 hours.
        isPublic:
          type: boolean
        publicProjectTierAvailability:
          $ref: '#/components/schemas/PublicProjectTierAvailability'
        repositoryUrl:
          type: string
          description: URL to the source code of this custom learn block.
        showInDataSources:
          type: boolean
          description: >-
            Whether to show this block in 'Data sources'. Only applies for
            standalone blocks.
        showInCreateTransformationJob:
          type: boolean
          description: >-
            Whether to show this block in 'Create transformation job'. Only
            applies for standalone blocks.
        showInSyntheticData:
          type: boolean
          description: >-
            Whether to show this block in 'Synthetic data'. Only applies for
            standalone blocks.
        showInAIActions:
          type: boolean
          description: >-
            Whether to show this block in 'AI Labeling'. Only applies for
            standalone blocks.
        environmentVariables:
          type: array
          items:
            $ref: '#/components/schemas/EnvironmentVariable'
        aiActionsOperatesOn:
          type: array
          description: >-
            For AI labeling blocks, this lists the data types that the block
            supports. If this field is empty then there's no information about
            supported data types.
          items:
            $ref: '#/components/schemas/AIActionsOperatesOn'
        sourceCodeDownloadStaffOnly:
          type: boolean
          description: Whether the source code is only available for staff users.
    OrganizationDeployBlock:
      type: object
      required:
        - id
        - name
        - dockerContainer
        - dockerContainerManagedByEdgeImpulse
        - created
        - description
        - cliArguments
        - photo
        - privileged
        - mountLearnBlock
        - supportsEonCompiler
        - showOptimizations
        - category
        - sourceCodeAvailable
        - sourceCodeDownloadStaffOnly
      properties:
        id:
          type: integer
        name:
          type: string
        dockerContainer:
          type: string
        dockerContainerManagedByEdgeImpulse:
          type: boolean
        created:
          type: string
          format: date-time
        createdByUser:
          $ref: '#/components/schemas/CreatedUpdatedByUser'
        lastUpdated:
          type: string
          format: date-time
        lastUpdatedByUser:
          $ref: '#/components/schemas/CreatedUpdatedByUser'
        userId:
          type: integer
        userName:
          type: string
        description:
          type: string
        cliArguments:
          description: These arguments are passed into the container
          type: string
        requestsCpu:
          type: number
        requestsMemory:
          type: integer
        limitsCpu:
          type: number
        limitsMemory:
          type: integer
        photo:
          type: string
        integrateUrl:
          type: string
        privileged:
          type: boolean
        mountLearnBlock:
          type: boolean
        supportsEonCompiler:
          type: boolean
        showOptimizations:
          type: boolean
        category:
          type: string
          enum:
            - library
            - firmware
        sourceCodeAvailable:
          type: boolean
        sourceCodeDownloadStaffOnly:
          type: boolean
          description: Whether the source code is only available for staff users.
        parameters:
          description: >-
            List of parameters, spec'ed according to
            https://docs.edgeimpulse.com/docs/tips-and-tricks/adding-parameters-to-custom-blocks
          type: array
          items:
            type: object
        parametersUI:
          description: List of parameters to be rendered in the UI
          type: array
          items:
            $ref: '#/components/schemas/DSPGroupItem'
    GetOrganizationDeployBlockResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - deployBlock
          properties:
            deployBlock:
              $ref: '#/components/schemas/OrganizationDeployBlock'
    ListOrganizationDeployBlocksResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - deployBlocks
          properties:
            deployBlocks:
              type: array
              items:
                $ref: '#/components/schemas/OrganizationDeployBlock'
    AddOrganizationDeployBlockRequest:
      type: object
      required:
        - name
        - dockerContainer
        - description
        - cliArguments
      properties:
        name:
          type: string
        dockerContainer:
          type: string
        description:
          type: string
        cliArguments:
          type: string
        requestsCpu:
          type: number
        requestsMemory:
          type: integer
        limitsCpu:
          type: number
        limitsMemory:
          type: integer
        photo:
          type: string
          format: binary
        integrateUrl:
          type: string
        privileged:
          type: boolean
        mountLearnBlock:
          type: boolean
        supportsEonCompiler:
          type: boolean
        showOptimizations:
          type: boolean
        category:
          type: string
          enum:
            - library
            - firmware
        sourceCodeDownloadStaffOnly:
          type: boolean
          description: Whether the source code is only available for staff users.
        parameters:
          description: >-
            List of parameters, spec'ed according to
            https://docs.edgeimpulse.com/docs/tips-and-tricks/adding-parameters-to-custom-blocks
          type: array
          items:
            type: object
    UpdateOrganizationDeployBlockRequest:
      type: object
      properties:
        name:
          type: string
        dockerContainer:
          type: string
        description:
          type: string
        cliArguments:
          type: string
        requestsCpu:
          type: number
        requestsMemory:
          type: integer
        limitsCpu:
          type: number
        limitsMemory:
          type: integer
        photo:
          type: string
          format: binary
        integrateUrl:
          type: string
        privileged:
          type: boolean
        mountLearnBlock:
          type: boolean
        supportsEonCompiler:
          type: boolean
        showOptimizations:
          type: boolean
        category:
          type: string
          enum:
            - library
            - firmware
        sourceCodeDownloadStaffOnly:
          type: boolean
          description: Whether the source code is only available for staff users.
        parameters:
          description: >-
            List of parameters, spec'ed according to
            https://docs.edgeimpulse.com/docs/tips-and-tricks/adding-parameters-to-custom-blocks
          type: array
          items:
            type: object
    OrganizationDspBlock:
      type: object
      required:
        - id
        - name
        - dockerContainer
        - dockerContainerManagedByEdgeImpulse
        - created
        - description
        - port
        - isConnected
        - sourceCodeAvailable
        - sourceCodeDownloadStaffOnly
      properties:
        id:
          type: integer
        name:
          type: string
        dockerContainer:
          type: string
        dockerContainerManagedByEdgeImpulse:
          type: boolean
        created:
          type: string
          format: date-time
        createdByUser:
          $ref: '#/components/schemas/CreatedUpdatedByUser'
        lastUpdated:
          type: string
          format: date-time
        lastUpdatedByUser:
          $ref: '#/components/schemas/CreatedUpdatedByUser'
        userId:
          type: integer
        userName:
          type: string
        description:
          type: string
        requestsCpu:
          type: number
        requestsMemory:
          type: integer
        limitsCpu:
          type: number
        limitsMemory:
          type: integer
        port:
          type: integer
        isConnected:
          type: boolean
        error:
          type: string
        sourceCodeAvailable:
          type: boolean
        sourceCodeDownloadStaffOnly:
          type: boolean
          description: Whether the source code is only available for staff users.
    GetOrganizationDspBlockResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - dspBlock
          properties:
            dspBlock:
              $ref: '#/components/schemas/OrganizationDspBlock'
    ListOrganizationDspBlocksResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - dspBlocks
          properties:
            dspBlocks:
              type: array
              items:
                $ref: '#/components/schemas/OrganizationDspBlock'
    AddOrganizationDspBlockRequest:
      type: object
      required:
        - name
        - dockerContainer
        - description
        - port
      properties:
        name:
          type: string
        dockerContainer:
          type: string
        description:
          type: string
        requestsCpu:
          type: number
        requestsMemory:
          type: integer
        limitsCpu:
          type: number
        limitsMemory:
          type: integer
        port:
          type: integer
        sourceCodeDownloadStaffOnly:
          type: boolean
          description: Whether the source code is only available for staff users.
    UpdateOrganizationDspBlockRequest:
      type: object
      properties:
        name:
          type: string
        dockerContainer:
          type: string
        description:
          type: string
        requestsCpu:
          type: number
        requestsMemory:
          type: integer
        limitsCpu:
          type: number
        limitsMemory:
          type: integer
        port:
          type: integer
        sourceCodeDownloadStaffOnly:
          type: boolean
          description: Whether the source code is only available for staff users.
    OrganizationTransferLearningOperatesOn:
      type: string
      enum:
        - object_detection
        - audio
        - image
        - regression
        - anomaly_detection
        - visual_anomaly_detection
        - other
        - image_akida
        - object_detection_akida
        - classification_akida
    OrganizationTransferLearningBlock:
      type: object
      required:
        - id
        - name
        - dockerContainer
        - dockerContainerManagedByEdgeImpulse
        - created
        - description
        - operatesOn
        - implementationVersion
        - isPublic
        - isPublicForDevices
        - isPublicEnterpriseOnly
        - parameters
        - indRequiresGpu
        - sourceCodeAvailable
        - sourceCodeDownloadStaffOnly
        - indBlockNoLongerAvailable
      properties:
        id:
          type: integer
        name:
          type: string
        dockerContainer:
          type: string
        dockerContainerManagedByEdgeImpulse:
          type: boolean
        created:
          type: string
          format: date-time
        createdByUser:
          $ref: '#/components/schemas/CreatedUpdatedByUser'
        lastUpdated:
          type: string
          format: date-time
        lastUpdatedByUser:
          $ref: '#/components/schemas/CreatedUpdatedByUser'
        description:
          type: string
        userId:
          type: integer
        userName:
          type: string
        operatesOn:
          $ref: '#/components/schemas/OrganizationTransferLearningOperatesOn'
        objectDetectionLastLayer:
          $ref: '#/components/schemas/ObjectDetectionLastLayer'
        implementationVersion:
          type: integer
        isPublic:
          type: boolean
          description: >-
            Whether this block is publicly available to Edge Impulse users (if
            false, then only for members of the owning organization)
        isPublicForDevices:
          description: >-
            If `isPublic` is true, the list of devices (from latencyDevices) for
            which this model can be shown.
          type: array
          items:
            type: string
        publicProjectTierAvailability:
          $ref: '#/components/schemas/PublicProjectTierAvailability'
        isPublicEnterpriseOnly:
          type: boolean
          description: Whether this block is publicly available to only enterprise users
        enterpriseOnly:
          type: boolean
          description: Whether this block is available to only enterprise users
        repositoryUrl:
          type: string
          description: URL to the source code of this custom learn block.
        parameters:
          description: >-
            List of parameters, spec'ed according to
            https://docs.edgeimpulse.com/docs/tips-and-tricks/adding-parameters-to-custom-blocks
          type: array
          items:
            type: object
        imageInputScaling:
          $ref: '#/components/schemas/ImageInputScaling'
        indRequiresGpu:
          description: If set, requires this block to be scheduled on GPU.
          type: boolean
        sourceCodeAvailable:
          type: boolean
        sourceCodeDownloadStaffOnly:
          type: boolean
          description: Whether the source code is only available for staff users.
        displayCategory:
          $ref: '#/components/schemas/BlockDisplayCategory'
        customModelVariants:
          description: >-
            List of custom model variants produced when this block is trained.
            This is experimental and may change in the future.
          type: array
          items:
            $ref: >-
              #/components/schemas/OrganizationTransferLearningBlockCustomVariant
        indBlockNoLongerAvailable:
          type: boolean
          description: >-
            If set, then this block is no longer available for training; and
            blockNoLongerAvailableReason will be set.
        blockNoLongerAvailableReason:
          type: string
          description: >-
            In Markdown format. Set if `indBlockNoLongerAvailable` is true,
            contains migration information for existing users of this block.
    GetOrganizationTransferLearningBlockResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - transferLearningBlock
          properties:
            transferLearningBlock:
              $ref: '#/components/schemas/OrganizationTransferLearningBlock'
    ListOrganizationTransferLearningBlocksResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - transferLearningBlocks
          properties:
            transferLearningBlocks:
              type: array
              items:
                $ref: '#/components/schemas/OrganizationTransferLearningBlock'
    AddOrganizationTransferLearningBlockRequest:
      type: object
      required:
        - name
        - dockerContainer
        - description
        - operatesOn
        - implementationVersion
      properties:
        name:
          type: string
        dockerContainer:
          type: string
        description:
          type: string
        operatesOn:
          $ref: '#/components/schemas/OrganizationTransferLearningOperatesOn'
        objectDetectionLastLayer:
          $ref: '#/components/schemas/ObjectDetectionLastLayer'
        implementationVersion:
          type: integer
        isPublic:
          type: boolean
          description: >-
            Whether this block is publicly available to Edge Impulse users (if
            false, then only for members of the owning organization)
        isPublicForDevices:
          description: >-
            If `isPublic` is true, the list of devices (from latencyDevices) for
            which this model can be shown.
          type: array
          items:
            type: string
        publicProjectTierAvailability:
          $ref: '#/components/schemas/PublicProjectTierAvailability'
        repositoryUrl:
          type: string
          description: URL to the source code of this custom learn block.
        parameters:
          description: >-
            List of parameters, spec'ed according to
            https://docs.edgeimpulse.com/docs/tips-and-tricks/adding-parameters-to-custom-blocks
          type: array
          items:
            type: object
        imageInputScaling:
          $ref: '#/components/schemas/ImageInputScaling'
        indRequiresGpu:
          description: If set, requires this block to be scheduled on GPU.
          type: boolean
        customModelVariants:
          description: >-
            List of custom model variants produced when this block is trained.
            This is experimental and may change in the future.
          type: array
          items:
            $ref: >-
              #/components/schemas/OrganizationTransferLearningBlockCustomVariant
        displayCategory:
          $ref: '#/components/schemas/BlockDisplayCategory'
        indBlockNoLongerAvailable:
          type: boolean
          description: >-
            If set, then this block is no longer available for training; and
            blockNoLongerAvailableReason should be set.
        blockNoLongerAvailableReason:
          type: string
          description: >-
            In Markdown format. Should be set if `indBlockNoLongerAvailable` is
            true, contains migration information for existing users of this
            block.
        sourceCodeDownloadStaffOnly:
          type: boolean
          description: Whether the source code is only available for staff users.
    UpdateOrganizationTransferLearningBlockRequest:
      type: object
      properties:
        name:
          type: string
        dockerContainer:
          type: string
        description:
          type: string
        operatesOn:
          $ref: '#/components/schemas/OrganizationTransferLearningOperatesOn'
        objectDetectionLastLayer:
          $ref: '#/components/schemas/ObjectDetectionLastLayer'
        implementationVersion:
          type: integer
        isPublic:
          type: boolean
          description: >-
            Whether this block is publicly available to Edge Impulse users (if
            false, then only for members of the owning organization)
        isPublicForDevices:
          description: >-
            If `isPublic` is true, the list of devices (from latencyDevices) for
            which this model can be shown.
          type: array
          items:
            type: string
        publicProjectTierAvailability:
          $ref: '#/components/schemas/PublicProjectTierAvailability'
        repositoryUrl:
          type: string
          description: URL to the source code of this custom learn block.
        parameters:
          description: >-
            List of parameters, spec'ed according to
            https://docs.edgeimpulse.com/docs/tips-and-tricks/adding-parameters-to-custom-blocks
          type: array
          items:
            type: object
        imageInputScaling:
          $ref: '#/components/schemas/ImageInputScaling'
        indRequiresGpu:
          description: If set, requires this block to be scheduled on GPU.
          type: boolean
        displayCategory:
          $ref: '#/components/schemas/BlockDisplayCategory'
        customModelVariants:
          description: >-
            List of custom model variants produced when this block is trained.
            This is experimental and may change in the future.
          type: array
          items:
            $ref: >-
              #/components/schemas/OrganizationTransferLearningBlockCustomVariant
        indBlockNoLongerAvailable:
          type: boolean
          description: >-
            If set, then this block is no longer available for training; and
            blockNoLongerAvailableReason should be set.
        blockNoLongerAvailableReason:
          type: string
          description: >-
            In Markdown format. Should be set if `indBlockNoLongerAvailable` is
            true, contains migration information for existing users of this
            block.
        sourceCodeDownloadStaffOnly:
          type: boolean
          description: Whether the source code is only available for staff users.
    ObjectDetectionLastLayer:
      type: string
      enum:
        - mobilenet-ssd
        - fomo
        - yolov2-akida
        - yolov5
        - yolov5v5-drpai
        - yolox
        - yolov7
        - yolo-pro
        - tao-retinanet
        - tao-ssd
        - tao-yolov3
        - tao-yolov4
        - yolov11
        - yolov11-abs
        - paddleocr-detector
        - qc-face-det-lite
    ListOrganizationFilesResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - totalFileSize
            - totalFileCount
            - totalDataItemCount
            - data
          properties:
            filterParseError:
              type: string
            totalFileSize:
              type: integer
            totalFileCount:
              type: integer
            totalDataItemCount:
              type: integer
            data:
              type: array
              items:
                $ref: '#/components/schemas/OrganizationDataItem'
    OrganizationCreateProjectStatusResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          properties:
            status:
              $ref: '#/components/schemas/OrganizationCreateProjectWithFiles'
    TransformationJobStatusEnum:
      type: string
      enum:
        - waiting
        - created
        - started
        - finished
        - failed
    TransformationJobOperatesOnEnum:
      type: string
      enum:
        - file
        - directory
        - standalone
    OrganizationGetCreateProjectsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - jobs
            - totalJobCount
          properties:
            totalJobCount:
              type: integer
            jobs:
              type: array
              items:
                type: object
                required:
                  - id
                  - name
                  - transformJobStatus
                  - uploadJobStatus
                  - uploadType
                  - category
                  - created
                  - totalDownloadFileCount
                  - totalDownloadFileSize
                  - totalDownloadFileSizeString
                  - totalTimeSpentString
                properties:
                  id:
                    type: integer
                  organizationId:
                    type: integer
                  name:
                    type: string
                  uploadType:
                    type: string
                    enum:
                      - dataset
                      - project
                  transformJobStatus:
                    $ref: '#/components/schemas/TransformationJobStatusEnum'
                  uploadJobId:
                    type: integer
                  uploadJobStatus:
                    $ref: '#/components/schemas/TransformationJobStatusEnum'
                  projectOwner:
                    type: string
                  projectId:
                    type: integer
                  projectName:
                    type: string
                  transformationBlockId:
                    type: integer
                  builtinTransformationBlock:
                    type: object
                  transformationBlockName:
                    type: string
                  transformationOperatesOn:
                    $ref: '#/components/schemas/TransformationJobOperatesOnEnum'
                  created:
                    type: string
                    format: date-time
                  outputDatasetName:
                    type: string
                  outputDatasetBucketId:
                    type: integer
                  outputDatasetBucketPath:
                    type: string
                  totalDownloadFileCount:
                    type: integer
                  totalDownloadFileSize:
                    type: integer
                  totalDownloadFileSizeString:
                    type: string
                  totalUploadFileCount:
                    type: integer
                  totalTimeSpentSeconds:
                    type: integer
                    description: Total amount of compute used for this job (in seconds)
                  totalTimeSpentString:
                    type: string
                    description: Total amount of compute used (friendly string)
                  createdByUser:
                    $ref: '#/components/schemas/CreatedUpdatedByUser'
    LogStdoutResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - stdout
            - totalCount
          properties:
            stdout:
              type: array
              items:
                type: object
                required:
                  - created
                  - data
                properties:
                  created:
                    type: string
                    format: date-time
                  data:
                    type: string
                  logLevel:
                    type: string
                    enum:
                      - error
                      - warn
                      - info
                      - debug
            totalCount:
              type: integer
              description: Total number of logs (only the last 1000 lines are returned)
    JobLogsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - logs
          properties:
            logs:
              type: array
              items:
                type: object
                required:
                  - created
                  - data
                properties:
                  created:
                    type: string
                    format: date-time
                  data:
                    type: string
                  logLevel:
                    type: string
                    enum:
                      - error
                      - warn
                      - info
                      - debug
    JobMetricsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          properties:
            cpuUsage:
              type: array
              items:
                $ref: '#/components/schemas/TimeSeriesDataPoint'
            memoryUsage:
              type: array
              items:
                $ref: '#/components/schemas/TimeSeriesDataPoint'
    TimeSeriesDataPoint:
      type: object
      required:
        - timestamp
        - value
      properties:
        timestamp:
          type: string
          format: date-time
        value:
          type: number
    GetJobResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - job
          properties:
            job:
              $ref: '#/components/schemas/Job'
    UpdateOrganizationCreateProjectRequest:
      type: object
      properties:
        transformationParallel:
          type: integer
          description: Number of transformation jobs that can be ran in parallel
        emailRecipientUids:
          description: List of user IDs to notify when a Job succeeds
          type: array
          items:
            type: integer
    UpdateOrganizationCreateEmptyProjectRequest:
      type: object
      required:
        - projectName
      properties:
        projectName:
          type: string
          example: EEG trials
          description: The name of the project.
        projectVisibility:
          $ref: '#/components/schemas/ProjectVisibility'
        projectOwnerUsernameOrEmail:
          type: string
          example: jan@edgeimpulse.com
          description: >-
            The username or email of the owner of the project. This field is
            mandatory when authenticating via API key. If no email is provided
            when authenticating via JWT, the user ID attached to the JWT will be
            user as project owner.
        showGettingStartedWizard:
          type: boolean
          description: >-
            Whether to show the getting started wizard use-case chooser screen
            after the project is created
        tutorialKey:
          $ref: '#/components/schemas/TutorialType'
          description: Optional in-product tutorial to launch after the project is created
    UpdateOrganizationAddCollaboratorRequest:
      type: object
      required:
        - projectId
        - userId
      properties:
        projectId:
          type: integer
          description: The ID of the project to add the collaborator to.
        userId:
          type: integer
          description: >-
            The user ID to add to the project. The user must be an admin of the
            organization.
    AdminGetUsersResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - users
            - total
          properties:
            total:
              type: integer
            users:
              type: array
              items:
                type: object
                required:
                  - id
                  - username
                  - email
                  - name
                  - created
                properties:
                  id:
                    type: integer
                    example: 1
                  username:
                    type: string
                    example: janjongboom
                  email:
                    type: string
                    example: jan@edgeimpulse.com
                  name:
                    type: string
                    example: Jan Jongboom
                  photo:
                    type: string
                    example: https://usercdn.edgeimpulse.com/photos/1.jpg
                  created:
                    type: string
                    format: date-time
                    example: '2019-08-31T17:32:28Z'
                  lastSeen:
                    type: string
                    format: date-time
                    example: '2019-08-31T17:32:28Z'
                  activated:
                    type: boolean
                  from_evaluation:
                    type: boolean
                  tier:
                    $ref: '#/components/schemas/UserTierEnum'
                  deletedDate:
                    type: string
                    format: date-time
                    example: '2024-01-01T00:00:00Z'
    AdminGetUserResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - user
          properties:
            user:
              $ref: '#/components/schemas/AdminApiUser'
    AdminGetReportsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - reports
            - totalCount
          properties:
            reports:
              type: array
              description: List of organization usage reports.
              items:
                $ref: '#/components/schemas/Report'
            totalCount:
              type: integer
    AdminGetReportResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - report
          properties:
            report:
              $ref: '#/components/schemas/Report'
    AdminApiProject:
      type: object
      required:
        - id
        - name
        - owner
      properties:
        id:
          type: integer
          example: 1
        name:
          type: string
          example: Water hammer detection
        description:
          type: string
        created:
          type: string
          format: date-time
          example: '2019-07-21T17:32:28Z'
        owner:
          type: string
          description: User or organization that owns the project
        ownerUserId:
          type: integer
        ownerOrganizationId:
          type: integer
        lastAccessed:
          type: string
          format: date-time
          example: '2019-07-21T17:32:28Z'
        whitelabelId:
          type: integer
          nullable: true
          description: >-
            Unique identifier of the white label this project belongs to, if
            any.
        tier:
          $ref: '#/components/schemas/ProjectTierEnum'
        category:
          $ref: '#/components/schemas/ProjectType'
        deletedDate:
          type: string
          format: date-time
    AdminListProjects:
      type: object
      required:
        - projects
        - total
      properties:
        total:
          type: integer
        projects:
          type: array
          description: Array with projects
          items:
            $ref: '#/components/schemas/AdminApiProject'
    AdminListProjectsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - $ref: '#/components/schemas/AdminListProjects'
    AdminGetOrganizationsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - organizations
            - total
          properties:
            total:
              type: integer
            organizations:
              type: array
              description: Array with organizations
              items:
                type: object
                required:
                  - id
                  - name
                  - created
                  - privateProjectCount
                properties:
                  id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: Edge Impulse Inc.
                  logo:
                    type: string
                  created:
                    type: string
                    format: date-time
                    example: '2019-08-31T17:32:28Z'
                  readme:
                    type: string
                  experiments:
                    type: array
                    items:
                      type: string
                  domain:
                    type: string
                  whitelabelId:
                    type: integer
                  billable:
                    type: boolean
                  privateProjectCount:
                    type: integer
                  entitlementLimits:
                    $ref: '#/components/schemas/EntitlementLimits'
    AdminCreateOrganizationRequest:
      type: object
      required:
        - organizationName
      properties:
        organizationName:
          type: string
          example: EdgeImpulse Inc.
          description: The name of the organization.
        adminId:
          type: integer
          example: 1
          description: Unique identifier of the administrator of the new organization.
    AdminAddUserRequest:
      type: object
      properties:
        usernameOrEmail:
          type: string
          example: janjongboom
          description: >-
            Username or email of the user to be added to the project or
            organization. If no user is provided, the user ID attached to the
            JWT will be used.
    AdminAddProjectUserRequest:
      allOf:
        - $ref: '#/components/schemas/AdminAddUserRequest'
    AdminAddOrganizationUserRequest:
      allOf:
        - $ref: '#/components/schemas/AdminAddUserRequest'
        - type: object
          required:
            - role
            - datasets
          properties:
            role:
              $ref: '#/components/schemas/OrganizationMemberRole'
            datasets:
              description: >-
                Only used for 'guest' users. Limits the datasets the user has
                access to.
              type: array
              items:
                type: string
    FindUserResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - users
          properties:
            users:
              type: array
              items:
                type: object
                required:
                  - id
                  - username
                  - name
                  - created
                  - email
                properties:
                  id:
                    type: integer
                    example: 1
                  username:
                    type: string
                    example: janjongboom
                  name:
                    type: string
                    example: Jan Jongboom
                  photo:
                    type: string
                    example: https://usercdn.edgeimpulse.com/photos/1.jpg
                  created:
                    type: string
                    format: date-time
                    example: '2019-08-31T17:32:28Z'
                  email:
                    type: string
    OrganizationAddDataFolderRequest:
      type: object
      required:
        - dataset
        - bucketId
        - bucketPath
      properties:
        dataset:
          type: string
        bucketId:
          type: integer
        bucketPath:
          type: string
        metadataDataset:
          type: string
        type:
          $ref: '#/components/schemas/OrganizationDatasetTypeEnum'
    OrganizationAddDatasetRequest:
      type: object
      required:
        - dataset
        - tags
        - category
        - type
        - bucket
      properties:
        dataset:
          type: string
        tags:
          type: array
          items:
            type: string
        category:
          type: string
        type:
          $ref: '#/components/schemas/OrganizationDatasetTypeEnum'
        bucket:
          type: object
          required:
            - id
            - path
            - dataItemNamingLevelsDeep
          properties:
            id:
              description: Bucket ID
              type: integer
            path:
              description: Path in the bucket
              type: string
            dataItemNamingLevelsDeep:
              description: >-
                Number of levels deep for data items, e.g. if you have folder
                "test/abc", with value 1 "test" will be a data item, with value
                2 "test/abc" will be a data item. Only used for "clinical" type.
              type: integer
    OrganizationAddDataFolderResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - dataItemCount
            - dataFirstItems
          properties:
            dataItemCount:
              type: integer
            dataFirstItems:
              type: array
              items:
                type: string
    ListOrganizationBucketsUserResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - buckets
          properties:
            buckets:
              type: array
              items:
                type: object
                required:
                  - id
                  - organizationId
                  - organizationName
                  - bucket
                  - region
                  - whitelabelId
                properties:
                  id:
                    type: integer
                  organizationId:
                    type: integer
                  organizationName:
                    type: string
                  bucket:
                    type: string
                    description: S3 bucket
                  region:
                    type: string
                    description: S3 region
                  whitelabelId:
                    type: integer
                    description: >-
                      The unique identifier of the white label this bucket
                      belongs to, if any
    ProjectVersionRequest:
      type: object
      required:
        - description
        - makePublic
      properties:
        bucketId:
          type: integer
          description: Data bucket ID. Keep empty to store in Edge Impulse hosted storage.
        description:
          type: string
        makePublic:
          type: boolean
          description: Whether to make this version available on a public URL.
        runModelTestingWhileVersioning:
          type: boolean
          description: >-
            Whether to run model testing when creating this version (if this
            value is omitted, it will use the current state of
            'runModelTestingWhileVersioning' that is returned in
            ListVersionsResponse).
    PublicProjectLicense:
      type: string
      enum:
        - Apache-2.0
        - BSD-3-Clause
        - BSD-3-Clause-Clear
    ListVersionsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - nextVersion
            - versions
            - customLearnBlocks
            - runModelTestingWhileVersioning
          properties:
            nextVersion:
              type: integer
            versions:
              type: array
              items:
                type: object
                required:
                  - id
                  - version
                  - description
                  - bucket
                  - created
                properties:
                  id:
                    type: integer
                  version:
                    type: integer
                  description:
                    type: string
                  bucket:
                    type: object
                    required:
                      - path
                    properties:
                      id:
                        type: integer
                      name:
                        type: string
                      organizationName:
                        type: string
                      path:
                        type: string
                      bucket:
                        type: string
                  created:
                    type: string
                    format: date-time
                  userId:
                    type: integer
                  userName:
                    type: string
                  userPhoto:
                    type: string
                  publicProjectId:
                    type: integer
                  publicProjectUrl:
                    type: string
                  trainingAccuracy:
                    type: number
                    description: Accuracy calculated during training, using validation set.
                  testAccuracy:
                    type: number
                    description: Accuracy on test set.
                  trainingmAP50:
                    type: number
                    description: >-
                      Mean Average Precision @ IoU=50 on validation set (for
                      object detection projects).
                  testmAP50:
                    type: number
                    description: >-
                      Mean Average Precision @ IoU=50 on test set (for object
                      detection projects).
                  accuracyBasedOnImpulse:
                    type: string
                    description: >-
                      If your project had multiple impulses, this field
                      indicates which impulse was used to calculate the accuracy
                      metrics.
                  totalSamplesCount:
                    type: string
                  license:
                    $ref: '#/components/schemas/PublicProjectLicense'
            customLearnBlocks:
              type: array
              description: >-
                If you have any custom learn blocks (e.g. blocks you pushed
                through Bring Your Own Model), then these are listed here. We
                use these to show a warning in the UI that these blocks will
                also be available in a public version.
              items:
                type: object
                required:
                  - author
                  - name
                properties:
                  author:
                    type: string
                  name:
                    type: string
            runModelTestingWhileVersioning:
              type: boolean
              description: >-
                Whether the 'Run model testing while versioning' checkbox should
                be enabled.
    ListPublicVersionsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - versions
          properties:
            versions:
              type: array
              items:
                type: object
                required:
                  - version
                  - publicProjectId
                  - publicProjectUrl
                properties:
                  version:
                    type: integer
                  publicProjectId:
                    type: integer
                  publicProjectUrl:
                    type: string
    UpdateVersionRequest:
      type: object
      properties:
        description:
          type: string
    RestoreProjectRequest:
      type: object
      required:
        - projectId
        - projectApiKey
        - versionId
      properties:
        projectId:
          type: integer
          description: Source project ID
        projectApiKey:
          type: string
          description: Source project API key
        versionId:
          type: integer
          description: Source project version ID
    RestoreProjectFromPublicRequest:
      type: object
      required:
        - projectId
      properties:
        projectId:
          type: integer
          description: Source project ID
    SegmentSampleRequest:
      type: object
      required:
        - segments
      properties:
        segments:
          type: array
          items:
            type: object
            required:
              - startMs
              - endMs
            properties:
              startMs:
                type: integer
              endMs:
                type: integer
    TransferOwnershipOrganizationRequest:
      type: object
      required:
        - organizationId
      properties:
        organizationId:
          type: integer
    FindSegmentSampleRequest:
      type: object
      required:
        - shiftSegments
        - segmentLengthMs
      properties:
        shiftSegments:
          type: boolean
          description: >-
            If set, the segments are automatically shifted randomly, to make the
            dataset distribution more uniform.
        segmentLengthMs:
          type: integer
    FindSegmentSampleResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - segments
          properties:
            segments:
              type: array
              items:
                type: object
                required:
                  - startMs
                  - endMs
                properties:
                  startMs:
                    type: integer
                  endMs:
                    type: integer
    OrganizationBulkMetadataRequest:
      type: object
      required:
        - dataset
        - csvFile
      properties:
        dataset:
          type: string
        csvFile:
          type: string
          format: binary
    PortalInfoResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - id
            - name
            - description
            - organizationId
            - organizationName
            - bucketName
          properties:
            name:
              type: string
            description:
              type: string
            organizationId:
              type: integer
            organizationName:
              type: string
            organizationLogo:
              type: string
            bucketName:
              type: string
    ObjectDetectionLabelQueueResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - samples
          properties:
            samples:
              type: array
              items:
                type: object
                required:
                  - id
                properties:
                  id:
                    type: integer
    ObjectDetectionLabelQueueCountResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - samplesCount
          properties:
            samplesCount:
              type: integer
    BoundingBox:
      type: object
      description: >-
        This has the _absolute values_ for x/y/w/h (so 0..x (where x is the w/h
        of the image))
      required:
        - label
        - x
        - 'y'
        - width
        - height
      properties:
        label:
          type: string
        x:
          type: integer
        'y':
          type: integer
        width:
          type: integer
        height:
          type: integer
    BoundingBoxWithScore:
      type: object
      description: This has the _ratio_ for x/y/w/h (so 0..1)
      required:
        - label
        - x
        - 'y'
        - width
        - height
        - score
      properties:
        label:
          type: string
        x:
          type: number
        'y':
          type: number
        width:
          type: number
        height:
          type: number
        score:
          type: number
    SampleBoundingBoxesRequest:
      type: object
      required:
        - boundingBoxes
      properties:
        boundingBoxes:
          type: array
          items:
            $ref: '#/components/schemas/BoundingBox'
    SampleLabelMapRequest:
      type: object
      required:
        - labelMap
      properties:
        labelMap:
          $ref: '#/components/schemas/SampleLabelMapLabels'
    TrackObjectsRequest:
      type: object
      required:
        - sourceSampleId
        - nextSampleId
      properties:
        sourceSampleId:
          type: integer
        nextSampleId:
          type: integer
    TrackObjectsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - boundingBoxes
          properties:
            boundingBoxes:
              type: array
              items:
                $ref: '#/components/schemas/BoundingBox'
    ExportGetUrlResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - hasExport
          properties:
            hasExport:
              type: boolean
            created:
              description: Set if hasExport is true
              type: string
              format: date-time
            url:
              description: Set if hasExport is true
              type: string
    GetSyntiantPosteriorResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - hasPosteriorParameters
          properties:
            hasPosteriorParameters:
              type: boolean
            parameters:
              type: object
    SetSyntiantPosteriorRequest:
      type: object
      required:
        - parameters
      properties:
        parameters:
          type: object
    FindSyntiantPosteriorRequest:
      type: object
      required:
        - targetWords
        - referenceSet
      properties:
        targetWords:
          type: array
          items:
            type: string
        referenceSet:
          type: string
          enum:
            - 600_seconds
            - full
            - custom
            - no_calibration
        wavFile:
          type: string
          format: binary
        metaCsvFile:
          type: string
          format: binary
        deploymentTarget:
          type: string
          enum:
            - syntiant-ndp101
            - syntiant-ndp101-lib
            - syntiant-ndp120-lib
            - syntiant-ndp120-lib-tdk-v14
            - syntiant-nicla-ndp120
            - syntiant-avnet-rasyn
            - syntiant-ndp120-lib-ndp-v1-15-0
    GetDeploymentResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - hasDeployment
          properties:
            hasDeployment:
              type: boolean
            version:
              type: integer
    GetLastDeploymentBuildResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - hasBuild
          properties:
            hasBuild:
              type: boolean
              description: >-
                Does the deployment build still exist? (Builds are deleted if
                they are no longer valid for the project)
            lastBuild:
              type: object
              required:
                - version
                - deploymentType
                - engine
                - created
              properties:
                version:
                  type: integer
                  description: The build version, incremented after each deployment build
                deploymentType:
                  type: string
                  description: Deployment type of the build
                engine:
                  $ref: '#/components/schemas/DeploymentTargetEngine'
                modelType:
                  $ref: '#/components/schemas/KerasModelTypeEnum'
                created:
                  type: string
                  format: date-time
                  description: The time this build was created
            lastDeploymentTarget:
              $ref: '#/components/schemas/ProjectDeploymentTarget'
    GetModelMonitoringDeploymentsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - deployments
          properties:
            deployments:
              type: array
              items:
                type: object
                required:
                  - id
                  - created
                  - deploymentType
                properties:
                  id:
                    type: number
                  version:
                    type: number
                  created:
                    type: string
                    format: date-time
                  deploymentType:
                    type: string
                  engine:
                    $ref: '#/components/schemas/DeploymentTargetEngine'
                  modelType:
                    $ref: '#/components/schemas/KerasModelTypeEnum'
                  impulseId:
                    type: number
                  impulseName:
                    type: string
    ThirdPartyAuth:
      type: object
      required:
        - id
        - name
        - description
        - logo
        - domains
        - created
      properties:
        id:
          type: integer
        name:
          type: string
        description:
          type: string
        logo:
          type: string
        domains:
          type: array
          items:
            type: string
        created:
          type: string
          format: date-time
    GetThirdPartyAuthResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - auth
          properties:
            auth:
              $ref: '#/components/schemas/ThirdPartyAuth'
    AuthorizeThirdPartyRequest:
      type: object
      required:
        - nextUrl
      properties:
        nextUrl:
          description: The URL to redirect to after authorization is completed.
          type: string
    GetAllThirdPartyAuthResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - auths
          properties:
            auths:
              type: array
              items:
                $ref: '#/components/schemas/ThirdPartyAuth'
    CreateThirdPartyAuthRequest:
      type: object
      required:
        - name
        - description
        - logo
        - domains
      properties:
        name:
          type: string
        description:
          type: string
        logo:
          type: string
        domains:
          type: array
          items:
            type: string
        secretKey:
          type: string
        apiKey:
          type: string
    CreateThirdPartyAuthResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - id
            - secretKey
            - apiKey
          properties:
            id:
              type: integer
            secretKey:
              type: string
            apiKey:
              type: string
    UpdateThirdPartyAuthRequest:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        logo:
          type: string
        domains:
          type: array
          items:
            type: string
    CreateUserThirdPartyRequest:
      type: object
      required:
        - name
        - username
        - email
        - privacyPolicy
      properties:
        name:
          type: string
          description: Your name
          example: Jan Jongboom
        username:
          type: string
          description: >-
            Username, minimum 4 and maximum 30 characters. May contain
            alphanumeric characters, hyphens, underscores and dots. Validated
            according to
            `^(?=.{4,30}$)(?![_.])(?!.*[_.]{2})[a-zA-Z0-9._-]+(?<![_.])$`.
          example: janjongboom
        email:
          type: string
          description: >-
            E-mail address. Will need to be validated before the account will
            become active.
          example: jan@edgeimpulse.com
        projectName:
          type: string
          description: >-
            A project will automatically be created. Sets the name of the first
            project. If not set, this will be derived from the username.
        privacyPolicy:
          type: boolean
          description: Whether the user accepted the privacy policy
    CreateUserThirdPartyResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - status
          properties:
            status:
              type: string
              enum:
                - userWasCreated
                - userNotManagedByThirdParty
                - userAlreadyExists
            jwtToken:
              type: string
    UserByThirdPartyActivationRequest:
      type: object
      required:
        - activationCode
      properties:
        activationCode:
          type: string
    ActivateUserByThirdPartyActivationCodeRequest:
      type: object
      required:
        - activationCode
        - password
        - username
      properties:
        activationCode:
          type: string
        password:
          type: string
          description: Password, minimum length 8 characters.
        name:
          type: string
          description: Your name
          example: Jan Jongboom
        username:
          type: string
          description: >-
            Username, minimum 4 and maximum 30 characters. May contain
            alphanumeric characters, hyphens, underscores and dots. Validated
            according to
            `^(?=.{4,30}$)(?![_.])(?!.*[_.]{2})[a-zA-Z0-9._-]+(?<![_.])$`.
          example: janjongboom
        privacyPolicy:
          type: boolean
          description: Whether the user accepted the privacy policy
    CalculateDataQualityMetricsRequest:
      type: object
      properties:
        representation:
          description: Type of representation to use for calculating metrics.
          type: string
          enum:
            - keywords
            - images
            - current-impulse
            - current-impulse-embeddings
    ProjectDownloadsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - downloads
          properties:
            downloads:
              type: array
              items:
                $ref: '#/components/schemas/Download'
    CropSampleResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - requiresProcessing
          properties:
            requiresProcessing:
              type: boolean
    OrganizationPipelineStep:
      type: object
      required:
        - name
      properties:
        name:
          type: string
        filter:
          type: string
        pathFilters:
          type: array
          description: >-
            Set of paths to apply the transformation to, used for creating
            transformation jobs on default datasets. This option is experimental
            and may change in the future.
          items:
            $ref: '#/components/schemas/OrganizationCreateProjectPathFilter'
        uploadType:
          type: string
          enum:
            - project
            - dataset
        projectId:
          type: integer
        newProjectName:
          type: string
        projectApiKey:
          type: string
        projectHmacKey:
          type: string
        transformationBlockId:
          type: integer
        builtinTransformationBlock:
          type: object
        category:
          type: string
          enum:
            - training
            - testing
            - split
        outputDatasetName:
          type: string
        outputDatasetBucketId:
          type: integer
        outputDatasetBucketPath:
          type: string
        outputPathInDataset:
          description: >-
            Path within the selected dataset to upload transformed files into.
            Used only when uploading into a default (non-clinical) dataset.
          type: string
        outputDatasetPathRule:
          $ref: '#/components/schemas/OrganizationCreateProjectOutputDatasetPathRule'
        label:
          type: string
        transformationParallel:
          type: integer
        extraCliArguments:
          type: string
        parameters:
          type: object
          additionalProperties:
            type: string
    OrganizationPipelineRunStep:
      type: object
      required:
        - name
        - status
      properties:
        name:
          type: string
        transformationJob:
          $ref: '#/components/schemas/OrganizationCreateProject'
        filter:
          type: string
        uploadType:
          type: string
          enum:
            - project
            - dataset
        projectId:
          type: integer
        newProjectName:
          type: string
        projectApiKey:
          type: string
        projectHmacKey:
          type: string
        transformationBlockId:
          type: integer
        builtinTransformationBlock:
          type: object
        category:
          type: string
          enum:
            - training
            - testing
            - split
        outputDatasetName:
          type: string
        outputDatasetBucketId:
          type: integer
        outputDatasetBucketPath:
          type: string
        label:
          type: string
        extraCliArguments:
          type: string
        parameters:
          type: object
          additionalProperties:
            type: string
    OrganizationPipelineItemCount:
      type: object
      required:
        - itemCount
        - itemCountChecklistOK
        - itemCountChecklistFailed
      properties:
        itemCount:
          type: integer
        itemCountChecklistOK:
          type: integer
        itemCountChecklistFailed:
          type: integer
    OrganizationPipelineRun:
      type: object
      required:
        - id
        - steps
        - created
      properties:
        id:
          type: integer
        steps:
          type: array
          items:
            $ref: '#/components/schemas/OrganizationPipelineRunStep'
        created:
          type: string
          format: date-time
        finished:
          type: string
          format: date-time
        itemCountBefore:
          description: >-
            Item count before the pipeline ran, only set when the pipeline has a
            dataset attached.
          $ref: '#/components/schemas/OrganizationPipelineItemCount'
        itemCountAfter:
          description: >-
            Item count after the pipeline ran, only set when the pipeline has a
            dataset attached.
          $ref: '#/components/schemas/OrganizationPipelineItemCount'
        itemCountImportIntoProjectFailed:
          description: >-
            Number of data items that failed to import into a project (through
            the s3-to-project, portal-to-project or dataset-to-project)
            transform blocks
          type: integer
    OrganizationPipeline:
      type: object
      required:
        - id
        - name
        - description
        - steps
        - created
        - emailRecipientUids
        - whenToEmail
      properties:
        id:
          type: integer
        name:
          type: string
        description:
          type: string
        intervalStr:
          type: string
          description: 15m for every 15 minutes, 2h for every 2 hours, 1d for every 1 day
        steps:
          type: array
          items:
            $ref: '#/components/schemas/OrganizationPipelineStep'
        nextRun:
          type: string
          format: date-time
        created:
          type: string
          format: date-time
        currentRun:
          $ref: '#/components/schemas/OrganizationPipelineRun'
        lastRun:
          $ref: '#/components/schemas/OrganizationPipelineRun'
        feedingIntoDataset:
          type: object
          required:
            - dataset
            - datasetLink
            - itemCount
            - itemCountChecklistOK
            - itemCountChecklistError
          properties:
            dataset:
              type: string
            datasetLink:
              type: string
            itemCount:
              type: integer
            itemCountChecklistOK:
              type: integer
            itemCountChecklistError:
              type: integer
            datasetType:
              $ref: '#/components/schemas/OrganizationDatasetTypeEnum'
        feedingIntoProject:
          type: object
          required:
            - id
            - name
            - projectLink
            - itemCount
          properties:
            id:
              type: integer
            name:
              type: string
            projectLink:
              type: string
            itemCount:
              type: integer
        emailRecipientUids:
          type: array
          items:
            type: integer
        lastRunStartError:
          type: string
        notificationWebhook:
          type: string
        whenToEmail:
          type: string
          enum:
            - always
            - on_new_data
            - never
    OrganizationUpdatePipelineBody:
      type: object
      required:
        - name
        - description
        - steps
        - emailRecipientUids
        - whenToEmail
      properties:
        name:
          type: string
        description:
          type: string
        intervalStr:
          type: string
          description: 15m for every 15 minutes, 2h for every 2 hours, 1d for every 1 day
        steps:
          type: array
          items:
            $ref: '#/components/schemas/OrganizationPipelineStep'
        dataset:
          type: string
        projectId:
          type: integer
        emailRecipientUids:
          type: array
          items:
            type: integer
        notificationWebhook:
          type: string
        whenToEmail:
          type: string
          enum:
            - always
            - on_new_data
            - never
        archived:
          type: boolean
    ListOrganizationPipelinesResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - pipelines
          properties:
            pipelines:
              type: array
              items:
                $ref: '#/components/schemas/OrganizationPipeline'
    GetOrganizationPipelinesResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - pipeline
          properties:
            pipeline:
              $ref: '#/components/schemas/OrganizationPipeline'
    RunOrganizationPipelineResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - pipelineRun
          properties:
            pipelineRun:
              $ref: '#/components/schemas/OrganizationPipelineRun'
    UploadReadmeImageResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - url
          properties:
            url:
              type: string
    UploadAssetRequest:
      type: object
      properties:
        image:
          type: string
          format: binary
    UploadAssetResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          properties:
            url:
              type: string
    SetOrganizationDataDatasetRequest:
      type: object
      required:
        - dataset
      properties:
        dataset:
          type: string
    DspFeatureImportanceResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - hasFeatureImportance
            - labels
          properties:
            hasFeatureImportance:
              type: boolean
            labels:
              type: object
              additionalProperties:
                type: object
                required:
                  - features
                properties:
                  features:
                    type: array
                    items:
                      type: object
                      required:
                        - axis
                        - importance
                      properties:
                        axis:
                          type: string
                        importance:
                          type: number
    DspAutotunerResults:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - results
          properties:
            results:
              type: array
              items:
                type: object
                required:
                  - key
                  - value
                properties:
                  key:
                    type: string
                  value:
                    type: string
    DspPerformanceAllVariantsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          properties:
            performance:
              type: array
              description: List of performance estimates for each supported MCU.
              items:
                type: object
                required:
                  - mcu
                  - latency
                  - ram
                properties:
                  mcu:
                    type: string
                  latency:
                    type: integer
                    description: Latency estimate, in ms
                  ram:
                    type: integer
                    description: RAM estimate, in bytes
    DeploymentTargetEngine:
      type: string
      enum:
        - tflite
        - tflite-eon
        - tflite-eon-ram-optimized
        - tensorrt
        - tensaiflow
        - drp-ai
        - tidl
        - akida
        - syntiant
        - memryx
        - neox
        - ethos-linux
        - st-aton
        - ceva-npn
        - nordic-axon
        - vlm-connector
    DeploymentTargetVariant:
      type: object
      required:
        - variant
        - supported
      properties:
        variant:
          $ref: '#/components/schemas/KerasModelVariantEnum'
        supported:
          type: boolean
        hint:
          type: string
    DeploymentTarget:
      type: object
      required:
        - name
        - description
        - image
        - imageClasses
        - format
        - hasEonCompiler
        - hasTensorRT
        - hasTensaiFlow
        - hasDRPAI
        - hasTIDL
        - hasAkida
        - hasMemryx
        - hasStAton
        - hasCevaNpn
        - hasNordicAxon
        - hideOptimizations
        - uiSection
        - supportedEngines
        - preferredEngine
        - modelVariants
        - docsUrl
        - parameters
      properties:
        name:
          type: string
        description:
          type: string
        image:
          type: string
        imageClasses:
          type: string
        format:
          type: string
        latencyDevice:
          type: string
        hasEonCompiler:
          type: boolean
          description: Preferably use supportedEngines / preferredEngine
        hasTensorRT:
          type: boolean
          description: Preferably use supportedEngines / preferredEngine
        hasTensaiFlow:
          type: boolean
          description: Preferably use supportedEngines / preferredEngine
        hasDRPAI:
          type: boolean
          description: Preferably use supportedEngines / preferredEngine
        hasTIDL:
          type: boolean
          description: Preferably use supportedEngines / preferredEngine
        hasAkida:
          type: boolean
          description: Preferably use supportedEngines / preferredEngine
        hasMemryx:
          type: boolean
          description: Preferably use supportedEngines / preferredEngine
        hasStAton:
          type: boolean
          description: Preferably use supportedEngines / preferredEngine
        hasCevaNpn:
          type: boolean
          description: Preferably use supportedEngines / preferredEngine
        hasNordicAxon:
          type: boolean
          description: Preferably use supportedEngines / preferredEngine
        hideOptimizations:
          type: boolean
        badge:
          type: object
          required:
            - name
            - description
          properties:
            name:
              type: string
            description:
              type: string
        uiSection:
          type: string
          enum:
            - library
            - firmware
            - mobile
            - hidden
        customDeployId:
          type: integer
        customDeployOrganizationId:
          type: integer
        integrateUrl:
          type: string
        ownerOrganizationName:
          type: string
        supportedEngines:
          type: array
          items:
            $ref: '#/components/schemas/DeploymentTargetEngine'
        preferredEngine:
          $ref: '#/components/schemas/DeploymentTargetEngine'
        url:
          type: string
        docsUrl:
          type: string
        firmwareRepoUrl:
          type: string
        modelVariants:
          type: array
          items:
            $ref: '#/components/schemas/DeploymentTargetVariant'
        parameters:
          type: array
          items:
            $ref: '#/components/schemas/DSPGroupItem'
        redirect:
          type: object
          description: >-
            An optional redirect field for integration partners to be shown in
            addition to the docs link, i.e. for directing users to a partner's
            website or application once deployment completes. This is
            experimental and may change in the future.
          properties:
            url:
              type: string
            text:
              type: string
    DeploymentTargetsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - targets
          properties:
            targets:
              type: array
              items:
                $ref: '#/components/schemas/DeploymentTarget'
    ProjectDeploymentTarget:
      allOf:
        - $ref: '#/components/schemas/DeploymentTarget'
        - type: object
          required:
            - recommendedForProject
            - disabledForProject
          properties:
            recommendedForProject:
              type: boolean
              description: >-
                Whether this deployment target is recommended for the project
                based on connected devices.
            disabledForProject:
              type: boolean
              description: >-
                Whether this deployment target is disabled for the project based
                on various attributes of the project.
            reasonTargetDisabled:
              type: string
              description: >-
                If the deployment target is disabled for the project, this gives
                the reason why.
    ProjectDeploymentTargetsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - targets
          properties:
            targets:
              type: array
              items:
                $ref: '#/components/schemas/ProjectDeploymentTarget'
    DeploymentOptionsOrder:
      type: array
      description: >-
        Optional attribute allowing a whitelabel to customize the order of
        deployment options in the deployment view, given as an in-order list of
        deployment options.
      items:
        type: string
        description: Deployment option name
        example: org-1
    Theme:
      type: object
      required:
        - id
        - name
        - favicon
        - logos
        - colors
      properties:
        id:
          type: integer
        ownerUserId:
          type: integer
        ownerOrganizationId:
          type: integer
        name:
          type: string
        favicon:
          type: object
          properties:
            favicon32:
              type: string
            favicon57:
              type: string
            favicon76:
              type: string
            favicon96:
              type: string
            favicon120:
              type: string
            favicon128:
              type: string
            favicon144:
              type: string
            favicon152:
              type: string
            favicon180:
              type: string
            favicon228:
              type: string
        logos:
          type: object
          properties:
            primary:
              type: string
            primaryPng:
              type: string
            primaryWhite:
              type: string
            loginLogo:
              type: string
            loginLogoWhite:
              type: string
            mark:
              type: string
            markWhite:
              type: string
            deviceLogo:
              type: string
        colors:
          type: object
          properties:
            primaryColor:
              type: string
            primaryColorRgb:
              type: array
              items:
                type: number
            primaryColorGradientEnd:
              type: string
    GetThemesResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - themes
          properties:
            themes:
              type: array
              items:
                $ref: '#/components/schemas/Theme'
    GetThemeResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          properties:
            theme:
              $ref: '#/components/schemas/Theme'
    UpdateJobRequest:
      type: object
      properties:
        jobNotificationUids:
          type: array
          description: The IDs of users who should be notified when a job is finished.
          items:
            type: integer
    UpdateThemeLogosRequest:
      type: object
      description: Only fields set in this object will be updated.
      properties:
        primary:
          type: string
          description: Primary logo URL
        primaryWhite:
          type: string
          description: Primary logo for dark background URL
        login:
          type: string
          description: Login logo URL
        loginWhite:
          type: string
          description: Login logo for dark background URL
        mark:
          type: string
          description: Mark URL
        markWhite:
          type: string
          description: Mark for dark background URL
        deviceLogo:
          type: string
          description: Device logo URL
    UpdateThemeColorsRequest:
      type: object
      description: Only fields set in this object will be updated.
      properties:
        primaryColor:
          type: string
          description: Primary color in hex format
        primaryColorGradientEnd:
          type: string
          description: Primary color gradient end in hex format
    UploadImageRequest:
      type: object
      required:
        - image
      properties:
        image:
          type: string
          format: binary
    Whitelabel:
      type: object
      required:
        - id
        - name
        - domain
        - themeId
        - identityProviders
        - allowPasswordAuth
        - deploymentTargets
        - allDeploymentTargets
        - allowSignup
        - allowFreeProjects
        - supportedProjectTypes
        - allowNewProjectUi
        - learningBlocks
        - allLearningBlocks
        - developmentBoards
        - allDevelopmentBoards
      properties:
        id:
          type: integer
        name:
          type: string
        domain:
          type: string
        ownerOrganizationId:
          type: integer
        themeId:
          type: integer
        theme:
          $ref: '#/components/schemas/Theme'
        identityProviders:
          type: array
          items:
            type: string
        allowPasswordAuth:
          type: boolean
        deploymentTargets:
          description: List of deployment targets enabled for this white label
          type: array
          items:
            type: string
        allDeploymentTargets:
          description: List of all supported deployment targets
          type: array
          items:
            type: string
        customDeploymentBlocks:
          description: List of custom deployment blocks available to this white label
          type: array
          items:
            type: object
            required:
              - name
              - id
            properties:
              name:
                type: string
                description: The name of the custom deployment block
              id:
                type: number
                description: The custom deployment block ID
        deploymentOptionsOrder:
          $ref: '#/components/schemas/DeploymentOptionsOrder'
        allowSignup:
          type: boolean
        allowFreeProjects:
          type: boolean
        exposePublicProjects:
          type: boolean
        defaultDeploymentTarget:
          type: string
          description: The name of the default deployment target for this white label
          nullable: true
          example: C++ Library
        supportedProjectTypes:
          type: array
          items:
            $ref: '#/components/schemas/ProjectType'
        allowNewProjectUi:
          type: boolean
          description: >-
            Whether the new project UI should be enabled for this white label or
            not.
        learningBlocks:
          description: List of learning blocks enabled for this white label
          type: array
          items:
            type: string
        allLearningBlocks:
          description: List of all supported learning blocks
          type: array
          items:
            type: object
            required:
              - title
              - type
            properties:
              title:
                type: string
                description: The name of the learning block
              type:
                type: string
                description: The learning block type
        developmentBoards:
          type: array
          items:
            $ref: '#/components/schemas/DevelopmentBoardResponse'
        allDevelopmentBoards:
          type: array
          items:
            $ref: '#/components/schemas/DevelopmentBoardResponse'
        organizationsLimit:
          type: integer
          description: >-
            The maximum number of organizations that can be created under this
            white label.
        disablePublicEntities:
          type: boolean
          description: >-
            Whether public entities (like projects, user profiles, etc.) are
            disabled for this whitelabel instance.
        disableMarketingFeatures:
          type: boolean
          description: >-
            Whether marketing features (marketing cookies, HubSpot tracking,
            etc.) are disabled for this whitelabel instance.
        disableForumAccess:
          type: boolean
          description: Whether forum access is disabled for this whitelabel instance.
        customLimits:
          type: object
          description: Custom limits for this whitelabel instance.
    GetAllWhitelabelsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - whitelabels
          properties:
            whitelabels:
              type: array
              items:
                $ref: '#/components/schemas/Whitelabel'
    CreateWhitelabelRequest:
      type: object
      required:
        - name
        - domain
        - ownerOrganizationId
      properties:
        name:
          type: string
          example: Octopus's Garden
          description: The name of the white label.
        domain:
          type: string
          example: underthesea.com
          description: The domain where the white label lives.
        ownerOrganizationId:
          type: integer
        identityProviders:
          type: array
          items:
            type: string
          description: The list of allowed identity providers.
          example: '[google, okta, github]'
        allowPasswordAuth:
          type: boolean
          description: Whether this white label accepts password based authentication.
        deploymentTargets:
          type: array
          items:
            type: string
          description: The list of deployment targets to show on the UI
          example: '[''C++ library'', ''Arduino library'', ''Arduino Nano 33 BLE Sense'']'
        documentationUrl:
          type: string
          example: https://docs.edgeimpulse.com/renesas/
          description: Custom documentation URL
        allowSignup:
          type: boolean
          description: Whether this white label allow sign ups or not.
        allowFreeProjects:
          type: boolean
          description: Whether this white label allows the creation of free projects.
        sandboxed:
          type: boolean
          description: Whether this white label should work in sandboxed mode or not.
        exposePublicProjects:
          type: boolean
          description: >-
            Whether public projects created in this white label scope should be
            exposed through the Public Projects API or not.
        learningBlocks:
          type: array
          items:
            type: string
          description: The list of learning block types to show on the UI
          example: '[''keras'']'
        organizationsLimit:
          type: integer
          nullable: true
          description: >-
            The maximum number of organizations that can be created under this
            white label.
        disableMarketingFeatures:
          type: boolean
          description: >
            Controls whether marketing features (marketing cookies, HubSpot
            tracking, etc.) are disabled for this whitelabel instance.
        disableForumAccess:
          type: boolean
          description: >
            Controls whether forum access is disabled for this whitelabel
            instance.
        customLimits:
          type: object
          description: Custom limits for this whitelabel instance.
    CreateWhitelabelResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - id
            - themeId
          properties:
            id:
              type: integer
              description: Unique whitelabel identifier
            themeId:
              type: integer
              description: Unique identifier for the theme associated with the white label
    GetWhitelabelResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          properties:
            whitelabel:
              $ref: '#/components/schemas/Whitelabel'
    GetWhitelabelDomainResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - domain
          properties:
            domain:
              type: string
            logo:
              type: string
    UpdateWhitelabelInternalRequest:
      type: object
      properties:
        organizationsLimit:
          type: integer
          nullable: true
          description: >-
            The maximum number of organizations that can be created under this
            white label.
        disablePublicEntities:
          type: boolean
          description: >
            Controls whether public entities (like projects, user profiles,
            etc.) are disabled for this whitelabel instance.
        disableMarketingFeatures:
          type: boolean
          description: >
            Controls whether marketing features (marketing cookies, HubSpot
            tracking, etc.) are disabled for this whitelabel instance.
        disableForumAccess:
          type: boolean
          description: >
            Controls whether forum access is disabled for this whitelabel
            instance.
        customLimits:
          type: object
          description: Custom limits for this whitelabel instance.
    UpdateWhitelabelDeploymentTargetsRequest:
      type: object
      properties:
        targets:
          type: array
          description: >-
            The names of the deployment targets that are enabled for this
            whitelabel.
          items:
            type: string
    UpdateWhitelabelDeploymentOptionsOrderRequest:
      type: object
      properties:
        order:
          $ref: '#/components/schemas/DeploymentOptionsOrder'
    UpdateWhitelabelLearningBlocksRequest:
      type: object
      properties:
        learningBlocks:
          type: array
          description: >-
            The types of the learning blocks that are enabled for this
            whitelabel.
          items:
            type: string
    ObjectDetectionAutoLabelResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - results
            - allLabels
          properties:
            results:
              type: array
              items:
                type: object
                required:
                  - label
                  - x
                  - 'y'
                  - width
                  - height
                properties:
                  label:
                    type: string
                  x:
                    type: integer
                  'y':
                    type: integer
                  width:
                    type: integer
                  height:
                    type: integer
            allLabels:
              type: array
              items:
                type: string
    ObjectDetectionAutoLabelRequest:
      type: object
      required:
        - neuralNetwork
      properties:
        neuralNetwork:
          type: string
          enum:
            - yolov5
            - yolo-pro
            - currentProject
    ListOrganizationSecretsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - secrets
          properties:
            secrets:
              type: array
              items:
                type: object
                required:
                  - id
                  - name
                  - description
                  - created
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  description:
                    type: string
                  created:
                    type: string
                    format: date-time
                  createdByUser:
                    $ref: '#/components/schemas/CreatedUpdatedByUser'
    AddOrganizationSecretRequest:
      type: object
      required:
        - name
        - description
        - secret
      properties:
        name:
          type: string
        description:
          type: string
        secret:
          type: string
    DataExplorerSettings:
      type: object
      properties:
        preset:
          description: Preset to use for the data explorer.
          type: string
          enum:
            - keywords
            - images
            - current-impulse
            - current-impulse-embeddings
        dimensionalityReductionTechnique:
          type: string
          enum:
            - tsne
            - pca
        impulseId:
          type: integer
          description: >-
            Which impulse to use (if preset is either 'current-impulse' or
            'current-impulse-embeddings'). If this is undefined then
            'defaultImpulseId' is used.
    GetDataExplorerSettingsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - $ref: '#/components/schemas/DataExplorerSettings'
        - type: object
          required:
            - dimensionalityReductionRecommendation
          properties:
            dimensionalityReductionRecommendation:
              type: string
              enum:
                - tsne
                - pca
    GetUserNeedToSetPasswordResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          properties:
            email:
              type: string
              description: User email
            needPassword:
              type: boolean
              description: Whether the user needs to set its password or not
            whitelabels:
              type: array
              items:
                type: string
              description: White label domains the user belongs to, if any
            trials:
              type: array
              description: Current or past enterprise trials.
              items:
                $ref: '#/components/schemas/EnterpriseTrial'
            emailVerified:
              type: boolean
              description: Whether the user has verified its email address or not
            idps:
              type: array
              description: >-
                List of unique identifiers for identity providers associated
                with the user.
              example:
                - okta
                - google
              items:
                type: string
    SetUserPasswordRequest:
      type: object
      required:
        - accessToken
        - identityProvider
        - password
      properties:
        accessToken:
          type: string
        identityProvider:
          type: string
        password:
          type: string
    GetOrganizationDatasetResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - dataset
          properties:
            dataset:
              $ref: '#/components/schemas/OrganizationDataset'
    UpdateOrganizationDatasetRequest:
      type: object
      properties:
        dataset:
          type: string
        tags:
          type: array
          items:
            type: string
        category:
          type: string
        type:
          $ref: '#/components/schemas/OrganizationDatasetTypeEnum'
        bucket:
          type: object
          required:
            - id
            - path
            - dataItemNamingLevelsDeep
          properties:
            id:
              description: Bucket ID
              type: integer
            path:
              description: Path in the bucket
              type: string
            dataItemNamingLevelsDeep:
              description: >-
                Number of levels deep for data items, e.g. if you have folder
                "test/abc", with value 1 "test" will be a data item, with value
                2 "test/abc" will be a data item. Only used for "clinical"
                datasets.
              type: integer
    LastModificationDateResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - modificationDate
          properties:
            lastModificationDate:
              type: string
              format: date-time
            lastVersionDate:
              type: string
              format: date-time
    CreateDeveloperProfileResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - organizationId
          properties:
            organizationId:
              type: integer
            link:
              type: string
    AdminUpdateUserRequest:
      type: object
      description: Only fields set in this object will be updated.
      properties:
        email:
          type: string
          description: >-
            New email. This will also update the forum's email address but the
            user may need to logout/login back
          example: quijote@lamancha.es
        name:
          type: string
          description: New user full name
          example: Don Quijote de la Mancha
        activated:
          type: boolean
          description: >-
            Whether the user is active or not. Can only go from inactive to
            active.
          example: true
        suspended:
          type: boolean
          description: Whether the user is suspended or not.
          example: false
        suspensionReason:
          type: string
          description: Reason for suspension
          example: Spamming the forum
        jobTitle:
          type: string
          description: New user job title
          example: Knight
        experiments:
          type: array
          items:
            type: string
          description: List of user experiments
    AdminUpdateConfigRequest:
      type: object
      required:
        - value
      properties:
        value:
          type: string
          description: New config value, given as a JSON string.
    AdminUpdateOrganizationRequest:
      type: object
      description: Only fields set in this object will be updated.
      properties:
        logo:
          type: string
          description: New logo URL, or set to `null` to remove the logo.
        headerImg:
          type: string
          description: New leader image URL, or set to `null` to remove the leader.
        name:
          type: string
          description: New organization name.
        experiments:
          type: array
          items:
            type: string
        readme:
          type: string
          description: Readme for the organization (in Markdown)
        billable:
          type: boolean
        entitlementLimits:
          $ref: '#/components/schemas/EntitlementLimits'
        contractStartDate:
          type: string
          format: date-time
          description: >-
            The date in which the organization contract started. Compute time
            will be calculated from this date.
        domain:
          type: string
          description: >-
            The domain of the organization. The organization domain is used to
            add new users to an organization. For example, new @edgeimpulse.com
            would be added to the Edge Impulse organization if this organization
            has edgeimpulse.com as the domain.
          example: edgeimpulse.com
    OrganizationComputeTimeUsage:
      type: object
      properties:
        cpuComputeTime:
          type: number
          description: >-
            CPU compute time in seconds of all jobs in the organization
            (including organizational project jobs).
        gpuComputeTime:
          type: number
          description: >-
            GPU compute time in seconds of all jobs in the organization
            (including organizational project jobs).
        totalComputeTime:
          type: number
          description: >-
            Total compute time is the amount of computation time spent in jobs,
            in minutes used by an organization over the given period, calculated
            as CPU + GPU minutes.
    AdminOrganizationInfoResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - $ref: '#/components/schemas/OrganizationComputeTimeUsage'
        - type: object
          properties:
            billable:
              type: boolean
            entitlementLimits:
              $ref: '#/components/schemas/EntitlementLimits'
            computeTimeCurrentContractSince:
              type: string
              format: date-time
              description: >-
                The date from which the compute time for the running contract is
                calculated.
            totalStorage:
              type: number
              description: Total storage used by the organization.
            dailyMetrics:
              type: array
              description: Metrics for the last 365 days
              nullable: true
              items:
                $ref: '#/components/schemas/DailyMetricsRecord'
    AdminGetOrganizationComputeTimeUsageResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - $ref: '#/components/schemas/OrganizationComputeTimeUsage'
    SetSampleMetadataRequest:
      type: object
      properties:
        metadata:
          type: object
          additionalProperties:
            type: string
    DataExplorerPredictionsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - predictions
            - labels
            - classificationType
          properties:
            predictions:
              type: array
              items:
                $ref: '#/components/schemas/ModelPrediction'
            labels:
              type: array
              items:
                type: string
            classificationType:
              type: string
              enum:
                - classification
                - regression
    ModelPrediction:
      type: object
      required:
        - sampleId
        - startMs
        - endMs
        - prediction
      properties:
        sampleId:
          type: integer
        startMs:
          type: number
        endMs:
          type: number
        label:
          type: string
        prediction:
          type: string
        predictionCorrect:
          type: boolean
        f1Score:
          type: number
          description: Only set for object detection projects
        anomalyScores:
          type: array
          description: >-
            Only set for visual anomaly projects. 2D array of shape (n, n) with
            raw anomaly scores, where n varies based on the image input size and
            the specific visual anomaly algorithm used. The scores corresponds
            to each grid cell in the image's spatial matrix.
          items:
            type: array
            items:
              type: number
        boundingBoxes:
          type: array
          description: >-
            Only set for object detection projects. Coordinates are scaled 0..1,
            not absolute values.
          items:
            $ref: '#/components/schemas/BoundingBoxWithScore'
        labelMapPredictions:
          type: object
          description: >-
            For samples with structured labels (in the form of a key/value label
            map), this object will contain per-key prediction info for the
            sample.
          additionalProperties:
            type: string
    ModelResult:
      type: object
      required:
        - sampleId
        - sample
        - classifications
      properties:
        sampleId:
          type: integer
        sample:
          $ref: '#/components/schemas/Sample'
        classifications:
          type: array
          items:
            $ref: '#/components/schemas/ClassifySampleResponseClassification'
    ProjectCollaborator:
      allOf:
        - $ref: '#/components/schemas/User'
        - type: object
          required:
            - isOwner
          properties:
            isOwner:
              type: boolean
    ProjectLabelingMethod:
      type: string
      enum:
        - single_label
        - object_detection
        - label_map
    AdminGetMetricsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - metrics
          properties:
            metrics:
              type: object
    AdminGetUserMetricsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - metrics
          properties:
            metrics:
              type: object
    AdminGetUserIdsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - ids
          properties:
            ids:
              type: array
              items:
                type: integer
    GetPublicMetricsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - projects
            - data_samples
            - jobs
          properties:
            projects:
              type: integer
            data_samples:
              type: integer
            jobs:
              type: integer
    ProfileTfLiteRequest:
      type: object
      required:
        - tfliteFileBase64
        - device
      properties:
        tfliteFileBase64:
          description: A base64 encoded TFLite file
          type: string
        device:
          description: >-
            MCU used for calculating latency, query `latencyDevices` in
            `listProject` for a list of supported devices  (and use the "mcu"
            property here).
          type: string
    ProfileModelInfo:
      type: object
      required:
        - variant
        - device
        - tfliteFileSizeBytes
        - isSupportedOnMcu
        - customMetrics
        - hasPerformance
      properties:
        variant:
          $ref: '#/components/schemas/KerasModelVariantEnum'
        device:
          type: string
        tfliteFileSizeBytes:
          type: integer
        isSupportedOnMcu:
          type: boolean
        memory:
          type: object
          properties:
            tflite:
              $ref: '#/components/schemas/ProfileModelInfoMemoryDetails'
            eon:
              $ref: '#/components/schemas/ProfileModelInfoMemoryDetails'
            eonRamOptimized:
              $ref: '#/components/schemas/ProfileModelInfoMemoryDetails'
        timePerInferenceMs:
          type: integer
        mcuSupportError:
          type: string
        customMetrics:
          description: Custom, device-specific performance metrics
          type: array
          items:
            $ref: '#/components/schemas/KerasCustomMetric'
        hasPerformance:
          description: If false, then no metrics are available for this target
          type: boolean
        profilingError:
          description: Specific error during profiling (e.g. model not supported)
          type: string
    ProfileModelInfoMemoryDetails:
      type: object
      required:
        - ram
        - rom
        - arenaSize
      properties:
        ram:
          type: integer
          description: Estimated amount of RAM required by the model, measured in bytes
        rom:
          type: integer
          description: Estimated amount of ROM required by the model, measured in bytes
        arenaSize:
          type: integer
          description: Estimated arena size required for model inference, measured in bytes
    ProfileTfLiteResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - $ref: '#/components/schemas/ProfileModelInfo'
    ImageInputScaling:
      description: >-
        Normalization that is applied to images. If this is not set then 0..1 is
        used. "0..1" gives you non-normalized pixels between 0 and 1. "-1..1"
        gives you non-normalized pixels between -1 and 1. "0..255" gives you
        non-normalized pixels between 0 and 255. "-128..127" gives you
        non-normalized pixels between -128 and 127. "torch" first scales pixels
        between 0 and 1, then applies normalization using the ImageNet dataset
        (same as `torchvision.transforms.Normalize()`).
        "bgr-subtract-imagenet-mean" scales to 0..255, reorders pixels to BGR,
        and subtracts the ImageNet mean from each channel.
      type: string
      enum:
        - 0..1
        - '-1..1'
        - '-128..127'
        - 0..255
        - torch
        - bgr-subtract-imagenet-mean
    ImageInputResizeMode:
      type: string
      description: >
        Input images are resized automatically before training and testing, to
        match the impulse input shape.

        This determines the resize mode used when the aspect ratio of the input
        data is different to the aspect ratio of the impulse.
      example: squash
      enum:
        - squash
        - fit-short
        - fit-long
        - crop
    AnomalyCapacity:
      type: string
      description: >-
        Capacity level for visual anomaly detection. Determines which set of
        default configurations to use. The higher capacity, the higher number of
        (Gaussian) components, and the more adapted the model becomes to the
        original distribution
      enum:
        - low
        - medium
        - high
    BlockParameters:
      description: >-
        Training parameters specific to the type of the learn block. Parameters
        may be adjusted depending on the model defined in the visual layers.
        Used for our built-in blocks.
      oneOf:
        - $ref: '#/components/schemas/BlockParamsVisualAnomalyPatchcore'
        - $ref: '#/components/schemas/BlockParamsVisualAnomalyGmm'
    BlockParamsVisualAnomalyPatchcore:
      type: object
      properties:
        backbone:
          type: string
          description: The backbone to use for feature extraction
        numLayers:
          type: integer
          description: The number of layers in the feature extractor (1-3)
        poolSize:
          type: integer
          description: The pool size for the feature extractor
        samplingRatio:
          type: number
          description: The sampling ratio for the coreset, used for anomaly scoring
        numNearestNeighbors:
          type: integer
          description: >-
            The number of nearest neighbors to consider, used for anomaly
            scoring
    BlockParamsVisualAnomalyGmm:
      type: object
      properties:
        backbone:
          type: string
          description: The backbone to use for feature extraction
    KerasCustomMetric:
      type: object
      required:
        - name
        - value
      properties:
        name:
          description: The name of the metric
          type: string
        value:
          description: The value of this metric for this model type
          type: string
    DeployPretrainedModelInputTimeSeries:
      type: object
      required:
        - inputType
        - frequencyHz
        - windowLengthMs
      properties:
        inputType:
          type: string
          enum:
            - time-series
        frequencyHz:
          type: number
        windowLengthMs:
          type: integer
    DeployPretrainedModelInputAudio:
      type: object
      required:
        - inputType
        - frequencyHz
      properties:
        inputType:
          type: string
          enum:
            - audio
        frequencyHz:
          type: number
    DeployPretrainedModelInputImage:
      type: object
      required:
        - inputType
      properties:
        inputType:
          type: string
          enum:
            - image
        inputScaling:
          $ref: '#/components/schemas/ImageInputScaling'
        resizeMode:
          $ref: '#/components/schemas/ImageInputResizeMode'
    DeployPretrainedModelInputOther:
      type: object
      required:
        - inputType
      properties:
        inputType:
          type: string
          enum:
            - other
    DeployPretrainedModelModelClassification:
      type: object
      required:
        - modelType
        - labels
      properties:
        modelType:
          type: string
          enum:
            - classification
        labels:
          type: array
          items:
            type: string
    DeployPretrainedModelModelRegression:
      type: object
      required:
        - modelType
      properties:
        modelType:
          type: string
          enum:
            - regression
    DeployPretrainedModelModelFreeform:
      type: object
      required:
        - modelType
      properties:
        modelType:
          type: string
          enum:
            - freeform
    DeployPretrainedModelModelAnomaly:
      type: object
      required:
        - modelType
      properties:
        modelType:
          type: string
          enum:
            - anomaly
    DeployPretrainedModelModelVisualAnomaly:
      type: object
      required:
        - modelType
      properties:
        modelType:
          type: string
          enum:
            - visual-anomaly
        thresholdValues:
          type: object
          description: >-
            All configured thresholds for the current model. Valid keys are
            'min_anomaly_score' and 'anomaly_scoring_aggregation_method'.
          additionalProperties:
            $ref: '#/components/schemas/ThresholdValue'
    DeployPretrainedModelModelObjectDetection:
      type: object
      required:
        - modelType
        - labels
        - lastLayer
        - minimumConfidence
      properties:
        modelType:
          type: string
          enum:
            - object-detection
        labels:
          type: array
          items:
            type: string
        lastLayer:
          $ref: '#/components/schemas/ObjectDetectionLastLayer'
        minimumConfidence:
          description: >-
            Deprecated: use thresholdValues instead. Threshold for objects (f.e.
            0.3).
          type: number
        thresholdValues:
          type: object
          description: >-
            All configured thresholds for the current model. Valid keys are
            'min_score' (object detection models, all but paddleocr-detector);
            'min_score_pixel', 'min_score_box', 'unclip_ratio'
            (paddleocr-detector).
          additionalProperties:
            type: number
    DeployPretrainedModelRequest:
      type: object
      required:
        - modelFileBase64
        - modelFileType
        - deploymentType
        - modelInfo
      properties:
        modelFileBase64:
          description: A base64 encoded pretrained model
          type: string
        modelFileType:
          type: string
          enum:
            - tflite
            - onnx
            - saved_model
            - lgbm
            - xgboost
            - pickle
            - ngboost
        deploymentType:
          type: string
          description: >-
            The name of the built target. You can find this by listing all
            deployment targets through `listDeploymentTargetsForProject` (via
            `GET /v1/api/{projectId}/deployment/targets`) and see the `format`
            type.
        engine:
          $ref: '#/components/schemas/DeploymentTargetEngine'
        modelInfo:
          type: object
          required:
            - input
            - model
          properties:
            input:
              discriminator:
                propertyName: inputType
                mapping:
                  time-series: '#/components/schemas/DeployPretrainedModelInputTimeSeries'
                  audio: '#/components/schemas/DeployPretrainedModelInputAudio'
                  image: '#/components/schemas/DeployPretrainedModelInputImage'
                  other: '#/components/schemas/DeployPretrainedModelInputOther'
              oneOf:
                - $ref: '#/components/schemas/DeployPretrainedModelInputTimeSeries'
                - $ref: '#/components/schemas/DeployPretrainedModelInputAudio'
                - $ref: '#/components/schemas/DeployPretrainedModelInputImage'
                - $ref: '#/components/schemas/DeployPretrainedModelInputOther'
            model:
              discriminator:
                propertyName: modelType
                mapping:
                  classification: >-
                    #/components/schemas/DeployPretrainedModelModelClassification
                  regression: '#/components/schemas/DeployPretrainedModelModelRegression'
                  object-detection: >-
                    #/components/schemas/DeployPretrainedModelModelObjectDetection
                  freeform: '#/components/schemas/DeployPretrainedModelModelFreeform'
                  anomaly: '#/components/schemas/DeployPretrainedModelModelAnomaly'
                  visual-anomaly: '#/components/schemas/DeployPretrainedModelModelVisualAnomaly'
              oneOf:
                - $ref: >-
                    #/components/schemas/DeployPretrainedModelModelClassification
                - $ref: '#/components/schemas/DeployPretrainedModelModelRegression'
                - $ref: >-
                    #/components/schemas/DeployPretrainedModelModelObjectDetection
                - $ref: '#/components/schemas/DeployPretrainedModelModelFreeform'
                - $ref: '#/components/schemas/DeployPretrainedModelModelAnomaly'
                - $ref: '#/components/schemas/DeployPretrainedModelModelVisualAnomaly'
        representativeFeaturesBase64:
          description: >-
            A base64 encoded .npy file containing the features from your
            validation set (optional for onnx and saved_model) - used to
            quantize your model.
          type: string
        deployModelType:
          type: string
          enum:
            - int8
            - float32
        useConverter:
          description: Optional, use a specific converter (only for ONNX models).
          type: string
          enum:
            - onnx-tf
            - onnx2tf
        overrideInputShape:
          description: >-
            Optional for ONNX files: overrides the input shape of the model.
            This is highly suggested if the model has dynamic dimensions. If
            this field is not set, then all dynamic dimensions will be set to
            '1'.
          type: array
          items:
            type: integer
    ThresholdValue:
      description: Current value of the threshold
      oneOf:
        - type: number
        - type: string
    UpdateProjectTagsRequest:
      type: object
      required:
        - tags
      properties:
        tags:
          type: array
          items:
            type: string
    UploadPretrainedModelRequest:
      type: object
      required:
        - modelFile
        - modelFileName
        - modelFileType
      properties:
        modelFile:
          type: string
          format: binary
        modelFileName:
          type: string
        modelFileType:
          type: string
          enum:
            - tflite
            - onnx
            - saved_model
        representativeFeatures:
          type: string
          format: binary
        device:
          description: >-
            MCU used for calculating latency, query `latencyDevices` in
            `listProject` for a list of supported devices (and use the "mcu"
            property here). If this is kept empty then we'll show an overview of
            multiple devices.
          type: string
        overrideInputShape:
          description: >-
            Optional for ONNX files: overrides the input shape of the model.
            This is highly suggested if the model has dynamic dimensions. If
            this field is not set, then all dynamic dimensions will be set to
            '1'.
          type: array
          items:
            type: integer
    UploadPretrainedModelByUrlRequest:
      type: object
      required:
        - modelFileUrl
        - modelFileName
        - modelFileType
      properties:
        modelFileUrl:
          type: string
        modelFileName:
          type: string
        modelFileType:
          type: string
          enum:
            - tflite
            - onnx
            - saved_model
        representativeFeatures:
          type: string
          format: binary
        device:
          description: >-
            MCU used for calculating latency, query `latencyDevices` in
            `listProject` for a list of supported devices (and use the "mcu"
            property here). If this is kept empty then we'll show an overview of
            multiple devices.
          type: string
        overrideInputShape:
          description: >-
            Optional for ONNX files: overrides the input shape of the model.
            This is highly suggested if the model has dynamic dimensions. If
            this field is not set, then all dynamic dimensions will be set to
            '1'.
          type: array
          items:
            type: integer
    PretrainedModelTensor:
      type: object
      required:
        - dataType
        - name
        - shape
      properties:
        dataType:
          type: string
          enum:
            - int8
            - uint8
            - float32
        name:
          type: string
        shape:
          type: array
          items:
            type: integer
        quantizationScale:
          type: number
        quantizationZeroPoint:
          type: number
    ProfileModelTableMcu:
      type: object
      required:
        - description
        - supported
      properties:
        description:
          type: string
        timePerInferenceMs:
          type: integer
        memory:
          type: object
          properties:
            tflite:
              type: object
              required:
                - ram
                - rom
              properties:
                ram:
                  type: integer
                rom:
                  type: integer
            eon:
              type: object
              required:
                - ram
                - rom
              properties:
                ram:
                  type: integer
                rom:
                  type: integer
            eonRamOptimized:
              type: object
              required:
                - ram
                - rom
              properties:
                ram:
                  type: integer
                rom:
                  type: integer
        supported:
          type: boolean
        mcuSupportError:
          type: string
    ProfileModelTableMpu:
      type: object
      required:
        - description
        - supported
      properties:
        description:
          type: string
        timePerInferenceMs:
          type: integer
        rom:
          type: number
        supported:
          type: boolean
    ProfileModelTable:
      type: object
      required:
        - variant
        - lowEndMcu
        - highEndMcu
        - highEndMcuPlusAccelerator
        - mpu
        - gpuOrMpuAccelerator
      description: >-
        Performance for a range of device types. Note that MPU is referred to as
        CPU in Studio, as MPU and CPU are treated equivalent for performance
        estimation.
      properties:
        variant:
          type: string
          enum:
            - int8
            - float32
        lowEndMcu:
          $ref: '#/components/schemas/ProfileModelTableMcu'
        highEndMcu:
          $ref: '#/components/schemas/ProfileModelTableMcu'
        highEndMcuPlusAccelerator:
          $ref: '#/components/schemas/ProfileModelTableMcu'
        mpu:
          $ref: '#/components/schemas/ProfileModelTableMpu'
        gpuOrMpuAccelerator:
          $ref: '#/components/schemas/ProfileModelTableMpu'
    GetPretrainedModelResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - specificDeviceSelected
            - availableModelTypes
          properties:
            specificDeviceSelected:
              type: boolean
              description: Whether a specific device was selected for performance profiling
            availableModelTypes:
              type: array
              description: The types of model that are available
              items:
                $ref: '#/components/schemas/KerasModelTypeEnum'
            model:
              type: object
              required:
                - fileName
                - inputs
                - outputs
              properties:
                fileName:
                  type: string
                profileInfo:
                  type: object
                  required:
                    - table
                  properties:
                    float32:
                      $ref: '#/components/schemas/ProfileModelInfo'
                    int8:
                      $ref: '#/components/schemas/ProfileModelInfo'
                    table:
                      $ref: '#/components/schemas/ProfileModelTable'
                inputs:
                  type: array
                  items:
                    $ref: '#/components/schemas/PretrainedModelTensor'
                outputs:
                  type: array
                  items:
                    $ref: '#/components/schemas/PretrainedModelTensor'
                profileJobId:
                  description: >-
                    If this is set, then we're still profiling this model.
                    Subscribe to job updates to see when it's done (afterward
                    the metadata will be updated).
                  type: integer
                profileJobFailed:
                  description: >-
                    If this is set, then the profiling job failed (get the
                    status by getting the job logs for 'profilingJobId').
                  type: boolean
                supportsTFLite:
                  type: boolean
            modelInfo:
              type: object
              required:
                - input
                - model
              properties:
                input:
                  discriminator:
                    propertyName: inputType
                    mapping:
                      time-series: >-
                        #/components/schemas/DeployPretrainedModelInputTimeSeries
                      audio: '#/components/schemas/DeployPretrainedModelInputAudio'
                      image: '#/components/schemas/DeployPretrainedModelInputImage'
                      other: '#/components/schemas/DeployPretrainedModelInputOther'
                  oneOf:
                    - $ref: >-
                        #/components/schemas/DeployPretrainedModelInputTimeSeries
                    - $ref: '#/components/schemas/DeployPretrainedModelInputAudio'
                    - $ref: '#/components/schemas/DeployPretrainedModelInputImage'
                    - $ref: '#/components/schemas/DeployPretrainedModelInputOther'
                model:
                  discriminator:
                    propertyName: modelType
                    mapping:
                      classification: >-
                        #/components/schemas/DeployPretrainedModelModelClassification
                      regression: >-
                        #/components/schemas/DeployPretrainedModelModelRegression
                      object-detection: >-
                        #/components/schemas/DeployPretrainedModelModelObjectDetection
                      freeform: '#/components/schemas/DeployPretrainedModelModelFreeform'
                      anomaly: '#/components/schemas/DeployPretrainedModelModelAnomaly'
                      visual-anomaly: >-
                        #/components/schemas/DeployPretrainedModelModelVisualAnomaly
                  oneOf:
                    - $ref: >-
                        #/components/schemas/DeployPretrainedModelModelClassification
                    - $ref: >-
                        #/components/schemas/DeployPretrainedModelModelRegression
                    - $ref: >-
                        #/components/schemas/DeployPretrainedModelModelObjectDetection
                    - $ref: '#/components/schemas/DeployPretrainedModelModelFreeform'
                    - $ref: '#/components/schemas/DeployPretrainedModelModelAnomaly'
                    - $ref: >-
                        #/components/schemas/DeployPretrainedModelModelVisualAnomaly
    TestPretrainedModelRequest:
      type: object
      required:
        - features
        - modelInfo
      properties:
        features:
          type: array
          items:
            type: number
        modelInfo:
          type: object
          required:
            - input
            - model
          properties:
            input:
              discriminator:
                propertyName: inputType
                mapping:
                  time-series: '#/components/schemas/DeployPretrainedModelInputTimeSeries'
                  audio: '#/components/schemas/DeployPretrainedModelInputAudio'
                  image: '#/components/schemas/DeployPretrainedModelInputImage'
                  other: '#/components/schemas/DeployPretrainedModelInputOther'
              oneOf:
                - $ref: '#/components/schemas/DeployPretrainedModelInputTimeSeries'
                - $ref: '#/components/schemas/DeployPretrainedModelInputAudio'
                - $ref: '#/components/schemas/DeployPretrainedModelInputImage'
                - $ref: '#/components/schemas/DeployPretrainedModelInputOther'
            model:
              discriminator:
                propertyName: modelType
                mapping:
                  classification: >-
                    #/components/schemas/DeployPretrainedModelModelClassification
                  regression: '#/components/schemas/DeployPretrainedModelModelRegression'
                  object-detection: >-
                    #/components/schemas/DeployPretrainedModelModelObjectDetection
                  freeform: '#/components/schemas/DeployPretrainedModelModelFreeform'
                  anomaly: '#/components/schemas/DeployPretrainedModelModelAnomaly'
                  visual-anomaly: '#/components/schemas/DeployPretrainedModelModelVisualAnomaly'
              oneOf:
                - $ref: >-
                    #/components/schemas/DeployPretrainedModelModelClassification
                - $ref: '#/components/schemas/DeployPretrainedModelModelRegression'
                - $ref: >-
                    #/components/schemas/DeployPretrainedModelModelObjectDetection
                - $ref: '#/components/schemas/DeployPretrainedModelModelFreeform'
                - $ref: '#/components/schemas/DeployPretrainedModelModelAnomaly'
                - $ref: '#/components/schemas/DeployPretrainedModelModelVisualAnomaly'
    TestPretrainedModelResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          properties:
            result:
              type: object
              description: >-
                Classification value per label. For a neural network this will
                be the confidence, for anomalies the anomaly score.
              additionalProperties:
                type: number
            boundingBoxes:
              type: array
              items:
                $ref: '#/components/schemas/BoundingBoxWithScore'
            freeformResult:
              type: object
              required:
                - outputTensors
              properties:
                outputTensors:
                  type: array
                  items:
                    type: object
                    required:
                      - shape
                      - dataType
                      - data
                    properties:
                      shape:
                        type: array
                        items:
                          type: integer
                      dataType:
                        type: string
                        enum:
                          - int8
                          - uint8
                          - float32
                      data:
                        type: array
                        items:
                          type: number
            anomalyResult:
              type: array
              description: >-
                Anomaly scores and computed metrics for visual anomaly
                detection, one item per window.
              items:
                $ref: '#/components/schemas/AnomalyResult'
    TestPretrainedModelImagesRequest:
      type: object
      required:
        - imageFileBase64
        - input
        - model
      properties:
        imageFileBase64:
          description: A base64 encoded input image file
          type: string
        input:
          type: object
          required:
            - resizeMode
            - inputScaling
          properties:
            resizeMode:
              $ref: '#/components/schemas/ImageInputResizeMode'
            inputScaling:
              $ref: '#/components/schemas/ImageInputScaling'
        model:
          discriminator:
            propertyName: modelType
            mapping:
              classification: '#/components/schemas/DeployPretrainedModelModelClassification'
              regression: '#/components/schemas/DeployPretrainedModelModelRegression'
              object-detection: '#/components/schemas/DeployPretrainedModelModelObjectDetection'
              freeform: '#/components/schemas/DeployPretrainedModelModelFreeform'
              anomaly: '#/components/schemas/DeployPretrainedModelModelAnomaly'
              visual-anomaly: '#/components/schemas/DeployPretrainedModelModelVisualAnomaly'
          oneOf:
            - $ref: '#/components/schemas/DeployPretrainedModelModelClassification'
            - $ref: '#/components/schemas/DeployPretrainedModelModelRegression'
            - $ref: '#/components/schemas/DeployPretrainedModelModelObjectDetection'
            - $ref: '#/components/schemas/DeployPretrainedModelModelFreeform'
            - $ref: '#/components/schemas/DeployPretrainedModelModelAnomaly'
            - $ref: '#/components/schemas/DeployPretrainedModelModelVisualAnomaly'
    SavePretrainedModelRequest:
      type: object
      required:
        - input
        - model
      properties:
        input:
          discriminator:
            propertyName: inputType
            mapping:
              time-series: '#/components/schemas/DeployPretrainedModelInputTimeSeries'
              audio: '#/components/schemas/DeployPretrainedModelInputAudio'
              image: '#/components/schemas/DeployPretrainedModelInputImage'
              other: '#/components/schemas/DeployPretrainedModelInputOther'
          oneOf:
            - $ref: '#/components/schemas/DeployPretrainedModelInputTimeSeries'
            - $ref: '#/components/schemas/DeployPretrainedModelInputAudio'
            - $ref: '#/components/schemas/DeployPretrainedModelInputImage'
            - $ref: '#/components/schemas/DeployPretrainedModelInputOther'
        model:
          discriminator:
            propertyName: modelType
            mapping:
              classification: '#/components/schemas/DeployPretrainedModelModelClassification'
              regression: '#/components/schemas/DeployPretrainedModelModelRegression'
              object-detection: '#/components/schemas/DeployPretrainedModelModelObjectDetection'
              freeform: '#/components/schemas/DeployPretrainedModelModelFreeform'
              anomaly: '#/components/schemas/DeployPretrainedModelModelAnomaly'
              visual-anomaly: '#/components/schemas/DeployPretrainedModelModelVisualAnomaly'
          oneOf:
            - $ref: '#/components/schemas/DeployPretrainedModelModelClassification'
            - $ref: '#/components/schemas/DeployPretrainedModelModelRegression'
            - $ref: '#/components/schemas/DeployPretrainedModelModelObjectDetection'
            - $ref: '#/components/schemas/DeployPretrainedModelModelFreeform'
            - $ref: '#/components/schemas/DeployPretrainedModelModelAnomaly'
            - $ref: '#/components/schemas/DeployPretrainedModelModelVisualAnomaly'
    ProjectInfoSummaryResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - id
            - owner
            - name
            - studioUrl
            - viewCount
            - cloneCount
          properties:
            id:
              type: integer
            owner:
              type: string
            name:
              type: string
            studioUrl:
              type: string
            viewCount:
              type: integer
            cloneCount:
              type: integer
    DevelopmentBoardResponse:
      type: object
      required:
        - id
        - name
        - image
        - docsUrl
      properties:
        id:
          type: integer
        name:
          type: string
        image:
          type: string
        docsUrl:
          type: string
    DevelopmentBoardRequest:
      type: object
      required:
        - name
        - image
        - docsUrl
      properties:
        name:
          type: string
        image:
          type: string
        docsUrl:
          type: string
    DevelopmentBoardRequestUpdate:
      type: object
      properties:
        name:
          type: string
        image:
          type: string
        docsUrl:
          type: string
    DevelopmentBoardsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - developmentBoards
          properties:
            developmentBoards:
              type: array
              items:
                $ref: '#/components/schemas/DevelopmentBoardResponse'
    AdminGetSSOSettingsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - ssoWhitelist
          properties:
            ssoWhitelist:
              type: array
              items:
                type: object
                required:
                  - domain
                  - idps
                properties:
                  domain:
                    type: string
                    example: example.com
                  idps:
                    type: array
                    items:
                      type: string
                    example:
                      - google
                      - okta
    GetSSODomainIdPsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - idps
          properties:
            idps:
              type: array
              items:
                type: string
                example:
                  - google
                  - okta
    AdminAddOrUpdateSSODomainIdPsRequest:
      type: object
      required:
        - idps
      properties:
        idps:
          type: array
          items:
            type: string
          example:
            - google
            - okta
    SendUserFeedbackRequest:
      type: object
      required:
        - type
        - subject
        - body
      properties:
        type:
          type: string
          enum:
            - feedback
        subject:
          type: string
          description: The reason the user is contacting Edge Impulse Support.
        body:
          type: string
          description: The body of the message.
        workEmail:
          type: string
          description: >-
            The user's work email address. This is optional, if it's not
            provided, the registered email will be used.
        company:
          type: string
          description: The user's company. This is optional.
        jobTitle:
          type: string
          description: The user's job title. This is optional.
        companySize:
          type: string
          description: The user's company size. This is optional.
        organizationId:
          type: number
          description: The user's organization ID. This is optional.
    EnterpriseUpgradeOrTrialExtensionRequest:
      type: object
      properties:
        reason:
          type: string
          description: >-
            Answer to the question: 'Why is this the right time for your team to
            invest in edge AI?'. This is optional.
        useCase:
          type: string
          description: >-
            Answer to the question: 'What best describes your use case?'. This
            is optional.
        timeline:
          type: string
          description: >-
            Answer to the question: 'What is your timeline for solving your
            problem?'. This is optional.
        objective:
          type: string
          description: >-
            Answer to the question: 'What are you hoping to achieve with an
            extension?'. This is optional.
        trialId:
          type: number
          description: The user's trial ID. This is optional.
    EnterpriseLimitsIncreaseRequest:
      type: object
      required:
        - limits
      properties:
        limits:
          type: array
          items:
            $ref: '#/components/schemas/EnterpriseLimit'
        reason:
          type: string
          description: Additional notes for the request. This is optional.
    EnterpriseLimit:
      type: string
      enum:
        - users
        - projects
        - compute
        - storage
    LogWebsitePageviewRequest:
      type: object
      required:
        - sessionId
        - pageUrl
      properties:
        sessionId:
          type: string
        pageUrl:
          type: string
        pageReferrer:
          type: string
    LogAnalyticsEventRequest:
      type: object
      required:
        - eventName
        - eventProperties
      properties:
        sessionId:
          type: string
          description: >-
            Optional session ID for users who have not signed in yet. Helps
            match anonymous activity with user activity once they sign in.
        eventName:
          type: string
        eventProperties:
          type: object
    TestAddMockModelMonitoringDataRequest:
      type: object
      required:
        - deploymentId
        - intervalMs
        - dataPointsToGenerate
      properties:
        deploymentId:
          type: number
        intervalMs:
          type: number
        dataPointsToGenerate:
          type: number
        startTimestamp:
          type: number
        devices:
          type: array
          description: >-
            Optional list of device IDs to generate data for. If undefined, data
            will be generated for all existing project devices.
          items:
            type: string
    AdminUpdateUserPermissionsRequest:
      type: object
      required:
        - permissions
      properties:
        permissions:
          type: array
          items:
            $ref: '#/components/schemas/Permission'
    AdminGetSignupApprovalRequestResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - created
            - expirationDate
            - status
            - approverEmail
            - termsOfServicesVersion
          properties:
            created:
              type: string
              format: date-time
            deletedDate:
              type: string
              format: date-time
            expirationDate:
              type: string
              format: date-time
            status:
              type: string
              enum:
                - pending
                - approved
                - rejected
                - error
            approverEmail:
              type: string
            verificationCode:
              type: string
            termsOfServicesVersion:
              type: string
    AdminCreateSignupApprovalRequest:
      type: object
      required:
        - approverEmail
      properties:
        approverEmail:
          type: string
    Permission:
      type: string
      enum:
        - admin:infra:disallowedEmailDomains:read
        - admin:infra:disallowedEmailDomains:write
        - admin:infra:featureFlags:read
        - admin:infra:featureFlags:write
        - admin:infra:config:read
        - admin:infra:config:write
        - admin:infra:migrations:read
        - admin:infra:migrations:write
        - admin:metrics:read
        - admin:metrics:write
        - admin:oauth:read
        - admin:oauth:write
        - admin:organizations:read
        - admin:organizations:write
        - admin:organizations:members:write
        - admin:projects:members:write
        - admin:projects:read
        - admin:projects:write
        - admin:trashbin:write
        - admin:trials:read
        - admin:trials:write
        - admin:users:permissions:write
        - admin:users:read
        - admin:users:signupApprovals:read
        - admin:users:signupApprovals:write
        - admin:users:write
        - admin:jobs:read
        - admin:emails:verification:code:read
        - admin:sso:read
        - admin:sso:domainIdps:write
        - admin:vlm:model:read
        - admin:vlm:model:write
        - projects:limits:write
        - projects:training:keras:write
        - projects:data:versioning:write
        - thirdpartyauth:read
        - thirdpartyauth:write
        - users:emails:read
        - whitelabels:read
        - whitelabels:write
        - test:data:write
    OAuthScope:
      type: string
      enum:
        - deployments:create
        - deployments:delete
        - deployments:read
        - deployments:update
        - devices:create
        - devices:delete
        - devices:read
        - devices:update
        - jobs:read
        - organizations:read
        - projects:create
        - projects:delete
        - projects:read
        - projects:update
        - user:read
        - user:update
    GetOrganizationDataItemTransformJobsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - transformationJobs
            - totalTransformationJobCount
          properties:
            transformationJobs:
              type: array
              items:
                type: object
                required:
                  - id
                  - transformationJobId
                  - createProjectId
                  - created
                  - jobId
                  - transformationBlockName
                properties:
                  id:
                    type: integer
                  transformationJobId:
                    type: integer
                  createProjectId:
                    type: integer
                  created:
                    type: string
                    format: date-time
                  jobId:
                    type: integer
                  jobStarted:
                    type: string
                    format: date-time
                  jobFinished:
                    type: string
                    format: date-time
                  jobFinishedSuccessful:
                    type: boolean
                  transformationBlockName:
                    type: string
                  pipelineName:
                    type: string
            totalTransformationJobCount:
              type: integer
    DataCampaignDashboard:
      type: object
      required:
        - id
        - created
        - name
        - emailRecipientUids
        - whenToEmail
        - showNoOfDays
      properties:
        id:
          type: integer
        created:
          type: string
          format: date-time
        name:
          type: string
        emailRecipientUids:
          description: List of user IDs to notify for this dashboard (sent daily)
          type: array
          items:
            type: integer
        latestScreenshot:
          type: string
        whenToEmail:
          type: string
          enum:
            - always
            - on_changes
            - never
        showNoOfDays:
          type: integer
    DataCampaignQuery:
      type: object
      required:
        - name
        - dataset
        - query
      properties:
        name:
          type: string
        dataset:
          type: string
        query:
          type: string
    DataCampaignLink:
      type: object
      required:
        - icon
        - name
        - link
      properties:
        icon:
          type: string
        name:
          type: string
        link:
          type: string
    DataCampaign:
      type: object
      required:
        - id
        - dataCampaignDashboardId
        - created
        - name
        - description
        - coordinatorUids
        - pipelineIds
        - queries
        - links
        - datasets
        - projectIds
      properties:
        id:
          type: integer
        dataCampaignDashboardId:
          type: integer
        created:
          type: string
          format: date-time
        name:
          type: string
        description:
          type: string
        coordinatorUids:
          description: List of user IDs that coordinate this campaign
          type: array
          items:
            type: integer
        logo:
          type: string
        queries:
          type: array
          items:
            $ref: '#/components/schemas/DataCampaignQuery'
        links:
          type: array
          items:
            $ref: '#/components/schemas/DataCampaignLink'
        datasets:
          type: array
          items:
            type: string
        pipelineIds:
          type: array
          items:
            type: integer
        projectIds:
          type: array
          items:
            type: integer
    GetOrganizationDataCampaignDashboardsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - dashboards
          properties:
            dashboards:
              type: array
              items:
                $ref: '#/components/schemas/DataCampaignDashboard'
    AddOrganizationDataCampaignDashboardRequest:
      type: object
      required:
        - name
        - emailRecipientUids
        - whenToEmail
        - showNoOfDays
      properties:
        name:
          type: string
        emailRecipientUids:
          description: List of user IDs to notify for this dashboard (sent daily)
          type: array
          items:
            type: integer
        whenToEmail:
          type: string
          enum:
            - always
            - on_changes
            - never
        showNoOfDays:
          type: integer
    AddOrganizationDataCampaignDashboardResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - dataCampaignDashboardId
          properties:
            dataCampaignDashboardId:
              type: integer
    GetOrganizationDataCampaignDashboardResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - dashboard
          properties:
            dashboard:
              $ref: '#/components/schemas/DataCampaignDashboard'
    UpdateOrganizationDataCampaignDashboardRequest:
      type: object
      properties:
        name:
          type: string
        emailRecipientUids:
          description: List of user IDs to notify for this dashboard (sent daily)
          type: array
          items:
            type: integer
        whenToEmail:
          type: string
          enum:
            - always
            - on_changes
            - never
        showNoOfDays:
          type: integer
    GetOrganizationDataCampaignsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - campaigns
          properties:
            campaigns:
              type: array
              items:
                type: object
                required:
                  - campaign
                  - graphs
                properties:
                  campaign:
                    $ref: '#/components/schemas/DataCampaign'
                  graphs:
                    type: array
                    items:
                      $ref: '#/components/schemas/DataCampaignGraph'
    AddOrganizationDataCampaignRequest:
      type: object
      required:
        - dataCampaignDashboardId
        - name
        - description
        - coordinatorUids
        - queries
        - links
        - datasets
        - pipelineIds
        - projectIds
      properties:
        id:
          type: integer
        dataCampaignDashboardId:
          type: integer
        created:
          type: string
          format: date-time
        name:
          type: string
        description:
          type: string
        coordinatorUids:
          description: List of user IDs that coordinate this campaign
          type: array
          items:
            type: integer
        logo:
          type: string
        queries:
          type: array
          items:
            $ref: '#/components/schemas/DataCampaignQuery'
        links:
          type: array
          items:
            $ref: '#/components/schemas/DataCampaignLink'
        datasets:
          type: array
          items:
            type: string
        pipelineIds:
          type: array
          items:
            type: integer
        projectIds:
          type: array
          items:
            type: integer
    AddOrganizationDataCampaignResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - dataCampaignId
          properties:
            dataCampaignId:
              type: integer
    UpdateOrganizationDataCampaignRequest:
      type: object
      properties:
        dataCampaignDashboardId:
          type: integer
        name:
          type: string
        coordinatorUids:
          description: List of user IDs that coordinate this campaign
          type: array
          items:
            type: integer
        logo:
          type: string
        description:
          type: string
        queries:
          type: array
          items:
            $ref: '#/components/schemas/DataCampaignQuery'
        links:
          type: array
          items:
            $ref: '#/components/schemas/DataCampaignLink'
        datasets:
          type: array
          items:
            type: string
        pipelineIds:
          type: array
          items:
            type: integer
        projectIds:
          type: array
          items:
            type: integer
    GetOrganizationDataCampaignResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - campaign
            - graphs
          properties:
            campaign:
              $ref: '#/components/schemas/DataCampaign'
            graphs:
              type: array
              items:
                $ref: '#/components/schemas/DataCampaignGraph'
    DataCampaignGraph:
      type: object
      required:
        - title
        - link
        - xData
        - yTicks
        - nextUpdate
      properties:
        title:
          type: string
        link:
          type: string
        xData:
          type: array
          items:
            type: object
            required:
              - color
              - popupText
              - legendText
              - values
              - dataType
            properties:
              color:
                type: string
              legendText:
                type: string
              popupText:
                type: string
              values:
                type: array
                items:
                  type: object
                  required:
                    - id
                  properties:
                    id:
                      type: integer
                    value:
                      type: number
              dataset:
                type: string
              query:
                type: string
              dataType:
                type: string
                enum:
                  - dataItems
                  - time
                  - percentage
        yTicks:
          type: array
          items:
            type: string
            format: date-time
        nextUpdate:
          type: string
          format: date-time
    OrganizationDataCampaignDiffRequest:
      type: object
      required:
        - queries
      properties:
        queries:
          type: array
          items:
            type: object
            required:
              - dataset
              - query
              - graphValueId
            properties:
              dataset:
                type: string
              query:
                type: string
              graphValueId:
                type: integer
                description: Which point in the graph was clicked (from "graphs.values")
    OrganizationDataCampaignDiffResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - date
            - queries
          properties:
            date:
              type: string
              format: date-time
            queries:
              type: array
              items:
                type: object
                required:
                  - title
                  - dataset
                  - query
                  - newItems
                  - deletedItems
                properties:
                  title:
                    type: string
                  dataset:
                    type: string
                  query:
                    type: string
                  newItems:
                    type: array
                    items:
                      type: string
                  deletedItems:
                    type: array
                    items:
                      type: string
    Migration:
      type: object
      required:
        - id
        - state
      properties:
        id:
          type: string
          description: Unique identifier of the data migration
          example: entitlements_filesize
        state:
          type: string
          enum:
            - paused
            - queued
            - running
            - done
            - failed
          description: >-
            Migration state. Can be 'paused', 'queued', 'running', 'done',
            'failed'
          example: paused
        offset:
          type: integer
          description: Optional. Number of items already processed
          example: 0
        batchSize:
          type: integer
          description: >-
            Optional. The number of items to process in each batch during a
            migration
          example: 1000
    AdminGetDataMigrationsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - migrations
          properties:
            migrations:
              type: array
              items:
                $ref: '#/components/schemas/Migration'
    AdminGetDataMigrationResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - migration
          properties:
            migration:
              $ref: '#/components/schemas/Migration'
    AdminToggleDataMigrationRequest:
      type: object
      required:
        - id
        - shouldRun
      properties:
        id:
          type: string
          description: Unique identifier of the data migration
          example: entitlements_filesize
        shouldRun:
          type: boolean
          description: Whether the migration should be queued for execution
          example: true
    AdminAddDisallowedEmailDomainRequest:
      type: object
      required:
        - domain
      properties:
        domain:
          type: string
          example:
            - domain.org
    AdminGetDisallowedEmailDomainsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - domains
          properties:
            domains:
              type: array
              items:
                type: string
              example:
                - domain.org
                - domain2.org
    EntitlementLimits:
      type: object
      properties:
        totalStorage:
          type: number
          description: Storage entitlement, in bytes
        computeTimePerYear:
          type: number
          description: Total compute time entitlement (CPU + GPU), in seconds
        gpuComputeTimePerYear:
          type: number
          description: GPU compute time entitlement, in seconds
        numberOfProjects:
          type: integer
          description: Number of projects allowed for this organization
        numberOfUsers:
          type: integer
          description: Number of users allowed for this organization
    GetAutoLabelerResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - hasResults
            - clusters
            - simThreshold
            - minObjectSizePx
            - whichItemsToInclude
          properties:
            hasResults:
              type: boolean
            clusters:
              type: array
              items:
                type: object
                required:
                  - items
                properties:
                  label:
                    type: string
                  items:
                    type: array
                    items:
                      type: object
                      required:
                        - sampleId
                        - maskId
                        - imageUrl
                      properties:
                        sampleId:
                          type: integer
                        maskId:
                          type: integer
                        imageUrl:
                          type: string
            simThreshold:
              type: number
            minObjectSizePx:
              type: integer
            maxObjectSizePx:
              type: integer
            whichItemsToInclude:
              type: string
    UpdateWhitelabelDefaultDeploymentTargetRequest:
      type: object
      required:
        - defaultDeploymentTarget
      properties:
        defaultDeploymentTarget:
          type: string
          nullable: true
          description: Name of the default deployment target
          example: C++ library
    GetAllImportedFromResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - data
          properties:
            data:
              type: array
              items:
                type: object
                required:
                  - id
                  - category
                  - importedFrom
                properties:
                  id:
                    type: integer
                  category:
                    type: string
                  importedFrom:
                    type: string
    ExportKerasBlockDataRequest:
      type: object
      properties:
        overrideImageInputScaling:
          $ref: '#/components/schemas/ImageInputScaling'
    EnterpriseTrial:
      type: object
      required:
        - id
        - userId
        - created
        - organizationId
        - expirationDate
        - expiredDate
        - deletedDate
        - upgradedDate
      properties:
        id:
          type: integer
          description: Unique identifier of the trial.
        userId:
          type: integer
          description: ID of the user who created the trial.
        organizationId:
          type: integer
          description: ID of the organization created for the trial.
        created:
          type: string
          format: date-time
          description: >-
            Date when the trial was created. Trials start immediately on
            creation.
        expirationDate:
          $ref: '#/components/schemas/TrialExpirationDate'
        notes:
          $ref: '#/components/schemas/TrialNotes'
        expiredDate:
          type: string
          format: date-time
          nullable: true
          description: >-
            Date when the trial actually expired. This is set when the trial is
            expired by the system.
        deletedDate:
          type: string
          format: date-time
          nullable: true
          description: >-
            Date when the trial was deleted. This is set when the trial is
            fully  deleted by the system.
        upgradedDate:
          type: string
          format: date-time
          nullable: true
          description: Date when the trial was upgraded to a full enterprise account.
    TrialExpirationDate:
      type: string
      format: date-time
      description: >-
        Expiration date of the trial. The trial will be set as expired after
        this date. There will be a grace period of 30 days after a trial expires
        before fully deleting the trial organization. This field is ignored if
        the trial is requested by a non-admin user, defaulting to 14 days trial.
      example: '2020-01-01T00:00:00Z'
    TrialNotes:
      type: string
      description: >-
        Notes about the trial. Free form text. This field is ignored if the
        trial is requested by a non-admin user.
      example: This is a trial for the company's new project.
    StartEnterpriseTrialRequest:
      type: object
      properties:
        email:
          type: string
          description: >-
            Email of the user requesting the trial. If this email is different
            to the one stored for the user requesting the trial, it will be used
            to replace the existing one.
          example: fred@flintstones.org
        name:
          type: string
          description: >-
            Name of the user requesting the trial. If this name is different to
            the one stored for the user requesting the trial, it will be used to
            replace the existing one.
          example: Fred Flintstone
        organizationName:
          type: string
          description: >-
            Name of the trial organization. All enterprise features are tied to
            an organization. This organization will be deleted after the trial
            ends. If no organization name is provided, the user's name will be
            used.
          example: My Company
        expirationDate:
          $ref: '#/components/schemas/TrialExpirationDate'
        notes:
          $ref: '#/components/schemas/TrialNotes'
        useCase:
          type: string
          description: Use case of the trial.
          example: Industrial
        userHasMLModelsInProduction:
          type: string
          enum:
            - 'yes'
            - 'no'
            - no, but we will soon
          description: Whether the user has ML models in production.
          example: 'no'
        companyName:
          type: string
          description: Name of the company requesting the trial.
          example: ACME Inc.
        companySize:
          type: string
          description: >-
            Size of the company requesting the trial. This is a range of number
            of employees.
          example: 1-10
        country:
          type: string
          description: Country of the company requesting the trial.
          example: United States
        stateOrProvince:
          type: string
          description: State or province of the company requesting the trial.
          example: California
        redirectUrlOrigin:
          type: string
          description: >-
            Origin of the redirect URL returned as result of creating the trial
            user.
          example: https://studio.edgeimpulse.com
        redirectUrlQueryParams:
          type: string
          description: >-
            Query parameters to be appended to the redirect URL returned as
            result of creating the trial user.
          example: utm_source=google&utm_medium=cpc&utm_campaign=trial
    AdminStartEnterpriseTrialRequest:
      allOf:
        - $ref: '#/components/schemas/StartEnterpriseTrialRequest'
        - type: object
          required:
            - userId
          properties:
            userId:
              type: integer
              description: ID of the user requesting the trial.
    CreateEnterpriseTrialUserRequest:
      allOf:
        - $ref: '#/components/schemas/StartEnterpriseTrialRequest'
        - type: object
          required:
            - name
            - username
            - email
            - privacyPolicy
            - turnstileResponse
          properties:
            name:
              type: string
              description: Name of the user.
              example: John Doe
            username:
              type: string
              description: >-
                Username, minimum 4 and maximum 30 characters. May contain
                alphanumeric characters, hyphens, underscores and dots.
                Validated according to
                `^(?=.{4,30}$)(?![_.])(?!.*[_.]{2})[a-zA-Z0-9._-]+(?<![_.])$`.
              example: johndoe
            email:
              type: string
              description: >-
                Email of the user. Only business email addresses are allowed.
                Emails with free domains like gmail.com or yahoo.com are not
                allowed.
              example: jan@edgeimpulse.com
            privacyPolicy:
              type: boolean
              description: >-
                Whether the user has accepted the terms of service and privacy
                policy.
            password:
              type: string
              description: Password of the user. Minimum length 8 characters.
            jobTitle:
              type: string
              description: Job title of the user.
              example: TinyML engineer
            companyName:
              type: string
              description: Name of the company requesting the trial.
              example: ACME Inc.
            redirectUrlOrigin:
              type: string
              description: >-
                Origin of the redirect URL returned as result of creating the
                trial user.
              example: https://studio.edgeimpulse.com
            redirectUrlQueryParams:
              type: string
              description: >-
                Query parameters to be appended to the redirect URL returned as
                result of creating the trial user.
              example: utm_source=google&utm_medium=cpc&utm_campaign=trial
            utmParams:
              type: array
              description: List of UTM parameters.
              items:
                $ref: '#/components/schemas/UtmParameter'
            turnstileResponse:
              type: string
              description: CloudFlare Turnstile response token
    EntityCreatedResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - id
          properties:
            id:
              type: integer
              description: Unique identifier of the created entity.
    AdminGetTrialResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - trial
          properties:
            trial:
              $ref: '#/components/schemas/EnterpriseTrial'
    AdminUpdateTrialRequest:
      type: object
      properties:
        expirationDate:
          $ref: '#/components/schemas/TrialExpirationDate'
        notes:
          $ref: '#/components/schemas/TrialNotes'
    VerifyOrganizationExistingBucketRequest:
      type: object
      required:
        - prefix
      properties:
        prefix:
          type: string
    ProjectType:
      type: string
      enum:
        - kws
        - audio
        - object-detection
        - image
        - accelerometer
        - other
    UpdateWhitelabelRequest:
      type: object
      description: Only fields set in this object will be updated.
      properties:
        supportedProjectTypes:
          type: array
          items:
            $ref: '#/components/schemas/ProjectType'
    ListEnterpriseTrialsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - trials
          properties:
            trials:
              type: array
              description: Current or past enterprise trials.
              items:
                $ref: '#/components/schemas/EnterpriseTrial'
    CreateEnterpriseTrialResponse:
      allOf:
        - $ref: '#/components/schemas/EntityCreatedResponse'
        - type: object
          properties:
            userId:
              type: integer
              description: >-
                ID of the user created for the trial, if the user did not
                already exist.
            redirectUrl:
              type: string
              description: >-
                URL to redirect the user to in order to access the enterprise
                trial.
    UserSubscriptionMetricsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          properties:
            metrics:
              type: object
              required:
                - computeMinutesCpu
                - computeMinutesGpu
                - computeMinutesTotal
                - computeMinutesLimit
              properties:
                computeMinutesCpu:
                  type: number
                  description: >-
                    Total compute of all user jobs, running on CPU, in the
                    current billing period.
                computeMinutesGpu:
                  type: number
                  description: >-
                    Total compute of all user jobs, running on GPU, in the
                    current billing period.
                computeMinutesTotal:
                  type: number
                  description: >-
                    Total compute of all user jobs in the current billing
                    period, calculated as CPU + 3*GPU compute.
                computeMinutesLimit:
                  type: number
                  description: Overall compute limit for the current billing period.
                computeResetDate:
                  type: string
                  format: date-time
                  description: >-
                    The date at which the current compute billing period will
                    reset.
            approachingComputeLimitMinutesLeft:
              type: number
              description: >
                Number of compute minutes remaining before reaching the monthly
                compute limit. This field is only present when the user has
                fewer than 60 minutes left. Once the limit is reached, users can
                continue using compute resources by subscribing to the
                pay-as-you-go plan.
    RequestEmailVerificationRequest:
      type: object
      required:
        - redirectUrl
      properties:
        redirectUrl:
          type: string
          description: URL to redirect the user after email verification.
    VerifyEmailResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          properties:
            email:
              type: string
              description: Email address that was verified.
            userId:
              type: number
              description: >-
                ID of the user associated with the verified email address, if
                any.
            redirectUrl:
              type: string
              description: URL to redirect the user to after email verification.
    ValidateEmailResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - email
            - verdict
            - score
          properties:
            email:
              type: string
              description: Email address that was checked.
            verdict:
              type: string
              description: Classification of the email's validity status
              enum:
                - Valid
                - Risky
                - Invalid
            score:
              type: number
              example: 0.98015
              description: >-
                This number from 0 to 1 represents the likelihood the email
                address is valid, expressed as a percentage.
            suggestion:
              type: string
              example: gmail.com
              description: A corrected domain, if a possible typo is detected.
            local:
              type: string
              example: jan.jongboom
              description: The first part of the email address (before the @ sign)
            host:
              type: string
              example: edgeimpulse.com
              description: The second part of the email address (after the @ sign)
    GetEmailVerificationStatusResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - verified
          properties:
            verified:
              type: boolean
              description: Whether the email address has been verified.
    GetEmailVerificationCodeResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          properties:
            code:
              type: string
              description: The verification code associated with the provided email.
              nullable: true
    VerifySignupApprovalResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - username
            - email
          properties:
            username:
              type: string
              description: The username associated with the signup.
            email:
              type: string
              description: The email address associated with the signup.
    Feature:
      type: string
      enum:
        - signup-thank-you-page
        - stripe-live-mode
        - azure-storage
        - monthly-compute-limit-enforcement
        - pay-as-you-go
        - user-screening-check
        - oauth2
        - external-apps-redirect-flow
      description: Known feature identifiers.
    GetFeatureFlagsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - flags
          properties:
            flags:
              type: array
              description: List of feature flags.
              items:
                type: object
                required:
                  - feature
                  - enabled
                properties:
                  feature:
                    $ref: '#/components/schemas/Feature'
                  enabled:
                    type: boolean
                    description: Whether the feature is enabled.
    AdminEnableFeatureRequest:
      type: object
      required:
        - feature
      properties:
        feature:
          $ref: '#/components/schemas/Feature'
          description: Feature to enable.
    GetStudioConfigResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - config
          properties:
            config:
              type: array
              description: List of config items
              items:
                type: object
                required:
                  - key
                  - value
                properties:
                  key:
                    type: string
                    description: Config key
                  value:
                    type: string
                    description: Config value (as JSON string)
    UserDismissNotificationRequest:
      type: object
      required:
        - notification
      properties:
        notification:
          type: string
    ProjectDismissNotificationRequest:
      type: object
      required:
        - notification
      properties:
        notification:
          type: string
    SetSampleStructuredLabelsRequest:
      type: object
      required:
        - structuredLabels
      properties:
        structuredLabels:
          type: array
          items:
            $ref: '#/components/schemas/StructuredLabel'
    Report:
      type: object
      required:
        - id
        - created
        - jobId
        - jobFinished
        - jobFinishedSuccessful
        - reportStartDate
        - reportEndDate
      properties:
        id:
          type: integer
        created:
          type: string
          format: date-time
        createdByUser:
          $ref: '#/components/schemas/CreatedUpdatedByUser'
        jobId:
          type: integer
        jobFinished:
          type: boolean
        jobFinishedSuccessful:
          type: boolean
        downloadLink:
          type: string
        reportStartDate:
          type: string
          format: date-time
        reportEndDate:
          type: string
          format: date-time
    ListOrganizationUsageReportsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - reports
            - totalCount
          properties:
            reports:
              type: array
              description: List of feature flags.
              items:
                $ref: '#/components/schemas/Report'
            totalCount:
              type: integer
    GetOrganizationUsageReportResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - report
          properties:
            report:
              $ref: '#/components/schemas/Report'
    CreateOrganizationUsageReportBody:
      type: object
      required:
        - reportStartDate
        - reportEndDate
      properties:
        reportStartDate:
          type: string
          format: date-time
        reportEndDate:
          type: string
          format: date-time
    ProjectVisibility:
      type: string
      enum:
        - public
        - private
      description: >-
        The visibility of the project, either public or private. Public projects
        can be viewed by anyone on the internet and edited by collaborators.
        Private projects can only be viewed and edited by collaborators.
    CreatedUpdatedByUser:
      type: object
      required:
        - id
        - name
        - username
      properties:
        id:
          type: integer
        name:
          type: string
        username:
          type: string
        photo:
          type: string
    UpdateTunerRunRequest:
      type: object
      properties:
        name:
          type: string
    UploadCsvWizardUploadedFileRequest:
      type: object
      required:
        - file
      properties:
        file:
          type: string
          format: binary
    GetCsvWizardUploadedFileInfo:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - hasFile
          properties:
            hasFile:
              type: boolean
            link:
              type: string
    ExportBlockResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - id
            - exportUrl
          properties:
            id:
              type: integer
              description: Job identifier. Status updates will include this identifier.
              example: 12873488112
            exportUrl:
              type: string
    UserGenerateNewMfaKeyResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - key
            - url
          properties:
            key:
              type: string
              description: Secret key (use SHA-1).
            url:
              type: string
              description: URL that will be converted into a QR code that can be scanned.
    UserSetTotpMfaKeyRequest:
      type: object
      required:
        - key
        - totpToken
      properties:
        key:
          type: string
          description: Secret key obtained through `userGenerateNewMfaKey`.
        totpToken:
          type: string
          description: >-
            TOTP token that is valid for the key (to ensure the device is
            configured correctly)
    UserSetTotpMfaKeyResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - recoveryCodes
          properties:
            recoveryCodes:
              type: array
              description: >-
                10 recovery codes, which can be used in case you've lost access
                to your MFA TOTP app. Recovery codes are single use. Once you've
                used a recovery code once, it can not be used again.
              items:
                type: string
    UserDeleteTotpMfaKeyRequest:
      type: object
      required:
        - totpToken
      properties:
        totpToken:
          type: string
          description: Valid TOTP token
    OrganizationDataExport:
      type: object
      required:
        - id
        - created
        - expirationDate
        - jobId
        - jobFinished
        - jobFinishedSuccessful
      properties:
        id:
          type: integer
        created:
          type: string
          format: date-time
        createdByUser:
          $ref: '#/components/schemas/CreatedUpdatedByUser'
        jobId:
          type: integer
        jobFinished:
          type: boolean
        jobFinishedSuccessful:
          type: boolean
        description:
          type: string
          description: Description of the data export
        expirationDate:
          type: string
          format: date-time
          description: >-
            Date when the export will expire. Default is 30 days. Maximum
            expiration date is 60 days from the creation date.
        downloadUrl:
          type: string
    GetOrganizationDataExportsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - exports
            - totalCount
          properties:
            exports:
              type: array
              description: List of organization data exports.
              items:
                $ref: '#/components/schemas/OrganizationDataExport'
            totalCount:
              type: integer
    GetOrganizationDataExportResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - export
          properties:
            export:
              $ref: '#/components/schemas/OrganizationDataExport'
    AdminCreateOrganizationDataExportRequest:
      type: object
      required:
        - description
      properties:
        description:
          type: string
          description: Description of the data export
        expirationDate:
          type: string
          format: date-time
          description: >-
            Date when the export will expire. Default is 30 days. Maximum
            expiration date is 60 days from the creation date.
    AdminUpdateOrganizationDataExportRequest:
      type: object
      properties:
        description:
          type: string
          description: Description of the data export
        expirationDate:
          type: string
          format: date-time
          description: >-
            Date when the export will expire. Default is 30 days. Maximum
            expiration date is 60 days from the creation date.
    DeviceDebugStreamType:
      type: string
      enum:
        - snapshot
        - inference
    StartDeviceSnapshotDebugStreamRequest:
      type: object
      required:
        - resolution
      properties:
        resolution:
          type: string
          enum:
            - high
            - low
    StartDeviceDebugStreamResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - streamId
          properties:
            streamId:
              type: integer
    CanaryResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - routeToCanary
          properties:
            routeToCanary:
              type: boolean
              description: Whether the request should be routed to the canary or not.
              example: true
    KeepDeviceDebugStreamAliveRequest:
      type: object
      required:
        - streamId
      properties:
        streamId:
          type: integer
    StopDeviceDebugStreamRequest:
      type: object
      required:
        - streamId
      properties:
        streamId:
          type: integer
    GetImpulseRecordsRequest:
      type: object
      properties:
        index:
          type: integer
        range:
          type: object
          properties:
            first:
              type: integer
            last:
              type: integer
        list:
          type: array
          items:
            type: integer
    BillingCycle:
      type: string
      enum:
        - monthly
        - yearly
      description: >
        Specifies the frequency at which the subscription fee is billed:

        - `monthly`: Billed once every month.

        - `yearly`: Billed once every year, often at a discounted rate compared
        to monthly billing.
    UpgradeSubscriptionRequest:
      type: object
      required:
        - billingCycle
        - successUrl
        - cancelUrl
      properties:
        billingCycle:
          $ref: '#/components/schemas/BillingCycle'
          description: |
            Selects the billing frequency for the subscription.
            Either 'monthly' for regular monthly charges or 'yearly'
            for annual billing with a potential discount.
        successUrl:
          type: string
          description: URL to redirect the user to after a successful checkout process.
        cancelUrl:
          type: string
          description: URL to redirect the user to after the checkout process is canceled.
    DowngradeSubscriptionRequest:
      type: object
      properties:
        downgradeReason:
          type: string
          description: Reason for downgrading the subscription.
    GetNewBlockIdResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - blockId
          properties:
            blockId:
              type: integer
    UpdateImpulseRequest:
      type: object
      properties:
        name:
          type: string
        tags:
          type: array
          items:
            type: string
        type:
          $ref: '#/components/schemas/ImpulseType'
    SetTunerPrimaryJobRequest:
      type: object
      properties:
        name:
          type: string
          description: Optional name. If no name is provided, the trial name is used.
    CloneImpulseRequest:
      type: object
      required:
        - name
      properties:
        name:
          type: string
    DailyMetricsRecord:
      type: object
      required:
        - date
        - totalUsers
        - totalStaffUsers
        - totalProjects
        - totalCurrentContractCpuComputeTimeSeconds
        - totalCurrentContractGpuComputeTimeSeconds
        - totalCurrentContractComputeTimeSeconds
        - computeTimeCalculatedSince
        - totalStorageSizeBytes
        - usersAdded
        - usersDeleted
        - projectsAdded
        - projectsDeleted
        - cpuComputeTimeSeconds
        - gpuComputeTimeSeconds
        - computeTimeSeconds
        - storageBytesAdded
        - storageBytesDeleted
      properties:
        date:
          type: string
          format: date-time
          description: Date of the metrics record.
          example: '2021-01-01T00:00:00Z'
        totalUsers:
          type: integer
          description: >
            Total number of users, if the metrics record applies to a
            non-developer profile organization.

            For developer profile organizations, we default to 0.
          example: 100
        totalStaffUsers:
          type: integer
          description: >
            Total number of staff users, if the metrics record applies to a
            non-developer profile organization.

            For developer profile organizations, we default to 0.
          example: 10
        totalProjects:
          type: integer
          description: |
            Total number of projects at the end of the metrics record date.
          example: 50
        totalCurrentContractCpuComputeTimeSeconds:
          type: integer
          description: >
            Total CPU compute time since contract start date, or organization /
            user creation date, at

            the end of the metrics record date.
          example: 100000
        totalCurrentContractGpuComputeTimeSeconds:
          type: integer
          description: >
            Total GPU compute time since contract start date, or organization /
            user creation date, at

            the end of the metrics record date.
          example: 100000
        totalCurrentContractComputeTimeSeconds:
          type: integer
          description: >
            Total compute time since contract start date, or organization / user
            creation date, at

            the end of the metrics record date.

            Compute time is calculated as CPU + 3*GPU compute time.
          example: 100000
        computeTimeCalculatedSince:
          type: string
          format: date-time
          description: >
            Date from which the total compute time is calculated. This is the
            contract start date for billing

            organizations, or organization / user creation date.
          example: '2021-01-01T00:00:00Z'
        totalStorageSizeBytes:
          type: integer
          description: |
            Total storage size in bytes at the end of the metrics record date.
          example: 1000000000
        usersAdded:
          type: integer
          description: |
            Number of users added during the metrics record date.
          example: 10
        staffUsersAdded:
          type: integer
          description: |
            Number of staff users added during the metrics record date.
          example: 1
        usersDeleted:
          type: integer
          description: |
            Number of users deleted during the metrics record date.
          example: 5
        staffUsersDeleted:
          type: integer
          description: |
            Number of staff users deleted during the metrics record date.
          example: 1
        projectsAdded:
          type: integer
          description: |
            Number of projects added during the metrics record date.
          example: 10
        projectsDeleted:
          type: integer
          description: |
            Number of projects deleted during the metrics record date.
          example: 5
        cpuComputeTimeSeconds:
          type: integer
          description: |
            Total CPU compute time during the metrics record date.
          example: 10000
        gpuComputeTimeSeconds:
          type: integer
          description: |
            Total GPU compute time during the metrics record date.
          example: 10000
        computeTimeSeconds:
          type: integer
          description: |
            Total compute time during the metrics record date.
            Compute time is calculated as CPU + 3*GPU compute time.
          example: 10000
        storageBytesAdded:
          type: integer
          description: |
            Total storage size in bytes added during the metrics record date.
          example: 1000000000
        storageBytesDeleted:
          type: integer
          description: |
            Total storage size in bytes deleted during the metrics record date.
          example: 500000000
    CreateSyntheticDataRequest:
      type: object
      required:
        - transformationBlockId
        - parameters
      properties:
        transformationBlockId:
          type: integer
          description: The ID of a Synthetic Data transform block ID (public or private)
        parameters:
          type: object
          description: Properties for this synthetic data block
          additionalProperties:
            type: string
    GetSyntheticDataConfigResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - recentJobs
          properties:
            recentJobs:
              type: array
              items:
                type: object
                required:
                  - job
                  - samples
                properties:
                  job:
                    $ref: '#/components/schemas/Job'
                  samples:
                    type: array
                    items:
                      $ref: '#/components/schemas/Sample'
            lastUsedTransformationBlockId:
              type: integer
            lastUsedParameters:
              type: object
              additionalProperties:
                type: string
    AIActionsConfigStep:
      type: object
      required:
        - transformationBlockId
        - parameters
      properties:
        transformationBlockId:
          description: The selected transformation block ID.
          type: integer
        parameters:
          description: >-
            Parameters for the transformation block. These map back to the
            parameters in OrganizationTransformationBlock 'parameters' property.
          type: object
          additionalProperties:
            type: string
    AIActionsConfig:
      type: object
      required:
        - dataCategory
        - steps
      properties:
        dataCategory:
          description: Type of data to run this AI action on.
          $ref: '#/components/schemas/AIActionsDataCategory'
        dataMetadataKey:
          description: >-
            Metadata key to filter on. Required if dataCategory is equal to
            "dataWithoutMetadataKey" or "dataWithMetadata".
          type: string
        dataMetadataValue:
          description: >-
            Metadata value to filter on. Required if dataCategory is equal to
            "dataWithMetadata".
          type: string
        steps:
          type: array
          items:
            $ref: '#/components/schemas/AIActionsConfigStep'
    AIAction:
      type: object
      required:
        - id
        - displayName
        - config
        - previewConfig
        - maxDataPreviewCount
        - gridColumnCount
        - setMetadataAfterRunning
        - cacheUnchangedSteps
      properties:
        id:
          type: integer
        name:
          type: string
          description: Manually set name (optional)
        displayName:
          type: string
          description: >-
            Name to show to the user when interacting with this action (e.g. in
            a table, or when running the action). Will return either "name" (if
            present), or a name derived from the transformation block.
        config:
          $ref: '#/components/schemas/AIActionsConfig'
        previewConfig:
          $ref: '#/components/schemas/AIActionsConfig'
        maxDataPreviewCount:
          description: >-
            When rendering preview items, the max amount of items to show (pass
            this into the previewAIActionsSamples)
          type: integer
        gridColumnCount:
          description: Number of grid columns to use during preview.
          type: integer
        lastPreviewState:
          type: object
          description: >-
            Contains the last preview state, this is filled with whatever was
            ran last, so when you refresh an AI Action it'll always have the
            exact same state as before refresh.
          required:
            - samples
            - proposedChanges
          properties:
            samples:
              type: array
              items:
                $ref: '#/components/schemas/Sample'
            proposedChanges:
              type: array
              items:
                type: object
                required:
                  - sampleId
                  - step
                  - proposedChanges
                properties:
                  sampleId:
                    type: integer
                  step:
                    type: integer
                  proposedChanges:
                    $ref: '#/components/schemas/SampleProposedChanges'
        setMetadataAfterRunning:
          type: array
          description: >-
            After the action runs, add this key/value pair as metadata on the
            affected samples.
          items:
            type: object
            required:
              - key
              - value
            properties:
              key:
                type: string
              value:
                type: string
        cacheUnchangedSteps:
          description: >-
            If enabled, will load cached results from the previous preview job
            for unchanged jobs. Disable this if you're developing your own
            custom AI Labeling job, and want to always re-run all steps.
          type: boolean
    ListAIActionsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - actions
          properties:
            actions:
              type: array
              items:
                $ref: '#/components/schemas/AIAction'
    GetAIActionResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - action
          properties:
            action:
              $ref: '#/components/schemas/AIAction'
    PreviewAIActionsSamplesRequest:
      type: object
      required:
        - saveConfig
        - dataCategory
        - maxDataPreviewCount
      properties:
        saveConfig:
          description: >-
            If this is passed in, the `previewConfig` of the AI action is
            overwritten (requires actionId to be a valid action).
          type: boolean
        dataCategory:
          description: >-
            Type of data to preview. A random subset of this data will be
            returned.
          $ref: '#/components/schemas/AIActionsDataCategory'
        dataMetadataKey:
          description: >-
            Metadata key to filter on. Required if dataCategory is equal to
            "dataWithoutMetadataKey" or "dataWithMetadata".
          type: string
        dataMetadataValue:
          description: >-
            Metadata value to filter on. Required if dataCategory is equal to
            "dataWithMetadata".
          type: string
        maxDataPreviewCount:
          description: Max. amount of data items to return.
          type: integer
    SampleProposedChanges:
      type: object
      properties:
        label:
          type: string
          description: New label (single-label)
        isDisabled:
          type: boolean
          description: >-
            True if the current sample should be disabled; or false if it should
            not be disabled.
        boundingBoxes:
          type: array
          description: >-
            List of bounding boxes. The existing bounding boxes on the sample
            will be replaced (so if you want to add new bounding boxes, use the
            existing list as a basis).
          items:
            $ref: '#/components/schemas/BoundingBox'
        metadata:
          type: object
          description: >-
            Free form associated metadata. The existing metadata on the sample
            will be replaced (so if you want to add new metadata, use the
            existing list as a basis).
          additionalProperties:
            type: string
        structuredLabels:
          type: array
          description: New label (multi-label)
          items:
            $ref: '#/components/schemas/StructuredLabel'
    SetSampleProposedChangesRequest:
      type: object
      required:
        - jobId
        - proposedChanges
      properties:
        jobId:
          type: integer
          description: >-
            Job ID of an AI Actions job. This is passed into your job via the
            --propose-actions argument.
        proposedChanges:
          $ref: '#/components/schemas/SampleProposedChanges'
    SetSampleVideoDimensionsRequest:
      type: object
      required:
        - width
        - height
      properties:
        width:
          type: integer
        height:
          type: integer
    AIActionsDataCategory:
      type: string
      enum:
        - allData
        - unlabeledData
        - enabledData
        - dataWithoutMetadataKey
        - dataWithMetadata
    CreatePreviewAIActionsJobRequest:
      type: object
      required:
        - steps
        - sampleIds
        - cacheUnchangedSteps
      properties:
        steps:
          type: array
          items:
            $ref: '#/components/schemas/AIActionsConfigStep'
        sampleIds:
          type: array
          items:
            type: integer
        cacheUnchangedSteps:
          description: >-
            If enabled, will load cached results from the previous preview job
            for unchanged jobs. Disable this if you're developing your own
            custom AI Labeling job, and want to always re-run all steps.
          type: boolean
    UpdateAIActionRequest:
      required:
        - steps
        - dataCategory
        - setMetadataAfterRunning
      properties:
        name:
          type: string
          description: >-
            User-provided name. If no name is set then displayName on the action
            will be automatically configured based on the transformation block.
        steps:
          type: array
          items:
            $ref: '#/components/schemas/AIActionsConfigStep'
        dataCategory:
          description: Type of data to run this AI action on.
          $ref: '#/components/schemas/AIActionsDataCategory'
        dataMetadataKey:
          description: >-
            Metadata key to filter on. Required if dataCategory is equal to
            "dataWithoutMetadataKey" or "dataWithMetadata".
          type: string
        dataMetadataValue:
          description: >-
            Metadata value to filter on. Required if dataCategory is equal to
            "dataWithMetadata".
          type: string
        setMetadataAfterRunning:
          type: array
          description: >-
            After the action runs, add this key/value pair as metadata on the
            affected samples.
          items:
            type: object
            required:
              - key
              - value
            properties:
              key:
                type: string
              value:
                type: string
        sortOrder:
          description: >-
            Numeric value (1..n) where this action should be shown in the action
            list (and in which order the actions should run when started from a
            data source).
          type: integer
    GetAIActionsProposedChangesResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - proposedChanges
          properties:
            proposedChanges:
              type: array
              items:
                type: object
                required:
                  - sampleId
                  - step
                  - proposedChanges
                properties:
                  sampleId:
                    type: integer
                  step:
                    type: integer
                  proposedChanges:
                    $ref: '#/components/schemas/SampleProposedChanges'
    BatchAddMetadataRequest:
      type: object
      required:
        - metadataKey
        - metadataValue
      properties:
        metadataKey:
          type: string
        metadataValue:
          type: string
    BatchClearMetadataByKeyRequest:
      type: object
      required:
        - metadataKey
      properties:
        metadataKey:
          type: string
    SetAIActionsOrderRequest:
      required:
        - orderByActionId
      properties:
        orderByActionId:
          type: array
          items:
            type: integer
    StorageProvider:
      type: string
      enum:
        - s3
        - google
        - azure
        - other
    AddApiKeyResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - id
            - apiKey
          properties:
            id:
              type: integer
              description: ID of the new API key
            apiKey:
              type: string
              description: >-
                New API Key (starts with "ei_...") - this'll be shared only
                once.
    TrashBinEntity:
      type: object
      description: >
        Represents an entity (either an organization, a user or a project) that
        has been moved to the trash bin.

        The entity must have either an organizationId, a userId or a projectId,
        but not multiple of them.

        At least one of these IDs must be present.
      required:
        - id
        - deletedAt
        - name
        - deletionRequestedByUserEmail
      properties:
        id:
          type: integer
          description: >-
            The ID of the entity in the trash bin. This is not the same as the
            user, project or organization ID.
        organizationId:
          type: integer
          description: >
            The ID of the organization in the trash bin.

            This should only be set if the entity is an organization (userId and
            projectId should be null in this case).
        userId:
          type: integer
          description: >
            The ID of the user in the trash bin.

            This should only be set if the entity is a user (organizationId and
            projectId should be null in this case).
        projectId:
          type: integer
          description: >
            The ID of the project in the trash bin.

            This should only be set if the entity is a project (organizationId
            and userId should be null in this case).
        name:
          type: string
          description: The name of the entity in the trash bin.
        deletedAt:
          type: string
          format: date-time
          description: The timestamp when the entity was moved to the trash bin.
        fullyDeletedAt:
          type: string
          format: date-time
          description: The timestamp when the entity was permanently deleted.
        deletionRequestedByUserEmail:
          type: string
          description: The email of the user that requested the deletion.
    AdminGetTrashBinResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          description: |
            Response containing a list of entities currently in the trash bin.
            Each entity represents either a deleted organization or user.
          required:
            - total
            - entities
          properties:
            total:
              type: integer
              description: Total number of entities in the trash bin.
            trashbin:
              type: array
              items:
                $ref: '#/components/schemas/TrashBinEntity'
    ConvertParquetToCsvRequest:
      type: object
      required:
        - file
      properties:
        file:
          type: string
          format: binary
    ConvertParquetToCsvResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - csvFile
          properties:
            csvFile:
              type: string
    GetAllTransferLearningModelsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - transferLearningModels
          properties:
            transferLearningModels:
              type: array
              items:
                $ref: '#/components/schemas/TransferLearningModel'
    BlockThreshold:
      type: object
      description: >-
        Configurable threshold for this block (e.g. minimum score before tagging
        as an anomaly, or the min. score to save bounding boxes)
      required:
        - key
        - description
        - helpText
        - value
      properties:
        key:
          type: string
          description: >-
            Identifier to reference the threshold. You'll need to refer to the
            threshold by this key when you set the threshold).
          example: min_score
        description:
          type: string
          description: User-friendly description of the threshold.
          example: Score threshold
        helpText:
          type: string
          description: Additional help text (shown in the UI under a "?" icon)
          example: >-
            Threshold score for bounding boxes. If the score for a bounding box
            is below this the box will be discarded.
        suggestedValue:
          type: number
          description: >-
            If the threshold has a suggested value, e.g. a max. absolute error
            for regression projects; or the min. anomaly score for visual
            anomaly detection, then this is the numeric value of that threshold.
        suggestedValueText:
          type: string
          description: >-
            If the threshold has a suggested value, e.g. a max. absolute error
            for regression projects; or the min. anomaly score for visual
            anomaly detection, then this is the stringified value of that
            threshold.
        value:
          description: Current value of the threshold
          example: 0.5
          oneOf:
            - type: number
            - type: string
        dropdownOptions:
          description: Optional list of options, will be shown in a dropdown.
          type: array
          items:
            type: object
            required:
              - description
              - value
            properties:
              description:
                type: string
                description: Full description of the value
              value:
                type: string
                description: Value, maps back to "BlockThreshold#value"
    SetImpulseThresholdsRequest:
      type: object
      required:
        - thresholds
        - allowCreatingRegenerateModelTestingJobs
      properties:
        thresholds:
          type: array
          items:
            type: object
            required:
              - blockId
              - key
              - value
            properties:
              blockId:
                type: integer
                description: Learn block ID for which you want to set the threshold
              key:
                type: string
                description: Threshold identifier (see BlockThreshold#key)
              value:
                description: New threshold value
                oneOf:
                  - type: number
                  - type: string
        allowCreatingRegenerateModelTestingJobs:
          type: boolean
          description: >
            Whether a call to this function is allowed to create jobs to
            regenerate model testing results

            (e.g. object detection datasets, or large datasets).

            This option is here because further calls to setImpulseThresholds
            are blocked

            while model testing jobs are running (so e.g. live classification
            has this to FALSE).
        forceRunRegenerateModelTestingInJob:
          type: boolean
          description: >-
            If set, this'll force the creation of a job to regenerate the model
            testing results.
    SetImpulseThresholdsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - hadModelTestingResults
            - regenerateModelTestingStatus
          properties:
            hadModelTestingResults:
              description: >-
                Whether there were model testing results available before
                calling this function.
              type: boolean
            regenerateModelTestingStatus:
              description: >
                Altering thresholds invalidates model testing results. We try to
                regenerate the results where possible.

                You'll get either

                "not_regenerated" (e.g. no model testing results, or dataset
                does not support fast regeneration, like for object detection
                models);

                "regenerated" (regeneration successful);

                "started_job" (regenerate is possible, but requires a job, that
                was kicked off - e.g. for large test sets);

                "requires_job" (requires a job, but
                "allowCreatingRegenerateModelTestingJobs" was false - start a
                new job manually via regenerateModelTestingSummary).

                If a job was started then "regenerateModelTestingResultsJobId"
                is set.
              type: string
              enum:
                - not_regenerated
                - regenerated
                - started_job
                - requires_job
            regenerateModelTestingResultsJobId:
              description: >
                If there previously were model testing results, and your dataset
                supports fast re-generation of model testing results

                (e.g. no object detection blocks), but your dataset is too big
                to re-generate results inline (e.g. >20K test set samples) -

                then a job is kicked off to regenerate the results. This field
                contains the job ID.
              type: integer
    AcceptEulaRequest:
      required:
        - name
      properties:
        name:
          $ref: '#/components/schemas/UserEulaName'
    ObjectTrackingPostProcessingObject:
      type: object
      required:
        - label
        - id
        - x
        - 'y'
        - width
        - height
      properties:
        label:
          type: string
        id:
          type: integer
        x:
          type: number
        'y':
          type: number
        width:
          type: number
        height:
          type: number
    ObjectTrackingPostProcessingResult:
      type: object
      required:
        - frames
        - parameters
      properties:
        frames:
          type: array
          items:
            type: object
            required:
              - frameIndex
              - objects
            properties:
              frameIndex:
                type: integer
              objects:
                type: array
                items:
                  $ref: '#/components/schemas/ObjectTrackingPostProcessingObject'
        parameters:
          type: object
          additionalProperties:
            type: string
    ObjectDetectionPostProcessingObject:
      type: object
      required:
        - label
        - x
        - 'y'
        - width
        - height
        - score
      properties:
        label:
          type: string
        x:
          type: number
        'y':
          type: number
        width:
          type: number
        height:
          type: number
        score:
          type: number
    ObjectDetectionPostProcessingResult:
      type: object
      required:
        - frames
      properties:
        frames:
          type: array
          items:
            type: object
            required:
              - frameIndex
              - objects
            properties:
              frameIndex:
                type: integer
              objects:
                type: array
                items:
                  $ref: '#/components/schemas/ObjectDetectionPostProcessingObject'
    GetPostProcessingResultsForSampleResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - hasResults
          properties:
            hasResults:
              type: string
              enum:
                - has-results
                - job-is-running
                - no-results
            results:
              type: object
              properties:
                objectTracking:
                  $ref: '#/components/schemas/ObjectTrackingPostProcessingResult'
                objectDetection:
                  $ref: '#/components/schemas/ObjectDetectionPostProcessingResult'
            jobIsRunning:
              type: object
              required:
                - jobId
                - config
              properties:
                jobId:
                  type: integer
                config:
                  $ref: '#/components/schemas/PostProcessingConfigRequest'
    GetPostProcessingFeaturesForSampleResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - results
          properties:
            results:
              type: object
              properties:
                objectTracking:
                  $ref: '#/components/schemas/ObjectTrackingPostProcessingResult'
                objectDetection:
                  $ref: '#/components/schemas/ObjectDetectionPostProcessingResult'
    GetFeaturesForPostProcessingSampleResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - features
          properties:
            features:
              type: array
              items:
                type: number
    OauthGrantType:
      type: string
      description: >
        The OAuth 2.0 grant type as defined in RFC 6749.

        Determines how the client obtains access tokens from the authorization
        server.
      enum:
        - authorization_code
        - implicit
        - password
        - client_credentials
        - refresh_token
      example: authorization_code
    OauthClient:
      type: object
      description: >-
        Metadata and configuration details for a registered OAuth client
        application.
      required:
        - id
        - clientId
        - name
        - createdByUserId
        - createdAt
      properties:
        id:
          type: integer
          description: >
            Internal database identifier for the OAuth client.

            This value is used only within the system and is not exposed to or
            used by the OAuth client itself.
          example: 101
        clientId:
          type: string
          description: >
            The public, unique identifier assigned to the OAuth client.

            This value is shared with the client application and is used to
            identify the client during OAuth authentication and authorization
            flows.
          example: 56786343-473a-4e52-af7c-d9b29ca84f8c
        name:
          type: string
          description: Human-readable name of the OAuth client application.
          example: Awesome Edge Impulse Client
        description:
          type: string
          description: >-
            Human-readable description providing details about the OAuth client
            application and its purpose.
          example: This Edge Impulse client does this and that
        redirectUris:
          type: array
          items:
            type: string
          description: >
            List of allowed redirect URIs for the OAuth client.

            After successful authorization, users are redirected to one of these
            URIs. Only these URIs are permitted to prevent redirection attacks.
          example:
            - https://client.example.com/callback
            - https://client.example.com/alt-callback
        allowedGrantTypes:
          type: array
          items:
            $ref: '#/components/schemas/OauthGrantType'
          description: >
            List of OAuth 2.0 grant types that the client is permitted to use.

            Common values include 'authorization_code', 'client_credentials',
            'refresh_token', etc.
          example:
            - authorization_code
            - refresh_token
        scopes:
          type: array
          items:
            $ref: '#/components/schemas/OAuthScope'
          description: |
            List of OAuth scopes that the client is allowed to request.
            Scopes define the level of access the client has to user resources.
            For example, 'projects:read', 'projects:write', etc.
          example:
            - projects:read
            - projects:write
        createdAt:
          type: string
          format: date-time
          description: Timestamp indicating when the OAuth client was registered.
        createdByUserId:
          type: integer
          description: Unique identifier of the user who registered the OAuth client.
        createdByUserName:
          type: string
          description: Name of the user who registered the OAuth client.
        createdByUserEmail:
          type: string
          description: Email address of the user who registered the OAuth client.
        requiresConsent:
          type: boolean
          description: >-
            Indicates whether this OAuth client requires explicit user consent.
            Internal clients may not require consent.
          example: false
        isPublic:
          type: boolean
          description: >-
            Indicates whether this OAuth client is a public client (e.g.
            native/SPA using PKCE) and does not require a client secret.
          example: true
        logoUrl:
          type: string
          description: URL of the OAuth client logo.
          example: https://client.example.com/logo.png
        ownerName:
          type: string
          description: Name of the owner of the OAuth client.
          example: John Doe
        ownerUrl:
          type: string
          description: URL of the owner of the OAuth client.
          example: https://john.doe.com
    AdminGetOauthClientsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - oauthClients
          properties:
            oauthClients:
              type: array
              items:
                $ref: '#/components/schemas/OauthClient'
            totalCount:
              type: integer
              description: Total number of OAuth clients in the system.
    AdminGetOauthClientResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - oauthClient
          properties:
            oauthClient:
              $ref: '#/components/schemas/OauthClient'
    OauthClientProperties:
      type: object
      properties:
        name:
          type: string
          description: Name of the OAuth client
          example: My Application
        description:
          type: string
          description: Optional description of the OAuth client
          example: This is my application that uses OAuth
        redirectUris:
          type: array
          description: List of allowed redirect URIs for this client
          items:
            type: string
            example:
              - https://myapp.com/callback
              - https://myapp.com/oauth/callback
        allowedGrantTypes:
          type: array
          description: List of allowed OAuth grant types for this client
          items:
            $ref: '#/components/schemas/OauthGrantType'
          example:
            - authorization_code
            - refresh_token
        scopes:
          type: array
          description: List of allowed scopes for this client
          items:
            type: string
          example:
            - projects:read
            - projects:write
        requiresConsent:
          type: boolean
          description: >-
            Indicates whether this OAuth client requires explicit user consent.
            Internal clients may not require consent.
          example: false
        isPublic:
          type: boolean
          description: >-
            Indicates whether this OAuth client is a public client (e.g.
            native/SPA using PKCE) and does not require a client secret.
          example: true
        logoUrl:
          type: string
          description: URL of the OAuth client logo
          example: https://myapp.com/logo.png
        ownerName:
          type: string
          description: Name of the owner of the OAuth client
          example: John Doe
        ownerUrl:
          type: string
          description: URL of the owner of the OAuth client
          example: https://johndoe.com
    AdminCreateOauthClientRequest:
      allOf:
        - $ref: '#/components/schemas/OauthClientProperties'
        - type: object
          required:
            - name
            - redirectUris
    AdminCreateOauthClientResponse:
      allOf:
        - $ref: '#/components/schemas/EntityCreatedResponse'
        - type: object
          required:
            - clientId
            - clientSecret
          properties:
            clientId:
              type: string
              description: |
                The public, unique identifier assigned to the OAuth client.
                This value is used by the client application to identify itself
                during OAuth authentication and authorization flows.
              example: 56786343-473a-4e52-af7c-d9b29ca84f8c
            clientSecret:
              type: string
              description: >
                A confidential secret known only to the client and the
                authorization server.

                The client secret is only shown once at creation and cannot be
                retrieved later.

                Users must save this value securely. If the secret is lost or
                compromised,

                a new secret must be generated using the
                adminRotateOauthClientSecret endpoint.
              example: 5f174550762748a2ba9423711e9fe2fd
    AdminUpdateOauthClientRequest:
      allOf:
        - $ref: '#/components/schemas/OauthClientProperties'
        - type: object
    AdminRotateOauthClientSecretResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - clientSecret
          properties:
            clientSecret:
              type: string
              description: >
                A confidential secret known only to the client and the
                authorization server.

                The client secret is only shown once at creation and cannot be
                retrieved later.

                Users must save this value securely. If the secret is lost or
                compromised,

                a new secret must be generated using the
                adminRotateOauthClientSecret endpoint.
              example: 5f174550762748a2ba9423711e9fe2fd
    ImportDataFromAnotherProjectJobRequest:
      type: object
      required:
        - projectId
      properties:
        projectId:
          type: integer
    MetadataFilterOptions:
      type: object
      required:
        - totalCount
        - count
        - optionsList
      properties:
        totalCount:
          type: integer
        count:
          type: integer
        optionsList:
          type: array
          description: >-
            Available metadata filter options that can be supplied to the
            /raw-data/ endpoint to filter samples
          items:
            type: object
            required:
              - key
              - options
            properties:
              key:
                example: locationId
                type: string
              options:
                type: array
                example:
                  - buildingA
                  - buildingB
                items:
                  type: string
    GetDatasetRatioResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - $ref: '#/components/schemas/DatasetRatioData'
    ExportInferenceHistoryDataRequest:
      type: object
      required:
        - deploymentId
        - startTimestamp
        - endTimestamp
        - format
      properties:
        deploymentId:
          type: number
        startTimestamp:
          type: number
        endTimestamp:
          type: number
        deviceFilters:
          type: string
          description: Optional list of devices to filter by, given as a JSON string
        format:
          type: string
          description: Data export format
          enum:
            - row-per-summary
            - row-per-value
    CreateMultiProjectDeploymentRequest:
      type: object
      required:
        - engine
        - impulses
      properties:
        impulses:
          type: array
          items:
            type: object
            required:
              - projectId
              - impulseId
              - variant
            properties:
              projectId:
                type: integer
              impulseId:
                type: integer
              variant:
                $ref: '#/components/schemas/KerasModelVariantEnum'
        engine:
          $ref: '#/components/schemas/ModelEngineShortEnum'
    VlmModel:
      type: object
      required:
        - modelId
        - modelName
        - type
        - description
        - cardLink
        - defaultParameters
      properties:
        modelId:
          type: number
          example: 1
        modelName:
          type: string
          example: qwen/qwen3-vl-8b-instruct
        type:
          $ref: '#/components/schemas/VlmModelType'
        description:
          type: string
          example: >-
            Qwen3 VL 8B Instruct is a multimodal open-weight model for zero-shot
            image classification via text prompts
        requiresWarmup:
          type: boolean
          description: >-
            If true, the warmup endpoint may be called to prepare the model for
            inference
        availablePromptComponents:
          type: array
          description: >-
            List of example prompt templates available for insertion. Each
            template is an array of components defining the prompt text and
            whether the component is user-editable.
          items:
            type: array
            items:
              $ref: '#/components/schemas/VlmPromptComponent'
        defaultParameters:
          type: array
          items:
            $ref: '#/components/schemas/DSPGroup'
    VlmModelType:
      type: string
      enum:
        - clip
        - vlmZeroShot
    VlmPromptComponent:
      type: object
      required:
        - text
        - userEditable
      properties:
        text:
          type: string
          description: The text content of the prompt.
          example: >
            Analyze the image.

            If it contains <__insert description__> respond with class <__insert
            label__>.

            If it contains <__insert description__> respond with class <__insert
            label__>.

            ...

            If none of the above apply, respond with class <__unknown class__>.

            Respond with this JSON schema: { \"class\": str } and nothing else.
        userEditable:
          type: boolean
          description: Indicates whether the prompt component can be edited by the user.
          example: true
    VlmPromptComponentConfig:
      type: object
      required:
        - version
        - promptComponents
      properties:
        version:
          type: integer
        promptComponents:
          type: array
          items:
            $ref: '#/components/schemas/VlmPromptComponent'
    VlmCandidateLabelItem:
      type: object
      required:
        - class
        - description
      properties:
        class:
          type: string
        description:
          type: string
    VlmCandidateLabelMap:
      type: object
      required:
        - version
        - candidateLabels
      properties:
        version:
          type: integer
        candidateLabels:
          type: array
          items:
            $ref: '#/components/schemas/VlmCandidateLabelItem'
    VlmPromptConfigParamItem:
      type: object
      required:
        - name
        - value
      properties:
        name:
          type: string
        value:
          type: string
    VlmPromptConfigParameters:
      type: object
      required:
        - version
        - modelParameters
      properties:
        version:
          type: integer
        modelParameters:
          type: array
          items:
            $ref: '#/components/schemas/VlmPromptConfigParamItem'
    VlmConfigurationBase:
      type: object
      required:
        - modelId
      properties:
        modelId:
          type: number
        deploymentId:
          type: number
        candidateLabelsMap:
          $ref: '#/components/schemas/VlmCandidateLabelMap'
        promptComponents:
          $ref: '#/components/schemas/VlmPromptComponentConfig'
        parameters:
          $ref: '#/components/schemas/VlmPromptConfigParameters'
    VlmConfiguration:
      allOf:
        - $ref: '#/components/schemas/VlmConfigurationBase'
        - type: object
          required:
            - configId
          properties:
            configId:
              type: number
              description: Unique configuration ID, updated each time the config is changed
    VlmMetadata:
      type: object
      required:
        - name
      properties:
        name:
          type: string
        thresholds:
          type: array
          description: List of configurable thresholds for this block.
          items:
            $ref: '#/components/schemas/BlockThreshold'
        config:
          description: Prompt config
          $ref: '#/components/schemas/VlmConfiguration'
    VlmConfigResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          description: VLM block metadata
          properties:
            metadata:
              $ref: '#/components/schemas/VlmMetadata'
    VlmSetConfigResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
    VlmGetInferenceResultsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - $ref: '#/components/schemas/VlmInferenceResults'
    VlmInferenceResults:
      type: object
      required:
        - configId
        - results
      properties:
        configId:
          type: integer
          description: VLM config ID associated with these results
        results:
          type: array
          items:
            type: object
            required:
              - sample
              - result
            properties:
              sample:
                $ref: '#/components/schemas/Sample'
              result:
                type: object
                description: Classification results for the sample
                example:
                  person: 1
                additionalProperties:
                  type: number
    VlmInferenceRequest:
      type: object
      required:
        - sampleIds
      properties:
        sampleIds:
          type: array
          items:
            type: integer
        newConfig:
          $ref: '#/components/schemas/VlmConfigurationBase'
          description: >-
            Provide a configuration to update if available. This configuration
            must be supplied at least once for the specified project and learn
            ID, and it will be saved persistently. If not provided, the most
            recently saved configuration will be used.
    VlmGetAllModelsResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          properties:
            models:
              type: array
              items:
                $ref: '#/components/schemas/VlmModel'
    VlmGetModelResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          properties:
            model:
              $ref: '#/components/schemas/VlmModel'
    DeploymentHistory:
      type: object
      required:
        - created
        - deploymentVersion
        - deploymentFormat
        - engine
        - impulseId
        - impulseName
        - impulseIsDeleted
        - impulseHasChangedSinceDeployment
        - downloadUrl
      properties:
        created:
          type: string
          format: date-time
          description: Date when the model was deployed
        deploymentVersion:
          type: integer
        deploymentFormat:
          type: string
        deploymentTarget:
          $ref: '#/components/schemas/ProjectDeploymentTarget'
        engine:
          $ref: '#/components/schemas/DeploymentTargetEngine'
        modelType:
          $ref: '#/components/schemas/KerasModelTypeEnum'
        impulseId:
          type: integer
        impulseName:
          type: string
        impulseIsDeleted:
          type: boolean
        createdByUser:
          description: The user who created this deployment (empty if created through API).
          $ref: '#/components/schemas/CreatedUpdatedByUser'
        impulseHasChangedSinceDeployment:
          description: >-
            Set to true if the deployment no longer exactly matches the impulse
            it was created from (e.g. model was trained since the deployment was
            created, or some thresholds have changed)
          type: boolean
        downloadUrl:
          type: string
    ListDeploymentHistoryResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - deployments
            - totalDeploymentCount
          properties:
            deployments:
              type: array
              items:
                $ref: '#/components/schemas/DeploymentHistory'
            totalDeploymentCount:
              type: integer
    BuildOnDeviceModelResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - id
            - deploymentVersion
          properties:
            id:
              type: integer
              description: Job identifier. Status updates will include this identifier.
              example: 12873488112
            deploymentVersion:
              type: integer
              description: >-
                Deployment version, use `downloadHistoricDeployment` to later
                download the deployment using this identifier.
    GetDeploymentHistoryResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - deployment
          properties:
            deployment:
              $ref: '#/components/schemas/DeploymentHistory'
security:
  - ApiKeyAuthentication: []
  - JWTAuthentication: []
  - JWTHttpHeaderAuthentication: []
  - OAuth2: []
