---
title: "GetEndpointCertificate"
method: POST
path: "/v2/certificate"
tags: ["General"]
---

# GetEndpointCertificate

`POST /v2/certificate`

Get a server endpoint's certificate and certificate chain if available.

## Request body

- EndpointModel — Endpoint model
  - `url` string, required — Endpoint url to use to connect with
  - `alternativeUrls` string[] — Alternative endpoint urls that can be used for accessing and validating the server
  - `securityMode` 'Best' | 'Sign' | 'SignAndEncrypt' | 'None' | 'NotNone' — Specifies the security mode for OPC UA endpoint connections. Determines how messages are protected during transmission between the Publisher and OPC UA servers. Proper security mode selection is crucial for protecting sensitive data and credentials.
  - `securityPolicy` string — Security policy uri to use for communication. default to best.
  - `certificate` string — Endpoint certificate thumbprint

## Response `200`

The operation was successful or the response payload contains relevant error information.

- X509CertificateChainModel — Certificate chain
  - `chain` X509CertificateModel[] — Chain
    - `subject` string — Subject
    - `thumbprint` string — Thumbprint
    - `serialNumber` string — Serial number
    - `notBeforeUtc` string, date-time — Not before validity
    - `notAfterUtc` string, date-time — Not after validity
    - `selfSigned` boolean — Self signed certificate
    - `pfx` integer[] — Certificate as Pkcs12
    - `hasPrivateKey` boolean — Contains private key
  - `status` 'NotTimeValid' | 'Revoked' | 'NotSignatureValid' | 'NotValidForUsage' | 'UntrustedRoot' | 'RevocationStatusUnknown' | 'Cyclic' | 'InvalidExtension' | 'InvalidPolicyConstraints' | 'InvalidBasicConstraints' | 'InvalidNameConstraints' | 'HasNotSupportedNameConstraint' | 'HasNotDefinedNameConstraint' | 'HasNotPermittedNameConstraint' | 'HasExcludedNameConstraint' | 'PartialChain' | 'CtlNotTimeValid' | 'CtlNotSignatureValid' | 'CtlNotValidForUsage' | 'HasWeakSignature' | 'OfflineRevocation' | 'NoIssuanceChainPolicy' | 'ExplicitDistrust' | 'HasNotSupportedCriticalExtension' — Chain validation status if validated

## Other responses

- `400` — The passed in information is invalid
- `408` — The operation timed out.
- `500` — An unexpected error occurred

---

[API](https://skmtc.net/azure/apis/opcpublisher.md) · [All operations](https://skmtc.net/azure/apis/opcpublisher/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/opcpublisher/versions/8eac19a554d6/schema)
