Mender-artifact deployment not using the UI

Hi,

How can I deploy the artifact via a command line?

The document says:

Deploy the Artifact
Now that we have the device connected and the Artifact uploaded to the server, all that remains is to go to the Deployments tab and click Create a deployment.

Select the Artifact you just uploaded and All devices, then Create deployment.

How can I execute all those procedures above via a command line?

Thank you!

Kind regards,
Marizonne

https://docs.mender.io/api/?shell#management-api-deployments

Tried this command and then monitor the client, seems like nothing is happening…

herodev@ubuntu-bionic-desktop:~/Downloads$ RESPONSE=$(curl -s -X POST $MENDER_SERVER_URI/api/management/v1/deployments/deployments -H "Content-Type: application/json" -H "Accept: application/json" -H "Authorization: Bearer $JWT" --data-raw "{\"name\": \"74cd11ff-7e8a-404b-a011-54738f3cbd0b\", \"artifact_name\": \"hero-secc-release-2.00-Rc1\", \"devices\": [\"1501003847544634520686ea4d4e2700\"]}") | echo $RESPONSE

This is the mender-client log:

Nov 25 05:24:43 hero-secc mender[848]: time="2022-11-25T05:24:43Z" level=info msg="Executing script: Sync_Leave_90"
Nov 25 05:24:44 hero-secc mender[848]: time="2022-11-25T05:24:44Z" level=info msg="Collected output (stderr) while running script /etc/mender/scripts/Sync_Leave_90\nhero-secc-release-2.0rc9748-dbg3: Sync_Leave_90 was called!\n\n---------- end of script output"
Nov 25 05:24:44 hero-secc mender[848]: time="2022-11-25T05:24:44Z" level=info msg="Executing script: Idle_Enter_00"
Nov 25 05:24:44 hero-secc mender[848]: time="2022-11-25T05:24:44Z" level=info msg="Collected output (stderr) while running script /etc/mender/scripts/Idle_Enter_00\nhero-secc-release-2.0rc9748-dbg3: Idle_Enter_00 was called!\n\n---------- end of script output"

Thoughts?

Use the ID provided by the mender in devices and not the Device Identity.