GET | List certificates

Prev Next

List certificates based on specified filters.

  • Endpoint: /api/certificate/list
  • Method: GET
  • Request: GET /api/certificate/list

Request parameters

Parameter Type Required Description
code_certificate int No Certificate code.
status_certificate int No Certificate status. The options are: 1 = Valid, 2 = Revoked, 3 = Pending Renewal, and 4 = Expired.
active int No Certificate state. The options are: 1 = Active and 0 = Inactive.
start_validity string No Start validity date.
end_validity string No End validity date.
origin_certificate string No Certificate of origin. The options are: SCAN = Scan and Discovery, REQU = Request, and IMPO = Manually Imported.
type_certificate int No Certificate type.
type_domain string No Domain type.
organization int 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 int No Encryption key size.
algorithm_certified string No Signature algorithm.
validity int 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 int No Self-signed indicator. The options are: 1 = true and 0 = false.
ca int No CA code.
responsible int No Responsible user code.
offset int No Pagination starting point.
limit int No Number of records per page.

Example using cURL

curl -X GET "https://[segura_vault_url]/api/certificate/list" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Response

{
    "code": 200,
    "response": {
        "status": 200,
        "message": "1001: OK",
        "error": false,
        "error_code": 0,
        "detail": "",
        "mensagem": "1001: OK",
        "erro": false,
        "cod_erro": 0
    },
    "tenant": "Segura",
    "data": [
        {
            "certificate_code": "1",
            "ca": "api-test",
            "common_name": "api-test",
            "san": null,
            "organization": "api-test",
            "start_validity": "2024-10-02 12:29:46",
            "end_validity": "2025-10-02 12:29:46",
            "validity": "6",
            "encryption": "RSA",
            "encryption_key_size": "2048",
            "status_certificate": "Valid",
            "active": "Yes",
            "tags": null,
            "origin_certificate": "IMPO",
            "environments": null,
            "systems": null,
            "project": null,
            "responsible": null,
            "description": null
        }
        // Additional certificates will be listed here
    ]
}

Error responses

HTTP Status Code Description
400 Bad Request Invalid parameters provided.
401 Unauthorized Unauthorized access.
403 Forbidden Forbidden access.
404 Not Found Resource not found.
500 Internal Server Error Internal server error.