{"type":"api","title":"Get Counts Device Certificates","meta":{"id":"/apps/pubhub/media/cloud-security-apis-in-eft/9d37d008417d562ab46d4b67547a68457ce288d2/40c74b80-600f-321b-b515-00f16a3f3d22","info":{"version":"1.0.0","title":"Cisco Secure Access Zero Trust User Devices API","description":"Get the certificate information and user summaries for the zero trust user devices.\nRevoke the certificates on the zero trust user device.","contact":{"name":"Cloud Security Developer Community"}},"security":[{"oauthFlow":[]}],"tags":[{"name":"ACME Client Certificates"},{"name":"Secure Access"}],"x-parser-conf":{"overview":{"markdownPath":"secure-access/reference/admin/zta-users-overview.md","uri":"secure-access-api-reference-zta-users-overview"}},"openapi":"3.0.3","servers":[{"url":"https://api.sse.cisco.com/{basePath}","variables":{"basePath":{"default":"admin/v2"}}}],"securitySchemes":{"oauthFlow":{"type":"oauth2","description":"The client credential flow.","flows":{"clientCredentials":{"tokenUrl":"https://api.sse.cisco.com/auth/v2/token","scopes":{"admin.ztna.certificates:read":"Read the certificate metadata for the users.","admin.ztna.users:read":"Read the user summaries.","admin.ztna.devices:read":"Read the certificate metadata for the user device","admin.ztna.enrollment:write":"Revoke the certificates for the user device"}}}}}},"spec":{"description":"Get the status and counts of device certificates for the zero trust users.","summary":"Get Counts Device Certificates","tags":["ACME Client Certificates","Secure Access"],"operationId":"getCountsZtaDeviceCertificates","security":[{"oauthFlow":["admin.ztna.users:read"]}],"parameters":[{"name":"userIds","in":"query","description":"A comma-separated list of user IDs.","required":true,"schema":{"description":"The list of user IDs.","type":"array","items":{"type":"string","description":"The unique identifier for the user.","readOnly":true,"example":"1251001730","$$ref":"#/components/schemas/userId"},"minItems":1,"maxItems":100,"$$ref":"#/components/schemas/userIds"},"style":"form","explode":false,"example":["54321","98765","232323"],"$$ref":"#/components/parameters/userIds"}],"responses":{"200":{"description":"The counts and status of the device certificates.","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":{"description":"The status and counts of the device certificates for the users.","type":"object","properties":{"organizationId":{"type":"integer","description":"The unique identifier for the organization.","readOnly":true,"example":2390145,"$$ref":"#/components/schemas/organizationId"},"users":{"description":"The list of zero trust users and the state and count of device certificates.","type":"array","items":{"description":"The properties of the device certificates for the user.","type":"object","properties":{"userId":{"type":"string","description":"The unique identifier for the user.","readOnly":true,"example":"1251001730","$$ref":"#/components/schemas/userId"},"deviceCertificateCounts":{"type":"object","required":["active"],"description":"The properties of the certificates for the user device.","properties":{"active":{"description":"The number of user devices where the most recently issued certificate is active.","type":"integer"},"expired":{"description":"The number of user devices where the recently issued certificate is expired.","type":"integer"},"revoked":{"description":"The number of user devices where the Recently issued certificate is revoked.","type":"integer"}}}},"example":{"userId":"324525a","deviceCertificateCounts":{"active":5,"expired":0,"revoked":0}},"$$ref":"#/components/schemas/userSummary"}}},"example":{"organizationId":2390145,"users":[{"userId":"54321","deviceCertificateCounts":{"active":2,"expired":0,"revoked":1}},{"userId":"98765","deviceCertificateCounts":{"active":3,"expired":1,"revoked":0}},{"userId":"232323","deviceCertificateCounts":{"active":5,"expired":0,"revoked":0}}]},"$$ref":"#/components/schemas/userSummaries"}}},"$$ref":"#/components/responses/userSummariesResponse"},"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":{"type":"string"}},"example":{"message":"error","description":"Bad Request"}}}},"$$ref":"#/components/responses/invalidRequestError"},"401":{"description":"Unauthorized","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 request is not authorized.","properties":{"message":{"type":"string","example":"success","enum":["success","error"]},"description":{"type":"string"}},"example":{"message":"error","description":"Unauthorized request"}}}},"$$ref":"#/components/responses/unauthorizedError"},"403":{"description":"Forbidden","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 request is forbidden.","properties":{"message":{"type":"string","example":"success","enum":["success","error"]},"description":{"type":"string"}},"example":{"message":"error","description":"Forbidden"}}}},"$$ref":"#/components/responses/forbiddenError"},"404":{"description":"Not Found","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 request failed because the resource doesn't exist.","properties":{"message":{"type":"string","example":"error","enum":["success","error"]},"description":{"type":"string"}},"example":{"message":"error","description":"Not Found"}}}},"$$ref":"#/components/responses/notFoundError"},"500":{"description":"Internal Server Error","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":{"error":{"type":"string","description":"Error message explaining the reason for failure.","example":"Internal Server Error"},"requestId":{"type":"string","description":"The ID of the request.","example":"7d318524-d5a4-4fd8-8b29-ad295b2f035b"}}}}},"$$ref":"#/components/responses/internalServerError"}},"__originalOperationId":"getCountsZtaDeviceCertificates","method":"get","path":"/ztna/userSummaries"}}