Skip to main content

Set up API access for the tutorials

The infrastructure tutorials offer Desktop and API paths. For the API path, use Bash, curl, jq, and a daemon whose address and credential you manage. The server installation guide explains how to deploy one and choose its token. A development daemon is also suitable when its connection settings are known.

Set the base URL including /akoflow-api, without a trailing slash:

set -o pipefail
export AKOFLOW_API_URL='http://127.0.0.1:8080/akoflow-api'
read -rsp 'Akoflow API token: ' AKOFLOW_API_TOKEN; printf '\n'
export AKOFLOW_API_TOKEN

pipefail keeps a failed HTTP request visible even when its output is piped to jq. Stop at any failed command before creating dependent records.

Replace the origin and port with your daemon's settings. Press Enter without a token only for an explicitly tokenless local daemon. For packaged Desktop, connection details are managed by its proxy; completing the graphical tutorials does not require extracting its internal credential.

Check readiness and then access to a protected catalog:

curl --fail-with-body "$AKOFLOW_API_URL/preflight/" | jq
curl --fail-with-body \
-H "Authorization: Bearer $AKOFLOW_API_TOKEN" \
"$AKOFLOW_API_URL/environments/" | jq

The first response must report server.available: true; the second must return a catalog, which may be empty. A 401 means the supplied credential was rejected. A 403 may indicate that a tokenless daemon rejects non-loopback access.

Use a fresh tutorial identity. The examples use research-hpc and research-gcp; if those already exist, inspect them before continuing instead of resubmitting a create request. Store only returned credential references in environment JSON.

Continue with HPC registration or Google Cloud connection.