GET | List certificates

Prev Next

Retrieves one or more certificates based on specified filters.

  • Endpoint: /api/v1/certificates
  • Method: GET
  • Request: GET /api/v1/certificates

Request parameters

Parameter Type Required Description
code_certificate Integer No Certificate code.
status_certificate Integer No Certificate status. Values: 1 = Valid, 2 = Revoked, 3 = Pending Renewal, 4 = Expired.
active Integer No Certificate state. Values: 1 = Active, 0 = Inactive.
start_validity String No Start validity date.
end_validity String No End validity date.
origin_certificate String No Certificate of origin. Values: SCAN = Scan and Discovery, REQU = Request, IMPO = Manually Imported.
type_certificate Integer No Certificate type.
type_domain String No Domain type.
organization Integer No Organization code.
common_name String No Certificate common name.
san String No Subject Alternative Names (comma-separated).
tags String No Identification tags (comma-separated).
encryption String No Encryption algorithm.
encryption_key_size Integer No Encryption key size.
algorithm_certified String No Signature algorithm.
validity Integer No Validity period in days.
environments String No Environments (comma-separated).
systems String No Systems (comma-separated).
project String No Project name.
ip_external String No External IP address.
ip_hostname String No IP or hostname.
self_signed Integer No Self-signed indicator. Values: 1 = true, 0 = false.
ca Integer No CA code.
responsible Integer No Responsible user code.
offset Integer No Pagination starting point.
limit Integer No Number of records per page.

Example using cURL

curl -X GET "https://[segura_vault_url]/api/v1/certificates?organization=42&active=1&limit=10" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Response

{
  "status": 200,
  "message": "Certificates retrieved successfully",
  "error": false,
  "total": 3,
  "certificates": [
    {
      "code_certificate": 456,
      "status_certificate": "1 - Valid",
      "active": "1 - Active",
      "start_validity": "2024-01-15",
      "end_validity": "2025-01-15",
      "origin_certificate": "REQU - Request",
      "type_certificate": 2,
      "type_domain": "SING",
      "organization": 42,
      "common_name": "api.example.com",
      "encryption": "RSA",
      "encryption_key_size": 2048,
      "certificate_algorithm": "SHA256",
      "validity": 365
    }
    // Additional certificates will be listed here
  ]
}