curl -X POST -i -u ditto:foobar -H 'Content-Type: application/json' -d '{
"targetActorSelection": "/system/sharding/connection",
"headers": {
"aggregate": false
},
"piggybackCommand": {
"type": "connectivity.commands:testConnection",
"connection": {
"id": "'$MY_DEVICE'",
"connectionType": "amqp-10",
"connectionStatus": "open",
"uri": "amqp://consumer%40HONO:my-pwd@$AMQP_NETWORK_IP:15672",
"failoverEnabled": true,
"sources": [{
"addresses": [
"telemetry/$MY_TENANT",
"event/$MY_TENANT"
]
}]
}
}
}' http://localhost:8080/devops/piggyback/connectivity?timeout=8000
Подсказки на ошибки:
HTTP/1.1 401 Unauthorized
Server: nginx/1.13.12
Date: Sun, 19 Jan 2020 11:20:52 GMT
Content-Type: text/plain; charset=UTF-8
Content-Length: 38
Connection: keep-alive
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
WWW-Authenticate: Basic realm="DITTO-DEVOPS",charset=UTF-8
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Accept,Authorization,Cache-Control,Content-Type,Content-Length,DNT,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Origin,User-Agent,X-Requested-With
Поставленная аутентификация недействительна