POST
/
api
/
v1
/
stats
/
securityPosture
Get security posture
curl --request POST \
  --url https://zeropath.com/api/v1/stats/securityPosture \
  --header 'Content-Type: application/json' \
  --header 'X-ZeroPath-API-Token-Id: <api-key>' \
  --header 'X-ZeroPath-API-Token-Secret: <api-key>' \
  --data '{
  "organizationId": "<string>",
  "projectId": "<string>",
  "startDate": "2023-12-25",
  "endDate": "2023-12-25",
  "timeGranularity": "day",
  "severities": [
    "critical"
  ]
}'
[
  {
    "summary": {
      "overAllRiskScore": 123,
      "riskTrend": "<string>",
      "totalOpenIssues": 123,
      "criticalIssues": 123,
      "highIssues": 123,
      "mediumIssues": 123,
      "lowIssues": 123,
      "vulnerabilityDensity": 123,
      "repositoriesAtRisk": 123,
      "totalRepositories": 123,
      "meanRemediationTime": 123
    },
    "exposure": {
      "meanCriticalExposure": 123,
      "meanHighExposure": 123,
      "oldestCriticalAge": 123,
      "oldestHighAge": 123
    },
    "trends": [
      {
        "date": "2023-12-25",
        "openIssues": 123,
        "newIssues": 123,
        "resolvedIssues": 123,
        "riskScore": 123,
        "criticalIssues": 123,
        "meanRemediationTime": 123,
        "exposure": {
          "meanCriticalExposure": 123,
          "meanHighExposure": 123,
          "oldestCriticalAge": 123,
          "oldestHighAge": 123
        }
      }
    ],
    "topRiskFactors": [
      {
        "type": "<string>",
        "count": 123
      }
    ],
    "repositoryRiskScores": [
      {
        "id": "<string>",
        "name": "<string>",
        "riskScore": 123,
        "openIssues": 123,
        "criticalIssues": 123
      }
    ]
  }
]

Authorizations

X-ZeroPath-API-Token-Id
string
header
required
X-ZeroPath-API-Token-Secret
string
header
required

Body

application/json
organizationId
string
projectId
string
startDate
string<date>
endDate
string<date>
timeGranularity
enum<string>
Available options:
day,
week,
month
severities
enum<string>[]

Response

200 - application/json

Successful response

summary
object
exposure
object
topRiskFactors
object[]
repositoryRiskScores
object[]