coolify icon indicating copy to clipboard operation
coolify copied to clipboard

[Bug]: 404 on API Execute Command

Open g-nie opened this issue 9 months ago • 4 comments

Error Message and Logs

Hello, I am running into an issue when trying to use the execute command endpoint - https://coolify.io/docs/api-reference/api/operations/execute-command-application

curl "https://app.coolify.io/api/v1/applications/myapp-uuid/execute" \
  --request POST -d '{"command": "echo"}' \  
  --header "Authorization: Bearer mytoken" \
  --header 'Content-Type: application/json'

This returns {"message":"Not found.","docs":"https:\/\/coolify.io\/docs"}

Other "applications" endpoints work just fine (e.g. Start, Stop, Restart).

For context, it's a docker compose app and that's probably the reason why it fails. I reckon the endpoint should support passing "container_name" in the request body, similarly to how Pre/Post Deployment Commands work in the UI:

Image

Steps to Reproduce

  1. Set up a docker compose app
  2. Set up API tokens
  3. Use the curl command from above

Coolify Version

v4.0.0-beta.398

Are you using Coolify Cloud?

Yes (Coolify Cloud)

g-nie avatar Mar 20 '25 15:03 g-nie