Skip to main content

Project Lifecycle

Use these API calls before creating workloads, scenarios, benchmark runs, or reports.

Set these environment variables for the examples:

export METRUM_API_URL="https://api.<control-plane-domain>"
export METRUM_JWT_TOKEN="<12-hour-db-minted-postgrest-jwt>"
export METRUM_ACCOUNT_ID="<account-uuid>"

Current User Context

Returns the account and organization context used by later runbook calls.

curl -fsS -X POST "$METRUM_API_URL/rpc/get_current_user_context" \
-H "Authorization: Bearer $METRUM_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"p_account_id\":\"$METRUM_ACCOUNT_ID\"}" | jq

Parameters:

NameRequiredDescription
p_account_idYesAccount UUID for the caller.

List Projects

Lists projects visible to the current user.

curl -fsS -X POST "$METRUM_API_URL/rpc/list_projects" \
-H "Authorization: Bearer $METRUM_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"p_account_id\":\"$METRUM_ACCOUNT_ID\",\"p_include_shared\":true}" | jq

Parameters:

NameRequiredDescription
p_account_idYesAccount UUID for the caller.
p_include_sharedNoInclude projects shared with the caller.

Create Project

Creates a benchmark project.

curl -fsS -X POST "$METRUM_API_URL/rpc/create_project" \
-H "Authorization: Bearer $METRUM_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"p_owner_account_id\":\"$METRUM_ACCOUNT_ID\",
\"p_project_name\":\"deepseek-qwen15b-rtxpro6000-smoke\",
\"p_visibility_code\":\"private\",
\"p_created_by_account_id\":\"$METRUM_ACCOUNT_ID\"
}" | jq

Parameters:

NameRequiredDescription
p_owner_account_idYesAccount UUID that owns the project.
p_project_nameYesHuman-readable project name. Use a stable, unique name for the benchmark campaign.
p_visibility_codeNoVisibility code. Use private unless the workflow requires another value.
p_created_by_account_idYesAccount UUID creating the project.

Query Project Runs

Lists run status for a project from the run status view.

curl -fsS "$METRUM_API_URL/v_project_runs_with_status?project_name=eq.deepseek-qwen15b-rtxpro6000-smoke&limit=50" \
-H "Authorization: Bearer $METRUM_JWT_TOKEN" | jq

Query parameters:

NameRequiredDescription
project_nameNoUse eq.<name> to filter by project name.
current_statusNoUse eq.<status> to filter by current run status.
limitNoMaximum rows to return.