{"type":"api","title":"Get Keys","meta":{"id":"/apps/pubhub/media/cloud-security-apis-in-eft/d2a1854d5c0ed9069a7f0bc54a9b813f3075ddc9/eb145afb-23bf-3669-8aa6-a86cb8aee573","info":{"title":"Cisco Secure Access API Usage API","version":"2.0.0","description":"Get the Cisco Secure Access API usage reports for an organization.","contact":{"name":"Cloud Security Developer Community"}},"security":[{"oauthFlow":[]}],"tags":[{"name":"API Usage Report","description":"API Usage reports"},{"name":"Secure Access"}],"x-parser-conf":{"overview":{"markdownPath":"secure-access/reference/reports/api-usage-overview.md","uri":"secure-access-api-reference-api-usage-overview"}},"openapi":"3.0.1","servers":[{"url":"https://api.sse.cisco.com/{basePath}","variables":{"basePath":{"default":"reports/v2"}}}],"securitySchemes":{"oauthFlow":{"type":"oauth2","description":"Client credential flow","flows":{"clientCredentials":{"tokenUrl":"https://api.sse.cisco.com/auth/v2/token","scopes":{"reports.apiusage:read":"Read the API Usage reports"}}}}}},"spec":{"operationId":"getAPIUsageKeys","summary":"Get Keys","description":"Get the API key usage information, including the total number of API requests within a specific time period.","tags":["API Usage Report","Secure Access"],"security":[{"oauthFlow":["reports.apiusage:read"]}],"parameters":[{"name":"from","in":"query","description":"The date and time specified in the RFC-3339 format, for example: 2023-10-01.\nFilter the collection for data that appears after this time.","required":true,"schema":{"type":"string"},"example":"2023-10-01","$$ref":"#/components/parameters/from"},{"name":"to","in":"query","description":"The date and time specified in the RFC-3339 format, for example: 2023-10-01.\nFilter the collection for data that appears before this time.","required":true,"schema":{"type":"string"},"example":"2023-10-01T 20:23:00Z","$$ref":"#/components/parameters/to"},{"name":"apiKeys","in":"query","description":"Sort the collection using a list of comma-separated API key IDs.","required":false,"schema":{"type":"string"},"example":"123abfs77632","$$ref":"#/components/parameters/apiKeys"},{"name":"paths","in":"query","description":"Sort the collection using a list of comma-separated API resource paths.","required":false,"schema":{"type":"string"},"example":"policies/v2/destinationlists/1234556,policies/v2/destinationlists","$$ref":"#/components/parameters/paths"},{"name":"verbs","in":"query","description":"Sort the collection using a list of comma-separated HTTP verbs.\nThe HTTP verb strings are case sensitive.","required":false,"schema":{"type":"string"},"example":"GET,POST,PUT","$$ref":"#/components/parameters/verbs"},{"name":"statusCodes","in":"query","description":"Sort the collection using a list of comma-separated HTTP status codes.","required":false,"schema":{"type":"string"},"example":"200,204,429","$$ref":"#/components/parameters/statusCodes"},{"name":"userAgents","in":"query","description":"Sort the collection using a list of comma-separated labels that describe the HTTP client programs.","required":false,"schema":{"type":"string"},"example":"python-requests/2.20.0,Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36","$$ref":"#/components/parameters/userAgents"}],"responses":{"200":{"description":"OK","headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The timestamp of the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"content":{"application/json":{"schema":{"type":"object","description":"The information about the API key usage.","required":["from","to","count","items"],"properties":{"from":{"type":"string","description":"The date and time where to start reading in the collection.","example":"2023-12-03","$$ref":"#/components/schemas/from"},"to":{"type":"string","description":"The date and time where to stop reading in the collection.","example":"2023-12-05","$$ref":"#/components/schemas/to"},"count":{"type":"integer","format":"int32","description":"The total number of API requests.","example":450,"$$ref":"#/components/schemas/count"},"items":{"type":"array","description":"The information about the API key usage.","items":{"type":"object","required":["count","requests","keyName","keyId"],"properties":{"keyName":{"type":"string","description":"The name of the API key.","example":"Deployments API key"},"keyId":{"type":"string","description":"The ID of the API key.","example":"12345345345a"},"count":{"type":"integer","format":"int32","description":"The total number of API requests.","example":450,"$$ref":"#/components/schemas/count"},"requests":{"type":"array","description":"The list of API request information.","items":{"type":"object","required":["path","verb","count"],"properties":{"path":{"type":"string","description":"The path of the API endpoint.","example":"/reports/v2/activity/proxy"},"verb":{"type":"string","description":"The name of the API operation.","example":"GET"},"count":{"type":"integer","description":"The number of requests to the API endpoint.","format":"int64","example":928}},"example":{"path":"/auth/v2/token","verb":"POST","count":928}},"example":[{"path":"/auth/v2/token","verb":"POST","count":928}],"$$ref":"#/components/schemas/requestDetailsList"}}},"example":[{"keyName":"Reports and Policies API key","keyId":"ajsdk12455555","count":400,"requests":[{"path":"/reports/v2/activity/proxy","verb":"GET","count":546},{"path":"/policies/v2/destinationlists","verb":"POST","count":16},{"path":"/policies/v2/destinationlists","verb":"GET","count":4}]}],"$$ref":"#/components/schemas/keysInformation"}},"example":{"from":"2023-12-03","to":"2023-12-04","count":100,"items":[{"keyName":"Reports and Policies API key","keyId":"ajsdk12455555","count":400,"requests":[{"path":"/reports/v2/activity/proxy","verb":"GET","count":546},{"path":"/policies/v2/destinationlists","verb":"POST","count":16},{"path":"/policies/v2/destinationlists","verb":"GET","count":4}]}]},"$$ref":"#/components/schemas/keys"},"example":{"from":"2023-12-03","to":"2023-12-04","count":566,"items":[{"keyName":"Deployments API key","keyId":"124afg","count":5000,"requests":[{"path":"/deployments/v2/roamingcomputers","verb":"GET","count":4},{"path":"/deployments/v2/networks","verb":"GET","count":10}]}]}}}},"400":{"description":"Bad Request","headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The timestamp of the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"The description of the error.","example":"Internal Server Error","$$ref":"#/components/schemas/message"},"code":{"type":"integer","description":"The status code of the error.","example":500,"$$ref":"#/components/schemas/code"}},"example":{"message":"Bad Request","code":400}}}},"$$ref":"#/components/responses/400Error"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"The description of the error.","example":"Internal Server Error","$$ref":"#/components/schemas/message"},"code":{"type":"integer","description":"The status code of the error.","example":500,"$$ref":"#/components/schemas/code"}},"example":{"message":"Unauthorized","code":401}}}},"headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The timestamp of the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"$$ref":"#/components/responses/401Error"},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"The description of the error.","example":"Internal Server Error","$$ref":"#/components/schemas/message"},"code":{"type":"integer","description":"The status code of the error.","example":500,"$$ref":"#/components/schemas/code"}},"example":{"message":"Forbidden","code":403}}}},"headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The timestamp of the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"$$ref":"#/components/responses/403Error"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"The description of the error.","example":"Internal Server Error","$$ref":"#/components/schemas/message"},"code":{"type":"integer","description":"The status code of the error.","example":500,"$$ref":"#/components/schemas/code"}},"example":{"message":"Not Found","code":404}}}},"headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The timestamp of the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"$$ref":"#/components/responses/404Error"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"The description of the error.","example":"Internal Server Error","$$ref":"#/components/schemas/message"},"code":{"type":"integer","description":"The status code of the error.","example":500,"$$ref":"#/components/schemas/code"}},"example":{"message":"Internal Server Error","code":500}}}},"headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The timestamp of the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"$$ref":"#/components/responses/500Error"}},"__originalOperationId":"getAPIUsageKeys","method":"get","path":"/apiUsage/keys"}}