automation-pilot-executions-api
Skill1 starsChanged 4 months agoMITView on GitHub
Monitor and manage SAP Automation Pilot executions via API. Use when triggering commands, checking execution status, retrieving logs, aborting or pausing executions, or troubleshooting failed runs.
- Sends data out
In this repository413 other files it gives its agents.
- .agents/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- .codex/AGENTS.mdAGENTS.md
- .cursor/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- sap-router-skillCopilot instructions
- .cursor/rules/sap-router.mdcCursor rule
- abap-cloud-migrationSkill
- abap-cloudSkill
- abap-code-patternsSkill
- abap-code-reviewSkill
- abap-docs-referenceSkill
- abapgitSkill
- abapSkill
- abap-snippetSkill
- abap-sql-amdpSkill
- abap-system-infoSkill
- abap-unit-testingSkill
- arc-1-skillsSkill
- atc-cloudificationSkill
- authorization-iamSkill
- automation-pilot-catalog-explorerSkill
- automation-pilot-command-generationSkill
- automation-pilot-command-reviewSkill
- automation-pilot-content-management-via-apiSkill
- automation-pilot-debuggerSkill
- automation-pilot-executor-executescriptSkill
- automation-pilot-executor-httprequestSkill
- automation-pilot-mcp-server-generationSkill
- automation-pilot-scheduled-executions-apiSkill
- badi-enhancementSkill
- btp-abap-environmentSkill
- btp-best-practicesSkill
- btp-build-work-zoneSkill
- btp-business-application-studioSkill
- btp-ciasSkill
- btp-cloud-foundrySkill
- btp-cloud-identitySkill
- btp-cloud-loggingSkill
- btp-cloud-platformSkill
- btp-cloud-transport-managementSkill
- btp-connectivitySkill
- btp-developer-guideSkill
- btp-diagram-generatorSkill
- btp-integration-suiteSkill
- btp-job-schedulingSkill
- btp-master-data-integrationSkill
- btp-service-managerSkill
- cap-add-remote-serviceSkill
- cap-developerSkill
- cap-triviaSkill
- capture-answerSkill
- cap-upgradeSkill
- cds-view-entitiesSkill
- claude-abap-skillsSkill
- claude-memSkill
- clean-abapSkill
- context-modeSkill
- cpi-iflow-developmentSkill
- engine-cap-developmentSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
Ensure curl is available in your environment.
- Very specific: line 92
Add "feature:dryRun": "" to the tags to execute without making actual changes.
- Very specific: line 177
All actions use the same endpoint: POST /api/v1/executions/$EXEC_ID/actions
- Distinctive: line 244
Check logs for the current step
- Distinctive: line 245
Look for external dependencies (HTTP timeouts, etc.)
- Distinctive: line 246
Consider aborting and retrying
- Distinctive: line 261
Check logs for the failed step
- Very specific: line 281
Solution: Always include "feature:logs": "" in the tags object when triggering.
- Distinctive: line 315
Only completed executions can be deleted (not RUNNING).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
SAP Automation Pilot Executions API Management
This skill manages command executions in SAP Automation Pilot - triggering, monitoring, controlling, and troubleshooting executions.
Prerequisites
- Set the following required environment variables:
export AUTOPI_HOSTNAME="emea.autopilot.cloud.sap"
export AUTOPI_USERNAME="your-username"
export AUTOPI_PASSWORD="your-password"
export AUTOPI_DEFAULT_CATALOG="mycommands-<<<TENANT_ID>>>"- Ensure
curlis available in your environment.
Execution Lifecycle
Statuses
| Status | Description | Active or Terminal |
RUNNING | Execution is currently running. During delays (initial delay, retry backoff, repeat interval) the execution stays RUNNING while individual executors show their delay reason. | Active |
PAUSED | Manually paused — must be resumed to continue. | Active |
INPUT_REQUIRED | Waiting for a user choice (Confirm action required). | Active |
FAILED | Failed due to an error or failed validation. Can be retried or reset. | Active |
FINISHED | Completed successfully. | Terminal |
ABORTED | Canceled by the user. | Terminal |
SUSPENDED | Canceled by Automation Pilot (runtime limit exceeded, tenant execution limit reached, or execution/output size limit exceeded). | Terminal |
Terminal statuses (FINISHED, ABORTED, SUSPENDED) mean the execution is complete and no further actions can be applied. Completed executions can be retriggered and deleted.
Active statuses (RUNNING, PAUSED, INPUT_REQUIRED, FAILED) mean the execution is still live and can be acted upon.
Actions
Each action is only valid from specific statuses — applying an action from the wrong status returns HTTP 409.
| Action | Valid from | Result |
| PAUSE | RUNNING | → PAUSED |
| RESUME | PAUSED | → RUNNING |
| RETRY | FAILED | → RUNNING. Re-attempts the execution, preserving progress for provided composite commands. |
| RESET | FAILED, PAUSED, INPUT_REQUIRED | → RUNNING from a chosen previous child command. Not available for direct executions of provided commands. For provided composite commands, starts the whole command from the beginning (unlike RETRY which preserves progress). |
| ABORT | PAUSED, FAILED | → ABORTED |
| COMMENT | Any | Adds a comment to the execution's Action Log (max 10 comments per execution). |
EXEC_ID="execution-uuid-here"
# Pause
curl -s -X POST -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
-H "Content-Type: application/json" \
-d '{"type": "PAUSE", "reason": "Blocking on manual verification"}' \
"https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID/actions"
# Resume
curl -s -X POST -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
-H "Content-Type: application/json" \
-d '{"type": "RESUME", "reason": "Resuming after verification"}' \
"https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID/actions"
# Retry
curl -s -X POST -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
-H "Content-Type: application/json" \
-d '{"type": "RETRY", "reason": "Retrying after transient failure"}' \
"https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID/actions"
# Abort
curl -s -X POST -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
-H "Content-Type: application/json" \
-d '{"type": "ABORT", "reason": "Superseded by a newer run"}' \
"https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID/actions"Triggering Executions
Note: To retrieve logs after execution, include feature:logs in the tags of the trigger request. This tag is opt-in and cannot be added retroactively — an execution triggered without it will return no logs from GET /executions/{id}/logs.
Trigger a Command
Add "feature:dryRun": "" to the tags to execute without making actual changes.
# Basic trigger (opt-in feature:logs tag enables log retrieval)
curl -s -X POST \
-u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
-H "Content-Type: application/json" \
-d '{
"commandId": "my-catalog:MyCommand:1",
"inputValues": {
"param1": "value1",
"param2": "value2"
},
"tags": {"feature:logs": ""}
}' \
"https://$AUTOPI_HOSTNAME/api/v1/executions"
# With dry run mode (adds feature:dryRun tag)
curl -s -X POST \
-u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
-H "Content-Type: application/json" \
-d '{
"commandId": "my-catalog:MyCommand:1",
"inputValues": {"param1": "value1"},
"tags": {"feature:logs": "", "feature:dryRun": ""}
}' \
"https://$AUTOPI_HOSTNAME/api/v1/executions"All inputValues entries must be strings on the wire, regardless of the declared parameter type. The runtime converts each value to its declared type inside the executor:
"inputValues": {
"appName": "my-app",
"instances": "3",
"enabled": "true",
"regions": "[\"cf-eu10\",\"cf-us10\"]",
"config": "{\"maxRetries\":5}"
}Monitoring Executions
List Executions
# List all (up to limit)
curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" "https://$AUTOPI_HOSTNAME/api/v1/executions?limit=100"
# Filter by status
curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" "https://$AUTOPI_HOSTNAME/api/v1/executions?status=FAILED&limit=50"
# Filter by command
curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" "https://$AUTOPI_HOSTNAME/api/v1/executions?commandId=my-catalog:MyCommand:1"
# Filter by time (epoch milliseconds)
curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" "https://$AUTOPI_HOSTNAME/api/v1/executions?startedAfter=1707000000000"Get Execution Details
EXEC_ID="execution-uuid-here"
curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" "https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID"Get Execution Summary
# Get counts by status
curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" "https://$AUTOPI_HOSTNAME/api/v1/executions/summary"Get Input/Output
# Get execution input
curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" "https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID/input"
# Get execution output (only for FINISHED)
curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" "https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID/output"Controlling Executions
All actions use the same endpoint: POST /api/v1/executions/$EXEC_ID/actions
See the Actions table in the Execution Lifecycle section for valid statuses and expected outcomes.
EXEC_ID="execution-uuid-here"
# Reset — resets to a previous child command (provide the executor path via "value")
curl -s -X POST -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
-H "Content-Type: application/json" \
-d '{"type": "RESET", "value": "stepAlias", "reason": "Retry after fixing the input"}' \
"https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID/actions"
# Comment — add a note to the Action Log (max 10 per execution)
curl -s -X POST -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
-H "Content-Type: application/json" \
-d '{"type": "COMMENT", "reason": "Escalated to L2 on-call"}' \
"https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID/actions"
# List action history
curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
"https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID/actions"Viewing Logs
Get Execution Logs
EXEC_ID="execution-uuid-here"
# Get paginated logs
curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" "https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID/logs?page=0&maxPageSize=20"
# Get logs for specific executor
EXECUTOR_PATH="step1"
curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" "https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID/logs/$EXECUTOR_PATH"Troubleshooting
Quick Troubleshooting
EXEC_ID="your-execution-id"
# 1. Get status and error
curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" "https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID"
# 2. Check input used
curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" "https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID/input"
# 3. Check recent logs
curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
"https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID/logs?page=0&maxPageSize=10"
# 4. Check output (if FINISHED)
curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" "https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID/output"Common Issues
Execution Stuck in RUNNING
- Check logs for the current step
- Look for external dependencies (HTTP timeouts, etc.)
- Consider aborting and retrying
curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
"https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID/logs?page=0&maxPageSize=20"
curl -s -X POST -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
-H "Content-Type: application/json" \
-d '{"type": "ABORT", "reason": "Aborting stuck execution"}' \
"https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID/actions"Execution Failed
- Get execution details to see error
- Check logs for the failed step
- Review input parameters
curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" "https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID"
curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" "https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID/input"Input Required
The execution is waiting for manual input:
curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" "https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID"
# Inspect the response — check the suspendedStep fieldNo Logs Available
Cause: The execution was triggered without the feature:logs tag, so logging was not enabled.
Solution: Always include "feature:logs": "" in the tags object when triggering. Logs cannot be retrieved retroactively for executions that were triggered without this tag. Re-trigger the execution with the tag included.
Filtering & Pagination
Query Parameters for List Executions
| Parameter | Type | Description |
status | array | Filter by status (RUNNING, FAILED, FINISHED, etc.) |
commandId | array | Filter by command ID |
executionId | array | Filter by execution ID |
startedAfter | integer | Unix epoch milliseconds |
startedBefore | integer | Unix epoch milliseconds |
tag | array | Key-value pairs |
limit | integer | Max results (1-1000, default 1000) |
Examples
# Last 24 hours, failed only
YESTERDAY=$(($(date +%s) * 1000 - 86400000))
curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
"https://$AUTOPI_HOSTNAME/api/v1/executions?status=FAILED&startedAfter=$YESTERDAY&limit=50"
# Multiple statuses
curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
"https://$AUTOPI_HOSTNAME/api/v1/executions?status=RUNNING&status=PAUSED"Delete Executions
Only completed executions can be deleted (not RUNNING).
EXEC_ID="execution-uuid-here"
curl -s -X DELETE -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" "https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID"Event Triggers
Trigger via Generic Event
curl -s -X POST \
-u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
-H "Content-Type: application/json" \
-d '{
"commandReference": "my-catalog:MyCommand:1",
"event": {
"type": "alert",
"message": "High CPU usage detected"
}
}' \
"https://$AUTOPI_HOSTNAME/api/v1/triggers/generic-event"Trigger via ANS Event
curl -s -X POST \
-u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
-H "Content-Type: application/json" \
-d '{
"commandReference": "my-catalog:MyCommand:1",
"event": {...ANS event payload...}
}' \
"https://$AUTOPI_HOSTNAME/api/v1/triggers/ans-event"Error Handling
HTTP Status Codes
| Code | Description |
200 | Success |
202 | Accepted (trigger/action) |
204 | No Content (delete) |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
409 | Conflict (invalid state) |
413 | Payload Too Large |
429 | Rate Limited |
Permissions Required
| Operation | Permission |
| List/Get executions | Read |
| Delete executions | Write |
| Trigger/Actions | Execute |
Examples
Example 1: Trigger and monitor a command
User: "Run my health check command"
- POST to
/api/v1/executionswithcommandId, input values, and"tags": {"feature:logs": ""} - Capture the execution ID from the response
- GET
/api/v1/executions/$EXEC_IDand poll untilstatusis no longerRUNNING - Report the final status and output
Example 2: Troubleshoot a failed execution
User: "My execution failed, what went wrong?"
- GET
/api/v1/executions/$EXEC_ID— extractstatus,error,progressMessage - GET
/api/v1/executions/$EXEC_ID/input— verify the parameters that were used - GET
/api/v1/executions/$EXEC_ID/logs?page=0&maxPageSize=20— find the failed step - Report the root cause from the error message and log output
Example 3: Find and abort stuck executions
User: "Are there any stuck executions? Abort them."
- GET
/api/v1/executions?status=RUNNINGto list all currently running executions - For each one, check
startedAtto identify those running unexpectedly long - For each stuck execution, POST
{"type": "ABORT", "reason": "Stuck execution"}to/api/v1/executions/$EXEC_ID/actions - Confirm each abort returned HTTP 202
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

