@@ -1557,6 +1557,101 @@ paths:
1557
1557
multipart/form-data :
1558
1558
schema :
1559
1559
$ref : ' #/components/schemas/devices_v2_ota_upload_request'
1560
+ responses :
1561
+ " 200 " :
1562
+ content :
1563
+ application/vnd.arduino.devicev2.otaupload+json :
1564
+ schema :
1565
+ $ref : ' #/components/schemas/ArduinoDevicev2Otaupload'
1566
+ application/vnd.goa.error+json :
1567
+ schema :
1568
+ $ref : ' #/components/schemas/ArduinoDevicev2Otaupload'
1569
+ description : OK
1570
+ " 202 " :
1571
+ content :
1572
+ application/vnd.arduino.devicev2.otaupload+json :
1573
+ schema :
1574
+ $ref : ' #/components/schemas/ArduinoDevicev2Otaupload'
1575
+ application/vnd.goa.error+json :
1576
+ schema :
1577
+ $ref : ' #/components/schemas/ArduinoDevicev2Otaupload'
1578
+ description : Accepted
1579
+ " 400 " :
1580
+ content :
1581
+ application/vnd.arduino.devicev2.otaupload+json :
1582
+ schema :
1583
+ $ref : ' #/components/schemas/error'
1584
+ application/vnd.goa.error+json :
1585
+ schema :
1586
+ $ref : ' #/components/schemas/error'
1587
+ description : Bad Request
1588
+ " 401 " :
1589
+ description : Unauthorized
1590
+ " 404 " :
1591
+ content :
1592
+ application/vnd.arduino.devicev2.otaupload+json :
1593
+ schema :
1594
+ $ref : ' #/components/schemas/error'
1595
+ application/vnd.goa.error+json :
1596
+ schema :
1597
+ $ref : ' #/components/schemas/error'
1598
+ description : Not Found
1599
+ " 409 " :
1600
+ description : Conflict
1601
+ " 410 " :
1602
+ content :
1603
+ application/vnd.arduino.devicev2.otaupload+json :
1604
+ schema :
1605
+ $ref : ' #/components/schemas/error'
1606
+ application/vnd.goa.error+json :
1607
+ schema :
1608
+ $ref : ' #/components/schemas/error'
1609
+ description : Gone
1610
+ " 412 " :
1611
+ content :
1612
+ application/vnd.arduino.devicev2.otaupload+json :
1613
+ schema :
1614
+ $ref : ' #/components/schemas/error'
1615
+ application/vnd.goa.error+json :
1616
+ schema :
1617
+ $ref : ' #/components/schemas/error'
1618
+ description : Precondition Failed
1619
+ " 500 " :
1620
+ content :
1621
+ application/vnd.arduino.devicev2.otaupload+json :
1622
+ schema :
1623
+ $ref : ' #/components/schemas/error'
1624
+ application/vnd.goa.error+json :
1625
+ schema :
1626
+ $ref : ' #/components/schemas/error'
1627
+ description : Internal Server Error
1628
+ security :
1629
+ - oauth2 : []
1630
+ summary : upload devices_v2_ota
1631
+ tags :
1632
+ - devices_v2_ota
1633
+ put :
1634
+ description : Send a binary url to a device
1635
+ operationId : devices_v2_ota#send
1636
+ parameters :
1637
+ - description : The id of the device
1638
+ explode : false
1639
+ in : path
1640
+ name : id
1641
+ required : true
1642
+ schema :
1643
+ type : string
1644
+ style : simple
1645
+ requestBody :
1646
+ content :
1647
+ application/json :
1648
+ schema :
1649
+ $ref : ' #/components/schemas/devicev2.otabinaryurl'
1650
+ application/x-www-form-urlencoded :
1651
+ schema :
1652
+ $ref : ' #/components/schemas/devicev2.otabinaryurl'
1653
+ required : true
1654
+ x-originalParamName : payload
1560
1655
responses :
1561
1656
" 200 " :
1562
1657
description : OK
@@ -1611,12 +1706,13 @@ paths:
1611
1706
description : Internal Server Error
1612
1707
security :
1613
1708
- oauth2 : []
1614
- summary : upload devices_v2_ota
1709
+ summary : send devices_v2_ota
1615
1710
tags :
1616
1711
- devices_v2_ota
1617
- put :
1618
- description : Send a binary url to a device
1619
- operationId : devices_v2_ota#send
1712
+ /v2/devices/{id}/ota/url :
1713
+ post :
1714
+ description : Generate a url for downloading a binary
1715
+ operationId : devices_v2_ota#url
1620
1716
parameters :
1621
1717
- description : The id of the device
1622
1718
explode : false
@@ -1630,10 +1726,10 @@ paths:
1630
1726
content :
1631
1727
application/json :
1632
1728
schema :
1633
- $ref : ' #/components/schemas/devicev2.otabinaryurl '
1729
+ $ref : ' #/components/schemas/devicev2.otaurlpyalod '
1634
1730
application/x-www-form-urlencoded :
1635
1731
schema :
1636
- $ref : ' #/components/schemas/devicev2.otabinaryurl '
1732
+ $ref : ' #/components/schemas/devicev2.otaurlpyalod '
1637
1733
required : true
1638
1734
x-originalParamName : payload
1639
1735
responses :
@@ -1690,7 +1786,7 @@ paths:
1690
1786
description : Internal Server Error
1691
1787
security :
1692
1788
- oauth2 : []
1693
- summary : send devices_v2_ota
1789
+ summary : url devices_v2_ota
1694
1790
tags :
1695
1791
- devices_v2_ota
1696
1792
/v2/devices/{id}/pass :
@@ -4052,6 +4148,8 @@ components:
4052
4148
description : Accepted
4053
4149
BadRequest :
4054
4150
description : Bad Request
4151
+ Conflict :
4152
+ description : Conflict
4055
4153
NotFound :
4056
4154
description : Not Found
4057
4155
NotImplemented :
@@ -4404,6 +4502,27 @@ components:
4404
4502
title : " Mediatype identifier: application/vnd.arduino.devicev2.event.properties+json;\
4405
4503
\ view=default"
4406
4504
type : object
4505
+ ArduinoDevicev2Otaupload :
4506
+ description : ArduinoDevicev2Otaupload media type (default view)
4507
+ properties :
4508
+ file_sha :
4509
+ description : SHA256 of the uploaded file
4510
+ type : string
4511
+ ota_id :
4512
+ description : OTA request id (only available from OTA version 2 and above)
4513
+ type : string
4514
+ ota_version :
4515
+ description : OTA version
4516
+ format : int64
4517
+ type : integer
4518
+ status :
4519
+ description : OTA request status (only available from OTA version 2 and above)
4520
+ type : string
4521
+ required :
4522
+ - ota_version
4523
+ title : " Mediatype identifier: application/vnd.arduino.devicev2.otaupload+json;\
4524
+ \ view=default"
4525
+ type : object
4407
4526
ArduinoDevicev2Pass :
4408
4527
description : DeviceCertV2 describes a password associated to a device (default
4409
4528
view)
@@ -6117,6 +6236,22 @@ components:
6117
6236
- binary_key
6118
6237
title : devicev2.otabinaryurl
6119
6238
type : object
6239
+ devicev2.otaurlpyalod :
6240
+ properties :
6241
+ binary_key :
6242
+ description : The object key of the binary
6243
+ pattern : " ^ota/[a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+.ota$"
6244
+ type : string
6245
+ sha256 :
6246
+ description : The sha256 of the binary
6247
+ pattern : " ^[a-fA-F0-9]{64}$"
6248
+ type : string
6249
+ user_id :
6250
+ description : The id of the user who is requesting the url
6251
+ format : uuid
6252
+ type : string
6253
+ title : devicev2.otaurlpyalod
6254
+ type : object
6120
6255
devicev2.pass :
6121
6256
properties :
6122
6257
password :
0 commit comments