get-certificates.asciidoc 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. --
  2. :api: get-certificates
  3. :response: GetSslCertificatesResponse
  4. --
  5. [role="xpack"]
  6. [id="{upid}-{api}"]
  7. === SSL Certificate API
  8. [id="{upid}-{api}-request"]
  9. ==== Get Certificates Request
  10. The X.509 Certificates that are used to encrypt communications in an
  11. Elasticsearch cluster using the `security().getSslCertificates()` method:
  12. ["source","java",subs="attributes,callouts,macros"]
  13. --------------------------------------------------
  14. include-tagged::{doc-tests}/SecurityDocumentationIT.java[{api}-execute]
  15. --------------------------------------------------
  16. [id="{upid}-{api}-response"]
  17. ==== Get Certificates Response
  18. The returned +{response}+ contains a single field, `certificates`.
  19. This field, accessed with `getCertificates` returns a List of `CertificateInfo`
  20. objects containing the information for all the certificates used.
  21. ["source","java",subs="attributes,callouts,macros"]
  22. --------------------------------------------------
  23. include-tagged::{doc-tests}/SecurityDocumentationIT.java[{api}-response]
  24. --------------------------------------------------
  25. <1> `certificates` is a List of `CertificateInfo`
  26. include::../execution.asciidoc[]