openapi: 3.1.0
info:
  title: TMT API
  description: API working with Test suites in TMT
  version: 1.0.0
paths:
  /api/v2/rpc (GET_DOCUMENT for Test Suite):
    post:
      summary: Get test suite detail
      description: Get content of a test suite by given test suite document reference
      parameters:
        - $ref: '#/components/parameters/ProjectIdHeader'
        - $ref: '#/components/parameters/SubProjectIdHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetDocumentRequest'
              examples:
                $ref: example/GET_TEST_SUITE-request.json
      responses:
        '200':
          description: Content of the test suite
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestSuiteDocumentResponse'
                examples:
                  $ref: example/GET_TEST_SUITE-response.json
  /api/v2/rpc (ADD_DOCUMENT for Test suite):
    post:
      summary: Add test suite
      description: Add a new test suite
      parameters:
        - $ref: '#/components/parameters/ProjectIdHeader'
        - $ref: '#/components/parameters/SubProjectIdHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddTestSuiteRequest'
              examples:
                $ref: example/ADD_TEST_SUITE-request.json
      responses:
        '200':
          description: docRef of the created test suite
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddDocumentResponse'
                examples:
                  $ref: example/ADD_TEST_SUITE-response.json
  /api/v2/rpc (LIST_TEST_SUITES):
    post:
      summary: List test suites
      description: List of test suites for given project version
      parameters:
        - $ref: '#/components/parameters/ProjectIdHeader'
        - $ref: '#/components/parameters/SubProjectIdHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListTestSuiteRequest'
              examples:
                $ref: example/LIST_TEST_SUITE-request.json
      responses:
        '200':
          description: docRef of the created test suite
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTestSuiteResponse'
                examples:
                  $ref: example/LIST_TEST_SUITE-response.json
  /api/v2/rpc (MODIFY_DOCUMENT for Test suite):
    post:
      summary: Update test suite
      description: Update content of a test suite
      parameters:
        - $ref: '#/components/parameters/ProjectIdHeader'
        - $ref: '#/components/parameters/SubProjectIdHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModifyTestSuiteRequest'
              examples:
                $ref: example/MODIFY_TEST_SUITE-request.json
      responses:
        '200':
          description: Successful response after update project
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModifyDocumentResponse'
                examples:
                  $ref: example/MODIFY_TEST_SUITE-response.json
  /api/v2/rpc (DELETE_TEST_SUITE):
    post:
      summary: Delete a test suite
      description: >
        Trigger a task request to delete an existing test suite. Task request
        will then run on background <br/> You can call [Get task
        request](./task#/paths/~1api~1v2~1rpc%20(GET_DOCUMENT)/post)
        periodically to get the task's status


        **Notice:** A test suite is only deleted if it is not in any open test
        run
      parameters:
        - $ref: '#/components/parameters/ProjectIdHeader'
        - $ref: '#/components/parameters/SubProjectIdHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteTestSuiteRequest'
              examples:
                $ref: example/DELETE_TEST_SUITE-request.json
      responses:
        '200':
          description: >-
            Ok. **The test suite will be deleted in the background**. In the
            next release, we will return the document reference of the
            associated task request instead
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteTestSuiteResponse'
                examples:
                  $ref: example/DELETE_TEST_SUITE-response.json
  /api/v2/rpc (GET_TEST_SUITES_IN_RUN):
    post:
      summary: Get test suites in a test run
      description: Return all test suites that are in a test run
      parameters:
        - $ref: '#/components/parameters/ProjectIdHeader'
        - $ref: '#/components/parameters/SubProjectIdHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetTestSuitesInRunRequest'
              examples:
                $ref: example/GET_TEST_SUITES_IN_RUN-request.json
      responses:
        '200':
          description: Test suites that are in Run, along its linked document
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTestSuitesInRunResponse'
                examples:
                  $ref: example/GET_TEST_SUITES_IN_RUN-response.json
security:
  - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
  schemas:
    GetTestSuitesInRunRequest:
      allOf:
        - $ref: '#/components/schemas/RpcRequestWithIdAndJsonRpc'
        - type: object
          required:
            - method
            - params
          properties:
            method:
              type: string
              description: GET_TEST_SUITES_IN_RUN
            params:
              required:
                - testRunDocRef
              properties:
                testRunDocRef:
                  type: string
                  description: test run document reference
      examples:
        - id: TestSuites.DataProvider-98
          jsonrpc: '2.0'
          method: GET_TEST_SUITES_IN_RUN
          params:
            testRunDocRef: TestRun-dm/19517
            filter:
              filters:
                - Root.General.ProjectId:P_9
                - Root.General.SubprojectId:SP_2
                - Root.General.ProjectVersionNumber:1.0.0
              fulltext: ''
              lang: ''
            page:
              offset: 0
              limit: 50
            sort:
              - order: target.Root.General.Title ASC
    GetTestSuitesInRunResponse:
      allOf:
        - $ref: '#/components/schemas/ListDocumentResponse'
        - type: object
          properties:
            result:
              properties:
                entries:
                  items:
                    allOf:
                      - $ref: '#/components/schemas/TestSuiteInRunDocumentResult'
      examples:
        - jsonrpc: '2.0'
          id: TestSuites.DataProvider-98
          result:
            fullSize: 2
            page:
              offset: 0
              limit: 50
            entries:
              - docRef: TestRunTestSuiteTestSuite-dm/18283
                documentModelName: TestRunTestSuiteTestSuite-dm
                document:
                  target:
                    Root:
                      General:
                        ProjectId: P_9
                        ProjectVersionNumber: 1.0.0
                        SubprojectId: SP_2
                        Title: 01 Payment types and capturing
                        Id: S_15
                        TechnicalId: d773eab2-f92d-43e1-9ca7-ee3ee1ebd2a6
                        TenantId: T_1
                        Order: '2'
                        RecommendedPriority:
                          Value: MEDIUM
                      Metadata:
                        CreatedBy: peter.parker
                        DisplayCreatedOn: '2022-12-05T13:14:09'
                        CreatedOn: 1670246049789
                        EditedBy: peter.parker
                        DisplayEditedOn: '2022-12-05T13:14:18'
                        EditedOn: 1670246058338
                        AssignedToVersion:
                          AssignedToNumber: 1.0.0
                          AssignedToTitle: ERP & PIM
                      DisplayFields:
                        TotalRunningTestCases: 0
                        TotalTestCases: 0
                    __meta:
                      creator: peter.parker
                      modifier: peter.parker
                      docRef: TestSuite-dm/1615
                      modelReference: TestSuite-dm
                      createdAt: '2022-12-05T13:14:09'
                      modifiedAt: '2023-11-20T03:59:04'
                      modelVersion: null
                    docRef: TestSuite-dm/1615
                  relationship:
                    id: TestRunTestSuiteAdditionalFields-dm
                    Root:
                      General:
                        Assignee: peter.lange
                        TenantId: T_1
                        ProjectId: P_9
                        SubprojectId: SP_2
                        RecommendedPriority:
                          Value: MEDIUM
                    __meta:
                      creator: peter.lange
                      modifier: peter.lange
                      docRef: TestRunTestSuiteAdditionalFields-dm/19519
                      modelReference: TestRunTestSuiteAdditionalFields-dm
                      createdAt: '2023-08-07T12:12:51'
                      modifiedAt: '2023-10-31T07:44:02'
                      modelVersion: null
                    docRef: TestRunTestSuiteAdditionalFields-dm/19519
              - docRef: TestRunTestSuiteTestSuite-dm/18284
                documentModelName: TestRunTestSuiteTestSuite-dm
                document:
                  target:
                    Root:
                      General:
                        ProjectId: P_9
                        ProjectVersionNumber: 1.0.0
                        SubprojectId: SP_2
                        Title: 02 Pending payments
                        Id: S_16
                        TechnicalId: 584fa015-7f25-438b-b9ad-15ec5e4c886f
                        TenantId: T_1
                        Order: '3'
                        RecommendedPriority:
                          Value: MEDIUM
                      Metadata:
                        CreatedBy: peter.parker
                        DisplayCreatedOn: '2022-12-05T13:14:28'
                        CreatedOn: 1670246068283
                        EditedBy: peter.parker
                        DisplayEditedOn: '2022-12-05T13:14:35'
                        EditedOn: 1670246075967
                        AssignedToVersion:
                          AssignedToNumber: 1.0.0
                          AssignedToTitle: ERP & PIM
                      DisplayFields:
                        TotalRunningTestCases: 0
                        TotalTestCases: 0
                    __meta:
                      creator: peter.parker
                      modifier: peter.parker
                      docRef: TestSuite-dm/1616
                      modelReference: TestSuite-dm
                      createdAt: '2022-12-05T13:14:28'
                      modifiedAt: '2023-11-20T03:59:04'
                      modelVersion: null
                    docRef: TestSuite-dm/1616
                  relationship:
                    id: TestRunTestSuiteAdditionalFields-dm
                    Root:
                      General:
                        Assignee: peter.lange
                        TenantId: T_1
                        ProjectId: P_9
                        SubprojectId: SP_2
                        RecommendedPriority:
                          Value: MEDIUM
                    __meta:
                      creator: peter.lange
                      modifier: peter.lange
                      docRef: TestRunTestSuiteAdditionalFields-dm/19520
                      modelReference: TestRunTestSuiteAdditionalFields-dm
                      createdAt: '2023-08-07T12:12:51'
                      modifiedAt: '2023-10-31T07:44:02'
                      modelVersion: null
                    docRef: TestRunTestSuiteAdditionalFields-dm/19520
    DeleteTestSuiteRequest:
      allOf:
        - $ref: '#/components/schemas/RpcRequestWithIdAndJsonRpc'
        - type: object
          required:
            - method
            - params
          properties:
            method:
              type: string
              description: DELETE_TEST_SUITE
            params:
              required:
                - testSuiteDocRef
              properties:
                testSuiteDocRef:
                  type: string
                  description: document reference of the deleted suite
      examples:
        - jsonrpc: '2.0'
          id: delete_test_suite_operation_id_1
          method: DELETE_TEST_SUITE
          params:
            testSuiteDocRef: TestSuite-dm/123
    DeleteTestSuiteResponse:
      allOf:
        - $ref: '#/components/schemas/RpcResult'
        - type: object
          properties:
            result:
              type: object
              description: OK
      examples:
        - jsonrpc: '2.0'
          id: delete_test_suite_operation_id_1
          result: OK
    ModifyTestSuiteRequest:
      allOf:
        - $ref: '#/components/schemas/ModifyDocumentRequest'
        - type: object
          required:
            - method
            - params
          properties:
            params:
              required:
                - docRef
                - locale
                - document
              properties:
                document:
                  $ref: '#/components/schemas/TestSuiteDocument'
      examples:
        - id: MODIFY_TEST_SUITE
          method: MODIFY_DOCUMENT
          params:
            document:
              Root:
                General:
                  ProjectId: P_9
                  ProjectVersionNumber: 1.0.0
                  SubprojectId: SP_2
                  Title: Incoming order
                  Id: S_14
                  TechnicalId: c1cd1a9b-5313-4fb0-8f05-ce194820c8d4
                  TenantId: T_1
                  Order: '1'
                  Tags: order,payment,address
                  Description: >-
                    This suites contains the test cases that test for the
                    incoming orders
                  SearchableTags: '|[order]|'
                  RecommendedPriority:
                    Value: HIGH
                  SearchTags:
                    - Value: order
                Metadata:
                  CreatedBy: peter.parker
                  DisplayCreatedOn: '2022-12-05T13:13:57'
                  CreatedOn: 1670246037200
                  EditedBy: trung
                  DisplayEditedOn: '2024-11-11T03:42:35'
                  EditedOn: 1731296555565
                  AssignedToVersion:
                    AssignedToNumber: 1.0.0
                    AssignedToTitle: ERP & PIM
                  LatestTestCaseExecutionData:
                    TestedOn: '2023-08-07T12:17:15'
                    TestedBy: peter.lange
                    TestRunId: R_3
                    TestRunTitle: Run 1
                    VersionId: 1.0.0
                    VersionTitle: ERP & PIM
                    TestCaseId: C_39
                    TestCaseTitle: Yet another test case
                Attachments:
                  - FileName: index.country.m3u
                    CreatedAt: '2024-11-11T03:42:30'
                    UploadOn: '2024-11-11'
                    OriginalFileName: index.country.m3u
                    UploadBy: trung
                    Referenced: false
                    CopyNumber: 0
                    ThumbnailId: ''
                    File:
                      content: null
                      attachment_id: 4e66782a-65e6-427a-9aaf-7a1c365d9290
                      internal_filename: 1731296538385-adb3718b-9bed-4e6a-acb8-112c2a975d4c.m3u
                      original_filename: index.country.m3u
                      size: 3973812
                      mime_type: application/vnd.apple.mpegurl
              __meta:
                creator: peter.parker
                modifier: trung
                docRef: TestSuite-dm/1614
                modelReference: TestSuite-dm
                createdAt: '2022-12-05T13:13:57'
                modifiedAt: '2024-11-11T03:42:35'
                modelVersion: null
            locale: en
            docRef: TestSuite-dm/1614
    AddTestSuiteRequest:
      allOf:
        - $ref: '#/components/schemas/AddDocumentRequest'
        - type: object
          required:
            - method
            - params
          properties:
            method:
              description: ADD_DOCUMENT
            params:
              required:
                - docRef
                - locale
                - document
                - documentModelName
              properties:
                documentModelName:
                  type: string
                  description: TestSuite-dm
                document:
                  $ref: '#/components/schemas/TestSuiteDocument'
      examples:
        - id: ADD_TEST_SUITE
          method: ADD_DOCUMENT
          params:
            document:
              Root:
                General:
                  RecommendedPriority:
                    Value: HIGH
                  ProjectId: P_9
                  ProjectVersionNumber: 1.0.0
                  SubprojectId: SP_2
                  Title: Cart management
                  Tags: cart,shopping
                  Description: >-
                    Manage the operation on a cart, e.g add/remove products into
                    cart
                Attachments:
                  - FileName: 16K.jpg
                    File:
                      content: null
                      attachment_id: 7cfd7350-8839-4683-a20c-f4de5068c9d6
                      internal_filename: 1731307906841-6fd09549-27f7-4959-a8f7-faefacdbda3c.jpg
                      original_filename: 16K.jpg
                      size: 86838
                      mime_type: image/jpeg
                    CreatedAt: '2024-11-11T06:51:48'
                    UploadOn: '2024-11-11'
                    OriginalFileName: 16K.jpg
                    UploadBy: trung
                    Referenced: false
                    CopyNumber: 0
                    ThumbnailId: e5c3456e-4d85-4307-aa7b-a65facddb6e7
              id: '-1'
            documentModelName: TestSuite-dm
            locale: en
    TestSuiteDocumentResponse:
      allOf:
        - $ref: '#/components/schemas/RpcResult'
        - type: object
          properties:
            result:
              allOf:
                - $ref: '#/components/schemas/TestSuiteDocumentResult'
      examples:
        - jsonrpc: '2.0'
          id: GET_DOCUMENT-10
          result:
            docRef: TestSuite-dm/1614
            documentModelName: TestSuite-dm
            document:
              Root:
                General:
                  ProjectId: P_9
                  ProjectVersionNumber: 1.0.0
                  SubprojectId: SP_2
                  Title: 00 Incoming order
                  Id: S_14
                  TechnicalId: c1cd1a9b-5313-4fb0-8f05-ce194820c8d4
                  TenantId: T_1
                  Order: '1'
                  Tags: order
                  Description: >-
                    This suites contains the test cases that test for the
                    incoming orders
                  SearchableTags: '|[order]|'
                  RecommendedPriority:
                    Value: MEDIUM
                  SearchTags:
                    - Value: order
                Metadata:
                  CreatedBy: peter.parker
                  DisplayCreatedOn: '2022-12-05T13:13:57'
                  CreatedOn: 1670246037200
                  EditedBy: trung
                  DisplayEditedOn: '2024-11-11T03:42:35'
                  EditedOn: 1731296555565
                  AssignedToVersion:
                    AssignedToNumber: 1.0.0
                    AssignedToTitle: ERP & PIM
                  LatestTestCaseExecutionData:
                    TestedOn: '2023-08-07T12:17:15'
                    TestedBy: peter.lange
                    TestRunId: R_3
                    TestRunTitle: Run 1
                    VersionId: 1.0.0
                    VersionTitle: ERP & PIM
                    TestCaseId: C_39
                    TestCaseTitle: Yet another test case
                Attachments:
                  - FileName: index.country.m3u
                    CreatedAt: '2024-11-11T03:42:30'
                    UploadOn: '2024-11-11'
                    OriginalFileName: index.country.m3u
                    UploadBy: trung
                    Referenced: false
                    CopyNumber: 0
                    ThumbnailId: ''
                    File:
                      content: null
                      attachment_id: 4e66782a-65e6-427a-9aaf-7a1c365d9290
                      internal_filename: 1731296538385-adb3718b-9bed-4e6a-acb8-112c2a975d4c.m3u
                      original_filename: index.country.m3u
                      size: 3973812
                      mime_type: application/vnd.apple.mpegurl
              __meta:
                creator: peter.parker
                modifier: trung
                docRef: TestSuite-dm/1614
                modelReference: TestSuite-dm
                createdAt: '2022-12-05T13:13:57'
                modifiedAt: '2024-11-11T03:42:35'
                modelVersion: null
    ListTestSuiteRequest:
      allOf:
        - $ref: '#/components/schemas/RpcRequestWithIdAndJsonRpc'
        - required:
            - method
            - params
        - properties:
            method:
              description: LIST_TEST_SUITES
            params:
              type: object
              required:
                - projectSpec
                - page
                - sort
                - filter
              properties:
                projectSpec:
                  $ref: '#/components/schemas/ProjectSpec'
                filter:
                  $ref: '#/components/schemas/FilterSpec'
                page:
                  $ref: '#/components/schemas/PageSpec'
                sort:
                  type: array
                  $ref: '#/components/schemas/SortSpecArray'
      examples:
        - id: TestSuites.DataProvider-12
          jsonrpc: '2.0'
          method: LIST_TEST_SUITES
          params:
            projectSpec:
              projectId: P_9
              subProjectId: SP_2
              projectVersionNumber: 1.0.0
            filter:
              filters: []
              fulltext: ''
              lang: ''
            page:
              offset: 0
              limit: 50
            sort:
              - order: Root.General.Order ASC
    ListTestSuiteResponse:
      allOf:
        - $ref: '#/components/schemas/ListDocumentResponse'
        - type: object
          properties:
            result:
              properties:
                entries:
                  items:
                    allOf:
                      - $ref: '#/components/schemas/TestSuiteDocumentResult'
      examples:
        - jsonrpc: '2.0'
          id: TestSuites.DataProvider-12
          result:
            result:
              fullSize: 9
              page:
                offset: 0
                limit: 50
              entries:
                - docRef: TestSuite-dm/1614
                  documentModelName: TestSuite-dm
                  document:
                    Root:
                      General:
                        ProjectId: P_9
                        ProjectVersionNumber: 1.0.0
                        SubprojectId: SP_2
                        Title: 00 Incoming order
                        Id: S_14
                        TechnicalId: c1cd1a9b-5313-4fb0-8f05-ce194820c8d4
                        TenantId: T_1
                        Order: '1'
                        Tags: order
                        Description: >-
                          This suites contains the test cases that test for the
                          incoming orders
                        SearchableTags: '|[order]|'
                        RecommendedPriority:
                          Value: MEDIUM
                        SearchTags:
                          - Value: order
                      Metadata:
                        CreatedBy: peter.parker
                        DisplayCreatedOn: '2022-12-05T13:13:57'
                        CreatedOn: 1670246037200
                        EditedBy: trung
                        DisplayEditedOn: '2024-11-11T03:42:35'
                        EditedOn: 1731296555565
                        AssignedToVersion:
                          AssignedToNumber: 1.0.0
                          AssignedToTitle: ERP & PIM
                        LatestTestCaseExecutionData:
                          TestedOn: '2023-08-07T12:17:15'
                          TestedBy: peter.lange
                          TestRunId: R_3
                          TestRunTitle: Run 1
                          VersionId: 1.0.0
                          VersionTitle: ERP & PIM
                          TestCaseId: C_39
                          TestCaseTitle: Yet another test case
                      Attachments:
                        - FileName: index.country.m3u
                          CreatedAt: '2024-11-11T03:42:30'
                          UploadOn: '2024-11-11'
                          OriginalFileName: index.country.m3u
                          UploadBy: trung
                          Referenced: false
                          CopyNumber: 0
                          ThumbnailId: ''
                          File:
                            content: null
                            attachment_id: 4e66782a-65e6-427a-9aaf-7a1c365d9290
                            internal_filename: >-
                              1731296538385-adb3718b-9bed-4e6a-acb8-112c2a975d4c.m3u
                            original_filename: index.country.m3u
                            size: 3973812
                            mime_type: application/vnd.apple.mpegurl
                      DisplayFields:
                        TotalTestCases: 1
                        PercentageOfAutomatedCases: 0.00%
                        AutomationCoverage:
                          - name: TO_BE_EVALUATED
                            count: 0
                          - name: TO_BE_AUTOMATED
                            count: 0
                          - name: AUTOMATED
                            count: 0
                          - name: NOT_TO_BE_AUTOMATED
                            count: 0
                          - name: NOT_DEFINED
                            count: 1
                        AssigneesOfTestCases: []
                        TestCasesWithAssignee: 0.00%
                    __meta:
                      creator: peter.parker
                      modifier: trung
                      docRef: TestSuite-dm/1614
                      modelReference: TestSuite-dm
                      createdAt: '2022-12-05T13:13:57'
                      modifiedAt: '2024-11-11T03:42:35'
                      modelVersion: null
                - docRef: TestSuite-dm/1615
                  documentModelName: TestSuite-dm
                  document:
                    Root:
                      General:
                        ProjectId: P_9
                        ProjectVersionNumber: 1.0.0
                        SubprojectId: SP_2
                        Title: 01 Payment types and capturing
                        Id: S_15
                        TechnicalId: d773eab2-f92d-43e1-9ca7-ee3ee1ebd2a6
                        TenantId: T_1
                        Order: '2'
                        RecommendedPriority:
                          Value: MEDIUM
                      Metadata:
                        CreatedBy: peter.parker
                        DisplayCreatedOn: '2022-12-05T13:14:09'
                        CreatedOn: 1670246049789
                        EditedBy: peter.parker
                        DisplayEditedOn: '2022-12-05T13:14:18'
                        EditedOn: 1670246058338
                        AssignedToVersion:
                          AssignedToNumber: 1.0.0
                          AssignedToTitle: ERP & PIM
                      DisplayFields:
                        TotalTestCases: 0
                        PercentageOfAutomatedCases: '-'
                        AutomationCoverage: []
                        AssigneesOfTestCases: []
                        TestCasesWithAssignee: '-'
                    __meta:
                      creator: peter.parker
                      modifier: peter.parker
                      docRef: TestSuite-dm/1615
                      modelReference: TestSuite-dm
                      createdAt: '2022-12-05T13:14:09'
                      modifiedAt: '2023-11-20T03:59:04'
                      modelVersion: null
                - docRef: TestSuite-dm/1616
                  documentModelName: TestSuite-dm
                  document:
                    Root:
                      General:
                        ProjectId: P_9
                        ProjectVersionNumber: 1.0.0
                        SubprojectId: SP_2
                        Title: 02 Pending payments
                        Id: S_16
                        TechnicalId: 584fa015-7f25-438b-b9ad-15ec5e4c886f
                        TenantId: T_1
                        Order: '3'
                        RecommendedPriority:
                          Value: MEDIUM
                      Metadata:
                        CreatedBy: peter.parker
                        DisplayCreatedOn: '2022-12-05T13:14:28'
                        CreatedOn: 1670246068283
                        EditedBy: peter.parker
                        DisplayEditedOn: '2022-12-05T13:14:35'
                        EditedOn: 1670246075967
                        AssignedToVersion:
                          AssignedToNumber: 1.0.0
                          AssignedToTitle: ERP & PIM
                      DisplayFields:
                        TotalTestCases: 0
                        PercentageOfAutomatedCases: '-'
                        AutomationCoverage: []
                        AssigneesOfTestCases: []
                        TestCasesWithAssignee: '-'
                    __meta:
                      creator: peter.parker
                      modifier: peter.parker
                      docRef: TestSuite-dm/1616
                      modelReference: TestSuite-dm
                      createdAt: '2022-12-05T13:14:28'
                      modifiedAt: '2023-11-20T03:59:04'
                      modelVersion: null
                - docRef: TestSuite-dm/1617
                  documentModelName: TestSuite-dm
                  document:
                    id: '-1'
                    Root:
                      General:
                        ProjectId: P_9
                        ProjectVersionNumber: 1.0.0
                        SubprojectId: SP_2
                        Title: 03 Refund process
                        Id: S_17
                        TechnicalId: e6a9b94f-ed94-4e43-9ee2-fbf56085d7f3
                        TenantId: T_1
                        Order: '4'
                        RecommendedPriority:
                          Value: MEDIUM
                      Metadata:
                        CreatedBy: peter.parker
                        DisplayCreatedOn: '2022-12-05T13:14:47'
                        CreatedOn: 1670246087904
                        EditedBy: peter.parker
                        DisplayEditedOn: '2022-12-05T13:14:47'
                        EditedOn: 1670246087904
                      DisplayFields:
                        TotalTestCases: 0
                        PercentageOfAutomatedCases: '-'
                        AutomationCoverage: []
                        AssigneesOfTestCases: []
                        TestCasesWithAssignee: '-'
                    __meta:
                      creator: peter.parker
                      modifier: peter.parker
                      docRef: TestSuite-dm/1617
                      modelReference: TestSuite-dm
                      createdAt: '2022-12-05T13:14:47'
                      modifiedAt: '2023-11-20T03:59:04'
                      modelVersion: null
                - docRef: TestSuite-dm/1618
                  documentModelName: TestSuite-dm
                  document:
                    id: '-1'
                    Root:
                      General:
                        ProjectId: P_9
                        ProjectVersionNumber: 1.0.0
                        SubprojectId: SP_2
                        Title: 04 Product management
                        Id: S_18
                        TechnicalId: fdc5bbcd-46fc-4ea7-abb4-a9cebbec4f26
                        TenantId: T_1
                        Order: '5'
                        RecommendedPriority:
                          Value: MEDIUM
                      Metadata:
                        CreatedBy: peter.parker
                        DisplayCreatedOn: '2022-12-05T13:15:07'
                        CreatedOn: 1670246107453
                        EditedBy: peter.parker
                        DisplayEditedOn: '2022-12-05T13:15:07'
                        EditedOn: 1670246107453
                      DisplayFields:
                        TotalTestCases: 0
                        PercentageOfAutomatedCases: '-'
                        AutomationCoverage: []
                        AssigneesOfTestCases: []
                        TestCasesWithAssignee: '-'
                    __meta:
                      creator: peter.parker
                      modifier: peter.parker
                      docRef: TestSuite-dm/1618
                      modelReference: TestSuite-dm
                      createdAt: '2022-12-05T13:15:07'
                      modifiedAt: '2023-11-20T03:59:04'
                      modelVersion: null
                - docRef: TestSuite-dm/1620
                  documentModelName: TestSuite-dm
                  document:
                    Root:
                      General:
                        ProjectId: P_9
                        ProjectVersionNumber: 1.0.0
                        SubprojectId: SP_2
                        Title: 05 Services and Interfaces
                        Id: S_20
                        TechnicalId: 244d1c90-f48c-4cd0-a802-3f2e4a61829b
                        TenantId: T_1
                        Order: '6'
                        RecommendedPriority:
                          Value: MEDIUM
                      Metadata:
                        CreatedBy: peter.parker
                        DisplayCreatedOn: '2022-12-05T13:16:03'
                        CreatedOn: 1670246163370
                        EditedBy: peter.parker
                        DisplayEditedOn: '2022-12-05T13:16:36'
                        EditedOn: 1670246196913
                      DisplayFields:
                        TotalTestCases: 0
                        PercentageOfAutomatedCases: '-'
                        AutomationCoverage: []
                        AssigneesOfTestCases: []
                        TestCasesWithAssignee: '-'
                    __meta:
                      creator: peter.parker
                      modifier: peter.parker
                      docRef: TestSuite-dm/1620
                      modelReference: TestSuite-dm
                      createdAt: '2022-12-05T13:16:03'
                      modifiedAt: '2023-11-20T03:59:04'
                      modelVersion: null
                - docRef: TestSuite-dm/1621
                  documentModelName: TestSuite-dm
                  document:
                    id: '-1'
                    Root:
                      General:
                        ProjectId: P_9
                        ProjectVersionNumber: 1.0.0
                        SubprojectId: SP_2
                        Title: 06 Price lists
                        Id: S_21
                        TechnicalId: f371e373-fbdf-46fb-945d-d39f03332852
                        TenantId: T_1
                        Order: '7'
                        RecommendedPriority:
                          Value: MEDIUM
                      Metadata:
                        CreatedBy: peter.parker
                        DisplayCreatedOn: '2022-12-05T13:17:33'
                        CreatedOn: 1670246253261
                        EditedBy: peter.parker
                        DisplayEditedOn: '2022-12-05T13:17:33'
                        EditedOn: 1670246253261
                      DisplayFields:
                        TotalTestCases: 1
                        PercentageOfAutomatedCases: 0.00%
                        AutomationCoverage:
                          - name: TO_BE_EVALUATED
                            count: 0
                          - name: TO_BE_AUTOMATED
                            count: 0
                          - name: AUTOMATED
                            count: 0
                          - name: NOT_TO_BE_AUTOMATED
                            count: 0
                          - name: NOT_DEFINED
                            count: 1
                        AssigneesOfTestCases: []
                        TestCasesWithAssignee: 0.00%
                    __meta:
                      creator: peter.parker
                      modifier: peter.parker
                      docRef: TestSuite-dm/1621
                      modelReference: TestSuite-dm
                      createdAt: '2022-12-05T13:17:33'
                      modifiedAt: '2023-11-20T03:59:04'
                      modelVersion: null
                - docRef: TestSuite-dm/1619
                  documentModelName: TestSuite-dm
                  document:
                    Root:
                      General:
                        ProjectId: P_9
                        ProjectVersionNumber: 1.0.0
                        SubprojectId: SP_2
                        Title: 07 Remove customers, GDPR
                        Id: S_19
                        TechnicalId: 8e354d75-53ea-445f-9119-e4a2b0265850
                        TenantId: T_1
                        Order: '8'
                        RecommendedPriority:
                          Value: MEDIUM
                      Metadata:
                        CreatedBy: peter.parker
                        DisplayCreatedOn: '2022-12-05T13:15:31'
                        CreatedOn: 1670246131615
                        EditedBy: peter.parker
                        DisplayEditedOn: '2022-12-05T13:16:49'
                        EditedOn: 1670246209069
                        AssignedToVersion:
                          AssignedToNumber: 1.0.0
                          AssignedToTitle: ERP & PIM
                      DisplayFields:
                        TotalTestCases: 0
                        PercentageOfAutomatedCases: '-'
                        AutomationCoverage: []
                        AssigneesOfTestCases: []
                        TestCasesWithAssignee: '-'
                    __meta:
                      creator: peter.parker
                      modifier: peter.parker
                      docRef: TestSuite-dm/1619
                      modelReference: TestSuite-dm
                      createdAt: '2022-12-05T13:15:31'
                      modifiedAt: '2023-11-20T03:59:04'
                      modelVersion: null
                - docRef: TestSuite-dm/6c1de7de-04af-498e-848d-fea2d30e2ab5
                  documentModelName: TestSuite-dm
                  document:
                    Root:
                      General:
                        ProjectId: P_9
                        ProjectVersionNumber: 1.0.0
                        SubprojectId: SP_2
                        Title: Cart management
                        Tags: cart,shopping
                        Description: >-
                          Manage the operation on a cart, e.g add/remove
                          products into cart
                        Id: S_22
                        TechnicalId: a318e847-5932-4fc1-80b7-f8d8bdd0bbce
                        Order: '9'
                        TenantId: T_1
                        SearchableTags: '|[cart]|,|[shopping]|'
                        RecommendedPriority:
                          Value: HIGH
                        SearchTags:
                          - Value: cart
                          - Value: shopping
                      Metadata:
                        CreatedBy: trung
                        DisplayCreatedOn: '2024-11-11T06:51:56'
                        CreatedOn: 1731307916049
                        EditedBy: trung
                        DisplayEditedOn: '2024-11-11T06:52:39'
                        EditedOn: 1731307959239
                        AssignedToVersion:
                          AssignedToNumber: 1.0.0
                          AssignedToTitle: ERP & PIM
                      Attachments:
                        - FileName: 16K.jpg
                          CreatedAt: '2024-11-11T06:51:48'
                          UploadOn: '2024-11-11'
                          OriginalFileName: 16K.jpg
                          UploadBy: trung
                          Referenced: false
                          CopyNumber: 0
                          ThumbnailId: e5c3456e-4d85-4307-aa7b-a65facddb6e7
                          File:
                            content: null
                            attachment_id: 7cfd7350-8839-4683-a20c-f4de5068c9d6
                            internal_filename: >-
                              1731307906841-6fd09549-27f7-4959-a8f7-faefacdbda3c.jpg
                            original_filename: 16K.jpg
                            size: 86838
                            mime_type: image/jpeg
                      DisplayFields:
                        TotalTestCases: 0
                        PercentageOfAutomatedCases: '-'
                        AutomationCoverage: []
                        AssigneesOfTestCases: []
                        TestCasesWithAssignee: '-'
                    __meta:
                      creator: trung
                      modifier: trung
                      createdAt: '2024-11-11T06:51:55'
                      modifiedAt: '2024-11-11T06:52:39'
                      modelReference: TestSuite-dm
                      docRef: TestSuite-dm/6c1de7de-04af-498e-848d-fea2d30e2ab5
                      modelVersion: null
            filterItemMap:
              Root.DisplayFields.AssigneesOfTestCases:
                - value: none
                  label: None
              Root.General.RecommendedPriority.Value:
                - value: MEDIUM
                  label: MEDIUM
                - value: HIGH
                  label: HIGH
    RpcRequestWithIdAndJsonRpc:
      type: object
      required:
        - id
        - jsonrpc
      properties:
        id:
          type: string
          description: id of the operation
        jsonrpc:
          type: string
          description: must be 2.0
          example: '2.0'
    GetDocumentRequest:
      allOf:
        - $ref: '#/components/schemas/RpcRequestWithIdAndJsonRpc'
        - type: object
          required:
            - method
            - params
          properties:
            method:
              type: string
              description: GET_DOCUMENT
            params:
              required:
                - docRef
              properties:
                docRef:
                  type: string
                  description: document reference
      examples:
        - jsonrpc: '2.0'
          method: GET_DOCUMENT
          id: GET_DOCUMENT-10
          params:
            docRef: TestSuite-dm/1614
    RpcResult:
      type: object
      properties:
        jsonrpc:
          type: string
          description: request jsonrpc version
        id:
          type: string
          description: id of the operation
        result:
          type: object
    DocumentResult:
      type: object
      properties:
        docRef:
          type: string
          description: document reference
        documentModelName:
          type: string
          description: model name
        document:
          type: object
    TestSuiteGeneral:
      type: object
      properties:
        ProjectId:
          type: string
          description: Project's Id that containing this test suite
        ProjectVersionNumber:
          type: string
          description: Sub Project's version number that containing this test suite
        SubprojectId:
          type: string
          description: Sub Project's Id that containing this test suite
        Title:
          type: string
          description: Title of the test suite
        Id:
          type: string
          description: Business id of the test suite. It is unique in a sub project
        TechnicalId:
          type: string
          format: uuid
          description: Technical id of the test suite. It is unique in the whole system
        TenantId:
          type: string
          description: Tenant Id
        Order:
          type: string
          description: Order of the test suite in the test suite overview
        Tags:
          type: string
          description: Tags of the test suite
        Description:
          type: string
          description: Description for the test suite
        SearchableTags:
          type: string
          deprecated: true
          description: Use SearchTags instead
        RecommendedPriority:
          type: object
          description: >-
            Priority of the test suite. Possible values are BLOCKER, HIGH,
            MEDIUM, LOW
          properties:
            Value:
              type: string
        SearchTags:
          type: array
          description: Used for searching tags in suites.
          items:
            type: object
            properties:
              Value:
                type: string
    Metadata:
      type: object
      readOnly: true
      description: >-
        \[**Read only**] Metadata of the document. It will be ignored if
        included in the request of the add/update operations (e.g ADD_DOCUMENT,
        MODIFY_DOCUMENT)
      properties:
        CreatedBy:
          type: string
          description: who created this project
        DisplayCreatedOn:
          type: string
          format: date-time
          description: creation time in the human readable format (UTC time zone)
        CreatedOn:
          type: integer
          description: creation time of the project
        EditedBy:
          description: the last person who edited this project document
          type: string
        DisplayEditedOn:
          type: string
          format: date-time
          description: edited time in the human readable format (UTC time zone)
        EditedOn:
          description: the last edited time of the project
          type: integer
    LatestTestCaseExecutionData:
      type: object
      description: latest test case execution for this test suite.
      properties:
        TestedOn:
          type: string
          format: date-time
          description: The date and time when the test case was last executed.
        TestedBy:
          type: string
          description: The username of the person who executed the test case.
        TestRunId:
          type: string
          description: The test run's id in which this test case was executed.
        TestRunTitle:
          type: string
          description: The title of the test run in which this test case was executed.
        VersionId:
          type: string
          description: >-
            The project version identifier associated with the test case during
            execution.
        VersionTitle:
          type: string
          description: The title of the version associated with the test case.
        TestCaseId:
          type: string
          description: The id of the test case that has the latest execution.
        TestCaseTitle:
          type: string
          description: The name of the test case that has the latest execution
    TestSuiteMetadata:
      allOf:
        - $ref: '#/components/schemas/Metadata'
        - type: object
        - properties:
            LatestTestCaseExecutionData:
              $ref: '#/components/schemas/LatestTestCaseExecutionData'
    File:
      type: object
      properties:
        content:
          type: string
          nullable: true
          description: Content of the file in base64 format.
        attachment_id:
          type: string
          description: Unique identifier for the attachment.
        internal_filename:
          type: string
          description: Internal storage filename for the attachment.
        original_filename:
          type: string
          description: Original name of the uploaded file.
        size:
          type: integer
          description: Size of the file in bytes.
        mime_type:
          type: string
          description: MIME type of the file.
    Attachment:
      type: object
      properties:
        FileName:
          type: string
          description: Name of the file attached.
        CreatedAt:
          type: string
          format: date-time
          description: Timestamp when the attachment was created.
        UploadOn:
          type: string
          format: date
          description: Date when the file was uploaded.
        OriginalFileName:
          type: string
          description: Original filename as provided during upload.
        UploadBy:
          type: string
          description: Username of the uploader.
        Referenced:
          type: boolean
          description: Indicates if the attachment is referenced elsewhere.
        CopyNumber:
          type: integer
          description: Number of times the attachment has been copied.
        ThumbnailId:
          type: string
          description: Identifier for the attachment’s thumbnail image.
        File:
          $ref: '#/components/schemas/File'
    Root:
      type: object
      properties:
        General:
          $ref: '#/components/schemas/TestSuiteGeneral'
        Metadata:
          $ref: '#/components/schemas/TestSuiteMetadata'
        Attachments:
          type: array
          items:
            $ref: '#/components/schemas/Attachment'
    Meta:
      type: object
      readOnly: true
      description: >-
        \[**Read only**] Contain the meta data information of the document. **It
        will be ignored if included in the request of the update operations**
        (e.g MODIFY_DOCUMENT)
      properties:
        creator:
          type: string
          readOnly: true
          description: The user who created the document
        modifier:
          type: string
          readOnly: true
          description: The user who last modified the document
        docRef:
          type: string
          description: Reference to the document
        modelReference:
          type: string
          description: Reference to the model associated with the document
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the document was created
        modifiedAt:
          type: string
          format: date-time
          description: Timestamp when the document was last modified
        modelVersion:
          type: string
          nullable: true
          description: Version of the model associated with the document
    TestSuiteDocument:
      type: object
      properties:
        Root:
          $ref: '#/components/schemas/Root'
        __meta:
          $ref: '#/components/schemas/Meta'
    TestSuiteDocumentResult:
      allOf:
        - $ref: '#/components/schemas/DocumentResult'
        - type: object
        - properties:
            document:
              description: Test suite document
              $ref: '#/components/schemas/TestSuiteDocument'
    AddDocumentRequest:
      allOf:
        - $ref: '#/components/schemas/RpcRequestWithIdAndJsonRpc'
        - type: object
          required:
            - method
            - params
          properties:
            method:
              type: string
            params:
              required:
                - docRef
              properties:
                documentModelName:
                  type: string
                locale:
                  type: string
                  description: locale of the request. 'en' or 'de'
                document:
                  type: object
                  description: added document content
    AddDocumentResponse:
      allOf:
        - $ref: '#/components/schemas/RpcResult'
        - type: object
          properties:
            result:
              type: object
              properties:
                docRef:
                  type: string
                  description: document reference of the created document
      examples:
        - jsonrpc: '2.0'
          id: ADD_TEST_SUITE
          result:
            docRef: TestSuite-dm/6c1de7de-04af-498e-848d-fea2d30e2ab5
    ProjectSpec:
      type: object
      description: project specification
      properties:
        projectId:
          type: string
          description: id of the project
        subProjectId:
          type: string
          description: >-
            id of the sub project. Must be "_" if working with parent project
            only
    FilterSpec:
      description: filter specification.
      type: object
      properties:
        fullText:
          type: string
          description: the full text search
        filters:
          type: Array<String>
          description: Array of filter
        lang:
          type: string
          description: requested language
    PageSpec:
      description: pagination specification
      type: object
      properties:
        offset:
          type: integer
        limit:
          type: integer
    SortSpec:
      description: type is a specification of the sorting to be applied on the server side.
      type: object
      properties:
        order:
          type: string
        lang:
          type: string
    SortSpecArray:
      description: type is a specification of the sorting to be applied on the server side.
      type: Array
      items:
        $ref: '#/components/schemas/SortSpec'
    ListDocumentResponse:
      allOf:
        - $ref: '#/components/schemas/RpcResult'
        - type: object
          properties:
            result:
              type: object
              properties:
                fullSize:
                  type: integer
                  description: Total number of the found item
                page:
                  $ref: '#/components/schemas/PageSpec'
                entries:
                  type: array
    ModifyDocumentRequest:
      allOf:
        - $ref: '#/components/schemas/RpcRequestWithIdAndJsonRpc'
        - type: object
          required:
            - method
            - params
          properties:
            method:
              type: string
              description: MODIFY_DOCUMENT
            params:
              required:
                - docRef
              properties:
                docRef:
                  type: string
                  description: document reference
                locale:
                  type: string
                  description: locale of the request. 'en' or 'de'
                document:
                  type: object
                  description: modified document content
    ModifyDocumentResponse:
      allOf:
        - $ref: '#/components/schemas/RpcResult'
        - type: object
          properties:
            result:
              type: object
              description: null value
      examples:
        - jsonrpc: '2.0'
          id: MODIFY_TEST_SUITE
          result: null
    LinkTestSuiteDocument:
      type: object
      description: relationship between the test suite and test run
      properties:
        __meta:
          $ref: '#/components/schemas/Meta'
        Root:
          type: object
          description: Root content of the link document
          properties:
            General:
              type: object
              properties:
                Assignee:
                  type: string
                  description: >-
                    The username of the individual assigned to this suite in
                    Run.
                TenantId:
                  type: string
                  description: Tenant id
                ProjectId:
                  type: string
                  description: The project's id associated with this item.
                SubprojectId:
                  type: string
                  description: The subproject's id under the main project.
                RecommendedPriority:
                  type: object
                  properties:
                    Value:
                      type: string
                      description: >-
                        The recommended priority level for this suite (e.g.,
                        HIGH, MEDIUM, LOW).
    TestSuiteInRunTargetDocument:
      type: object
      properties:
        target:
          allOf:
            - $ref: '#/components/schemas/LinkTestSuiteDocument'
        relationship:
          allOf:
            - $ref: '#/components/schemas/LinkTestSuiteDocument'
            - properties:
                id:
                  type: string
                  description: >-
                    The model name of the link document (between Test suite and
                    Test Run)
                  default: TestRunTestSuiteAdditionalFields-dm
                docRef:
                  type: string
                  description: >-
                    the document reference of the link document (between Test
                    suite and Test Run)
    TestSuiteInRunDocumentResult:
      allOf:
        - $ref: '#/components/schemas/DocumentResult'
        - type: object
        - properties:
            document:
              description: Test suite document in Run
              $ref: '#/components/schemas/TestSuiteInRunTargetDocument'
  parameters:
    ProjectIdHeader:
      name: Project-Id
      in: header
      required: true
      schema:
        type: string
      description: Project Id or the project document reference
    SubProjectIdHeader:
      name: Subproject-Id
      in: header
      required: false
      schema:
        type: string
      description: >-
        Sub Project Id or the project document reference. It might be required
        if you want to access the sub project's resource
