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_checkList cataloged tasks, arguments, and destructive flags:
endura task task_catalogMicrosoft 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:jsonlInput 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:trueCI/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.
| Task | Arguments | Output and effect |
|---|---|---|
<provider>_create | input, optional sync | Creates an integration and synchronizes pipelines and builds unless sync:false |
<provider>_delete | id, optional confirm | Previews or deletes an integration |
<provider>_get | id | Returns one integration without credentials |
<provider>_list | page, size, all, format | Lists integrations |
<provider>_stop | id, optional confirm | Previews or stops active synchronization |
<provider>_sync | optional id, optional mode, required trigger | Synchronizes selected integrations or every integration for that provider |
<provider>_test | id | Tests access to the upstream provider |
<provider>_update | id, input, optional sync | Updates 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:
| Provider | Create input | Update input |
|---|---|---|
| Bamboo | url, token | token |
| GitHub | url, token, organizations | token, organizations |
| GitLab | url, token, groups | token, groups |
| Jenkins | url, user, token | user, token |
| Koji | url, authentication, optional clientCert, optional caCert | authentication, optional clientCert, optional caCert |
| TeamCity | url, token | token |
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:trueThe 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.
| Resource | Get | List | Delete |
|---|---|---|---|
| Build | build_get id:<id> | build_list [page/size/all/format] | build_delete id:<id> [confirm:true] |
| Deployment | deployment_get id:<id> | deployment_list [page/size/all/format] | deployment_delete id:<id> [confirm:true] |
| Pipeline | pipeline_get id:<id> | pipeline_list [page/size/all/format] | pipeline_delete id:<id> [confirm:true] |
| Violation | violation_get id:<id> | violation_list [page/size/all/format] | violation_delete id:<id> [confirm:true] |
| Workload | workload_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
| Task | Arguments | Output and effect |
|---|---|---|
sensor_create | name, description | Creates a Runtime Sensor and returns both its record and one-time token |
sensor_delete | id, optional confirm | Previews or deletes a Runtime Sensor |
sensor_get | id | Returns one Runtime Sensor |
sensor_list | page, size, all, format | Lists Runtime Sensors |
sensor_rotate_token | id, optional confirm | Previews rotation; confirmation revokes the old generation and returns a new one-time token |
sensor_update | id, name, description | Replaces 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
| Task | Arguments | Output and effect |
|---|---|---|
user_create | subject, name, email, role | Creates a viewer, operator, or administrator |
user_delete | id, optional confirm | Previews or deletes a user, while protecting the final administrator and sole policy owners |
user_get | exactly one of id or email | Returns one user |
user_list | page, size, all, format | Lists users |
user_update | id; optional role, pipelines, deployments, policies, all_pipelines, all_deployments | Replaces 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:falsePersonal 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.
| Task | Arguments | Output and effect |
|---|---|---|
personal_access_token_create | user_id, name, description, permission, expires_in_days | Creates a token and returns its secret once |
personal_access_token_delete | id, user_id, optional confirm | Previews or revokes a token |
personal_access_token_get | id, user_id | Returns token metadata without the secret |
personal_access_token_list | user_id, page, size, all, format | Lists token metadata without secrets |
personal_access_token_rotate | id, user_id, optional confirm | Previews 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
| Task | Arguments | Output and effect |
|---|---|---|
policy_assign | id, pipelines, optional confirm | Previews or replaces all pipeline assignments |
policy_commit_list | id, page, size, all, format | Lists a policy’s immutable commits |
policy_create | input | Creates a policy, initial commit, owner, and optional variables |
policy_delete | id, optional confirm | Previews or deletes a policy |
policy_get | id | Returns one policy |
policy_list | page, size, all, format | Lists policies |
policy_pipeline_list | id, page, size, all, format | Lists assigned pipelines |
policy_revert | id, commit_id, optional confirm | Previews or restores a commit as the current definition |
policy_update | id, input | Validates an update and creates an immutable commit |
policy_validate | input | Compiles 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
| Task | Arguments | Output and effect |
|---|---|---|
email_create | input | Validates an SMTP connection without sending mail, then creates an active integration |
email_delete | id, optional confirm | Previews or deletes an integration and its resource scope |
email_get | id | Returns one integration without its password |
email_list | page, size, all, format | Lists integrations without passwords |
email_test | id | Validates the saved DNS, TLS, and optional authentication settings without sending mail |
email_update | id, input | Replaces sender, recipients, notification behavior, and resource scope |
email_update_connection | id, input | Validates 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
| Task | Arguments | Output and effect |
|---|---|---|
slack_create | input | Creates an unconnected Slack application integration |
slack_connect | id, input | Tests and saves a bot token for headless workspace connection |
slack_delete | id, optional confirm | Previews deletion; confirmation tries to revoke the bot token, then deletes the integration |
slack_get | id | Returns one integration without secrets |
slack_list | page, size, all, format | Lists integrations without secrets |
slack_test | id | Tests the saved bot token for a connected integration without posting a message |
slack_update | id, input | Replaces 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
| Task | Arguments | Output and effect |
|---|---|---|
teams_create | input | Validates Microsoft credentials, then creates a disconnected integration |
teams_delete | id, optional confirm | Previews or deletes the Team Server integration without removing external Microsoft resources |
teams_get | id | Returns one resolved integration without its client secret or connector URLs |
teams_list | page, size, all, format | Lists resolved integrations without secrets or connector URLs |
teams_rotate_secret | id, input | Validates and replaces the Microsoft Entra client secret |
teams_test | id | Performs a fresh credential exchange without posting to a channel |
teams_update | id, input | Replaces 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
| Task | Arguments | Output and effect |
|---|---|---|
log_settings_get | None | Returns Team Server log, submitted Runtime Sensor log, and integration run history retention settings |
log_settings_update | server_retention_days, sensor_retention_days, integration_run_retention_days | Replaces all three retention periods; each must be from 1 through 3,650 days |
pipeline_settings_get | None | Returns stale-pipeline and build-discovery settings |
pipeline_settings_update | days_until_stale, build_discovery_hours | Replaces both settings; accepted ranges are 1 through 365 days and 1 through 168 hours |
Maintenance and Diagnostic Tasks
| Task | Arguments | Purpose |
|---|---|---|
statistics_calculate | None | Captures dashboard statistic values |
status_reconcile | None | Recalculates status for Runtime Sensors, builds, workloads, pipelines, all email integrations, connected Slack integrations, and connected Microsoft Teams integrations |
log_prune | optional confirm | Previews or applies configured log and integration run history retention |
system_check | None | Verifies the database and reports the environment, version, and build |
task_catalog | None | Returns 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.
| Argument | Requirement |
|---|---|
resources | Required comma-separated subset of builds, workloads, violations, and stats |
older_than_days | Positive number of days; mutually exclusive with before |
before | RFC 3339 cutoff timestamp; mutually exclusive with older_than_days |
batch_size | Optional build, workload, and violation deletion size from 1 through 5,000; default 500 |
confirm | Optional; 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:trueFixture 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:trueUse fixture data only in disposable development and test environments.