As of December 31st, 2023 ThreadFix 2.X has reached End of Life and is no longer supported. For any further information please contact the Success and Implementation team.
Attach File to Vulnerability - API
/rest/{version}/documents/vulnerabilities/{vulnId}/upload
Â
Descriptor | Value |
---|---|
HTTP Method | POST |
Description | Attaches a file to an vulnerability. |
Required Permission | Manage Vulnerabilities or Manage Vulnerability File Attachments |
Version Introduced | 2.5.3 |
Request Header Parameters
Parameter | Value | Required | Description |
---|---|---|---|
Accept | String | Yes | A value of ‘application/json’ must be provided. |
Request POST Data Parameters
Parameter | Value | Required | Description |
---|---|---|---|
file0 | File | yes | The file you want to attach to the vulnerability in ThreadFix. |
filename | String | no | A name to override the filename when it is attached to the application. |
Sample Call:
curl --insecure -H 'Accept: application/json' -H "Authorization: APIKEY {apiKey}" -F 'file0=@C:\Users\user1\Desktop\doc test 1.txt' -X POST http://localhost:8080/threadfix/rest/documents/latest/vulnerabilities/2179/upload
Sample Output:
Values for uploadedDate are returned as Epoch time in milliseconds.
{
"message": "",
"success": true,
"responseCode": -1,
"object": {
"id": 8,
"active": true,
"name": "doc test 1",
"type": "txt",
"contentType": "text/plain",
"uploadedDate": 1522095256802
}
}
www.threadfix.it | www.coalfire.com
Copyright © 2024 Coalfire. All rights reserved.
This Information Security Policy is CoalFire - Public: Distribution of this material is not limited.