Remove an attachment from a risk.
DELETE
/v1/risks/{risk_id}/attachments/{file_id}
const url = 'https://api.adversarial.com/api/v1/risks/RSK-00001/attachments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'DELETE'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.adversarial.com/api/v1/risks/RSK-00001/attachments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0Detaches the file from this risk only. Other records and comments referencing the same file are unaffected and can still download it.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”risk_id
required
string
The ID of the risk — RSK-00001 (case-insensitive) or a bare number
Example
RSK-00001file_id
required
string format: uuid
The attachment’s id.
Responses
Section titled “Responses”Attachment detached from this risk
Missing risks:write permission
Attachment not found on this risk