Users can fetch the list of YARA rulesets.
GET https://<etp_instance_addr>/api/v1/policies/policy_uuid/configuration/rules/yara/rulesets
Required header:
x-fireeye-api-key: <key>—Specifies your personal API key.
Content-Type: application/json—Content-type of the request body.
Options
policy_uuid—Universally unique identifier (UUID) of the policy.
Example of the request
Values for ID and other fields are for illustration only.
GET https://etp.us.fireeye.com/api/v1/policies/7b14d291-e864-11eb-993c-02a7fc9eb3d9/configuration/rules/yara/rulesets
Example of the response
{
"data": {
"policy_master_uuid": "policy_uuid",
"rulesets": [{
"uuid": "ruleset_uuid",
"uri": "/api/v1/policies/policy_uuid/configuration/rules/yara/rulesets/ruleset_uuid/attributes",
"name": "ruleset",
"description": "desc1",
"override_rule_weights": true,
"default_file_weight": 70,
"content_type": "base",
"attachment_type": "common",
"yara_file_name": "file3.yara",
"enabled": true
},
{
"uuid": "ruleset4_uuid",
"uri": "/api/v1/policies/policy_uuid/configuration/rules/yara/rulesets/ruleset4_uuid/attributes",
"name": "ruleset4",
"description": "desc1",
"override_rule_weights": false,
"content_type": "base",
"attachment_type": "common",
"yara_file_name": "file4.yara",
"enabled": true
}
]
},
"meta": {
"total": 2,
"copyright": "Copyright 2021 FireEye Inc",
"type": "Yara Rules"
}
}cURL code sample: fetch list of YARA rulesets
curl -k -XGET https://etp.us.fireeye.com/api/v1/policies/7b14d291-e864-11eb-993c-02a7fc9eb3d9/configuration/rules/yara/rulesets -H 'x-fireeye-api-key: <feye-key>'
This cURL sample includes the following options:
-X GET—This option changes the HTTP method to GET.--header "Content-Type: application/json"—This header specifies that the server's response body is expected to be in JSON format.--header 'x-fireeye-api-key: <feye-key>'—This header specifies your personal API key.https://etp.us.fireeye.com/api/v1/policies/7b14d291-e864-11eb-993c-02a7fc9eb3d9/configuration/rules/yara/rulesets—The list ruleset request URL. Replaceetp.us.fireeye.comwith the IP address of your Email Security — Cloud instance and 7b14d291-e864-11eb-993c-02a7fc9eb3d9 with the UUID of the YARA policy.
Results
This example returns list of rulesets under the YARA policy.