So I've been trying to manually post requests to mount the devices, but the PLC keeps on responding with "400 bad request". One version I tried, based on the documentation on the Swagger UI I tried this: POST https://192.168.42.100/storage/api/v1/tasks
Content-Type: application/json
Accept: application/json
Authorization -> Bearer eyJhbGciOiJFUzM4N--- snip ---fvxWHsbqx5W3pZJ:
Content-Length: 106
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8.1)
Accept-Encoding: br,deflate,gzip,x-gzip
{
"action":"mount",
"parameters":{
"media":"C2E7-F514",
"assignment":"storage-extension"
}
} The "media" was the "UUID" of my removable device as returned by: https://192.168.42.100/storage/api/v1/media [
{
"uuid": "C2E7-F514",
"label": "Extreme SSD",
"mounted": false,
"format": "exfat",
"size": 1000169226752,
"device": "sda1"
},
{
"uuid": "4A65-4441",
"mounted": false,
"format": "fat32",
"size": 15633219584,
"device": "mmcblk1p1"
},
{
"uuid": "d2d26aa9-0ab9-4ecf-aff8-f8194080ee02",
"label": "ubuntu-data",
"mounted": true,
"format": "ext4",
"size": 2917068800,
"used": 1074720768,
"device": "mmcblk0p4",
"internal": true
}
] The output the generated OpenAPI client would have produced was quite a bit different and the server didn't like it either: {
"instance":{
"parameters":{
"media":"C2E7-F514",
"assignment":"storage-extension"
},
"action":"mount"
},
"isNullable":false,
"schemaType":"oneOf"
} Help greatly appreciated.
... View more