openapi: 3.1.0
info:
  title: TMT API
  description: API working with Test cases in TMT
  version: 1.0.0
paths:
  /api/v2/rpc (GET_DOCUMENT for Test Case):
    post:
      summary: Get test case detail
      description: Get content of a test case by given test case 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_CASE-request.json
      responses:
        '200':
          description: Content of the test case
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestCaseDocumentResponse'
                examples:
                  $ref: example/GET_TEST_CASE-response.json
  /api/v2/rpc (LIST_DOCUMENTS):
    post:
      summary: List test cases
      description: >
        -   List test case documents for given search criteria

        -   Notice: LIST_DOCUMENTS operation provides the flexibility to the
        caller, so they can customize their search criteria. But it requires the
        basic understanding on the search object to get the proper result. For
        the test cases, it is worthy to put the attention on the filter
        LIST_DOCUMENTS "-Root.Metadata.IsFrozenByClosedTestRun:true" to filter
        out the test cases are frozen by a closed run.
      parameters:
        - $ref: '#/components/parameters/ProjectIdHeader'
        - $ref: '#/components/parameters/SubProjectIdHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListTestCaseDocumentRequest'
              examples:
                $ref: example/LIST_TEST_CASE-request.json
      responses:
        '200':
          description: List of test cases matched the search criteria
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTestCaseResponse'
                examples:
                  $ref: example/LIST_TEST_CASE-response.json
  /api/v2/rpc (CREATE_TEST_CASE_TREE_NODE):
    post:
      summary: Create a new test case
      description: >
        Create a new test case and add it into a test case tree.<br/>

        The new test case will be located at the end of the folder (or the test
        suite if it is at the root level)
      parameters:
        - $ref: '#/components/parameters/ProjectIdHeader'
        - $ref: '#/components/parameters/SubProjectIdHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTestCaseTreeNodeRequest'
              examples:
                $ref: example/CREATE_TEST_CASE_TREE_NODE-request.json
      responses:
        '200':
          description: >-
            Information of the created test case and its relationship
            information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateTestCaseTreeNodeResponse'
                examples:
                  $ref: example/CREATE_TEST_CASE_TREE_NODE-response.json
  /api/v2/rpc (UPDATE_TEST_CASE_TREE_NODE):
    post:
      summary: Update test case
      description: Update test case content
      parameters:
        - $ref: '#/components/parameters/ProjectIdHeader'
        - $ref: '#/components/parameters/SubProjectIdHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTestCaseRequest'
              examples:
                $ref: example/UPDATE_TEST_CASE_TREE_NODE-request.json
      responses:
        '200':
          description: Updated test case's content
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateTestCaseResponse'
                examples:
                  $ref: example/UPDATE_TEST_CASE_TREE_NODE-response.json
  /api/v2/rpc (DELETE_DOCUMENT):
    post:
      summary: Delete a test case
      description: Delete a test case. This test case must be 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/DeleteDocumentRequest'
              examples:
                $ref: example/DELETE_TEST_CASE-request.json
      responses:
        '200':
          description: null if successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteDocumentResponse'
                examples:
                  $ref: example/DELETE_TEST_CASE-response.json
  /api/v2/rpc (MOVE_TEST_CASE):
    post:
      summary: Move test case
      description: Move a test case to another test suite or test folder.
      parameters:
        - $ref: '#/components/parameters/ProjectIdHeader'
        - $ref: '#/components/parameters/SubProjectIdHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MoveTestCaseRequest'
              examples:
                $ref: example/MOVE_TEST_CASE-request.json
      responses:
        '200':
          description: Content of the pasted test case along with its new path information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MoveTestCaseResponse'
                examples:
                  $ref: example/MOVE_TEST_CASE-response.json
security:
  - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
  schemas:
    ListTestCaseDocumentRequest:
      allOf:
        - $ref: '#/components/schemas/ListDocumentRequest'
        - properties:
            params:
              properties:
                documentModelName:
                  type: string
                  description: TestCase-dm
      examples:
        - id: TestCases.DataProvider-98
          jsonrpc: '2.0'
          method: LIST_DOCUMENTS
          params:
            documentModelName: TestCase-dm
            filter:
              filters:
                - Root.General.ProjectId:P_9
                - Root.General.SubprojectId:SP_1
                - Root.General.ProjectVersionNumber:1.2.0
                - Root.General.TestSuiteId:S_1
                - '-Root.Metadata.IsFrozenByClosedTestRun:true'
              fulltext: ''
              lang: ''
            page:
              offset: 0
              limit: 100
            sort:
              - order: Root.General.Title ASC
    MoveTestCaseRequest:
      allOf:
        - $ref: '#/components/schemas/RpcRequestWithIdAndJsonRpc'
        - type: object
        - required:
            - params
        - properties:
            method:
              type: string
              description: MOVE_TEST_CASE
            params:
              type: object
              required:
                - sourceDocRef
                - destinationDocRef
              properties:
                sourceDocRef:
                  type: string
                  description: docRef of the moved test case
                destinationDocRef:
                  type: string
                  description: >-
                    destination where test case is pasted. This can be test
                    suite or test folder's docRef
                predecessorDocRef:
                  type: string
                  description: >-
                    docRef of the item (test case or test folder) where this
                    test case can be pasted above or below
                position:
                  type: string
                  description: the position of the moved test case on the predecessor node
                  enum:
                    - BOTTOM
                    - TOP
      examples:
        - jsonrpc: '2.0'
          id: MOVE_TEST_CASE_dacb75d8-24fd-4d17-bb62-5f9b27bba552
          method: MOVE_TEST_CASE
          params:
            destinationDocRef: TestFolder-dm/20753
            position: BOTTOM
            predecessorDocRef: TestCase-dm/20770
            sourceDocRef: TestCase-dm/20761
    MoveTestCaseResponse:
      allOf:
        - $ref: '#/components/schemas/RpcResult'
        - type: object
          properties:
            result:
              type: object
              properties:
                documentSpec:
                  $ref: '#/components/schemas/TestCaseDocumentResult'
                path:
                  $ref: '#/components/schemas/Path'
      examples:
        - jsonrpc: '2.0'
          id: MOVE_TEST_CASE_dacb75d8-24fd-4d17-bb62-5f9b27bba552
          result:
            documentSpec:
              docRef: TestCase-dm/20761
              documentModelName: TestCase-dm
              document:
                Root:
                  Criteria:
                    TimeRelevance: false
                  General:
                    ImportantAdditionForNextTestRun: false
                    Status: NEW
                    ProjectId: P_9
                    ProjectVersionNumber: 1.2.0
                    SubprojectId: SP_1
                    TestSuiteId: S_1
                    Title: Filtering
                    Id: C_13
                    TechnicalId: 767a7a50-ed68-4585-82fd-0878b6bf1b99
                    TenantId: T_1
                    HasAssignee: false
                  AdditionalInfo:
                    TriggeredBy: peter.lange
                    TriggeredAt: 1691563508984
                    CreatingEvent: NEW_VERSION_CREATED
                    Path: >-
                      mgm Webshop$###$Web Frontend$###$00 Main landing
                      page$###$Filtering
                    CurrentPath: TestSuite-dm/5856
                    SourceTestCaseInfo:
                      Id: C_13
                      TenantId: T_1
                      ProjectId: P_9
                      SubprojectId: SP_1
                      ProjectVersionNumber: 1.1.0
                  Metadata:
                    CreatedBy: tmtdev
                    DisplayCreatedOn: '2023-03-07T12:37:16'
                    CreatedOn: 1678192636009
                    EditedBy: tmtdev
                    DisplayEditedOn: '2023-03-07T12:37:17'
                    EditedOn: 1678192637338
                    IsImported: false
                  Risk:
                    RiskLevel: UNDEFINED
                    CombinationLikelihoodImpact: null__null
                  TestSteps:
                    - 'No': 1
                      Id: c300c53d-21fd-42a2-a1ac-86cd9b335937
                __meta:
                  creator: SYSTEM
                  modifier: SYSTEM
                  docRef: TestCase-dm/20761
                  modelReference: TestCase-dm
                  createdAt: '2023-08-09T06:45:09'
                  modifiedAt: '2024-10-08T05:12:24'
                  modelVersion: null
            path:
              nodeNames:
                - mgm Webshop
                - Web Frontend
                - 00 Main landing page
                - Responsiveness
                - Filtering
              nodePaths:
                - id: '1585'
                  type: Project-dm
                - id: '1589'
                  type: Project-dm
                - id: '20740'
                  type: TestSuite-dm
                - id: '20753'
                  type: TestFolder-dm
                - id: '20761'
                  type: TestCase-dm
    UpdateTestCaseRequest:
      allOf:
        - $ref: '#/components/schemas/ModifyDocumentRequest'
        - type: object
          required:
            - method
            - params
          properties:
            method:
              description: UPDATE_TEST_CASE_TREE_NODE
            params:
              required:
                - docRef
                - locale
                - document
              properties:
                document:
                  $ref: '#/components/schemas/TestCaseDocument'
      examples:
        - id: modifyTestCase_0fba4ab2-3443-47fe-b528-417dd8aa71f6
          method: UPDATE_TEST_CASE_TREE_NODE
          jsonrpc: '2.0'
          params:
            document:
              Root:
                Criteria:
                  TimeRelevance: false
                  AdditionalToolsAids:
                    - value: DATABASE
                    - value: IMPORT_FILE
                General:
                  ImportantAdditionForNextTestRun: true
                  Status: IN_PROGRESS
                  ProjectId: P_9
                  ProjectVersionNumber: 1.2.0
                  SubprojectId: SP_1
                  TestSuiteId: S_1
                  Title: This test case is created under the folder Responsiveness
                  Type: FUNCTIONAL
                  Automation: TO_BE_AUTOMATED
                  Prioritization: MANDATORY
                  EstimatedExecutionTime: 60
                  Description: >-
                    This test case tests the action that create a new test case
                    and add it into a test case tree
                  Id: C_41
                  TechnicalId: b60ac6fb-531f-4b8c-af0c-f4a36fa9bc50
                  TenantId: T_1
                  HasAssignee: false
                  User: viethuynh
                Sources:
                  Tickets: TMT_123
                Risk:
                  AutoCalculateLikelihood: true
                  Likelihood: POSSIBLE
                  AutoCalculateImpact: false
                  Impact: SERIOUS
                  CombinationLikelihoodImpact: POSSIBLE__SERIOUS
                AdditionalInfo:
                  TriggeredBy: trung
                  TriggeredAt: 1731381348731
                  CreatingEvent: USER_MANUALLY
                Metadata:
                  CreatedBy: trung
                  DisplayCreatedOn: '2024-11-12T03:15:48'
                  CreatedOn: 1731381348735
                  EditedBy: trung
                  DisplayEditedOn: '2024-11-12T03:15:48'
                  EditedOn: 1731381348735
                  AssignedToVersion:
                    AssignedToNumber: 1.2.0
                    AssignedToTitle: August 2023
                TestSteps:
                  - Id: 3a1dd6e1-0b62-408b-8f9b-50dd67dd018f
                    'No': 1
                    Action: Create new test case
                    ExpectedResult: New document exists
                  - Id: 7b6d7c59-d2fd-4f72-9677-2d747b150c19
                    'No': 2
                    Action: Link the new test case into the test case tree
                    ExpectedResult: Test case is showed in the test case tree
                Conditions:
                  Preconditions: Prepare an existing test case tree
              __meta:
                creator: trung
                modifier: trung
                createdAt: '2024-11-12T03:15:48'
                modifiedAt: '2024-11-12T03:15:48'
                modelReference: TestCase-dm
                docRef: TestCase-dm/451b3e38-6464-4e42-965d-e9b7fb4150f1
                modelVersion: null
            locale: en
            docRef: TestCase-dm/451b3e38-6464-4e42-965d-e9b7fb4150f1
    UpdateTestCaseResponse:
      allOf:
        - $ref: '#/components/schemas/TestCaseDocumentResponse'
      examples:
        - jsonrpc: '2.0'
          id: modifyTestCase_0fba4ab2-3443-47fe-b528-417dd8aa71f6
          result:
            docRef: TestCase-dm/451b3e38-6464-4e42-965d-e9b7fb4150f1
            documentModelName: TestCase-dm
            document:
              Root:
                General:
                  Title: This test case is created under the folder Responsiveness
                  Id: C_41
                  Status: IN_PROGRESS
                  Description: >-
                    This test case tests the action that create a new test case
                    and add it into a test case tree
                  User: viethuynh
                  Type: FUNCTIONAL
                  Prioritization: MANDATORY
                  EstimatedExecutionTime: 60
                  ImportantAdditionForNextTestRun: true
                  Automation: TO_BE_AUTOMATED
                Criteria:
                  TimeRelevance: false
                  AdditionalToolsAids:
                    - value: DATABASE
                    - value: IMPORT_FILE
                Risk:
                  AutoCalculateLikelihood: true
                  Likelihood: POSSIBLE
                  AutoCalculateImpact: false
                  Impact: SERIOUS
                  CombinationLikelihoodImpact: POSSIBLE__SERIOUS
                Sources:
                  Tickets: TMT_123
    CreateTestCaseTreeNodeRequest:
      allOf:
        - $ref: '#/components/schemas/AddDocumentRequest'
        - type: object
          required:
            - method
            - params
          properties:
            method:
              description: CREATE_TEST_CASE_TREE_NODE
            params:
              required:
                - documentModelName
                - locale
                - document
                - parentNodeDocRef
              properties:
                documentModelName:
                  type: string
                  description: TestCase-dm
                parentNodeDocRef:
                  type: string
                  description: >-
                    the parent node's docRef of the created test case (Test
                    suite's docRef or Test folder's docRef)
                document:
                  $ref: '#/components/schemas/TestCaseDocument'
      examples:
        - id: addTestCase_12260ae6-5b82-4892-ab8e-0bbaeb38ef83
          method: CREATE_TEST_CASE_TREE_NODE
          jsonrpc: '2.0'
          params:
            document:
              Root:
                Criteria:
                  TimeRelevance: false
                  AdditionalToolsAids:
                    - value: DATABASE
                    - value: IMPORT_FILE
                General:
                  ImportantAdditionForNextTestRun: true
                  Status: NEW
                  ProjectId: P_9
                  ProjectVersionNumber: 1.2.0
                  SubprojectId: SP_1
                  TestSuiteId: S_1
                  Title: This test case is created under the folder Responsiveness
                  Type: FUNCTIONAL
                  Automation: TO_BE_AUTOMATED
                  Prioritization: MANDATORY
                  EstimatedExecutionTime: 60
                  Description: >-
                    This test case tests the action that create a new test case
                    and add it into a test case tree
                TestSteps:
                  - Id: 3a1dd6e1-0b62-408b-8f9b-50dd67dd018f
                    'No': 1
                    Action: Create new test case
                    ExpectedResult: New document exists
                  - Id: 7b6d7c59-d2fd-4f72-9677-2d747b150c19
                    'No': 2
                    Action: Link the new test case into the test case tree
                    ExpectedResult: Test case is showed in the test case tree
                Sources:
                  Tickets: TMT_123
                Risk:
                  AutoCalculateLikelihood: true
                  Likelihood: POSSIBLE
                  AutoCalculateImpact: false
                  Impact: SERIOUS
            documentModelName: TestCase-dm
            locale: en
            parentNodeDocRef: TestFolder-dm/20753
    TestCaseDocumentResponse:
      allOf:
        - $ref: '#/components/schemas/RpcResult'
        - type: object
          properties:
            result:
              allOf:
                - $ref: '#/components/schemas/TestCaseDocumentResult'
      examples:
        - jsonrpc: '2.0'
          id: GET_DOCUMENT-30
          result:
            docRef: TestCase-dm/20791
            documentModelName: TestCase-dm
            document:
              Root:
                Criteria:
                  TimeRelevance: false
                  Tags: import,order
                  Dependency: INTERRELATION
                  SearchableTags: '|[import]|,|[order]|'
                  Assignment:
                    - value: CUSTOMER_APPROVAL
                    - value: CUSTOMER_TEST
                  AdditionalToolsAids:
                    - value: IMPORT_FILE
                    - value: SCRIPT
                  SearchTags:
                    - Value: import
                    - Value: order
                  TestFocus:
                    - value: CALCULATION
                General:
                  ImportantAdditionForNextTestRun: true
                  Status: TO_BE_REVIEWED
                  ProjectId: P_9
                  ProjectVersionNumber: 1.2.0
                  SubprojectId: SP_1
                  TestSuiteId: S_1
                  Title: Open URL & Check Main Menu
                  Type: FUNCTIONAL
                  Automation: TO_BE_AUTOMATED
                  Prioritization: MANDATORY
                  EstimatedExecutionTime: 5
                  Id: C_1
                  TechnicalId: 1fc33e69-65c2-408c-94e4-0e89d13db517
                  TenantId: T_1
                  HasAssignee: false
                  Description: here is the description
                Conditions:
                  Preconditions: |-
                    \* User has opened browser in current version
                    \* User is connected to the mgm VPN.
                AdditionalInfo:
                  TriggeredBy: peter.lange
                  TriggeredAt: 1691563516202
                  CreatingEvent: NEW_VERSION_CREATED
                  Path: >-
                    mgm Webshop$###$Web Frontend$###$00 Main landing
                    page$###$Open URL
                  CurrentPath: TestSuite-dm/5856
                  SourceTestCaseInfo:
                    Id: C_1
                    TenantId: T_1
                    ProjectId: P_9
                    SubprojectId: SP_1
                    ProjectVersionNumber: 1.1.0
                Metadata:
                  CreatedBy: peter.lange
                  DisplayCreatedOn: '2023-08-09T06:45:16'
                  CreatedOn: 1691563516335
                  EditedBy: trung
                  DisplayEditedOn: '2024-11-12T02:30:58'
                  EditedOn: 1731378658952
                  IsImported: false
                  AssignedToVersion:
                    AssignedToNumber: 1.2.0
                    AssignedToTitle: August 2023
                  LatestTestCaseExecutionData:
                    TestedOn: '2023-08-09T06:38:53'
                    TestedBy: peter.lange
                    TestRunId: R_2
                    TestRunTitle: March 2023
                    VersionId: 1.1.0
                    VersionTitle: New features March 2023
                    TestCaseId: ''
                    TestCaseTitle: ''
                Sources:
                  Tickets: TMT-1
                  Documents: Webshop_Layout_Design.indd
                Risk:
                  RiskLevel: UNDEFINED
                  CombinationLikelihoodImpact: LIKELY__MAJOR
                  AutoCalculateLikelihood: true
                  Likelihood: LIKELY
                  AutoCalculateImpact: false
                  Impact: MAJOR
                TestSteps:
                  - 'No': 1
                    Id: a469f964-d571-4105-b363-9ed7a34ce476
                    Action: Enter URL https://shop-intern.mgm.hostpress.me/give-aways/
                    ExpectedResult: >-
                      Page opens properly

                      ![webshop.png](/api/attachment/thumbnail/988019b7-8113-4aca-ba0c-5f637136dbc3/thumb_big)
                  - 'No': 2
                    Id: c61804ca-554e-4e69-8850-ca98f621cda4
                    Action: |-
                      Check main menu exists and is complete:

                      * [HOME](https://www.mgm-tp.com)
                      * [ÜBER UNS](https://www.mgm-tp.com/ueber-uns/)
                      * [JOBS](http://jobs.mgm-tp.com/)
                      * [NEWS](https://live.mgm-tp.com/)
                      * [REFERENZEN](https://referenzen.mgm-tp.com/)
                      * [KONTAKT](https://shop-intern.mgm.hostpress.me/kontakt/)
                    ExpectedResult: Menu is complete and linked URLs are correct
                  - 'No': 3
                    Id: 46f2e6b5-ece3-4ffa-b54e-d95e546d7979
                    Action: Click on main menu entries.
                    ExpectedResult: The respective entry opens properly.
                Attachments:
                  - FileName: webshop.png
                    UploadOn: '2022-12-05'
                    OriginalFileName: webshop.png
                    UploadBy: peter.parker
                    Referenced: true
                    CopyNumber: 0
                    File:
                      internal_filename: 1670251855850-2233fab9-8b3a-4b01-8fb0-6558e10d482b.png
                      original_filename: 1670251855850-2233fab9-8b3a-4b01-8fb0-6558e10d482b.png
                      mime_type: image/png
                      attachment_id: 988019b7-8113-4aca-ba0c-5f637136dbc3
                      size: null
                  - FileName: everythingwillbealrightbuddy.png
                    UploadOn: '2023-03-09'
                    OriginalFileName: everythingwillbealrightbuddy.png
                    UploadBy: peter.parker
                    Referenced: false
                    CopyNumber: 0
                    File:
                      internal_filename: 1678368574089-f7f17993-6005-48ff-ae44-940791a4164d.png
                      original_filename: 1678368574089-f7f17993-6005-48ff-ae44-940791a4164d.png
                      mime_type: image/png
                      attachment_id: d44eb06c-6ee5-4731-a0cf-4e1c1e44adf1
                      size: null
                  - FileName: Screenshot 2022-12-09 152643.png
                    UploadOn: '2023-03-09'
                    OriginalFileName: Screenshot 2022-12-09 152643.png
                    UploadBy: peter.parker
                    Referenced: false
                    CopyNumber: 0
                    File:
                      internal_filename: 1678368580693-43906e99-65c0-461d-9437-3877a6c4321d.png
                      original_filename: 1678368580693-43906e99-65c0-461d-9437-3877a6c4321d.png
                      mime_type: image/png
                      attachment_id: 65980c9c-7f3d-4d20-bd41-3284f98f2c1a
                      size: null
              __meta:
                creator: SYSTEM
                modifier: trung
                docRef: TestCase-dm/20791
                modelReference: TestCase-dm
                createdAt: '2023-08-09T06:45:16'
                modifiedAt: '2024-11-12T02:30:58'
                modelVersion: null
    CreateTestCaseTreeNodeResponse:
      allOf:
        - $ref: '#/components/schemas/RpcResult'
        - type: object
          properties:
            result:
              allOf:
                - $ref: '#/components/schemas/LinkRef'
      examples:
        - jsonrpc: '2.0'
          id: addTestCase_12260ae6-5b82-4892-ab8e-0bbaeb38ef83
          result:
            linkDescriptor:
              relationshipModel: TestFolderTestCaseFolder-rm
              entities:
                - role: TestFolder
                  modelName: TestFolder-dm
                  docRef: TestFolder-dm/20753
                - role: TestCaseFolderSupertype
                  modelName: TestCase-dm
                  docRef: TestCase-dm/451b3e38-6464-4e42-965d-e9b7fb4150f1
              predecessorLinkRef: null
              position: BOTTOM
            id: '947425'
    ListTestCaseResponse:
      allOf:
        - $ref: '#/components/schemas/ListDocumentResponse'
        - type: object
          properties:
            result:
              properties:
                entries:
                  items:
                    allOf:
                      - $ref: '#/components/schemas/TestCaseDocumentResult'
      examples:
        - jsonrpc: '2.0'
          id: TestCases.DataProvider-98
          result:
            fullSize: 2
            page:
              offset: 0
              limit: 100
            entries:
              - docRef: TestCase-dm/20782
                documentModelName: TestCase-dm
                document:
                  Root:
                    Criteria:
                      TimeRelevance: false
                    General:
                      ImportantAdditionForNextTestRun: false
                      Status: TO_BE_CORRECTED
                      ProjectId: P_9
                      ProjectVersionNumber: 1.2.0
                      SubprojectId: SP_1
                      TestSuiteId: S_1
                      Title: Check Layout Grid
                      Id: C_6
                      TechnicalId: 5ccaad70-847e-4e40-966f-910468a4e51f
                      TenantId: T_1
                      HasAssignee: false
                    AdditionalInfo:
                      TriggeredBy: peter.lange
                      TriggeredAt: 1691563513879
                      CreatingEvent: NEW_VERSION_CREATED
                      Path: >-
                        mgm Webshop$###$Web Frontend$###$00 Main landing
                        page$###$Check Layout Grid
                      CurrentPath: TestSuite-dm/5856
                      SourceTestCaseInfo:
                        Id: C_6
                        TenantId: T_1
                        ProjectId: P_9
                        SubprojectId: SP_1
                        ProjectVersionNumber: 1.1.0
                    Metadata:
                      CreatedBy: tmtdev
                      DisplayCreatedOn: '2023-03-07T12:32:43'
                      CreatedOn: 1678192363174
                      EditedBy: tmtdev
                      DisplayEditedOn: '2023-08-08T14:06:22'
                      EditedOn: 1691503582642
                      IsImported: false
                      AssignedToVersion:
                        AssignedToNumber: 1.1.0
                        AssignedToTitle: New features March 2023
                    Risk:
                      RiskLevel: UNDEFINED
                      CombinationLikelihoodImpact: null__null
                    TestSteps:
                      - 'No': 1
                        Id: 08fc5870-8313-41a6-afd7-907be1654d16
                        Action: Do something
                        ExpectedResult: Expect something
                  __meta:
                    creator: SYSTEM
                    modifier: SYSTEM
                    docRef: TestCase-dm/20782
                    modelReference: TestCase-dm
                    createdAt: '2023-08-09T06:45:13'
                    modifiedAt: '2024-10-08T05:12:21'
                    modelVersion: null
              - docRef: TestCase-dm/20776
                documentModelName: TestCase-dm
                document:
                  Root:
                    Criteria:
                      TimeRelevance: false
                    General:
                      ImportantAdditionForNextTestRun: false
                      Status: NEW
                      ProjectId: P_9
                      ProjectVersionNumber: 1.2.0
                      SubprojectId: SP_1
                      TestSuiteId: S_1
                      Title: Data Privacy & Bottom Menu
                      Id: C_8
                      TechnicalId: 2d4f8ead-b0d8-4a2e-b376-312eb344620b
                      TenantId: T_1
                      HasAssignee: false
                    AdditionalInfo:
                      TriggeredBy: peter.lange
                      TriggeredAt: 1691563512648
                      CreatingEvent: NEW_VERSION_CREATED
                      Path: >-
                        mgm Webshop$###$Web Frontend$###$00 Main landing
                        page$###$Data Privacy & Bottom Menu
                      CurrentPath: TestSuite-dm/5856
                      SourceTestCaseInfo:
                        Id: C_8
                        TenantId: T_1
                        ProjectId: P_9
                        SubprojectId: SP_1
                        ProjectVersionNumber: 1.1.0
                    Metadata:
                      CreatedBy: tmtdev
                      DisplayCreatedOn: '2023-03-07T12:33:51'
                      CreatedOn: 1678192431530
                      EditedBy: tmtdev
                      DisplayEditedOn: '2023-03-07T12:33:52'
                      EditedOn: 1678192432386
                      IsImported: false
                    Risk:
                      RiskLevel: UNDEFINED
                      CombinationLikelihoodImpact: null__null
                    TestSteps:
                      - 'No': 1
                        Id: 46037172-8eb1-44da-bbef-e443b7313c33
                  __meta:
                    creator: SYSTEM
                    modifier: SYSTEM
                    docRef: TestCase-dm/20776
                    modelReference: TestCase-dm
                    createdAt: '2023-08-09T06:45:12'
                    modifiedAt: '2024-10-08T05:12:21'
                    modelVersion: null
    Path:
      type: object
      properties:
        nodeNames:
          type: array
          items:
            type: string
          description: >-
            List of names of nodes representing the hierarchical structure from
            the parent project.
        nodePaths:
          type: array
          items:
            $ref: '#/components/schemas/NodePath'
          description: >-
            Array of node paths, each with an ID and type to define the node's
            position in the hierarchy.
    NodePath:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the node within the path.
        type:
          type: string
          description: >-
            Type of node in the path hierarchy, such as Project, TestSuite,
            TestFolder, or TestCase.
    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-30
          params:
            docRef: TestCase-dm/20791
    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
    SimpleTestCaseGeneral:
      type: object
      properties:
        ImportantAdditionForNextTestRun:
          type: boolean
          description: >-
            Indicates if this item is an important addition for the next test
            run (Version delta)
        Status:
          type: string
          description: The current status of this item
          enum:
            - NEW
            - IN_PROGRESS
            - TO_BE_REVIEWED
            - TO_BE_CORRECTED
            - TO_BE_REVIEWED_AGAIN
            - REVIEWED
            - DONE
        Title:
          type: string
          description: The title of this test case.
        Type:
          type: string
          description: The type of test case
          enum:
            - FUNCTIONAL
            - PERFORMANCE
            - SECURITY
            - USABILITY
            - MODEL
        Automation:
          type: string
          description: Indicates the automation status of this test case
          enum:
            - TO_BE_EVALUATED
            - TO_BE_AUTOMATED
            - AUTOMATED
            - AUTOMATED
            - NOT_TO_BE_AUTOMATED
        Prioritization:
          type: string
          description: >-
            Indicates the prioritization level of this test case (e.g.,
            MANDATORY).
          enum:
            - MANDATORY
            - OPTIONAL
            - NO_TEST
        EstimatedExecutionTime:
          type: integer
          description: The estimated time in minutes required to execute this test case.
        Id:
          type: string
          description: The id of the test case. This is unique in a project version
        User:
          type: string
          description: assignee of this test case
    TestCaseGeneral:
      allOf:
        - $ref: '#/components/schemas/SimpleTestCaseGeneral'
        - type: object
          properties:
            ProjectId:
              type: string
              description: The project's Id associated with this item.
            ProjectVersionNumber:
              type: string
              description: >-
                The version number of the (sub) project associated with this
                item.
            SubprojectId:
              type: string
              description: The subproject's id under the main project.
            TestSuiteId:
              type: string
              description: The test suite's id containing this test case.
            TechnicalId:
              type: string
              description: The technical identifier of the test case, often a UUID.
            TenantId:
              type: string
              description: The tenant id
            HasAssignee:
              type: boolean
              description: Indicates whether this test case has an assignee.
    Criteria:
      type: object
      properties:
        TimeRelevance:
          type: boolean
          description: Indicates if time relevance is considered in the criteria.
          default: false
        AdditionalToolsAids:
          type: array
          description: additional tools & aids
          items:
            properties:
              value:
                type: string
                enum:
                  - DATABASE
                  - IMPORT_FILE
                  - SCRIPT
        Assignment:
          type: array
          description: assignment description
          items:
            properties:
              value:
                type: string
                enum:
                  - CUSTOMER_APPROVAL
                  - CUSTOMER_TEST
        Dependency:
          type: string
          description: dependency of the test case
          enum:
            - INTERRELATION
        TestFocus:
          type: string
          description: TestFocus of the test case
          enum:
            - CALCULATION
            - PERMISSION
            - REAL_TIME_CALCULATION
        Tags:
          type: string
          description: tags of the test cases. The values are separated by the comma
        SearchTags:
          type: array
          readOnly: true
          description: >-
            \[**read only**] searchable values for tags. This is an **auto
            generated value**
          items:
            properties:
              value:
                type: string
                description: tag value
    Conditions:
      type: object
      properties:
        Preconditions:
          type: string
          description: The preconditions required before executing this test case.
    AdditionalInfo:
      type: object
      description: \[**Read only**] Descriptive information for the test case
      properties:
        TriggeredBy:
          type: string
          description: The username of the person who triggered this test case.
        TriggeredAt:
          type: integer
          format: int64
          description: The timestamp of when the test case was triggered.
        CreatingEvent:
          type: string
          description: The event that created this test case (e.g., NEW_VERSION_CREATED).
        Path:
          type: string
          description: The path in the project hierarchy to this test case.
        CurrentPath:
          type: string
          description: The current path or reference ID for the test case.
        SourceTestCaseInfo:
          type: object
          properties:
            Id:
              type: string
              description: The Id of the source test case.
            TenantId:
              type: string
              description: The tenant ID of the source test case.
            ProjectId:
              type: string
              description: The project ID of the source test case.
            SubprojectId:
              type: string
              description: The subproject ID of the source test case.
            ProjectVersionNumber:
              type: string
              description: The version number of the source project for this test case.
    Sources:
      type: object
      properties:
        Tickets:
          type: string
          description: Associated ticket reference(s) for this test case.
        Documents:
          type: string
          description: Business document associated with this test case.
    Risk:
      type: object
      properties:
        RiskLevel:
          type: string
          deprecated: true
          description: >-
            \[**Read only**] The risk level of the business logic layer
            associated with this test case (e.g., UNDEFINED)
          enum:
            - LOW
            - MEDIUM
            - HIGH
            - UNDEFINED
        AutoCalculateLikelihood:
          type: boolean
          description: >-
            Determined if Likelihood value is manually input or automatically
            calculated by system
        Likelihood:
          type: string
          description: Likelihood value
          enum:
            - ALMOST_CERTAIN
            - LIKELY
            - POSSIBLE
            - UNLIKELY
            - RARE
        AutoCalculateImpact:
          type: boolean
          description: >-
            Determined if Impact value is manually input or automatically
            calculated by system
        Impact:
          type: string
          description: Impact value
          enum:
            - SERIOUS
            - MAJOR
            - MODERATE
            - MINOR
            - INSIGNIFICANT
        CombinationLikelihoodImpact:
          type: string
          description: >-
            \[**Read only**]A combination of likelihood and impact ratings for
            the risk level. This is an **auto generated value**
    TestSteps:
      type: array
      items:
        type: object
        properties:
          'No':
            type: integer
            description: Number of the test step (one based)
          Id:
            type: string
            description: Id of the test step (as UUID format) (it is only unique within TC)
          Action:
            type: string
            description: The action to be performed in this test step.
          ExpectedResult:
            type: string
            description: The expected result upon completion of this test step.
    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
    AssignedToVersion:
      type: object
      description: describe the version info that this test case is associated
      properties:
        AssignedToNumber:
          type: string
          description: version number
        AssignedToTitle:
          type: string
          description: version title
    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
    TestCaseMetadata:
      allOf:
        - $ref: '#/components/schemas/Metadata'
        - type: object
        - properties:
            IsImported:
              type: boolean
              description: >-
                indicate this test case is imported from external party (e.g
                Testrail)
              default: false
            AssignedToVersion:
              $ref: '#/components/schemas/AssignedToVersion'
            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/TestCaseGeneral'
        Criteria:
          $ref: '#/components/schemas/Criteria'
        Conditions:
          $ref: '#/components/schemas/Conditions'
        AdditionalInfo:
          $ref: '#/components/schemas/AdditionalInfo'
        Sources:
          $ref: '#/components/schemas/Sources'
        Risk:
          $ref: '#/components/schemas/Risk'
        TestSteps:
          $ref: '#/components/schemas/TestSteps'
        Metadata:
          $ref: '#/components/schemas/TestCaseMetadata'
        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
    TestCaseDocument:
      type: object
      properties:
        Root:
          $ref: '#/components/schemas/Root'
        __meta:
          $ref: '#/components/schemas/Meta'
    TestCaseDocumentResult:
      allOf:
        - $ref: '#/components/schemas/DocumentResult'
        - type: object
        - properties:
            document:
              description: Test case document
              $ref: '#/components/schemas/TestCaseDocument'
    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'
    ListDocumentRequest:
      allOf:
        - $ref: '#/components/schemas/RpcRequestWithIdAndJsonRpc'
        - type: object
          required:
            - method
            - params
          properties:
            method:
              type: string
              description: LIST_DOCUMENT
            params:
              properties:
                documentModelName:
                  type: string
                filter:
                  $ref: '#/components/schemas/FilterSpec'
                page:
                  $ref: '#/components/schemas/PageSpec'
                sort:
                  type: array
                  $ref: '#/components/schemas/SortSpecArray'
    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
    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
    Entity:
      type: object
      properties:
        role:
          type: string
          description: Role of the entity that participates into this relationship
        modelName:
          type: string
          description: Model name of the entity that participates into this relationship
        docRef:
          type: string
          description: Document reference of the entity
    LinkDescriptor:
      type: object
      description: Information of entities in the relationship
      properties:
        relationshipModel:
          type: string
          description: Name of the relationship model
        entities:
          type: array
          description: Contains 2 items which are the parent and child
          items:
            $ref: '#/components/schemas/Entity'
        predecessorLinkRef:
          type: string
          description: Link reference of the predecessor
          nullable: true
        position:
          type: number
          description: The position of the node to the predecessorLinkRef
    LinkRef:
      type: object
      description: Represent the link contains the documents
      properties:
        linkDescriptor:
          $ref: '#/components/schemas/LinkDescriptor'
        id:
          type: string
          description: id of the relationship link
    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
    DeleteDocumentRequest:
      allOf:
        - $ref: '#/components/schemas/RpcRequestWithIdAndJsonRpc'
        - type: object
          required:
            - method
            - params
          properties:
            method:
              type: string
              description: DELETE_DOCUMENT
            params:
              required:
                - docRef
              properties:
                docRef:
                  type: string
                  description: document reference
      examples:
        - id: DeleteNodeIdTestCasedm8ad7ac21c69049759b671e5fc4ec4dce
          params:
            docRef: TestCase-dm/8ad7ac21-c690-4975-9b67-1e5fc4ec4dce
            locale: en_US
          method: DELETE_DOCUMENT
          jsonrpc: '2.0'
    DeleteDocumentResponse:
      allOf:
        - $ref: '#/components/schemas/RpcResult'
        - type: object
          properties:
            result:
              type: object
              description: null value
      examples:
        - jsonrpc: '2.0'
          id: DeleteNodeIdTestCasedm8ad7ac21c69049759b671e5fc4ec4dce
          result: null
  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
