my_john_deere_api 2.3.3 → 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +236 -3
- data/lib/my_john_deere_api.rb +1 -0
- data/lib/my_john_deere_api/client.rb +13 -3
- data/lib/my_john_deere_api/net_http_retry.rb +2 -0
- data/lib/my_john_deere_api/net_http_retry/decorator.rb +53 -0
- data/lib/my_john_deere_api/net_http_retry/max_retries_exceeded_error.rb +20 -0
- data/lib/my_john_deere_api/version.rb +1 -1
- data/test/lib/my_john_deere_api/client_test.rb +20 -3
- data/test/lib/my_john_deere_api/errors/max_retries_exceeded_error_test.rb +13 -0
- data/test/lib/my_john_deere_api/net_http_retry/decorator_test.rb +163 -0
- data/test/support/helper.rb +1 -0
- data/test/support/vcr/accessor/delete_failed.yml +327 -0
- data/test/support/vcr/accessor/delete_max_failed.yml +615 -0
- data/test/support/vcr/accessor/delete_retry.yml +191 -0
- data/test/support/vcr/accessor/delete_retry_too_soon.yml +191 -0
- data/test/support/vcr/accessor/get_failed.yml +390 -0
- data/test/support/vcr/accessor/get_max_failed.yml +734 -0
- data/test/support/vcr/accessor/get_retry.yml +226 -0
- data/test/support/vcr/accessor/get_retry_too_soon.yml +226 -0
- data/test/support/vcr/accessor/post_failed.yml +417 -0
- data/test/support/vcr/accessor/post_max_failed.yml +785 -0
- data/test/support/vcr/accessor/post_retry.yml +241 -0
- data/test/support/vcr/accessor/post_retry_too_soon.yml +241 -0
- data/test/support/vcr/accessor/put_failed.yml +372 -0
- data/test/support/vcr/accessor/put_max_failed.yml +700 -0
- data/test/support/vcr/accessor/put_retry.yml +216 -0
- data/test/support/vcr/accessor/put_retry_too_soon.yml +216 -0
- metadata +24 -3
@@ -0,0 +1,241 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://sandboxapi.deere.com/platform/organizations/000000/assets
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"title":"Asset Title","assetCategory":"DEVICE","assetType":"SENSOR","assetSubType":"ENVIRONMENTAL","links":[{"@type":"Link","rel":"contributionDefinition","uri":"https://sandboxapi.deere.com/platform/contributionDefinitions/00000000-0000-0000-0000-000000000000"}]}'
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/vnd.deere.axiom.v3+json
|
12
|
+
Content-Type:
|
13
|
+
- application/vnd.deere.axiom.v3+json
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
User-Agent:
|
17
|
+
- OAuth gem v0.5.4
|
18
|
+
Content-Length:
|
19
|
+
- '265'
|
20
|
+
Authorization:
|
21
|
+
- OAuth oauth_body_hash="hObY6LROUn9S1WS8S28eTTfqmWk%3D", oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
|
22
|
+
oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
|
23
|
+
oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
|
24
|
+
oauth_version="1.0"
|
25
|
+
response:
|
26
|
+
status:
|
27
|
+
code: 429
|
28
|
+
message: Too Many Requests
|
29
|
+
headers:
|
30
|
+
Date:
|
31
|
+
- Mon, 10 Feb 2020 17:29:25 GMT
|
32
|
+
Content-Type:
|
33
|
+
- application/vnd.deere.axiom.v3+json
|
34
|
+
X-Deere-Handling-Server:
|
35
|
+
- ip-10-214-45-213
|
36
|
+
X-Frame-Options:
|
37
|
+
- SAMEORIGIN
|
38
|
+
Location:
|
39
|
+
- https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
|
40
|
+
X-Deere-Elapsed-Ms:
|
41
|
+
- '121'
|
42
|
+
Transfer-Encoding:
|
43
|
+
- chunked
|
44
|
+
Retry-After:
|
45
|
+
- '13'
|
46
|
+
body:
|
47
|
+
encoding: ASCII-8BIT
|
48
|
+
string: ''
|
49
|
+
http_version:
|
50
|
+
recorded_at: Mon, 10 Feb 2020 17:29:26 GMT
|
51
|
+
- request:
|
52
|
+
method: post
|
53
|
+
uri: https://sandboxapi.deere.com/platform/organizations/000000/assets
|
54
|
+
body:
|
55
|
+
encoding: UTF-8
|
56
|
+
string: '{"title":"Asset Title","assetCategory":"DEVICE","assetType":"SENSOR","assetSubType":"ENVIRONMENTAL","links":[{"@type":"Link","rel":"contributionDefinition","uri":"https://sandboxapi.deere.com/platform/contributionDefinitions/00000000-0000-0000-0000-000000000000"}]}'
|
57
|
+
headers:
|
58
|
+
Accept:
|
59
|
+
- application/vnd.deere.axiom.v3+json
|
60
|
+
Content-Type:
|
61
|
+
- application/vnd.deere.axiom.v3+json
|
62
|
+
Accept-Encoding:
|
63
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
64
|
+
User-Agent:
|
65
|
+
- OAuth gem v0.5.4
|
66
|
+
Content-Length:
|
67
|
+
- '265'
|
68
|
+
Authorization:
|
69
|
+
- OAuth oauth_body_hash="hObY6LROUn9S1WS8S28eTTfqmWk%3D", oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
|
70
|
+
oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
|
71
|
+
oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
|
72
|
+
oauth_version="1.0"
|
73
|
+
response:
|
74
|
+
status:
|
75
|
+
code: 429
|
76
|
+
message: Too Many Requests
|
77
|
+
headers:
|
78
|
+
Date:
|
79
|
+
- Mon, 10 Feb 2020 17:29:25 GMT
|
80
|
+
Content-Type:
|
81
|
+
- application/vnd.deere.axiom.v3+json
|
82
|
+
X-Deere-Handling-Server:
|
83
|
+
- ip-10-214-45-213
|
84
|
+
X-Frame-Options:
|
85
|
+
- SAMEORIGIN
|
86
|
+
Location:
|
87
|
+
- https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
|
88
|
+
X-Deere-Elapsed-Ms:
|
89
|
+
- '121'
|
90
|
+
Transfer-Encoding:
|
91
|
+
- chunked
|
92
|
+
Retry-After:
|
93
|
+
- '17'
|
94
|
+
body:
|
95
|
+
encoding: ASCII-8BIT
|
96
|
+
string: ''
|
97
|
+
http_version:
|
98
|
+
recorded_at: Mon, 10 Feb 2020 17:29:26 GMT
|
99
|
+
- request:
|
100
|
+
method: post
|
101
|
+
uri: https://sandboxapi.deere.com/platform/organizations/000000/assets
|
102
|
+
body:
|
103
|
+
encoding: UTF-8
|
104
|
+
string: '{"title":"Asset Title","assetCategory":"DEVICE","assetType":"SENSOR","assetSubType":"ENVIRONMENTAL","links":[{"@type":"Link","rel":"contributionDefinition","uri":"https://sandboxapi.deere.com/platform/contributionDefinitions/00000000-0000-0000-0000-000000000000"}]}'
|
105
|
+
headers:
|
106
|
+
Accept:
|
107
|
+
- application/vnd.deere.axiom.v3+json
|
108
|
+
Content-Type:
|
109
|
+
- application/vnd.deere.axiom.v3+json
|
110
|
+
Accept-Encoding:
|
111
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
112
|
+
User-Agent:
|
113
|
+
- OAuth gem v0.5.4
|
114
|
+
Content-Length:
|
115
|
+
- '265'
|
116
|
+
Authorization:
|
117
|
+
- OAuth oauth_body_hash="hObY6LROUn9S1WS8S28eTTfqmWk%3D", oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
|
118
|
+
oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
|
119
|
+
oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
|
120
|
+
oauth_version="1.0"
|
121
|
+
response:
|
122
|
+
status:
|
123
|
+
code: 503
|
124
|
+
message: Service Unavailable
|
125
|
+
headers:
|
126
|
+
Date:
|
127
|
+
- Mon, 10 Feb 2020 17:29:25 GMT
|
128
|
+
Content-Type:
|
129
|
+
- application/vnd.deere.axiom.v3+json
|
130
|
+
X-Deere-Handling-Server:
|
131
|
+
- ip-10-214-45-213
|
132
|
+
X-Frame-Options:
|
133
|
+
- SAMEORIGIN
|
134
|
+
Location:
|
135
|
+
- https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
|
136
|
+
X-Deere-Elapsed-Ms:
|
137
|
+
- '121'
|
138
|
+
Transfer-Encoding:
|
139
|
+
- chunked
|
140
|
+
Retry-After:
|
141
|
+
- '19'
|
142
|
+
body:
|
143
|
+
encoding: ASCII-8BIT
|
144
|
+
string: ''
|
145
|
+
http_version:
|
146
|
+
recorded_at: Mon, 10 Feb 2020 17:29:26 GMT
|
147
|
+
- request:
|
148
|
+
method: post
|
149
|
+
uri: https://sandboxapi.deere.com/platform/organizations/000000/assets
|
150
|
+
body:
|
151
|
+
encoding: UTF-8
|
152
|
+
string: '{"title":"Asset Title","assetCategory":"DEVICE","assetType":"SENSOR","assetSubType":"ENVIRONMENTAL","links":[{"@type":"Link","rel":"contributionDefinition","uri":"https://sandboxapi.deere.com/platform/contributionDefinitions/00000000-0000-0000-0000-000000000000"}]}'
|
153
|
+
headers:
|
154
|
+
Accept:
|
155
|
+
- application/vnd.deere.axiom.v3+json
|
156
|
+
Content-Type:
|
157
|
+
- application/vnd.deere.axiom.v3+json
|
158
|
+
Accept-Encoding:
|
159
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
160
|
+
User-Agent:
|
161
|
+
- OAuth gem v0.5.4
|
162
|
+
Content-Length:
|
163
|
+
- '265'
|
164
|
+
Authorization:
|
165
|
+
- OAuth oauth_body_hash="hObY6LROUn9S1WS8S28eTTfqmWk%3D", oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
|
166
|
+
oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
|
167
|
+
oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
|
168
|
+
oauth_version="1.0"
|
169
|
+
response:
|
170
|
+
status:
|
171
|
+
code: 503
|
172
|
+
message: Service Unavailable
|
173
|
+
headers:
|
174
|
+
Date:
|
175
|
+
- Mon, 10 Feb 2020 17:29:25 GMT
|
176
|
+
Content-Type:
|
177
|
+
- application/vnd.deere.axiom.v3+json
|
178
|
+
X-Deere-Handling-Server:
|
179
|
+
- ip-10-214-45-213
|
180
|
+
X-Frame-Options:
|
181
|
+
- SAMEORIGIN
|
182
|
+
Location:
|
183
|
+
- https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
|
184
|
+
X-Deere-Elapsed-Ms:
|
185
|
+
- '121'
|
186
|
+
Transfer-Encoding:
|
187
|
+
- chunked
|
188
|
+
Retry-After:
|
189
|
+
- '23'
|
190
|
+
body:
|
191
|
+
encoding: ASCII-8BIT
|
192
|
+
string: ''
|
193
|
+
http_version:
|
194
|
+
recorded_at: Mon, 10 Feb 2020 17:29:26 GMT
|
195
|
+
- request:
|
196
|
+
method: post
|
197
|
+
uri: https://sandboxapi.deere.com/platform/organizations/000000/assets
|
198
|
+
body:
|
199
|
+
encoding: UTF-8
|
200
|
+
string: '{"title":"Asset Title","assetCategory":"DEVICE","assetType":"SENSOR","assetSubType":"ENVIRONMENTAL","links":[{"@type":"Link","rel":"contributionDefinition","uri":"https://sandboxapi.deere.com/platform/contributionDefinitions/00000000-0000-0000-0000-000000000000"}]}'
|
201
|
+
headers:
|
202
|
+
Accept:
|
203
|
+
- application/vnd.deere.axiom.v3+json
|
204
|
+
Content-Type:
|
205
|
+
- application/vnd.deere.axiom.v3+json
|
206
|
+
Accept-Encoding:
|
207
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
208
|
+
User-Agent:
|
209
|
+
- OAuth gem v0.5.4
|
210
|
+
Content-Length:
|
211
|
+
- '265'
|
212
|
+
Authorization:
|
213
|
+
- OAuth oauth_body_hash="hObY6LROUn9S1WS8S28eTTfqmWk%3D", oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
|
214
|
+
oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
|
215
|
+
oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
|
216
|
+
oauth_version="1.0"
|
217
|
+
response:
|
218
|
+
status:
|
219
|
+
code: 201
|
220
|
+
message: Created
|
221
|
+
headers:
|
222
|
+
Date:
|
223
|
+
- Mon, 10 Feb 2020 17:29:25 GMT
|
224
|
+
Content-Type:
|
225
|
+
- application/vnd.deere.axiom.v3+json
|
226
|
+
X-Deere-Handling-Server:
|
227
|
+
- ip-10-214-45-213
|
228
|
+
X-Frame-Options:
|
229
|
+
- SAMEORIGIN
|
230
|
+
Location:
|
231
|
+
- https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
|
232
|
+
X-Deere-Elapsed-Ms:
|
233
|
+
- '121'
|
234
|
+
Transfer-Encoding:
|
235
|
+
- chunked
|
236
|
+
body:
|
237
|
+
encoding: ASCII-8BIT
|
238
|
+
string: ''
|
239
|
+
http_version:
|
240
|
+
recorded_at: Mon, 10 Feb 2020 17:29:26 GMT
|
241
|
+
recorded_with: VCR 5.0.0
|
@@ -0,0 +1,241 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://sandboxapi.deere.com/platform/organizations/000000/assets
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"title":"Asset Title","assetCategory":"DEVICE","assetType":"SENSOR","assetSubType":"ENVIRONMENTAL","links":[{"@type":"Link","rel":"contributionDefinition","uri":"https://sandboxapi.deere.com/platform/contributionDefinitions/00000000-0000-0000-0000-000000000000"}]}'
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/vnd.deere.axiom.v3+json
|
12
|
+
Content-Type:
|
13
|
+
- application/vnd.deere.axiom.v3+json
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
User-Agent:
|
17
|
+
- OAuth gem v0.5.4
|
18
|
+
Content-Length:
|
19
|
+
- '265'
|
20
|
+
Authorization:
|
21
|
+
- OAuth oauth_body_hash="hObY6LROUn9S1WS8S28eTTfqmWk%3D", oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
|
22
|
+
oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
|
23
|
+
oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
|
24
|
+
oauth_version="1.0"
|
25
|
+
response:
|
26
|
+
status:
|
27
|
+
code: 429
|
28
|
+
message: Too Many Requests
|
29
|
+
headers:
|
30
|
+
Date:
|
31
|
+
- Mon, 10 Feb 2020 17:29:25 GMT
|
32
|
+
Content-Type:
|
33
|
+
- application/vnd.deere.axiom.v3+json
|
34
|
+
X-Deere-Handling-Server:
|
35
|
+
- ip-10-214-45-213
|
36
|
+
X-Frame-Options:
|
37
|
+
- SAMEORIGIN
|
38
|
+
Location:
|
39
|
+
- https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
|
40
|
+
X-Deere-Elapsed-Ms:
|
41
|
+
- '121'
|
42
|
+
Transfer-Encoding:
|
43
|
+
- chunked
|
44
|
+
Retry-After:
|
45
|
+
- '0'
|
46
|
+
body:
|
47
|
+
encoding: ASCII-8BIT
|
48
|
+
string: ''
|
49
|
+
http_version:
|
50
|
+
recorded_at: Mon, 10 Feb 2020 17:29:26 GMT
|
51
|
+
- request:
|
52
|
+
method: post
|
53
|
+
uri: https://sandboxapi.deere.com/platform/organizations/000000/assets
|
54
|
+
body:
|
55
|
+
encoding: UTF-8
|
56
|
+
string: '{"title":"Asset Title","assetCategory":"DEVICE","assetType":"SENSOR","assetSubType":"ENVIRONMENTAL","links":[{"@type":"Link","rel":"contributionDefinition","uri":"https://sandboxapi.deere.com/platform/contributionDefinitions/00000000-0000-0000-0000-000000000000"}]}'
|
57
|
+
headers:
|
58
|
+
Accept:
|
59
|
+
- application/vnd.deere.axiom.v3+json
|
60
|
+
Content-Type:
|
61
|
+
- application/vnd.deere.axiom.v3+json
|
62
|
+
Accept-Encoding:
|
63
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
64
|
+
User-Agent:
|
65
|
+
- OAuth gem v0.5.4
|
66
|
+
Content-Length:
|
67
|
+
- '265'
|
68
|
+
Authorization:
|
69
|
+
- OAuth oauth_body_hash="hObY6LROUn9S1WS8S28eTTfqmWk%3D", oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
|
70
|
+
oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
|
71
|
+
oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
|
72
|
+
oauth_version="1.0"
|
73
|
+
response:
|
74
|
+
status:
|
75
|
+
code: 429
|
76
|
+
message: Too Many Requests
|
77
|
+
headers:
|
78
|
+
Date:
|
79
|
+
- Mon, 10 Feb 2020 17:29:25 GMT
|
80
|
+
Content-Type:
|
81
|
+
- application/vnd.deere.axiom.v3+json
|
82
|
+
X-Deere-Handling-Server:
|
83
|
+
- ip-10-214-45-213
|
84
|
+
X-Frame-Options:
|
85
|
+
- SAMEORIGIN
|
86
|
+
Location:
|
87
|
+
- https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
|
88
|
+
X-Deere-Elapsed-Ms:
|
89
|
+
- '121'
|
90
|
+
Transfer-Encoding:
|
91
|
+
- chunked
|
92
|
+
Retry-After:
|
93
|
+
- '1'
|
94
|
+
body:
|
95
|
+
encoding: ASCII-8BIT
|
96
|
+
string: ''
|
97
|
+
http_version:
|
98
|
+
recorded_at: Mon, 10 Feb 2020 17:29:26 GMT
|
99
|
+
- request:
|
100
|
+
method: post
|
101
|
+
uri: https://sandboxapi.deere.com/platform/organizations/000000/assets
|
102
|
+
body:
|
103
|
+
encoding: UTF-8
|
104
|
+
string: '{"title":"Asset Title","assetCategory":"DEVICE","assetType":"SENSOR","assetSubType":"ENVIRONMENTAL","links":[{"@type":"Link","rel":"contributionDefinition","uri":"https://sandboxapi.deere.com/platform/contributionDefinitions/00000000-0000-0000-0000-000000000000"}]}'
|
105
|
+
headers:
|
106
|
+
Accept:
|
107
|
+
- application/vnd.deere.axiom.v3+json
|
108
|
+
Content-Type:
|
109
|
+
- application/vnd.deere.axiom.v3+json
|
110
|
+
Accept-Encoding:
|
111
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
112
|
+
User-Agent:
|
113
|
+
- OAuth gem v0.5.4
|
114
|
+
Content-Length:
|
115
|
+
- '265'
|
116
|
+
Authorization:
|
117
|
+
- OAuth oauth_body_hash="hObY6LROUn9S1WS8S28eTTfqmWk%3D", oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
|
118
|
+
oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
|
119
|
+
oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
|
120
|
+
oauth_version="1.0"
|
121
|
+
response:
|
122
|
+
status:
|
123
|
+
code: 503
|
124
|
+
message: Service Unavailable
|
125
|
+
headers:
|
126
|
+
Date:
|
127
|
+
- Mon, 10 Feb 2020 17:29:25 GMT
|
128
|
+
Content-Type:
|
129
|
+
- application/vnd.deere.axiom.v3+json
|
130
|
+
X-Deere-Handling-Server:
|
131
|
+
- ip-10-214-45-213
|
132
|
+
X-Frame-Options:
|
133
|
+
- SAMEORIGIN
|
134
|
+
Location:
|
135
|
+
- https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
|
136
|
+
X-Deere-Elapsed-Ms:
|
137
|
+
- '121'
|
138
|
+
Transfer-Encoding:
|
139
|
+
- chunked
|
140
|
+
Retry-After:
|
141
|
+
- '2'
|
142
|
+
body:
|
143
|
+
encoding: ASCII-8BIT
|
144
|
+
string: ''
|
145
|
+
http_version:
|
146
|
+
recorded_at: Mon, 10 Feb 2020 17:29:26 GMT
|
147
|
+
- request:
|
148
|
+
method: post
|
149
|
+
uri: https://sandboxapi.deere.com/platform/organizations/000000/assets
|
150
|
+
body:
|
151
|
+
encoding: UTF-8
|
152
|
+
string: '{"title":"Asset Title","assetCategory":"DEVICE","assetType":"SENSOR","assetSubType":"ENVIRONMENTAL","links":[{"@type":"Link","rel":"contributionDefinition","uri":"https://sandboxapi.deere.com/platform/contributionDefinitions/00000000-0000-0000-0000-000000000000"}]}'
|
153
|
+
headers:
|
154
|
+
Accept:
|
155
|
+
- application/vnd.deere.axiom.v3+json
|
156
|
+
Content-Type:
|
157
|
+
- application/vnd.deere.axiom.v3+json
|
158
|
+
Accept-Encoding:
|
159
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
160
|
+
User-Agent:
|
161
|
+
- OAuth gem v0.5.4
|
162
|
+
Content-Length:
|
163
|
+
- '265'
|
164
|
+
Authorization:
|
165
|
+
- OAuth oauth_body_hash="hObY6LROUn9S1WS8S28eTTfqmWk%3D", oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
|
166
|
+
oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
|
167
|
+
oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
|
168
|
+
oauth_version="1.0"
|
169
|
+
response:
|
170
|
+
status:
|
171
|
+
code: 503
|
172
|
+
message: Service Unavailable
|
173
|
+
headers:
|
174
|
+
Date:
|
175
|
+
- Mon, 10 Feb 2020 17:29:25 GMT
|
176
|
+
Content-Type:
|
177
|
+
- application/vnd.deere.axiom.v3+json
|
178
|
+
X-Deere-Handling-Server:
|
179
|
+
- ip-10-214-45-213
|
180
|
+
X-Frame-Options:
|
181
|
+
- SAMEORIGIN
|
182
|
+
Location:
|
183
|
+
- https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
|
184
|
+
X-Deere-Elapsed-Ms:
|
185
|
+
- '121'
|
186
|
+
Transfer-Encoding:
|
187
|
+
- chunked
|
188
|
+
Retry-After:
|
189
|
+
- '3'
|
190
|
+
body:
|
191
|
+
encoding: ASCII-8BIT
|
192
|
+
string: ''
|
193
|
+
http_version:
|
194
|
+
recorded_at: Mon, 10 Feb 2020 17:29:26 GMT
|
195
|
+
- request:
|
196
|
+
method: post
|
197
|
+
uri: https://sandboxapi.deere.com/platform/organizations/000000/assets
|
198
|
+
body:
|
199
|
+
encoding: UTF-8
|
200
|
+
string: '{"title":"Asset Title","assetCategory":"DEVICE","assetType":"SENSOR","assetSubType":"ENVIRONMENTAL","links":[{"@type":"Link","rel":"contributionDefinition","uri":"https://sandboxapi.deere.com/platform/contributionDefinitions/00000000-0000-0000-0000-000000000000"}]}'
|
201
|
+
headers:
|
202
|
+
Accept:
|
203
|
+
- application/vnd.deere.axiom.v3+json
|
204
|
+
Content-Type:
|
205
|
+
- application/vnd.deere.axiom.v3+json
|
206
|
+
Accept-Encoding:
|
207
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
208
|
+
User-Agent:
|
209
|
+
- OAuth gem v0.5.4
|
210
|
+
Content-Length:
|
211
|
+
- '265'
|
212
|
+
Authorization:
|
213
|
+
- OAuth oauth_body_hash="hObY6LROUn9S1WS8S28eTTfqmWk%3D", oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
|
214
|
+
oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
|
215
|
+
oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
|
216
|
+
oauth_version="1.0"
|
217
|
+
response:
|
218
|
+
status:
|
219
|
+
code: 201
|
220
|
+
message: Created
|
221
|
+
headers:
|
222
|
+
Date:
|
223
|
+
- Mon, 10 Feb 2020 17:29:25 GMT
|
224
|
+
Content-Type:
|
225
|
+
- application/vnd.deere.axiom.v3+json
|
226
|
+
X-Deere-Handling-Server:
|
227
|
+
- ip-10-214-45-213
|
228
|
+
X-Frame-Options:
|
229
|
+
- SAMEORIGIN
|
230
|
+
Location:
|
231
|
+
- https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
|
232
|
+
X-Deere-Elapsed-Ms:
|
233
|
+
- '121'
|
234
|
+
Transfer-Encoding:
|
235
|
+
- chunked
|
236
|
+
body:
|
237
|
+
encoding: ASCII-8BIT
|
238
|
+
string: ''
|
239
|
+
http_version:
|
240
|
+
recorded_at: Mon, 10 Feb 2020 17:29:26 GMT
|
241
|
+
recorded_with: VCR 5.0.0
|