Tricentis Object Link API

Object Link API

OpenAPI Specification

tricentis-object-link-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: "[Introduction to qTest API Specification](https://documentation.tricentis.com/qtest/od/en/content/apis/overview/qtest_api_specification.htm) \n[How to use interactive API Doc](https://documentation.tricentis.com/qtest/od/en/content/apis/overview/how_to_use_interactive_api_documentation.htm)\n The bearer token can be found at `[qtestUrl/p/{projectId}/portal/project#tab=resource]` under the API & SDK tab."
  version: v3.0
  title: qTest Manager API Version 3.0 Object Link API
servers:
- url: https://apitryout.qtestnet.com/
tags:
- name: object-link
  description: Object Link API
paths:
  /api/v3/projects/{projectId}/linked-artifacts:
    get:
      tags:
      - object-link
      summary: Gets associated objects of given objects
      description: 'To retrieve associated objects of given objects


        <strong>qTest Manager version:</strong> 7.5+'
      operationId: find
      parameters:
      - name: projectId
        in: path
        description: ID of the project
        required: true
        schema:
          type: integer
          format: int64
      - name: type
        in: query
        description: Valid values include <em>releases</em>, <em>builds</em>, <em>requirements</em>,<em>test-cases</em>, <em>test-runs</em>, <em>test-logs</em>, <em>test-steps</em> or <em>defects</em>
        required: true
        schema:
          type: string
          enum:
          - releases
          - builds
          - requirements
          - test-cases
          - test-runs
          - test-logs
          - test-steps
          - defects
      - name: ids
        in: query
        description: IDs of objects whose links you want to retrieve
        required: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: integer
            format: int64
      - name: pids
        in: query
        description: 'In case of <em>type=defects</em>, you can specify a list of external defect id in this parameters.


          It cannot be used for other types'
        required: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      - name: TRofSharedprojects
        in: query
        required: false
        schema:
          type: boolean
          default: false
      responses:
        200:
          description: successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/LinkedArtifactContainer'
      security:
      - Authorization: []
  /api/v3/projects/{projectId}/{objectType}/{objectId}/link:
    post:
      tags:
      - object-link
      summary: Creates links between objects
      description: To add associated objects to another object
      operationId: linkArtifacts
      parameters:
      - name: projectId
        in: path
        description: ID of the project
        required: true
        schema:
          type: integer
          format: int64
      - name: objectType
        in: path
        description: The object type of the source object. Valid values include requirements, builds, test-steps, test-logs, releases
        required: true
        schema:
          type: string
          enum:
          - releases
          - builds
          - requirements
          - test-logs
          - test-steps
      - name: type
        in: query
        description: "The object type of the associated objects which are being added to the source object. \n\nValid values include releases, builds, requirements, test-cases, test-runs, test-logs, test-steps or defects"
        required: true
        schema:
          type: string
          enum:
          - releases
          - builds
          - requirements
          - test-cases
          - test-runs
          - test-logs
          - test-steps
          - defects
      - name: objectId
        in: path
        description: ID of the source object
        required: true
        schema:
          type: integer
          format: int64
      responses:
        200:
          description: 'Successful operation


            Note: System will ignore those objects that cannot be linked'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/LinkedArtifactContainer'
        201:
          description: ''
      security:
      - Authorization: []
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: integer
                format: int64
        description: 'A JSONArray of associated object IDs which are being added to the source object


          Notes:


          When creating link between Test Case and Requirement, please make sure that:


          - The Test Case is not routed for VERA approval


          - Data migration for Test Case version when turning on Test Case Settings to track Test Case - Requirement Link per version is completed'
        required: true
    delete:
      tags:
      - object-link
      summary: Removes links between objects
      description: To remove associated objects from another object
      operationId: unlinkArtifacts
      parameters:
      - name: projectId
        in: path
        description: ID of the project
        required: true
        schema:
          type: integer
          format: int64
      - name: objectType
        in: path
        description: The object type of the source object. Valid values include requirements, builds, test-steps, test-logs, releases
        required: true
        schema:
          type: string
          enum:
          - releases
          - builds
          - requirements
          - test-logs
          - test-steps
      - name: type
        in: query
        description: "The object type of the associated objects which are being added to the source object. \n\nValid values include releases, builds, requirements, test-cases, test-runs, test-logs, test-steps or defects"
        required: true
        schema:
          type: string
          enum:
          - releases
          - builds
          - requirements
          - test-cases
          - test-runs
          - test-logs
          - test-steps
          - defects
      - name: objectId
        in: path
        description: ID of the source object
        required: true
        schema:
          type: integer
          format: int64
      responses:
        200:
          description: 'Successful operation


            Note: System will ignore those objects that cannot be unlinked'
          content:
            application/json:
              schema:
                type: object
      security:
      - Authorization: []
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: integer
                format: int64
        description: 'A JSONArray of associated object IDs which are being removed from the source object


          Notes:


          When removing link between Test Case and Requirement, please make sure that:


          - The Test Case is not routed for VERA approval


          - Data migration for Test Case version when turning on Test Case Settings to track Test Case - Requirement Link per version is completed'
        required: true
  /api/v3/projects/{projectId}/{objectType}/{objectId}/{linkType}:
    post:
      tags:
      - object-link
      summary: Creates links between objects by pids
      description: To add associated objects to another object by pids or Jira Defects Ids
      operationId: linkArtifactsByPid
      parameters:
      - name: projectId
        in: path
        description: ID of the project
        required: true
        schema:
          type: integer
          format: int64
      - name: objectType
        in: path
        description: The object type of the source object. Valid values include test-steps, test-logs
        required: true
        schema:
          type: string
          enum:
          - releases
          - builds
          - requirements
          - test-logs
          - test-steps
      - name: linkType
        in: path
        description: "The object type of the associated objects which are being added to the source object. \n\nValid value: defects"
        required: true
        schema:
          type: string
          enum:
          - releases
          - builds
          - requirements
          - test-cases
          - test-runs
          - test-logs
          - test-steps
          - defects
      - name: objectId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        201:
          description: Link defect successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/LinkedDefectContainer'
        400:
          description: Test run was locked
        403:
          description: User does not have enough permission
        404:
          description: Link defect unsuccessfully
      security:
      - Authorization: []
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
        description: A JSONArray of associated object PIDs or Jira Defect which are being added to the source object
        required: true
    delete:
      tags:
      - object-link
      summary: Removes links between objects by pids
      description: To removes links between objects by pids
      operationId: unlinkArtifactsByPid
      parameters:
      - name: projectId
        in: path
        description: ID of the project
        required: true
        schema:
          type: integer
          format: int64
      - name: objectType
        in: path
        description: The object type of the source object. Valid values include test-steps, test-logs
        required: true
        schema:
          type: string
          enum:
          - releases
          - builds
          - requirements
          - test-logs
          - test-steps
      - name: linkType
        in: path
        description: "The object type of the associated objects which are being added to the source object. \n\nValid value: defects"
        required: true
        schema:
          type: string
          enum:
          - releases
          - builds
          - requirements
          - test-cases
          - test-runs
          - test-logs
          - test-steps
          - defects
      - name: objectId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        200:
          description: Unlink defect successfully, list of defects that unlinked successfully will be returned
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
        400:
          description: Test run was locked
        403:
          description: User does not have enough permission
        404:
          description: Unlink defect unsuccessfully
      security:
      - Authorization: []
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
        description: A JSONArray of associated object PIDs which are being added to the source object
        required: true
components:
  schemas:
    LinkedArtifact:
      type: object
      properties:
        id:
          type: integer
          format: int64
          example: 1
          description: ID of linked artifact
        pid:
          type: string
          example: TC-1
          description: PID of linked artifact
        link_type:
          type: string
          example: is_covered_by
          description: 'Type of relationship between source and linked Artifact '
        self:
          type: string
          example: https://apitryout.qtestnet.com/p/1/portal/project#tab=testdesign&object=1&id=1
          description: URL to linked artifact
    LinkedDefect:
      type: object
      properties:
        id:
          type: integer
          format: int64
          example: 1
          description: Defect id
        pid:
          type: string
          example: MTR-1
          description: Defect pid
        link_type:
          type: string
          example: is_associated_with
          description: Link type
        external_defect_id:
          type: string
          example: MTR-1
          description: External defect id
        connection_id:
          type: integer
          format: int64
          example: 1
          description: Defect connection id
        external_project_id:
          type: string
          example: MTR
          description: External project id
        summary:
          type: string
          example: Defect summary 1
          description: Defect summary
        status:
          type: string
          example: New
          description: Defect status
    LinkedArtifactContainer:
      type: object
      properties:
        id:
          type: integer
          format: int64
          example: 1
          description: ID of source artifact
        pid:
          type: string
          example: RQ-1
          description: PID of source artifact`
        objects:
          type: array
          description: Arrays of linked artifact
          items:
            $ref: '#/components/schemas/LinkedArtifact'
    LinkedDefectContainer:
      type: object
      properties:
        id:
          type: integer
          format: int64
          example: 1
          description: ID of source artifact
        objects:
          type: array
          description: Arrays of linked defect
          items:
            $ref: '#/components/schemas/LinkedDefect'
  securitySchemes:
    Authorization:
      type: apiKey
      name: Authorization
      in: header