PaloAltoNetworks / PaloAltoNetworks/pan.dev
Issue/Help with "List Alerts V2 - POST"
Nobody has claimed this yet.
- Dominant language
- MDX
- Stars
- 78
- Forks
- 88
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 18
Description
Documentation link
https://pan.dev/prisma-cloud/api/cspm/post-alerts-v-2/
Describe the problem
The policy name and severity is not returned:
"items": [
{
"alertRules": [],
"alertTime": 1680492646026,
"firstSeen": 1680492646026,
"history": [],
"id": "P-26555938",
"lastSeen": 1680492646026,
"lastUpdated": 1687405310914,
"metadata": {
"saveSearchId": "id"
},
"policy": {
"findingTypes": [],
"name": "",
"policyId": "id",
"policyType": "config",
"remediable": false,
"restrictAlertDismissal": true,
"rule": {
"criteria": "",
"name": "",
"parameters": null,
"type": ""
},
"severity": "",
"systemDefault": false
},...
Using the fields variable e.g.
fields = []string{"policy.name", "policy.severity"}
shows the name and severity, however everything else is omitted:
"items": [
{
"alertRules": [],
"id": "id",
"policy": {
"findingTypes": [],
"name": "name",
"policyType": "",
"remediable": false,
"rule": {
"criteria": "",
"name": "",
"parameters": null,
"type": ""
},
"severity": "low"
}
},...
How can I return all the alert info as well as the policy name and severity?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked List Alerts V2 - POST documentation and reproduce the response with and without fields set to policy.name and policy.severity. Check whether the endpoint's field-selection behavior is documented or reproducible; done means the supported request and expected complete alert response are clarified or documented.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100