Attachment
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:
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
- 200
{- "attachmentId": "60b87e2a-f5b5-4540-8335-4f2e4d58b0e0",
- "filename": "1700559417826-8a9fca09-5dd3-4bf8-9bba-093ac730772e.png",
- "mimeType": "image/png",
- "size": 4952,
- "annotations": [ ]
}
Load thumbnails
Load a thumbnail by given attachment id
Authorizations:
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/jsonrequired
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
- Payload
{- "jsonrpc": "2.0",
- "id": "LOAD_THUMBNAIL_URL_f7a4cb03-0e73-4843-8c85-42fc58373f76",
- "method": "LOAD_THUMBNAIL_URL",
- "params": {
- "attachmentId": "111c7b20-60aa-44b4-b8df-667fe0dfacac"
}
}
Response samples
- 200
{- "jsonrpc": "2.0",
- "id": "LOAD_THUMBNAIL_URL_f7a4cb03-0e73-4843-8c85-42fc58373f76",
- "result": {
}
}
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:
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/jsonrequired
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
- Payload
{- "jsonrpc": "2.0",
- "id": "7292c210-c779-44da-a803-925e7211f13c",
- "method": "LOAD_ATTACHMENT_URL",
- "params": {
- "attachmentId": "7292c210-c779-44da-a803-925e7211f13c",
- "docRef": "TestCase-dm/656241"
}
}
Response samples
- 200
{- "jsonrpc": "2.0",
- "id": "7292c210-c779-44da-a803-925e7211f13c",
}