{"type":"api","title":"Get Private Resource Access Statistics","meta":{"id":"/apps/pubhub/media/cloud-security-gov/9ead083ce611c254ac9201d1e76003bd3d4b4b6b/d1093732-2fd9-3760-ac85-83910c4b7111","info":{"title":"Cisco Secure Access for Government Reporting API","description":"The Reporting API provides the data to generate the Secure Access reports.","version":"2.0.1","contact":{"name":"Cloud Security Developer Community"}},"security":[{"oauthFlow":[]}],"tags":[{"name":"Activity"},{"name":"Top Identities"},{"name":"Identity Distribution"},{"name":"Top Resources"},{"name":"Top Destinations"},{"name":"Top Categories"},{"name":"Top Event Types"},{"name":"Top DNS Query Types"},{"name":"Organization Requests by Hour"},{"name":"Organization Requests by Timerange"},{"name":"Organization Requests by Hour and Category"},{"name":"Organization Requests by Timerange and Category"},{"name":"Deployment Status"},{"name":"Bandwidth by Hour"},{"name":"Bandwidth by Timerange"},{"name":"Top Files"},{"name":"Total Requests"},{"name":"Top Threats"},{"name":"Top Threat Types"},{"name":"Utility"},{"name":"Top IPs"},{"name":"Summary"},{"name":"Summaries by Category"},{"name":"Summaries by Destination"},{"name":"Summaries by Rule"},{"name":"Remote Access"},{"name":"Private Resource"},{"name":"Requests Resource Connector"},{"name":"Requests Summary Resource Connector Groups"},{"name":"Resource Connectors"},{"name":"Rules Activity"},{"name":"Unique Resources"},{"name":"Secure Access"}],"x-parser-conf":{"overview":{"markdownPath":"secure-access/reference/reports/reporting-overview.md","uri":"secure-access-api-reference-reporting-overview"}},"openapi":"3.0.1","servers":[{"url":"https://api.secureaccessfed.cisco.com/{basePath}","variables":{"basePath":{"default":"reports/v2"}}}],"securitySchemes":{"oauthFlow":{"type":"oauth2","description":"client credential flow","flows":{"clientCredentials":{"tokenUrl":"https://api.secureaccessfed.cisco.com/auth/v2/token","scopes":{"reports.granularEvents:read":"Read reports granular events","reports.utilities:read":"Read reports utilities","reports.aggregations:read":"Read reports aggregations","reports.summariesByRule:read":"Read reports for the summaries of the rule","reports.privateResources:read":"Read reports for the private resources"}}}}}},"spec":{"summary":"Get Private Resource Access Statistics","operationId":"getPrivateResourceDetailedStatsTimerange","tags":["Private Resource","Secure Access"],"description":"Get the detailed access statistics for a private resource, including total hits count and success or blocked count in a series of time ranges.\n\n**Access Scope:** Reports \u003e Private Resources \u003e Read-Only","security":[{"oauthFlow":["reports.privateResources:read"]}],"parameters":[{"name":"from","in":"query","description":"A timestamp or relative time string (for example: '-1days').\nFilter for data that appears after this time.","required":true,"schema":{"type":"string"},"example":"1639146300000","$$ref":"#/components/parameters/fromParam"},{"name":"to","in":"query","description":"A timestamp or relative time string (for example: 'now').\nFilter for data that appears before this time.","required":true,"schema":{"type":"string"},"example":"1640010300000","$$ref":"#/components/parameters/toParam"},{"name":"privateresourceid","in":"query","description":"A private resource ID.","required":true,"schema":{"type":"integer"},"example":47,"$$ref":"#/components/parameters/privateResourceIdParam"},{"name":"timerange","in":"header","description":"A string that represents a range of time.\nIf the header is not set, the header value defaults to `hour`.","schema":{"type":"string","enum":["minute","hour","day"]},"example":"minute","$$ref":"#/components/parameters/timerangeParam"},{"name":"timezone","in":"query","description":"Display the timestamp of the traffic events in the specified timezone.\nFor the timezone, provide a continent and city separated by an url-encoded forward slash ('/'), for example: timezone='ASIA%2fCALCUTTA'.","schema":{"type":"string"},"example":"ASIA%2fCALCUTTA","$$ref":"#/components/parameters/timezoneParam"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"The detailed access statistics for a private resource ID in a time range.","properties":{"privateresourceid":{"type":"number","description":"The private resource ID.","example":123},"totalHitsCount":{"type":"object","description":"The total hit counts information for the private resource.","properties":{"total":{"type":"number","description":"The total hit counts for the private resource.","example":54},"success":{"type":"number","description":"The number of hit counts for the private resource where the clients was allowed to access.","example":23},"blocked":{"type":"number","description":"The counts of the blocked access to the private resource.","example":31}},"example":{"total":54,"success":23,"blocked":31}},"timeSeriesHitsCount":{"type":"array","description":"The list of the counts and timestamps for the hit counts.","items":{"type":"object","properties":{"hitscount":{"type":"number","description":"The total number of times that the user or device accessed the private resource in a specific time period.","example":50},"success":{"type":"number","description":"The number of times that the user or device was allowed to access the private resource in a specific time period.","example":40},"blocked":{"type":"number","description":"The number of times that the user or device was blocked to access the private resource in a specific time period.","example":20},"timestamp":{"type":"number","description":"The timestamp represented in milliseconds for the bucket.","example":1594557263000,"$$ref":"#/components/schemas/TimestampForBucket"},"date":{"type":"string","description":"The date from the timestamp based on the timezone parameter.","example":"2020-07-12","$$ref":"#/components/schemas/Date"},"time":{"type":"string","description":"The time in 24-hour format based on the timezone parameter.","example":"12:34","$$ref":"#/components/schemas/Time"}},"example":{"hitscount":54,"success":23,"blocked":31,"timestamp":1585717200000,"date":"2020-04-01","time":"05:00:00"},"$$ref":"#/components/schemas/TimeSeriesHitsCount"},"example":[{"hitscount":54,"success":23,"blocked":31,"timestamp":1585717200000,"date":"2020-04-01","time":"05:00:00"}]}},"example":{"privateresourceid":123,"totalHitsCount":{"total":5000,"success":100,"blocked":50},"timeSeriesHitsCount":[{"hitscount":54,"success":23,"blocked":31,"timestamp":1585717200000,"date":"2020-04-01","time":"05:00:00"}]},"$$ref":"#/components/schemas/PrivateResourceDetailedStatsTimerange"},"meta":{"type":"object","description":"The properties of the metadata.","example":{},"$$ref":"#/components/schemas/Meta"}},"required":["data","meta"]},"example":{"data":{},"meta":{}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"example":{"message":"Bad Request"}}}},"$$ref":"#/components/responses/400Error"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"example":{"message":"Unauthorized"}}}},"$$ref":"#/components/responses/401Error"},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"example":{"message":"Forbidden"}}}},"$$ref":"#/components/responses/403Error"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"example":{"message":"Not Found"}}}},"$$ref":"#/components/responses/404Error"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"example":{"message":"Internal Server Error"}}}},"$$ref":"#/components/responses/500Error"}},"__originalOperationId":"getPrivateResourceDetailedStatsTimerange","method":"get","path":"/private-resources/detailed-stats-timerange"}}