Skip to main content

Attachment

TMT API (1.0.0)

Download OpenAPI specification:Download

API working with Test folders in TMT

Upload attachment

Upload attachment to TMT
Notice: For attachments of types: JPEG, PNG, BMP, WBMP , GIF or SVG, thumbnails will be generated with .png extension in 2 configurable sizes: small thumbnal and big thumbnail. Only images has smallThumbnailUrl and bigThumbnailUrl in the response
This attachment response then can be used to build the document content during the add/modify document operation

Authorizations:
bearerAuth
path Parameters
filename
required
string
Example: image.png

s not only attachment identifier the user knows but also with correct file extension might be a hint for supporting attachment mime type detection more precisely, therefore it is vital for attachment handling.

documentModelName
required
string
Example: TestSuite-dm

is needed for security purposes. The user of this endpoint must have the read access to this document.

pathToField
string
Example: /Root/Attachments

reserved for future, but it is mandatory parameter. Empty string could be used.

header Parameters
Project-Id
required
string

Project Id or the project document reference

Subproject-Id
string

Sub Project Id or the project document reference. It might be required if you want to access the sub project's resource

Responses

Response samples

Content type
application/json
{}

Load thumbnails

Load a thumbnail by given attachment id

Authorizations:
bearerAuth
header Parameters
Project-Id
required
string

Project Id or the project document reference

Subproject-Id
string

Sub Project Id or the project document reference. It might be required if you want to access the sub project's resource

Request Body schema: application/json
required
id
required
string

id of the operation

jsonrpc
required
string

must be 2.0

method
required
string

LOAD_THUMBNAIL_URL

required
object

Responses

Request samples

Content type
application/json
{
  • "jsonrpc": "2.0",
  • "id": "LOAD_THUMBNAIL_URL_f7a4cb03-0e73-4843-8c85-42fc58373f76",
  • "method": "LOAD_THUMBNAIL_URL",
  • "params": {
    }
}

Response samples

Content type
application/json
{}

Load attachment

Generate expirable public URLs (no security will be applied during download) with instruction for the browser not to cache. The expiration time is 5 minutes

Authorizations:
bearerAuth
header Parameters
Project-Id
required
string

Project Id or the project document reference

Subproject-Id
string

Sub Project Id or the project document reference. It might be required if you want to access the sub project's resource

Request Body schema: application/json
required
id
required
string

id of the operation

jsonrpc
required
string

must be 2.0

method
required
string

LOAD_ATTACHMENT_URL

required
object

Responses

Request samples

Content type
application/json
{
  • "jsonrpc": "2.0",
  • "id": "7292c210-c779-44da-a803-925e7211f13c",
  • "method": "LOAD_ATTACHMENT_URL",
  • "params": {
    }
}

Response samples

Content type
application/json