Skip to content

Commit

Permalink
Merge pull request #3 from ubc/exam-temp
Browse files Browse the repository at this point in the history
Add API commands with variables to NOTES.txt
  • Loading branch information
xcompass authored Apr 24, 2024
2 parents de7084d + b3694c5 commit 8ea52c1
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions jupyterhub/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}




Expand Down

0 comments on commit 8ea52c1

Please sign in to comment.