Skip to content

DAG creation via REST API always overwritten with echo hello #1268

@Sedymariama

Description

@Sedymariama

I am trying to create a new DAG with an SSH step using the REST API.
However, every time I send the request, the created dag file is overwritten with « echo hello » command instead of my step.
I did :
curl -X POST "https://dagu.sdom.com/api/v2/dags"
-H "Content-Type: application/json"
-d '{
"name": "test-ssh5",
"steps": [
{
"name": "start the script",
"executor": {
"type": "ssh",
"config": {
"user": "myuser",
"ip": "1.2.3.4",
"port": 5678,
"key": "/mysshkey"
}
},
"command": "/bin/bash /home/myuser/.....sh"
}
]
}' -u dagu:'xxxxxxxxxxxxxxxxxxxxxxxxx'

Result
The DAG is created, but its content is replaced with:
steps:

  • command: echo hello
    Environment:
    • Dagu Version: 1.22.4-be57f3d(running in Docker)
    • API endpoint: /api/v2/dags
    • Authentication: basic auth

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions