{{- if .Values.bootstrap.db.enabled }}
1. Extract the username and password for the REST API admin created during bootstrap:
kubectl get secret {{ include "corda.restApiAdminUsernameSecretName" . }} --namespace {{ .Release.Namespace }} -o go-template='{{ `{{` }} .data.{{ include "corda.restApiAdminSecretUsernameKey" . }} | base64decode {{ `}}` }}'
kubectl get secret {{ include "corda.restApiAdminPasswordSecretName" . }} --namespace {{ .Release.Namespace }} -o go-template='{{ `{{` }} .data.{{ include "corda.restApiAdminSecretPasswordKey" . }} | base64decode {{ `}}` }}'
{{- else }}
1. The REST API admin username and password were specified when the configuration database was initialized.
{{- end }}

{{- if .Values.workers.rest.ingress.hosts }}

2. The API endpoint definition can then be accessed via: 
{{- range .Values.workers.rest.ingress.hosts }}
https://{{ . }}/api/v1/swagger
{{- end }}
{{- else }}

2. Expose the API endpoint on localhost by running this command:
kubectl port-forward --namespace {{ .Release.Namespace }} deployment/{{ include "corda.fullname" . }}-rest-worker 8888 &

3. The API endpoint definition can then be accessed via: https://localhost:8888/api/v1/swagger

{{- end }}

For more information, see the Corda 5 documentation at docs.r3.com.