Add Enclave Tag To Report¶
POST /1.2/reports/{id}/enclave-tags?name={tag_name}&enclaveId={enclave_id}&idType={id_type}
Description¶
Creates a tag on an incident report, for the given enclave. If the tag already exists, it will be reused.
Parameters¶
Parameter | Required | Description |
---|---|---|
id | X | TruSTAR report id or external tracking id |
idType | internal or external (defaults to internal when not provided) |
|
name | X | the name of the tag to create |
enclaveId | X | the id of the enclave to create the tag in |
Responses¶
200 (OK)¶
{
"guid": enclave tag guid,
"name": tag name,
"count": number of times the tag has been applied,
"enclaveId": id of the enclave the tag belongs to
}
The enclave tag that was added to the report.
400 (Bad Request)¶
{
"timestamp": milliseconds since epoc,
"status": 400,
"error": "Bad Request",
"message": error detail (e.g. report id not provided)
}
403 (Forbidden)¶
{
"timestamp": milliseconds since epoc,
"status": 400,
"error": "Bad Request",
"message": error detail (e.g. user can't access report)
}
404 (Not Found)¶
{
"timestamp": milliseconds since epoc,
"status": 404,
"error": "Not Found",
"message": error detail (e.g. report not found)
}
Example Usage¶
Request¶
curl -k -H "Authorization: Bearer {access_token}" -XPOST "https://api.trustar.co/api/1.2/reports/9066ab40-2f3c-45ae-9566-7530403da691/enclave-tags?name=malware&enclaveId=2884f4b2-1781-4641-aa54-8911d32bd323"
Response¶
{
"guid": "368561e2-81ba-4efa-a46d-a306ad23932e",
"name": "malware",
"count": 1,
"enclaveId": "2884f4b2-1781-4641-aa54-8911d32bd323"
}