@@ -4,6 +4,8 @@ components:
4
4
description : Accepted
5
5
BadRequest :
6
6
description : Bad Request
7
+ Conflict :
8
+ description : Conflict
7
9
NotFound :
8
10
description : Not Found
9
11
NotImplemented :
@@ -315,6 +317,27 @@ components:
315
317
title : ' Mediatype identifier: application/vnd.arduino.devicev2.event.properties+json;
316
318
view=default'
317
319
type : object
320
+ ArduinoDevicev2Otaupload :
321
+ description : ArduinoDevicev2Otaupload media type (default view)
322
+ properties :
323
+ file_sha :
324
+ description : SHA256 of the uploaded file
325
+ type : string
326
+ ota_id :
327
+ description : OTA request id (only available from OTA version 2 and above)
328
+ type : string
329
+ ota_version :
330
+ description : OTA version
331
+ format : int64
332
+ type : integer
333
+ status :
334
+ description : OTA request status (only available from OTA version 2 and above)
335
+ type : string
336
+ required :
337
+ - ota_version
338
+ title : ' Mediatype identifier: application/vnd.arduino.devicev2.otaupload+json;
339
+ view=default'
340
+ type : object
318
341
ArduinoDevicev2Pass :
319
342
description : DeviceCertV2 describes a password associated to a device (default
320
343
view)
@@ -1891,6 +1914,22 @@ components:
1891
1914
- binary_key
1892
1915
title : devicev2.otabinaryurl
1893
1916
type : object
1917
+ devicev2.otaurlpyalod :
1918
+ properties :
1919
+ binary_key :
1920
+ description : The object key of the binary
1921
+ pattern : ^ota/[a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+.ota$
1922
+ type : string
1923
+ sha256 :
1924
+ description : The sha256 of the binary
1925
+ pattern : ^[a-fA-F0-9]{64}$
1926
+ type : string
1927
+ user_id :
1928
+ description : The id of the user who is requesting the url
1929
+ format : uuid
1930
+ type : string
1931
+ title : devicev2.otaurlpyalod
1932
+ type : object
1894
1933
devicev2.pass :
1895
1934
properties :
1896
1935
password :
@@ -3781,6 +3820,99 @@ paths:
3781
3820
required :
3782
3821
- ota_file
3783
3822
type : object
3823
+ responses :
3824
+ " 200 " :
3825
+ content :
3826
+ application/vnd.arduino.devicev2.otaupload+json :
3827
+ schema :
3828
+ $ref : ' #/components/schemas/ArduinoDevicev2Otaupload'
3829
+ application/vnd.goa.error+json :
3830
+ schema :
3831
+ $ref : ' #/components/schemas/ArduinoDevicev2Otaupload'
3832
+ description : OK
3833
+ " 202 " :
3834
+ content :
3835
+ application/vnd.arduino.devicev2.otaupload+json :
3836
+ schema :
3837
+ $ref : ' #/components/schemas/ArduinoDevicev2Otaupload'
3838
+ application/vnd.goa.error+json :
3839
+ schema :
3840
+ $ref : ' #/components/schemas/ArduinoDevicev2Otaupload'
3841
+ description : Accepted
3842
+ " 400 " :
3843
+ content :
3844
+ application/vnd.arduino.devicev2.otaupload+json :
3845
+ schema :
3846
+ $ref : ' #/components/schemas/error'
3847
+ application/vnd.goa.error+json :
3848
+ schema :
3849
+ $ref : ' #/components/schemas/error'
3850
+ description : Bad Request
3851
+ " 401 " :
3852
+ description : Unauthorized
3853
+ " 404 " :
3854
+ content :
3855
+ application/vnd.arduino.devicev2.otaupload+json :
3856
+ schema :
3857
+ $ref : ' #/components/schemas/error'
3858
+ application/vnd.goa.error+json :
3859
+ schema :
3860
+ $ref : ' #/components/schemas/error'
3861
+ description : Not Found
3862
+ " 409 " :
3863
+ description : Conflict
3864
+ " 410 " :
3865
+ content :
3866
+ application/vnd.arduino.devicev2.otaupload+json :
3867
+ schema :
3868
+ $ref : ' #/components/schemas/error'
3869
+ application/vnd.goa.error+json :
3870
+ schema :
3871
+ $ref : ' #/components/schemas/error'
3872
+ description : Gone
3873
+ " 412 " :
3874
+ content :
3875
+ application/vnd.arduino.devicev2.otaupload+json :
3876
+ schema :
3877
+ $ref : ' #/components/schemas/error'
3878
+ application/vnd.goa.error+json :
3879
+ schema :
3880
+ $ref : ' #/components/schemas/error'
3881
+ description : Precondition Failed
3882
+ " 500 " :
3883
+ content :
3884
+ application/vnd.arduino.devicev2.otaupload+json :
3885
+ schema :
3886
+ $ref : ' #/components/schemas/error'
3887
+ application/vnd.goa.error+json :
3888
+ schema :
3889
+ $ref : ' #/components/schemas/error'
3890
+ description : Internal Server Error
3891
+ security :
3892
+ - oauth2 : []
3893
+ summary : upload devices_v2_ota
3894
+ tags :
3895
+ - devices_v2_ota
3896
+ put :
3897
+ description : Send a binary url to a device
3898
+ operationId : devices_v2_ota#send
3899
+ parameters :
3900
+ - description : The id of the device
3901
+ in : path
3902
+ name : id
3903
+ required : true
3904
+ schema :
3905
+ type : string
3906
+ requestBody :
3907
+ content :
3908
+ application/json :
3909
+ schema :
3910
+ $ref : ' #/components/schemas/devicev2.otabinaryurl'
3911
+ application/x-www-form-urlencoded :
3912
+ schema :
3913
+ $ref : ' #/components/schemas/devicev2.otabinaryurl'
3914
+ required : true
3915
+ x-originalParamName : payload
3784
3916
responses :
3785
3917
" 200 " :
3786
3918
description : OK
@@ -3835,12 +3967,13 @@ paths:
3835
3967
description : Internal Server Error
3836
3968
security :
3837
3969
- oauth2 : []
3838
- summary : upload devices_v2_ota
3970
+ summary : send devices_v2_ota
3839
3971
tags :
3840
3972
- devices_v2_ota
3841
- put :
3842
- description : Send a binary url to a device
3843
- operationId : devices_v2_ota#send
3973
+ /v2/devices/{id}/ota/url :
3974
+ post :
3975
+ description : Generate a url for downloading a binary
3976
+ operationId : devices_v2_ota#url
3844
3977
parameters :
3845
3978
- description : The id of the device
3846
3979
in : path
@@ -3852,10 +3985,10 @@ paths:
3852
3985
content :
3853
3986
application/json :
3854
3987
schema :
3855
- $ref : ' #/components/schemas/devicev2.otabinaryurl '
3988
+ $ref : ' #/components/schemas/devicev2.otaurlpyalod '
3856
3989
application/x-www-form-urlencoded :
3857
3990
schema :
3858
- $ref : ' #/components/schemas/devicev2.otabinaryurl '
3991
+ $ref : ' #/components/schemas/devicev2.otaurlpyalod '
3859
3992
required : true
3860
3993
x-originalParamName : payload
3861
3994
responses :
@@ -3912,7 +4045,7 @@ paths:
3912
4045
description : Internal Server Error
3913
4046
security :
3914
4047
- oauth2 : []
3915
- summary : send devices_v2_ota
4048
+ summary : url devices_v2_ota
3916
4049
tags :
3917
4050
- devices_v2_ota
3918
4051
/v2/devices/{id}/pass :
0 commit comments