zs1621 opened a new issue #9:
URL: https://github.com/apache/airflow-client-go/issues/9
```func workoutDagTask(workout_id int64, workout_path string) {
cli := airflow.NewAPIClient(&airflow.Configuration{
Scheme: "http",
Host: "localhost:8080",
BasePath: "/api/v1",
})
cred := airflow.BasicAuth{
UserName: "admin",
Password: "admin",
}
ctx := context.WithValue(context.Background(),
airflow.ContextBasicAuth, cred)
var dagRunRequest airflow.DagRun
var dagRunResponse airflow.DagRun
dagRunRequest = airflow.DagRun{
Conf: map[string]interface{}{
"workout_id": workout_id,
"workout_path": workout_path,
},
}
dagRunResponse, httpResponse, err := cli.DAGRunApi.PostDagRun(ctx,
"workout_dag", dagRunRequest)
if err != nil {
fmt.Println(err, httpResponse)
} else {
fmt.Println(dagRunResponse)
}
}
```
httpResponse: 400 Bad Request
> {
"detail": "Property is read-only - 'dag_id'",
"status": 400,
"title": "Bad Request",
"type":
"https://airflow.apache.org/docs/2.0.1/stable-rest-api-ref.html#section/Errors/BadRequest"
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]