my_john_deere_api 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +813 -0
- data/Rakefile +9 -0
- data/lib/my_john_deere_api.rb +17 -0
- data/lib/my_john_deere_api/authorize.rb +69 -0
- data/lib/my_john_deere_api/client.rb +151 -0
- data/lib/my_john_deere_api/consumer.rb +90 -0
- data/lib/my_john_deere_api/errors.rb +7 -0
- data/lib/my_john_deere_api/errors/invalid_record_error.rb +29 -0
- data/lib/my_john_deere_api/errors/missing_contribution_definition_id_error.rb +12 -0
- data/lib/my_john_deere_api/errors/not_yet_implemented_error.rb +12 -0
- data/lib/my_john_deere_api/errors/type_mismatch_error.rb +12 -0
- data/lib/my_john_deere_api/errors/unsupported_environment_error.rb +18 -0
- data/lib/my_john_deere_api/helpers.rb +6 -0
- data/lib/my_john_deere_api/helpers/case_conversion.rb +37 -0
- data/lib/my_john_deere_api/helpers/environment_helper.rb +25 -0
- data/lib/my_john_deere_api/helpers/uri_helpers.rb +19 -0
- data/lib/my_john_deere_api/helpers/validate_contribution_definition.rb +18 -0
- data/lib/my_john_deere_api/model.rb +10 -0
- data/lib/my_john_deere_api/model/asset.rb +69 -0
- data/lib/my_john_deere_api/model/asset_location.rb +19 -0
- data/lib/my_john_deere_api/model/base.rb +97 -0
- data/lib/my_john_deere_api/model/contribution_definition.rb +15 -0
- data/lib/my_john_deere_api/model/contribution_product.rb +33 -0
- data/lib/my_john_deere_api/model/field.rb +40 -0
- data/lib/my_john_deere_api/model/flag.rb +36 -0
- data/lib/my_john_deere_api/model/organization.rb +43 -0
- 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/request.rb +6 -0
- data/lib/my_john_deere_api/request/collection.rb +10 -0
- data/lib/my_john_deere_api/request/collection/asset_locations.rb +27 -0
- data/lib/my_john_deere_api/request/collection/assets.rb +34 -0
- data/lib/my_john_deere_api/request/collection/base.rb +91 -0
- data/lib/my_john_deere_api/request/collection/contribution_definitions.rb +26 -0
- data/lib/my_john_deere_api/request/collection/contribution_products.rb +26 -0
- data/lib/my_john_deere_api/request/collection/fields.rb +26 -0
- data/lib/my_john_deere_api/request/collection/flags.rb +33 -0
- data/lib/my_john_deere_api/request/collection/organizations.rb +26 -0
- data/lib/my_john_deere_api/request/create.rb +5 -0
- data/lib/my_john_deere_api/request/create/asset.rb +57 -0
- data/lib/my_john_deere_api/request/create/asset_location.rb +110 -0
- data/lib/my_john_deere_api/request/create/base.rb +67 -0
- data/lib/my_john_deere_api/request/individual.rb +8 -0
- data/lib/my_john_deere_api/request/individual/asset.rb +19 -0
- data/lib/my_john_deere_api/request/individual/base.rb +52 -0
- data/lib/my_john_deere_api/request/individual/contribution_definition.rb +19 -0
- data/lib/my_john_deere_api/request/individual/contribution_product.rb +19 -0
- data/lib/my_john_deere_api/request/individual/field.rb +19 -0
- data/lib/my_john_deere_api/request/individual/organization.rb +19 -0
- data/lib/my_john_deere_api/request/update.rb +4 -0
- data/lib/my_john_deere_api/request/update/asset.rb +40 -0
- data/lib/my_john_deere_api/request/update/base.rb +67 -0
- data/lib/my_john_deere_api/validators.rb +5 -0
- data/lib/my_john_deere_api/validators/asset.rb +35 -0
- data/lib/my_john_deere_api/validators/asset_location.rb +34 -0
- data/lib/my_john_deere_api/validators/base.rb +67 -0
- data/lib/my_john_deere_api/version.rb +3 -0
- data/test/lib/my_john_deere_api/authorize_test.rb +81 -0
- data/test/lib/my_john_deere_api/client_test.rb +225 -0
- data/test/lib/my_john_deere_api/consumer_test.rb +58 -0
- data/test/lib/my_john_deere_api/errors/invalid_record_error_test.rb +26 -0
- data/test/lib/my_john_deere_api/errors/max_retries_exceeded_error_test.rb +13 -0
- data/test/lib/my_john_deere_api/errors/missing_contribution_definition_id_error_test.rb +14 -0
- data/test/lib/my_john_deere_api/errors/not_yet_implemented_error_test.rb +13 -0
- data/test/lib/my_john_deere_api/errors/type_mismatch_error_test.rb +13 -0
- data/test/lib/my_john_deere_api/errors/unsupported_environment_error_test.rb +18 -0
- data/test/lib/my_john_deere_api/errors_test.rb +25 -0
- data/test/lib/my_john_deere_api/helpers/case_conversion_test.rb +100 -0
- data/test/lib/my_john_deere_api/helpers/environment_helper_test.rb +67 -0
- data/test/lib/my_john_deere_api/helpers/uri_helpers_test.rb +58 -0
- data/test/lib/my_john_deere_api/helpers/validate_contribution_definition_test.rb +74 -0
- data/test/lib/my_john_deere_api/helpers_test.rb +21 -0
- data/test/lib/my_john_deere_api/model/asset_location_test.rb +38 -0
- data/test/lib/my_john_deere_api/model/asset_test.rb +133 -0
- data/test/lib/my_john_deere_api/model/base_test.rb +76 -0
- data/test/lib/my_john_deere_api/model/contribution_definition_test.rb +52 -0
- data/test/lib/my_john_deere_api/model/contribution_product_test.rb +82 -0
- data/test/lib/my_john_deere_api/model/field_test.rb +65 -0
- data/test/lib/my_john_deere_api/model/flag_test.rb +48 -0
- data/test/lib/my_john_deere_api/model/organization_test.rb +84 -0
- data/test/lib/my_john_deere_api/model_test.rb +37 -0
- data/test/lib/my_john_deere_api/net_http_retry/decorator_test.rb +163 -0
- data/test/lib/my_john_deere_api/request/collection/asset_locations_test.rb +102 -0
- data/test/lib/my_john_deere_api/request/collection/assets_test.rb +99 -0
- data/test/lib/my_john_deere_api/request/collection/base_test.rb +27 -0
- data/test/lib/my_john_deere_api/request/collection/contribution_definitions_test.rb +88 -0
- data/test/lib/my_john_deere_api/request/collection/contribution_products_test.rb +88 -0
- data/test/lib/my_john_deere_api/request/collection/fields_test.rb +86 -0
- data/test/lib/my_john_deere_api/request/collection/flags_test.rb +92 -0
- data/test/lib/my_john_deere_api/request/collection/organizations_test.rb +87 -0
- data/test/lib/my_john_deere_api/request/collection_test.rb +37 -0
- data/test/lib/my_john_deere_api/request/create/asset_location_test.rb +163 -0
- data/test/lib/my_john_deere_api/request/create/asset_test.rb +182 -0
- data/test/lib/my_john_deere_api/request/create/base_test.rb +29 -0
- data/test/lib/my_john_deere_api/request/create_test.rb +17 -0
- data/test/lib/my_john_deere_api/request/individual/asset_test.rb +33 -0
- data/test/lib/my_john_deere_api/request/individual/base_test.rb +18 -0
- data/test/lib/my_john_deere_api/request/individual/contribution_definition_test.rb +33 -0
- data/test/lib/my_john_deere_api/request/individual/contribution_product_test.rb +33 -0
- data/test/lib/my_john_deere_api/request/individual/field_test.rb +37 -0
- data/test/lib/my_john_deere_api/request/individual/organization_test.rb +33 -0
- data/test/lib/my_john_deere_api/request/individual_test.rb +29 -0
- data/test/lib/my_john_deere_api/request/update/asset_test.rb +99 -0
- data/test/lib/my_john_deere_api/request/update/base_test.rb +60 -0
- data/test/lib/my_john_deere_api/request/update_test.rb +13 -0
- data/test/lib/my_john_deere_api/request_test.rb +21 -0
- data/test/lib/my_john_deere_api/validators/asset_location_test.rb +61 -0
- data/test/lib/my_john_deere_api/validators/asset_test.rb +93 -0
- data/test/lib/my_john_deere_api/validators/base_test.rb +92 -0
- data/test/lib/my_john_deere_api/validators_test.rb +17 -0
- data/test/lib/my_john_deere_api/version_test.rb +9 -0
- data/test/my_john_deere_api_test.rb +37 -0
- data/test/support/helper.rb +97 -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
- data/test/support/vcr/catalog.yml +89 -0
- data/test/support/vcr/delete_asset.yml +82 -0
- data/test/support/vcr/get_access_token.yml +41 -0
- data/test/support/vcr/get_asset.yml +144 -0
- data/test/support/vcr/get_asset_locations.yml +196 -0
- data/test/support/vcr/get_assets.yml +152 -0
- data/test/support/vcr/get_contribution_definition.yml +90 -0
- data/test/support/vcr/get_contribution_definitions.yml +91 -0
- data/test/support/vcr/get_contribution_product.yml +91 -0
- data/test/support/vcr/get_contribution_products.yml +91 -0
- data/test/support/vcr/get_field.yml +144 -0
- data/test/support/vcr/get_fields.yml +146 -0
- data/test/support/vcr/get_flags.yml +47 -0
- data/test/support/vcr/get_organization.yml +90 -0
- data/test/support/vcr/get_organizations.yml +149 -0
- data/test/support/vcr/get_request_token.yml +83 -0
- data/test/support/vcr/post_asset_locations.yml +244 -0
- data/test/support/vcr/post_assets.yml +192 -0
- data/test/support/vcr/put_asset.yml +87 -0
- data/test/support/vcr/warning.txt +28 -0
- data/test/support/vcr_setup.rb +488 -0
- metadata +277 -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
|
+
- '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
|