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_TEST_SUITE):
    post:
      summary: Get test suite detail
      description: >
        Get a test suite document by its document reference using the
        GET_TMT_DOCUMENT operation.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetTmtDocumentRequest'
              examples:
                $ref: example/GET_TEST_SUITE-request.json
      responses:
        '200':
          description: GET_TMT_DOCUMENT result containing the test suite document
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTmtDocumentResponse'
                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
                page:
                  $ref: '#/components/schemas/QueryPaging'
                sort:
                  type: array
                  items:
                    $ref: '#/components/schemas/QueryOrder'
      examples:
        - jsonrpc: '2.0'
          id: TestRunTestSuite_TestSuites.DataProvider-1
          method: GET_TEST_SUITES_IN_RUN
          params:
            testRunDocRef: TestRun-dm/f90f07d9-af24-4cf9-b8ab-26c808d2876a
            page:
              pageNumber: 0
              pageSize: 50
            sort:
              - field: /target/Root/General/Title
                direction: ASC
                nullHandling: NULLS_LAST
                ignoreCase: true
    GetTestSuitesInRunResponse:
      allOf:
        - $ref: '#/components/schemas/QueryOperationResponse'
      examples:
        - jsonrpc: '2.0'
          id: TestRunTestSuite_TestSuites.DataProvider-1
          result:
            fullSize: 1
            page:
              pageNumber: 0
              pageSize: 50
            entries:
              - docRef: TestRunTestSuiteTestSuite-dm/41378
                documentModelName: TestRunTestSuiteTestSuite-dm
                document:
                  target:
                    Root:
                      General:
                        Id: S_1
                        ProjectId: P_6
                        ProjectVersionNumber: 5.0.0
                        SubprojectId: _
                        Tags: ''
                        TenantId: T_1
                        Title: Suiet 1
                        RecommendedPriority:
                          Value: MEDIUM
                      Metadata:
                        IsFrozenByClosedVersion: false
                      DisplayFields:
                        TotalRunningTestCases: 56
                        TotalTestCases: 56
                    __meta:
                      docRef: TestSuite-dm/92aed588-40e7-4cfb-bd9a-832f03b525ae
                    docRef: TestSuite-dm/92aed588-40e7-4cfb-bd9a-832f03b525ae
                  relationship:
                    id: TestRunTestSuiteAdditionalFields-dm
                    Root:
                      General:
                        Assignee: tmtdev
                        ProjectId: P_6
                        SubprojectId: _
                        TenantId: T_1
                        RecommendedPriority:
                          Value: MEDIUM
                    __meta:
                      createdAt: '2026-04-14T08:38:34'
                      creator: SYSTEM
                      docRef: >-
                        TestRunTestSuiteAdditionalFields-dm/589f4fc0-84e3-4785-aa2e-971abb425b06
                      modelReference: TestRunTestSuiteAdditionalFields-dm
                      modelVersion: null
                      modifiedAt: '2026-04-14T08:38:34'
                      modifier: SYSTEM
                    docRef: >-
                      TestRunTestSuiteAdditionalFields-dm/589f4fc0-84e3-4785-aa2e-971abb425b06
            links: null
            otherResults: null
    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'
    ListTestSuiteRequest:
      allOf:
        - $ref: '#/components/schemas/RpcRequestWithIdAndJsonRpc'
        - required:
            - method
            - params
        - properties:
            method:
              description: LIST_TEST_SUITES
            params:
              type: object
              required:
                - projectSpec
                - query
              properties:
                projectSpec:
                  $ref: '#/components/schemas/ProjectVersionSpec'
                testCaseFilters:
                  type: array
                  description: >-
                    Optional list of test case filters to apply alongside the
                    main query.
                  items:
                    type: object
                query:
                  $ref: '#/components/schemas/QueryApiRoot'
      examples:
        - jsonrpc: '2.0'
          id: LIST_TEST_SUITES_be255843-c709-4d92-a018-2a1107bc5af2
          method: LIST_TEST_SUITES
          params:
            testCaseFilters: []
            projectSpec:
              projectId: P_6
              subProjectId: _
              projectVersionNumber: 5.0.0
            query:
              targetDocumentModel: TestSuite-dm
              projectionName: document
              constraint: null
              sort:
                - field: /Root/General/Order
                  direction: ASC
                  nullHandling: NULLS_LAST
                  ignoreCase: true
              paging:
                pageNumber: 0
                pageSize: 50
    ListTestSuiteResponse:
      allOf:
        - $ref: '#/components/schemas/QueryOperationResponse'
      examples:
        - jsonrpc: '2.0'
          id: LIST_TEST_SUITES_be255843-c709-4d92-a018-2a1107bc5af2
          result:
            fullSize: 5
            page:
              pageNumber: 0
              pageSize: 50
            entries:
              - docRef: TestSuite-dm/5a6e558b-9f66-491f-9dce-95cc170d4d4b
                documentModelName: TestSuite-dm
                document:
                  id: '-1'
                  Root:
                    General:
                      Id: S_21
                      Order: '0.2'
                      ProjectId: P_6
                      ProjectVersionNumber: 5.0.0
                      SubprojectId: _
                      TechnicalId: 62f87d74-a0cc-4bf6-bb72-6030998f2d47
                      TenantId: T_1
                      Title: '1'
                      RecommendedPriority:
                        Value: MEDIUM
                    Metadata:
                      CreatedBy: tmtdev
                      CreatedOn: 1732689505974
                      DisplayCreatedOn: '2024-11-27T06:38:25'
                      DisplayEditedOn: '2024-11-27T06:47:15'
                      EditedBy: tmtdev
                      EditedOn: 1732690035626
                      IsImported: false
                    DisplayFields:
                      TotalTestCases: 0
                      PercentageOfAutomatedCases: '-'
                      AutomationCoverage: []
                      AssigneesOfTestCases: []
                      TestCasesWithAssignee: '-'
                  __meta:
                    createdAt: '2026-04-14T08:37:07'
                    creator: SYSTEM
                    docRef: TestSuite-dm/5a6e558b-9f66-491f-9dce-95cc170d4d4b
                    modelReference: TestSuite-dm
                    modelVersion: null
                    modifiedAt: '2026-04-14T08:37:07'
                    modifier: SYSTEM
              - docRef: TestSuite-dm/80c16135-046c-4eb1-a821-6362683b4a70
                documentModelName: TestSuite-dm
                document:
                  id: '-1'
                  Root:
                    General:
                      Id: S_20
                      Order: '0.3'
                      ProjectId: P_6
                      ProjectVersionNumber: 5.0.0
                      SubprojectId: _
                      TechnicalId: 5cdbdedc-9e68-462e-b969-d0454ec7ab4c
                      TenantId: T_1
                      Title: '1'
                      RecommendedPriority:
                        Value: MEDIUM
                    Metadata:
                      CreatedBy: tmtdev
                      CreatedOn: 1732689501554
                      DisplayCreatedOn: '2024-11-27T06:38:21'
                      DisplayEditedOn: '2024-11-27T06:47:15'
                      EditedBy: tmtdev
                      EditedOn: 1732690035860
                      IsImported: false
                    DisplayFields:
                      TotalTestCases: 0
                      PercentageOfAutomatedCases: '-'
                      AutomationCoverage: []
                      AssigneesOfTestCases: []
                      TestCasesWithAssignee: '-'
                  __meta:
                    createdAt: '2026-04-14T08:37:07'
                    creator: SYSTEM
                    docRef: TestSuite-dm/80c16135-046c-4eb1-a821-6362683b4a70
                    modelReference: TestSuite-dm
                    modelVersion: null
                    modifiedAt: '2026-04-14T08:37:07'
                    modifier: SYSTEM
              - docRef: TestSuite-dm/3bebee20-fa5c-455e-b965-9c99699f8d73
                documentModelName: TestSuite-dm
                document:
                  id: '-1'
                  Root:
                    General:
                      Id: S_19
                      Order: '0.4'
                      ProjectId: P_6
                      ProjectVersionNumber: 5.0.0
                      SubprojectId: _
                      TechnicalId: 1da1521a-3e85-44eb-9299-5037b4ad395a
                      TenantId: T_1
                      Title: '1'
                      RecommendedPriority:
                        Value: MEDIUM
                    Metadata:
                      CreatedBy: tmtdev
                      CreatedOn: 1732689499375
                      DisplayCreatedOn: '2024-11-27T06:38:19'
                      DisplayEditedOn: '2024-11-27T06:47:16'
                      EditedBy: tmtdev
                      EditedOn: 1732690036102
                      IsImported: false
                    DisplayFields:
                      TotalTestCases: 0
                      PercentageOfAutomatedCases: '-'
                      AutomationCoverage: []
                      AssigneesOfTestCases: []
                      TestCasesWithAssignee: '-'
                  __meta:
                    createdAt: '2026-04-14T08:37:07'
                    creator: SYSTEM
                    docRef: TestSuite-dm/3bebee20-fa5c-455e-b965-9c99699f8d73
                    modelReference: TestSuite-dm
                    modelVersion: null
                    modifiedAt: '2026-04-14T08:37:07'
                    modifier: SYSTEM
              - docRef: TestSuite-dm/e0a40b91-d3ba-4e96-b16e-6f50ea635774
                documentModelName: TestSuite-dm
                document:
                  id: '-1'
                  Root:
                    General:
                      Id: S_18
                      Order: '0.5'
                      ProjectId: P_6
                      ProjectVersionNumber: 5.0.0
                      SubprojectId: _
                      TechnicalId: fa4ee1d4-5753-4499-8533-007075fd1f5b
                      TenantId: T_1
                      Title: '1'
                      RecommendedPriority:
                        Value: MEDIUM
                    Metadata:
                      CreatedBy: tmtdev
                      CreatedOn: 1732689497192
                      DisplayCreatedOn: '2024-11-27T06:38:17'
                      DisplayEditedOn: '2024-11-27T06:47:16'
                      EditedBy: tmtdev
                      EditedOn: 1732690036298
                      IsImported: false
                    DisplayFields:
                      TotalTestCases: 0
                      PercentageOfAutomatedCases: '-'
                      AutomationCoverage: []
                      AssigneesOfTestCases: []
                      TestCasesWithAssignee: '-'
                  __meta:
                    createdAt: '2026-04-14T08:37:06'
                    creator: SYSTEM
                    docRef: TestSuite-dm/e0a40b91-d3ba-4e96-b16e-6f50ea635774
                    modelReference: TestSuite-dm
                    modelVersion: null
                    modifiedAt: '2026-04-14T08:37:06'
                    modifier: SYSTEM
              - docRef: TestSuite-dm/c7c50f56-f266-4cf8-8f87-1905fff404e8
                documentModelName: TestSuite-dm
                document:
                  id: '-1'
                  Root:
                    General:
                      Id: S_17
                      Order: '0.6'
                      ProjectId: P_6
                      ProjectVersionNumber: 5.0.0
                      SubprojectId: _
                      TechnicalId: 19c011aa-e20a-48d6-b9e8-6e2258d7feaa
                      TenantId: T_1
                      Title: '1'
                      RecommendedPriority:
                        Value: MEDIUM
                    Metadata:
                      CreatedBy: tmtdev
                      CreatedOn: 1732689495033
                      DisplayCreatedOn: '2024-11-27T06:38:15'
                      DisplayEditedOn: '2024-11-27T06:47:16'
                      EditedBy: tmtdev
                      EditedOn: 1732690036537
                      IsImported: false
                    DisplayFields:
                      TotalTestCases: 0
                      PercentageOfAutomatedCases: '-'
                      AutomationCoverage: []
                      AssigneesOfTestCases: []
                      TestCasesWithAssignee: '-'
                  __meta:
                    createdAt: '2026-04-14T08:37:06'
                    creator: SYSTEM
                    docRef: TestSuite-dm/c7c50f56-f266-4cf8-8f87-1905fff404e8
                    modelReference: TestSuite-dm
                    modelVersion: null
                    modifiedAt: '2026-04-14T08:37:06'
                    modifier: SYSTEM
            links: null
            otherResults:
              filterItemMap:
                /Root/DisplayFields/AssigneesOfTestCases:
                  - value: none
                    label: None
                /Root/General/RecommendedPriority/Value:
                  - value: MEDIUM
                    label: MEDIUM
                /Root/DisplayFields/SearchTagsFilter:
                  - value: none
                    label: None
    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'
    GetTmtDocumentRequest:
      allOf:
        - $ref: '#/components/schemas/RpcRequestWithIdAndJsonRpc'
        - type: object
          required:
            - method
            - params
          properties:
            method:
              type: string
              description: GET_TMT_DOCUMENT
            params:
              required:
                - docRef
              properties:
                docRef:
                  type: string
                  description: document reference
      examples:
        - id: GET_TMT_DOCUMENT-1
          method: GET_TMT_DOCUMENT
          jsonrpc: '2.0'
          params:
            docRef: TestSuite-dm/de462a40-40b2-49dc-9848-f253c3a37766
    RpcResult:
      type: object
      properties:
        jsonrpc:
          type: string
          description: request jsonrpc version
        id:
          type: string
          description: id of the operation
        result:
          type: object
    GetTmtDocumentResponse:
      allOf:
        - $ref: '#/components/schemas/RpcResult'
        - type: object
          properties:
            result:
              type: object
              required:
                - docRef
                - documentModelName
                - document
              properties:
                docRef:
                  type: string
                  description: Document reference of the returned document.
                documentModelName:
                  type: string
                  description: Document Model name of the returned document.
                document:
                  type: object
                  description: >-
                    Document content. Includes a `Root` object with the document
                    model fields and a `__meta` object with document metadata.
      examples:
        - jsonrpc: '2.0'
          id: GET_TMT_DOCUMENT-1
          result:
            docRef: TestSuite-dm/de462a40-40b2-49dc-9848-f253c3a37766
            documentModelName: TestSuite-dm
            document:
              Root:
                General:
                  Id: S_22
                  Order: '4.05'
                  ProjectId: P_6
                  ProjectVersionNumber: 5.0.0
                  SearchableTags: null
                  SubprojectId: _
                  TechnicalId: 270adeb2-0c75-4479-891d-5616b245f7e2
                  TenantId: T_1
                  Title: Here is the test suite
                  RecommendedPriority:
                    Value: MEDIUM
                Metadata:
                  CreatedBy: tmtdev
                  CreatedOn: 1732689508783
                  DisplayCreatedOn: '2024-11-27T06:38:28'
                  DisplayEditedOn: '2026-05-07T02:43:15'
                  EditedBy: tmtdoc
                  EditedOn: 1778121795261
                  IsImported: false
                  AssignedToVersion: {}
                  LatestTestCaseExecutionData:
                    TestCaseId: C_1
                    TestCaseTitle: 1 edited
                    TestRunId: R_5
                    TestedOn: '2026-01-19T04:51:40'
              __meta:
                createdAt: '2026-04-14T08:37:08'
                creator: SYSTEM
                docRef: TestSuite-dm/de462a40-40b2-49dc-9848-f253c3a37766
                modelReference: TestSuite-dm
                modelVersion: null
                modifiedAt: '2026-05-07T02:43:14'
                modifier: tmtdoc
    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
    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'
    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
    ProjectVersionSpec:
      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
        projectVersionNumber:
          type: string
          description: version of the project
    QueryPaging:
      type: object
      properties:
        pageNumber:
          type: integer
          description: Zero-based index of the first item to return in the query result.
        pageSize:
          type: integer
          description: Maximum number of items to return in the query result.
    QueryOrder:
      type: object
      properties:
        field:
          type: string
          description: Document Model field name to sort by.
        direction:
          type: string
          enum:
            - ASC
            - DESC
          description: Sorting direction, either ascending (`ASC`) or descending (`DESC`).
          default: ASC
        ignoreCase:
          type: boolean
          description: Whether the sorting should be case-sensitive
          default: false
        nullHandling:
          type: string
          enum:
            - NATIVE
            - NULLS_FIRST
            - NULLS_LAST
          description: >
            Specifies how null values should be handled in the sorting order.

            - `NULLS_FIRST` A hint to the used data store to order entries with
            null values before non null entries.

            - `NULLS_LAST` A hint to the used data store to order entries with
            null values after non null entries.

            - `NATIVE` Lets the data store decide what to do with nulls.
          default: NATIVE
    QueryLink:
      type: object
      properties:
        relationshipModel:
          type: string
          description: >-
            Specifies the Relationship Model, which document data shall be
            retrieved for..
        targetRole:
          type: string
          description: >-
            Specifies the target role in the relationship that will be linked to
            the root document. Data Services differentiates for document types
            "ROOT", "CHILD" and "LINK".
        constraint:
          type: object
          description: >-
            Defines a condition on the target document of the relationship,
            which allows for filtering of the link documents.
        linkDocumentConstraint:
          type: object
          description: >-
            Defines a condition on the link document, which allows for filtering
            the list of links. This is only allowed when a Link Document Model
            is defined for the relationship.
        fields:
          type: array
          items:
            type: string
          description: >-
            Specifies which fields of the "CHILD" documents should be included
            in the query result. If not explicitly provided, all fields are
            included.
        linkDocumentFields:
          type: array
          items:
            type: string
          description: >-
            Specifies which fields of the "LINK" documents should be included in
            the query result. If not explicitly provided, all fields are
            included.
        links:
          type: object
          description: >-
            Allows for linking additional documents to the link documents. It is
            possible to define either recursive or nested structures.
        maxDepth:
          type: integer
          description: >-
            Relevant for self-referencing relationships. Specifies how many
            references will be resolved. Required when a self-referencing
            relationship is detected in a link during query validation.
    QueryApiRoot:
      type: object
      required:
        - targetDocumentModel
        - projectionName
        - paging
      properties:
        targetDocumentModel:
          type: string
          description: Document Model name for which the query should be performed.
        projectionName:
          type: string
          required: true
          description: >-
            Specifies which projection type should be used for the query.
            Pre-defined are `"document"`, `"cdd"`, and `"document-graph"` as
            projection names.
        paging:
          type: object
          description: Specifies the pagination of the query result
          $ref: '#/components/schemas/QueryPaging'
        sort:
          type: array
          description: >-
            Specifies the sorting of the query result documents. Data Services
            does not apply any sorting per default.
          items:
            $ref: '#/components/schemas/QueryOrder'
        constraint:
          type: object
          description: >-
            Restricts the query result based on operators (e.g. logic operators
            on Document Model fields).
        fields:
          type: array
          description: >-
            Specifies which Document Model fields should be included in the
            query result. If not explicitly provided, all fields are included.
          items:
            type: string
        links:
          description: >-
            Specifies which link documents should be included in the query
            result.
          $ref: '#/components/schemas/QueryLink'
        aggregation:
          type: string
          description: >-
            Specifies a function which can be applied to the query result.
            Supported functions are `"avg"`, `"count"`, `"min"`, `"max"`, and
            `"sum"`.
        exclude:
          type: boolean
          description: >-
            Specifies whether root documents should be excluded from the query
            result. This is useful when only link documents are required.
    QueryResultEntry:
      type: object
      description: A single entry returned by a QUERY operation.
      properties:
        docRef:
          type: string
          description: Document reference of the returned document.
        document:
          type: object
          description: >-
            Document content. Includes a `Root` object with the document model
            fields and a `__meta` object with document metadata.
        type:
          type: string
          description: >-
            Type of the entry within the projection (e.g. `ROOT` for the root
            document of a document graph).
        depth:
          type: integer
          description: Depth of the entry in the document graph. `0` for the root document.
        documentModelName:
          type: string
          description: Document Model name of the returned document.
    QueryApiResult:
      type: object
      properties:
        fullSize:
          type: integer
          description: Total number of items found by the query (across all pages).
        page:
          type: object
          description: Pagination information of the current result page.
          properties:
            pageNumber:
              type: integer
              description: Zero-based index of the returned page.
            pageSize:
              type: integer
              description: Number of entries returned in this page.
        entries:
          type: array
          description: Result entries returned by the query.
          items:
            $ref: '#/components/schemas/QueryResultEntry'
        links:
          type: array
          description: >-
            If the result items are of type {@link DocumentTreeResult}, the
            entries list contains only documents of type LINK or CHILD.
            Otherwise, this list remains empty.
          items:
            type: object
        otherResults:
          type: object
          description: >-
            Additional aggregation or auxiliary results returned alongside the
            main entries (e.g. when an `aggregation` function is specified in
            the request).
    QueryOperationResponse:
      allOf:
        - $ref: '#/components/schemas/RpcResult'
        - type: object
          properties:
            result:
              $ref: '#/components/schemas/QueryApiResult'
    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
    DocumentResult:
      type: object
      properties:
        docRef:
          type: string
          description: document reference
        documentModelName:
          type: string
          description: model name
        document:
          type: object
    TestSuiteDocumentResult:
      allOf:
        - $ref: '#/components/schemas/DocumentResult'
        - type: object
        - properties:
            document:
              description: Test suite document
              $ref: '#/components/schemas/TestSuiteDocument'
  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
