pan.dev icon indicating copy to clipboard operation
pan.dev copied to clipboard

No documentation of Alarms API endpoint

Open goldjg opened this issue 2 years ago • 1 comments

Documentation link

https://pan.dev/prisma-cloud/api/

Describe the problem

The /alarms endpoint is not documented but is very useful to customers - the Alarm Center is lacking in features so I am using the Alarms API to surface alarms and then, because the notifications from Alarm Center (to email) do not contain remediation information and instead direct you to login to the console to check, I use the /account/{account id}/config/status endpoint to retrieve the remediation information for the required account e.g.

GET https://{{myenv}}/account/a12b34cd3-567e-8fed-cb76-1234567a1a2a/config/status
[
    {
        "name": "Config",
        "status": "warning",
        "message": "Prisma Cloud application is not assigned following action(s): [\"Microsoft.ContainerRegistry/registries/webhooks/getCallbackConfig/action\"]\n",
        "remediation": "Assign the mentioned action(s) to Prisma Cloud application: [\"Microsoft.ContainerRegistry/registries/webhooks/getCallbackConfig/action\"]\n",
        "subComponents": []
    },
    {
        "name": "Audit Logs",
        "status": "ok",
        "message": "",
        "remediation": "",
        "subComponents": []
    },
    {
        "name": "Flow logs",
        "status": "ok",
        "message": "",
        "remediation": "",
        "subComponents": []
    },
    {
        "name": "Authentication",
        "status": "ok",
        "message": "",
        "remediation": "",
        "subComponents": []
    },
    {
        "name": "Compute Discovery",
        "status": "warning",
        "message": "Prisma Cloud application is not assigned following action(s): [\"Microsoft.ContainerInstance/containerGroups/containers/exec/action\"]\n",
        "remediation": "Assign the mentioned action(s) to Prisma Cloud application: [\"Microsoft.ContainerInstance/containerGroups/containers/exec/action\"]\n",
        "subComponents": []
    },
    {
        "name": "Remediation",
        "status": "warning",
        "message": "Prisma Cloud application is not assigned following action(s): [\"Microsoft.Web/sites/config/Write\", \"Microsoft.Sql/servers/databases/transparentDataEncryption/write\", \"Microsoft.DBforMySQL/flexibleServers/configurations/write\", \"Microsoft.Sql/servers/databases/securityAlertPolicies/write\", \"Microsoft.Web/sites/Write\", \"Microsoft.Security/autoProvisioningSettings/write\", \"Microsoft.Storage/storageAccounts/write\", \"Microsoft.DBforPostgreSQL/servers/configurations/write\", \"Microsoft.Insights/LogProfiles/Delete\", \"Microsoft.Authorization/policyAssignments/write\", \"Microsoft.Authorization/policyAssignments/delete\", \"Microsoft.Storage/storageAccounts/*\", \"Microsoft.Insights/LogProfiles/Write\"]\n",
        "remediation": "Assign the mentioned action(s) to Prisma Cloud application: [\"Microsoft.Web/sites/config/Write\", \"Microsoft.Sql/servers/databases/transparentDataEncryption/write\", \"Microsoft.DBforMySQL/flexibleServers/configurations/write\", \"Microsoft.Sql/servers/databases/securityAlertPolicies/write\", \"Microsoft.Web/sites/Write\", \"Microsoft.Security/autoProvisioningSettings/write\", \"Microsoft.Storage/storageAccounts/write\", \"Microsoft.DBforPostgreSQL/servers/configurations/write\", \"Microsoft.Insights/LogProfiles/Delete\", \"Microsoft.Authorization/policyAssignments/write\", \"Microsoft.Authorization/policyAssignments/delete\", \"Microsoft.Storage/storageAccounts/*\", \"Microsoft.Insights/LogProfiles/Write\"]\n",
        "subComponents": []
    },
    {
        "name": "Serverless Function Scanning",
        "status": "warning",
        "message": "Prisma Cloud application is not assigned following action(s): [\"Microsoft.web/sites/functions/action\", \"Microsoft.Web/sites/publishxml/action\", \"Microsoft.Web/sites/config/list/action\"]\n",
        "remediation": "Assign the mentioned action(s) to Prisma Cloud application: [\"Microsoft.web/sites/functions/action\", \"Microsoft.Web/sites/publishxml/action\", \"Microsoft.Web/sites/config/list/action\"]\n",
        "subComponents": []
    }
]

Suggested fix

Publicly document and support the Alarms API endpoints - they are very useful

goldjg avatar Sep 26 '23 09:09 goldjg

:tada: Thanks for opening your first issue here! Welcome to the community!