Skip to content

feat: bin/list-requests.sh from request.nrec.no (Nettskjema API v3) - #152

Open
ivartz wants to merge 1 commit into
norcams:masterfrom
ivartz:list-requests
Open

feat: bin/list-requests.sh from request.nrec.no (Nettskjema API v3)#152
ivartz wants to merge 1 commit into
norcams:masterfrom
ivartz:list-requests

Conversation

@ivartz

@ivartz ivartz commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

./bin/list-requests.sh --help

#
# list-requests.sh
#
# Quick overview of IaaS project request submissions from Nettskjema
# form 289417, the "new project" form available at https://request.nrec.no.
#
# Note: This script ONLY queries submissions to the new-project form.
# It does not access other Nettskjema forms or ticket systems, and
# it does NOT distinguish between resolved and unresolved requests.
# Resolution state is managed elsewhere (e.g. in Request Tracker).
#
# Displays key submission details in a compact tabular format.
#
# Usage:
#   list-requests.sh [OPTIONS]
#
# Options:
#   -l, --limit N       Show last N submissions (default: 50; set to -1
#                       for all submissions)
#   -f, --from-id ID    Only show submissions with ID >= ID
#   --oldest-first      Sort oldest first (default: newest first)
#   -h, --help          Show this help message
#
# Environment:
#   NETTSKJEMA_API_ACCESS_TOKEN   Required API bearer token
#
# Example:
#   export NETTSKJEMA_API_ACCESS_TOKEN=TOKEN
#   ./list-requests.sh              # last 50
#   ./list-requests.sh --limit 100  # last 100
#   ./list-requests.sh --from-id 7500000
#
# API Reference:
#   https://www.uio.no/english/services/it/adm-services/nettskjema/help/api-clients-v3.md
#   https://nettskjema.no/api/v3/swagger-ui/index.html#/
#

./bin/list-requests.sh --limit 5

Fetching form data...
Fetching 5 submission(s)...
ID         Age      Date                Email                        Type             Institution    Project
---------- -------- ------------------- ---------------------------- ---------------- -------------- ------------------------------------
47018634   19h      2026-09-09T15:15:00 maunyad@uio.no               Shared           UiO            uio-ifi-imlab-webtest
47017662   20h      2026-09-09T14:19:23 riccasi@uio.no               Personal         N/A            N/A
46989176   2d       2026-09-08T09:38:10 hedda.marie.westlin@uib.no   Personal         N/A            N/A
46968015   3d       2026-09-07T09:17:27 dennis.adamek@uit.no         Personal         N/A            N/A
46938032   6d       2026-09-03T22:52:47 l.longueville@uib.no         Personal         N/A            N/A

Total: 5/5 submission(s) shown

@ivartz

ivartz commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

The script uses the following environmental variable:

NETTSKJEMA_API_ACCESS_TOKEN

Get it by:

source bin/predict/create-nettskjema-access-token.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant