Get Truststore Certificates

Overview

Retrieves all certificates from the truststore of a specific environment. This endpoint is only available for the admin project and returns certificates stored in the environment’s truststore.

Endpoint

GET /apiops/projects/{projectName}/certificates/truststore/{environmentName}/

Authentication

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request

Headers

Header Value Required
Authorization Bearer {token} Yes

Path Parameters

Parameter Type Required Description
projectName string Yes Project name (must be admin project)
environmentName string Yes Environment name

Query Parameters

None.

Response

Success Response (200 OK)

{
  "success": true,
  "resultList": [
    {
      "name": "truststore-cert-1",
      "description": "Certificate from truststore",
      "certificateEnvironmentList": [
        {
          "environmentName": "production",
          "startDate": "2024-01-01T00:00:00.000Z",
          "endDate": "2025-12-31T23:59:59.000Z",
          "base64EncodedContent": "MIIFXTCCBEWgAwIBAgIQ...",
          "sha1Thumbprint": "A1B2C3D4E5F6G7H8I9J0K1L2M3N4O5P6Q7R8S9T0",
          "subjectDn": "CN=ca.example.com, O=Example CA, C=US",
          "alias": "ca-cert-alias"
        }
      ]
    }
  ]
}

Response Fields

Same as List Certificates. See List Certificates for field descriptions.

Notes

  • Returns certificates from the environment’s truststore
  • Only available for admin project
  • Includes all certificates stored in the truststore

Error Response (400 Bad Request)

{
  "error": "bad_request",
  "error_description": "environmentName value can not be empty!"
}

or

{
  "error": "bad_request",
  "error_description": "Environment (production) is not found or user does not have privilege to access it!"
}

cURL Example

curl -X GET \
  "https://demo.apinizer.com/apiops/projects/admin/certificates/truststore/production/" \
  -H "Authorization: Bearer YOUR_TOKEN"

Notes and Warnings

  • Admin Project Only:
    • This endpoint is only available for admin project
    • Regular projects cannot access truststore certificates
  • Environment Must Exist:
    • Environment must exist and be accessible
  • Truststore Certificates:
    • Returns certificates stored in the environment’s truststore
    • These are typically CA certificates used for validation