Skip to main content

Environment

Your execution environment is the container for your team's UDFs, files, and attached resources. A service account token always resolves to an environment, which makes these endpoints the natural starting point for automation.

Get your environment

GET /execution-env/self

Scope: environment

Returns the environment the credentials resolve to. Useful fields:

FieldTypeDescription
idstringEnvironment id
namestringEnvironment name
usersarrayMembers of the environment
bucketsarrayAttached cloud buckets
github_reposarrayLinked GitHub repositories

Get real-time usage

GET /execution-env/self/realtime/usage

Scope: environment

Call counters for the real-time engine.

Query parameters

ParameterTypeDescription
date_prefixstringRestrict to a date, as YYYY, YYYY-MM, or YYYY-MM-DD. Omit for cumulative totals.

Response

FieldTypeDescription
calls_totalintegerAll calls
calls_successintegerSuccessful calls
calls_errorintegerFailed calls
calls_cachedintegerCalls served from cache
calls_total_timeintegerTotal execution time, in milliseconds
calls_success_timeintegerExecution time of successful calls, in milliseconds
calls_error_timeintegerExecution time of failed calls, in milliseconds
ai_callsintegerAI calls made
date_prefixstring | nullThe date filter applied
curl -H "Authorization: Fused-Service-Token $FUSED_SERVICE_ACCOUNT_TOKEN" \
"https://www.fused.io/server/v1/execution-env/self/realtime/usage?date_prefix=2026-08"

Service accounts

Service accounts are the long-lived machine credentials for your environment. See Service Accounts for the concepts and usage.

important

All four endpoints are user-scoped — they require a Bearer token. A service account token cannot manage service accounts, including its own.

List service accounts

GET /execution-env/self/service-account

Scope: user

Returns an array of service account objects — id, execution_environment_id, name, created_at. Tokens are never included.

Get a service account

GET /execution-env/self/service-account/by-id/{id}

Scope: user

Returns one service account object, without its token.

Create a service account

POST /execution-env/self/service-account/new

Scope: user

Body

FieldTypeRequiredDescription
namestringYesName for the service account
curl -X POST \
-H "Authorization: Bearer $FUSED_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "ci-deploy"}' \
"https://www.fused.io/server/v1/execution-env/self/service-account/new"

Response

FieldTypeDescription
idstringService account id
execution_environment_idstringOwning environment
namestringName
created_atstringCreation timestamp
tokenstringThe service account token
important

token is returned only in this response. Store it immediately — no endpoint can retrieve it later.

Delete a service account

DELETE /execution-env/self/service-account/by-id/{id}

Scope: user

Revokes the service account and returns the deleted record.

danger

The token stops working immediately. Anything still authenticating with it begins failing.

See also

  • Service Accounts — creating and using machine credentials
  • Batch jobs — submitting and tracking long-running jobs
  • Account — the signed-in user rather than the environment