Public endpoints expose software and versions and issue download links. Maintainers use a personal token to update assigned software, media and artifacts.
Base URL: https://<site-domain>/api/v1 Authorization: Bearer daisy_xxxxxxxxxxxxxxxxx
Maintainers sign in with their existing admin account and create a personal token. The plaintext token is shown once; only its hash is stored.
curl -c cookies.txt -X POST \
https://<site-domain>/api/v1/admin/login \
-H 'Content-Type: application/json' \
-d '{"username":"<user>","password":"<password>"}'
curl -b cookies.txt -X POST \
https://<site-domain>/api/v1/api-tokens \
-H 'Content-Type: application/json' \
-d '{"name":"my-script","expires_in_days":180}'export DAISY_API_TOKEN=daisy_xxxxx export DAISY_API_BASE=https://<site-domain>/api/v1 curl -H "Authorization: Bearer $DAISY_API_TOKEN" \ "$DAISY_API_BASE/maintainer/software"
| Method | Path | Description |
|---|---|---|
| GET | /software | Published software list |
| GET | /software/{slug} | Software details, images, links and maintainers |
| GET | /software/{slug}/versions | Versions, platforms, sizes and SHA-256 |
| GET | /downloads | All downloadable artifacts |
| POST | /download-links | Issue a signed download link |
| Method | Path | Scope | Description |
|---|---|---|---|
| GET | /maintainer/software | software:read | Software assigned to the current user |
| GET | /maintainer/software/{slug} | software:read | Full software, media and artifact data |
| PATCH | /maintainer/software/{slug} | software:write | Update software information |
| PUT | /maintainer/software/{slug}/beamlines | software:write | Replace applicable beamlines |
| POST | /maintainer/software/{slug}/media | media:write | Upload covers, screenshots or manuals |
| POST | /maintainer/software/{slug}/artifacts | artifact:write | Upload an artifact |
| PATCH | /maintainer/artifacts/{id} | artifact:write | Update artifact metadata |
| POST | /maintainer/artifacts/{id}/yank | artifact:write | Yank an artifact |
No token is required for list/get. Only update requires a Bearer token. All actions use POST JSON on /maintainer/action.
# 获取
curl -X POST https://<site-domain>/api/v1/maintainer/action \
-H "Content-Type: application/json" \
-d '{"action":"get","slug":"daisy-xrs"}'
# 修改
curl -X POST https://<site-domain>/api/v1/maintainer/action \
-H "Authorization: Bearer daisy_xxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"action":"update",
"slug":"daisy-xrs",
"fields":{"summary_zh":"新的软件简介"}
}'
# 需要下载物或媒体时显式开启
curl -X POST https://<site-domain>/api/v1/maintainer/action \
-H "Content-Type: application/json" \
-d '{
"action":"get",
"slug":"daisy-xrs",
"include_artifacts":true,
"include_media":true
}'Need to inspect available software? software catalogue.