Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.nscale.com/llms.txt

Use this file to discover all available pages before exploring further.

Service accounts provide machine-to-machine authentication for CI/CD pipelines and automated workflows. Once created, their tokens can be passed via the NSCALE_SERVICE_TOKEN environment variable. Aliases: serviceaccounts, sa

Subcommands

  • list — List service accounts
  • get — Get service account details
  • create — Create a new service account
  • update — Update an existing service account
  • rotate — Rotate a service account token
  • delete — Delete a service account

list

List service accounts in an organization.
nscale serviceaccounts list --org <org-id> [flags]

Flags

FlagDescription
—org stringOrganization ID
—jsonEmit the full JSON payload (mutually exclusive with -q)
-q, —query stringArrayjq filter for value extraction (see Query output with -q)

get

Get details for a specific service account.
nscale serviceaccounts get --id <sa-id> --org <org-id>

Flags

FlagDescription
—id stringService account ID
—org stringOrganization ID
—jsonEmit the full JSON payload (mutually exclusive with -q)
-q, —query stringArrayjq filter for value extraction (see Query output with -q)

create

Create a new service account. Supports interactive mode or JSON input.
nscale serviceaccounts create --org <org-id> [flags]

Flags

FlagDescription
—org stringOrganization ID
-f, —file stringPath to a JSON file
—stdinRead JSON from standard input
—dry-runPreview the request payload without persisting
-y, —yesAutomatically confirm creation
—jsonEmit the full JSON payload (mutually exclusive with -q)
-q, —query stringArrayjq filter for value extraction (see Query output with -q)

Examples

nscale serviceaccounts create --org <org-id> --file serviceaccount.json
nscale serviceaccounts create --org <org-id> --stdin < serviceaccount.json
cat serviceaccount.json | nscale serviceaccounts create --org <org-id> --stdin
# Interactive mode
nscale serviceaccounts create

update

Update an existing service account.
nscale serviceaccounts update --org <org-id> --id <sa-id> [flags]

Flags

FlagDescription
—id stringService account ID
—org stringOrganization ID
-f, —file stringPath to a JSON file
—stdinRead JSON from standard input
—dry-runPreview the request payload without persisting
-y, —yesAutomatically confirm update
—jsonEmit the full JSON payload (mutually exclusive with -q)
-q, —query stringArrayjq filter for value extraction (see Query output with -q)

Examples

nscale serviceaccounts update --org <org-id> --id <sa-id> --file serviceaccount.json
nscale serviceaccounts update --org <org-id> --id <sa-id> --stdin < serviceaccount.json
cat serviceaccount.json | nscale serviceaccounts update --org <org-id> --id <sa-id> --stdin

rotate

Rotate the access token for a service account. The old token is invalidated and a new one is returned.
nscale serviceaccounts rotate --org <org-id> --id <sa-id> [flags]

Flags

FlagDescription
—id stringService account ID
—org stringOrganization ID
—dry-runPreview the request payload without persisting
-y, —yesAutomatically confirm token rotation
—jsonEmit the full JSON payload (mutually exclusive with -q)
-q, —query stringArrayjq filter for value extraction (see Query output with -q)

Example

nscale serviceaccounts rotate --org <org-id> --id <sa-id> --yes

delete

Delete an existing service account.
nscale serviceaccounts delete --org <org-id> --id <sa-id> [flags]

Flags

FlagDescription
--id stringService account ID
--org stringOrganization ID
--dry-runPreview the request payload without persisting
-y, --yesAutomatically confirm deletion

Service Tokens (Console)

Generate and manage service tokens via the Console UI.