Skip to content

Command Tasks

Run privileged administrative tasks in the Team Server container:

endura task <task_name> [name:value ...]

Tasks bypass web/API authorization. Restrict shell/container access and use the service’s configuration and database credentials.

# Docker Compose
docker compose exec endura-team-server endura task system_check

# Podman Compose
podman compose exec endura-team-server endura task system_check

# Kubernetes
kubectl exec deployment/endura-team-server -- endura task system_check

List cataloged tasks, arguments, and destructive flags:

endura task task_catalog

Microsoft Teams tasks are omitted from the catalog in this release

The registered teams_* tasks are documented under Microsoft Teams Tasks below.

Output

Every normal response is one JSON object with schemaVersion, task, status, count, data, and warnings.

Lists default to page 1, at most 200 records. Set page/size (1–200), or use all:true format:jsonl for one object per line without the envelope.

endura task pipeline_list page:2 size:50
endura task pipeline_list all:true format:jsonl

Input and Safety

Use key:value for nonsecrets, positive integer IDs, and comma-separated ID lists. Booleans accept case-insensitive true/1/yes or false/0/no. Invalid values, IDs, enums, and unknown arguments fail.

Integration creation/updates and policy authoring read JSON through input:<path> or stdin with input:-. Keep credentials in protected files/stdin, never process arguments or history.

Destructive tasks preview by default: deletion/revocation, assignment replacement, sync stopping, schema refresh, and pruning. Review, then repeat with confirm:true.

endura task build_delete id:42
endura task build_delete id:42 confirm:true

CI/CD Integration Tasks

Each supported provider has the same eight-task family. Substitute one of these provider prefixes for <provider>: bamboo, github, gitlab, jenkins, koji, or teamcity.

TaskArgumentsOutput and effect
<provider>_createinput, optional syncCreates an integration and synchronizes pipelines and builds unless sync:false
<provider>_deleteid, optional confirmPreviews or deletes an integration
<provider>_getidReturns one integration without credentials
<provider>_listpage, size, all, formatLists integrations
<provider>_stopid, optional confirmPreviews or stops active synchronization
<provider>_syncoptional id, optional mode, required triggerSynchronizes selected integrations or every integration for that provider
<provider>_testidTests access to the upstream provider
<provider>_updateid, input, optional syncUpdates an integration and synchronizes unless sync:false

Sync modes are all (default), pipelines, or builds. Optional id selects integration IDs; omission selects all for that provider. Required trigger is manual or scheduled.

Sync blocks until completion/failure. Any integration ending API inactive (UI Error) produces a partial per-instance report and nonzero exit.

Create JSON includes the provider URL and credentials. Update JSON replaces mutable credentials and provider filters, but not the URL. Field names are camelCase:

ProviderCreate inputUpdate input
Bamboourl, tokentoken
GitHuburl, token, organizationstoken, organizations
GitLaburl, token, groupstoken, groups
Jenkinsurl, user, tokenuser, token
Kojiurl, authentication, optional clientCert, optional caCertauthentication, optional clientCert, optional caCert
TeamCityurl, tokentoken

Koji authentication accepts anonymous or clientCertificate. Client-certificate authentication requires both clientCert and caCert PEM values.

{
  "url": "https://github.com",
  "token": "github_pat_REDACTED",
  "organizations": ["example-org"]
}
endura task github_create input:/run/secrets/github.json
endura task github_sync id:1,4 mode:builds trigger:manual
endura task github_stop id:4
endura task github_stop id:4 confirm:true

The matching provider guides describe credential permissions and provider-specific behavior.

Observed Resource Tasks

Observed resources have get/list/delete tasks; creation comes from discovery or Sensors.

ResourceGetListDelete
Buildbuild_get id:<id>build_list [page/size/all/format]build_delete id:<id> [confirm:true]
Deploymentdeployment_get id:<id>deployment_list [page/size/all/format]deployment_delete id:<id> [confirm:true]
Pipelinepipeline_get id:<id>pipeline_list [page/size/all/format]pipeline_delete id:<id> [confirm:true]
Violationviolation_get id:<id>violation_list [page/size/all/format]violation_delete id:<id> [confirm:true]
Workloadworkload_get id:<id>workload_list [page/size/all/format]workload_delete id:<id> [confirm:true]

Deletes can cascade to dependent observations. Always inspect the preview before confirming.

Runtime Sensor Tasks

TaskArgumentsOutput and effect
sensor_createname, descriptionCreates a Runtime Sensor and returns both its record and one-time token
sensor_deleteid, optional confirmPreviews or deletes a Runtime Sensor
sensor_getidReturns one Runtime Sensor
sensor_listpage, size, all, formatLists Runtime Sensors
sensor_rotate_tokenid, optional confirmPreviews rotation; confirmation revokes the old generation and returns a new one-time token
sensor_updateid, name, descriptionReplaces a Runtime Sensor’s name and description

Capture tokens when sensor_create or a confirmed sensor_rotate_token returns them. Team Server does not display the token again.

User Tasks

TaskArgumentsOutput and effect
user_createsubject, name, email, roleCreates a viewer, operator, or administrator
user_deleteid, optional confirmPreviews or deletes a user, while protecting the final administrator and sole policy owners
user_getexactly one of id or emailReturns one user
user_listpage, size, all, formatLists users
user_updateid; optional role, pipelines, deployments, policies, all_pipelines, all_deploymentsReplaces only the supplied role or scope dimensions

user_update replaces supplied scope dimensions; omitted ones remain unchanged. Clear pipeline/deployment scope by omitting its list and passing all_*:false. The final Administrator is protected.

endura task user_get email:operator@example.com
endura task user_update \
  id:5 pipelines:1,2 deployments:3 policies:7 all_pipelines:false

Personal Access Token Tasks

These local tasks act for a selected user. HTTP token mutations instead require interactive sign-in; authorized PAT requests can read owner metadata.

TaskArgumentsOutput and effect
personal_access_token_createuser_id, name, description, permission, expires_in_daysCreates a token and returns its secret once
personal_access_token_deleteid, user_id, optional confirmPreviews or revokes a token
personal_access_token_getid, user_idReturns token metadata without the secret
personal_access_token_listuser_id, page, size, all, formatLists token metadata without secrets
personal_access_token_rotateid, user_id, optional confirmPreviews replacement; confirmation revokes the old token and returns a new secret once

permission accepts read, write, or read_write. expires_in_days must be from 1 through 365. Use the permissions described in Personal Access Tokens.

Policy Tasks

TaskArgumentsOutput and effect
policy_assignid, pipelines, optional confirmPreviews or replaces all pipeline assignments
policy_commit_listid, page, size, all, formatLists a policy’s immutable commits
policy_createinputCreates a policy, initial commit, owner, and optional variables
policy_deleteid, optional confirmPreviews or deletes a policy
policy_getidReturns one policy
policy_listpage, size, all, formatLists policies
policy_pipeline_listid, page, size, all, formatLists assigned pipelines
policy_revertid, commit_id, optional confirmPreviews or restores a commit as the current definition
policy_updateid, inputValidates an update and creates an immutable commit
policy_validateinputCompiles and validates policy content without saving it

Create and update input is camelCase. Creation requires name, description, content, version, ownerId, and the author’s user email in author; variables is optional. Update requires name, description, content, version, a commit message, and author. policy_validate accepts content and an optional policyId, which makes that policy’s saved variables available during compilation.

Policy inputs reject unknown fields. See Security Policies for valid policy content and variable definitions.

Email Tasks

TaskArgumentsOutput and effect
email_createinputValidates an SMTP connection without sending mail, then creates an active integration
email_deleteid, optional confirmPreviews or deletes an integration and its resource scope
email_getidReturns one integration without its password
email_listpage, size, all, formatLists integrations without passwords
email_testidValidates the saved DNS, TLS, and optional authentication settings without sending mail
email_updateid, inputReplaces sender, recipients, notification behavior, and resource scope
email_update_connectionid, inputValidates and replaces the complete SMTP connection

email_create input requires name, host, port, security, fromAddress, and recipients. security accepts tls for implicit TLS or startTls for required STARTTLS. Optional username and password must be supplied together; fromName is optional. It also accepts notifyViolations, includeObserved, allPipelines, pipelineIds, allDeployments, and deploymentIds.

email_update input requires name, fromAddress, and recipients, and accepts fromName plus the notification and scope fields. email_update_connection requires host, port, and security; supply both username and a new write-only password for authenticated SMTP, or omit both for an unauthenticated relay.

Omitted optional notification fields reset to their defaults: violation notifications and both all* scopes enabled, observed outcomes disabled, and empty ID lists. An empty recipients array mutes automatic delivery. Use Email Notifications for SMTP security, outbound policy, recipient behavior, and browser-based message testing.

Slack Tasks

TaskArgumentsOutput and effect
slack_createinputCreates an unconnected Slack application integration
slack_connectid, inputTests and saves a bot token for headless workspace connection
slack_deleteid, optional confirmPreviews deletion; confirmation tries to revoke the bot token, then deletes the integration
slack_getidReturns one integration without secrets
slack_listpage, size, all, formatLists integrations without secrets
slack_testidTests the saved bot token for a connected integration without posting a message
slack_updateid, inputReplaces notification behavior and resource scope

slack_create input requires name, clientId, and clientSecret. slack_connect input requires accessToken, teamId, and teamName.

slack_update input requires name and channels, and accepts notifyViolations, notifyHere, includeObserved, allPipelines, pipelineIds, allDeployments, and deploymentIds. Omitted optional update fields reset to their defaults: violation notifications and both all* scopes enabled, mentions and observed outcomes disabled, and empty ID lists.

Use Slack Notifications for the browser OAuth workflow, scopes, channel selection, and notification behavior.

Microsoft Teams Tasks

TaskArgumentsOutput and effect
teams_createinputValidates Microsoft credentials, then creates a disconnected integration
teams_deleteid, optional confirmPreviews or deletes the Team Server integration without removing external Microsoft resources
teams_getidReturns one resolved integration without its client secret or connector URLs
teams_listpage, size, all, formatLists resolved integrations without secrets or connector URLs
teams_rotate_secretid, inputValidates and replaces the Microsoft Entra client secret
teams_testidPerforms a fresh credential exchange without posting to a channel
teams_updateid, inputReplaces channels, notification behavior, and resource scope

teams_create input requires name, tenantId, appId, and clientSecret. teams_rotate_secret input requires clientSecret. teams_update input requires name and channels; each channel is an object with teamId and channelId. The update also accepts notifyViolations, includeObserved, allPipelines, pipelineIds, allDeployments, and deploymentIds.

Omitted optional update fields reset to their defaults: violation notifications and both all* scopes enabled, observed outcomes disabled, and empty ID lists. The command tasks do not generate or install the Teams app package. Use Microsoft Teams Notifications to configure the Azure Bot, download and install the package, discover channels, and send browser-based channel tests.

Settings Tasks

TaskArgumentsOutput and effect
log_settings_getNoneReturns Team Server log, submitted Runtime Sensor log, and integration run history retention settings
log_settings_updateserver_retention_days, sensor_retention_days, integration_run_retention_daysReplaces all three retention periods; each must be from 1 through 3,650 days
pipeline_settings_getNoneReturns stale-pipeline and build-discovery settings
pipeline_settings_updatedays_until_stale, build_discovery_hoursReplaces both settings; accepted ranges are 1 through 365 days and 1 through 168 hours

Maintenance and Diagnostic Tasks

TaskArgumentsPurpose
statistics_calculateNoneCaptures dashboard statistic values
status_reconcileNoneRecalculates status for Runtime Sensors, builds, workloads, pipelines, all email integrations, connected Slack integrations, and connected Microsoft Teams integrations
log_pruneoptional confirmPreviews or applies configured log and integration run history retention
system_checkNoneVerifies the database and reports the environment, version, and build
task_catalogNoneReturns the machine-readable cataloged-task inventory

Keep the scheduled statistics_calculate, status_reconcile, and log_prune confirm:true jobs enabled. CI/CD provider schedules use <provider>_sync mode:pipelines trigger:scheduled and <provider>_sync mode:builds trigger:scheduled. See Scheduler.

Observed Data Pruning

data_prune removes selected historical observations while retaining long-lived pipeline, deployment, Runtime Sensor, policy, user, and integration roots. It is not scheduled by default.

ArgumentRequirement
resourcesRequired comma-separated subset of builds, workloads, violations, and stats
older_than_daysPositive number of days; mutually exclusive with before
beforeRFC 3339 cutoff timestamp; mutually exclusive with older_than_days
batch_sizeOptional build, workload, and violation deletion size from 1 through 5,000; default 500
confirmOptional; omit for preview and use true to apply

Active builds/workloads are excluded. Each invocation deletes up to batch_size per observation type; repeat preview/apply until complete. Statistics delete all matches. Violations use their own timestamps and can be deleted while parents remain. Review retention and the preview first.

endura task data_prune resources:builds,workloads,violations older_than_days:90
endura task data_prune resources:builds,workloads,violations older_than_days:90 confirm:true
endura task data_prune resources:stats before:2026-01-01T00:00:00Z batch_size:1000 confirm:true

Fixture Data

database_seed loads path (default src/fixtures). refresh:true previews schema deletion/recreation; confirm:true applies it before loading. Production refuses the task.

endura task database_seed path:src/fixtures
endura task database_seed path:src/fixtures refresh:true
endura task database_seed path:src/fixtures refresh:true confirm:true

Use fixture data only in disposable development and test environments.