REST API
Ce contenu n’est pas encore disponible dans votre langue.
All API endpoints are available at https://orch.actionforge.dev. Authenticate requests with a token in the Authorization header:
curl -H "Authorization: Bearer <TOKEN>" \
https://orch.actionforge.dev/api/v2/ci/dashboard Projects
Section titled “Projects”# Create a project
curl -X POST https://orch.actionforge.dev/api/v2/ci/pipelines \
-H "Authorization: Bearer <PAT>" \
-H "Content-Type: application/json" \
-d '{
"owner": "myuser",
"name": "myproject",
"vcs_type": "github",
"vcs_url": "https://github.com/myuser/myrepo",
"default_ref": "main"
}'
# Get a project
curl https://orch.actionforge.dev/api/v2/ci/repos/{owner}/{name} \
-H "Authorization: Bearer <PAT>"
# Delete a project
curl -X DELETE https://orch.actionforge.dev/api/v2/ci/pipelines/{owner}/{name} \
-H "Authorization: Bearer <PAT>" Triggering Runs
Section titled “Triggering Runs”# Trigger a pipeline
curl -X POST https://orch.actionforge.dev/trigger/{owner}/{name}/{pipeline} \
-H "Authorization: Bearer <TOKEN>"
# Trigger by config version
curl -X POST https://orch.actionforge.dev/trigger/{owner}/{name}/{configName}/v{version} \
-H "Authorization: Bearer <TOKEN>"
# Unregistered trigger (full payload)
curl -X POST https://orch.actionforge.dev/trigger \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"owner": "myuser",
"name": "myproject",
"pipeline": "build.act",
"ref": "main",
"vcs_type": "github",
"vcs_url": "https://github.com/myuser/myrepo",
"entrypoint": "main",
"required_labels": "os=linux"
}' Runs & Jobs
Section titled “Runs & Jobs”# List runs
curl https://orch.actionforge.dev/api/v2/ci/repos/{owner}/{name}/runs \
-H "Authorization: Bearer <TOKEN>"
# Get run details
curl https://orch.actionforge.dev/api/v2/ci/runs/{id} \
-H "Authorization: Bearer <TOKEN>"
# Re-run
curl -X POST https://orch.actionforge.dev/api/v2/ci/runs/{id}/rerun \
-H "Authorization: Bearer <TOKEN>"
# Cancel runs
curl -X POST https://orch.actionforge.dev/api/v2/ci/runs/cancel \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
-d '{"run_ids": ["id1", "id2"]}' # Get job logs
curl https://orch.actionforge.dev/api/v2/ci/jobs/{jobId}/logs \
-H "Authorization: Bearer <TOKEN>"
# Stream logs (SSE)
curl https://orch.actionforge.dev/api/v2/ci/jobs/{jobId}/logs/stream \
-H "Authorization: Bearer <TOKEN>" # Get queue
curl https://orch.actionforge.dev/api/v2/ci/queue \
-H "Authorization: Bearer <TOKEN>"
# Reorder queue
curl -X PUT https://orch.actionforge.dev/api/v2/ci/queue/reorder \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
-d '{"run_ids": ["id1", "id2", "id3"]}' Artifacts
Section titled “Artifacts”# List artifacts for a run
curl https://orch.actionforge.dev/api/v2/ci/runs/{id}/artifacts \
-H "Authorization: Bearer <TOKEN>"
# Download an artifact
curl -O https://orch.actionforge.dev/api/v2/ci/runs/{id}/artifacts/{filename} \
-H "Authorization: Bearer <TOKEN>"
# List all artifacts
curl https://orch.actionforge.dev/api/v2/ci/artifacts \
-H "Authorization: Bearer <TOKEN>" Agents
Section titled “Agents”# List agents
curl https://orch.actionforge.dev/api/v2/ci/agents \
-H "Authorization: Bearer <PAT>"
# Get agent details
curl https://orch.actionforge.dev/api/v2/ci/agents/{name} \
-H "Authorization: Bearer <PAT>"
# Update agent labels
curl -X PATCH https://orch.actionforge.dev/api/v2/ci/agents/{name}/labels \
-H "Authorization: Bearer <PAT>" \
-H "Content-Type: application/json" \
-d '{"labels": ["os=linux", "arch=arm64", "gpu=true"]}'
# Remove agent
curl -X DELETE https://orch.actionforge.dev/api/v2/ci/agents/{name} \
-H "Authorization: Bearer <PAT>" Tokens
Section titled “Tokens”Personal Access Tokens
Section titled “Personal Access Tokens”# Create PAT
curl -X POST https://orch.actionforge.dev/api/v2/ci/tokens \
-H "Authorization: Bearer <SESSION>" \
-H "Content-Type: application/json" \
-d '{
"label": "ci-integration",
"description": "Token for CI system",
"scopes": ["trigger", "read", "pipeline:write"]
}'
# List PATs
curl https://orch.actionforge.dev/api/v2/ci/tokens \
-H "Authorization: Bearer <SESSION>" Organization Tokens
Section titled “Organization Tokens”curl -X POST https://orch.actionforge.dev/api/v2/ci/orgs/{org}/tokens \
-H "Authorization: Bearer <PAT>" \
-H "Content-Type: application/json" \
-d '{
"label": "deploy-bot",
"description": "Deployment automation token",
"scopes": ["trigger", "read"]
}' Agent Tokens
Section titled “Agent Tokens”# Personal agent token
curl -X POST https://orch.actionforge.dev/api/v2/ci/agent-tokens \
-H "Authorization: Bearer <PAT>" \
-H "Content-Type: application/json" \
-d '{"label": "my-build-server"}'
# Organization agent token
curl -X POST https://orch.actionforge.dev/api/v2/ci/orgs/{org}/agent-tokens \
-H "Authorization: Bearer <PAT>" \
-H "Content-Type: application/json" \
-d '{"label": "org-builder"}' Trigger Tokens
Section titled “Trigger Tokens”curl -X POST https://orch.actionforge.dev/api/v2/ci/repos/{owner}/{name}/tokens \
-H "Authorization: Bearer <PAT>" \
-H "Content-Type: application/json" \
-d '{"label": "github-webhook"}' Secrets
Section titled “Secrets”# Personal secret
curl -X POST https://orch.actionforge.dev/api/v2/ci/secrets \
-H "Authorization: Bearer <PAT>" \
-H "Content-Type: application/json" \
-d '{"key": "NPM_TOKEN", "value": "npm_abc123..."}'
# Organization secret
curl -X POST https://orch.actionforge.dev/api/v2/ci/orgs/{org}/secrets \
-H "Authorization: Bearer <PAT>" \
-H "Content-Type: application/json" \
-d '{"key": "DEPLOY_KEY", "value": "ssh-rsa AAAA..."}'
# Repository secret
curl -X POST https://orch.actionforge.dev/api/v2/ci/repos/{owner}/{name}/secrets \
-H "Authorization: Bearer <PAT>" \
-H "Content-Type: application/json" \
-d '{"key": "DATABASE_URL", "value": "postgres://..."}' Vault Configuration
Section titled “Vault Configuration”# Configure vault (repo-level)
curl -X PUT https://orch.actionforge.dev/api/v2/ci/repos/{owner}/{name}/vault \
-H "Authorization: Bearer <PAT>" \
-H "Content-Type: application/json" \
-d '{
"vault_addr": "https://vault.example.com",
"auth_method": "approle",
"role_id": "my-role-id",
"secret_id": "my-secret-id",
"mount_path": "secret",
"path": "ci/myproject",
"namespace": "engineering"
}'
# Test vault connection
curl -X POST https://orch.actionforge.dev/api/v2/ci/repos/{owner}/{name}/vault/test \
-H "Authorization: Bearer <PAT>" \
-H "Content-Type: application/json" \
-d '{ ... vault config ... }' Storage Configuration
Section titled “Storage Configuration”curl -X PUT https://orch.actionforge.dev/api/v2/ci/repos/{owner}/{name}/storage \
-H "Authorization: Bearer <PAT>" \
-H "Content-Type: application/json" \
-d '{
"provider": "s3",
"bucket": "my-artifacts-bucket",
"region": "us-east-1",
"endpoint": "https://s3.amazonaws.com",
"access_key": "AKIA...",
"secret_key": "...",
"prefix": "ci/myproject"
}' Organizations
Section titled “Organizations”# Create organization
curl -X POST https://orch.actionforge.dev/api/v2/ci/orgs \
-H "Authorization: Bearer <PAT>" \
-H "Content-Type: application/json" \
-d '{"name": "my-team"}'
# List namespaces
curl https://orch.actionforge.dev/api/v2/ci/namespaces \
-H "Authorization: Bearer <PAT>"
# Delete organization
curl -X DELETE https://orch.actionforge.dev/api/v2/ci/orgs/{name} \
-H "Authorization: Bearer <PAT>" Security Policy
Section titled “Security Policy”# Set organization security policy
curl -X PUT https://orch.actionforge.dev/api/v2/ci/{org}/security-policy \
-H "Authorization: Bearer <PAT>" \
-H "Content-Type: application/json" \
-d '{
"vault_mode": "external-orchestrator",
"vault_overridable": false,
"storage_mode": "orchestrator-presign",
"storage_overridable": true
}'
# Get effective repo policy
curl https://orch.actionforge.dev/api/v2/ci/repos/{owner}/{name}/policy \
-H "Authorization: Bearer <PAT>"
# Override repo policy
curl -X PUT https://orch.actionforge.dev/api/v2/ci/repos/{owner}/{name}/policy \
-H "Authorization: Bearer <PAT>" \
-H "Content-Type: application/json" \
-d '{"vault_mode": "external-agent"}' Trigger Configurations
Section titled “Trigger Configurations”# Create trigger config
curl -X POST https://orch.actionforge.dev/api/v2/ci/repos/{owner}/{name}/trigger-configs \
-H "Authorization: Bearer <PAT>" \
-H "Content-Type: application/json" \
-d '{"name": "nightly-build"}'
# Add a version
curl -X POST \
https://orch.actionforge.dev/api/v2/ci/repos/{owner}/{name}/trigger-configs/nightly-build/versions \
-H "Authorization: Bearer <PAT>" \
-H "Content-Type: application/json" \
-d '{
"workflow_path": "build.act",
"ref": "main",
"matrix": {
"os": ["linux", "macos", "windows"],
"arch": ["x64", "arm64"]
},
"env_mappings": {
"DEPLOY_ENV": "staging"
},
"subset_policy": {
"allow_subset": true,
"required_dimensions": ["os"]
}
}'
# Enable/disable a version
curl -X PATCH \
https://orch.actionforge.dev/api/v2/ci/repos/{owner}/{name}/trigger-configs/nightly-build/versions/1 \
-H "Authorization: Bearer <PAT>" \
-H "Content-Type: application/json" \
-d '{"enabled": true}' Streaming (SSE)
Section titled “Streaming (SSE)”The following endpoints provide real-time Server-Sent Events:
| Endpoint | Description |
|---|---|
/api/v2/ci/queue/stream | Queue updates |
/api/v2/ci/agents/stream | Agent status changes |
/api/v2/ci/runs/stream | All run updates |
/api/v2/ci/runs/{id}/logs/stream | Run log streaming |
/api/v2/ci/jobs/{jobId}/logs/stream | Job log streaming |