From b3694c56811200141d87f8a2734b8ea6f8f859b5 Mon Sep 17 00:00:00 2001 From: Ryoko Norden <117120137+ryokonorden@users.noreply.github.com> Date: Wed, 24 Apr 2024 09:49:57 -0700 Subject: [PATCH] Add API commands with variables to NOTES.txt --- jupyterhub/templates/NOTES.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/jupyterhub/templates/NOTES.txt b/jupyterhub/templates/NOTES.txt index 518ef50de3..28d942c11d 100644 --- a/jupyterhub/templates/NOTES.txt +++ b/jupyterhub/templates/NOTES.txt @@ -87,6 +87,24 @@ {{- end }} {{- println }} + {{- if .Values.examapi.enabled }} +### Exam snapshot API commands + + - Create a snapshot: + + curl --location --request POST 'https://{{ $.Values.examapi.host }}/snapshot_all' \ + --header 'X-Api-Key: {{ $.Values.examapi.apiKey }}' \ + --form 'SNAPSHOT_NAME="{{ .Release.Namespace }}"' + + - Download a snapshot: + + curl --location --request POST 'https://{{ $.Values.examapi.host }}/get_snapshot_zip' \ + --header 'X-Api-Key: {{ $.Values.examapi.apiKey }}' \ + --header 'Content-Type: application/x-www-form-urlencoded' \ + --data-urlencode 'SNAPSHOT_NAME={{ .Release.Namespace }}_{{ now | date "2006-01-02" }}' \ + --output {{ .Release.Namespace }}_{{ now | date "2006-01-02" }}.zip + {{- end }} +