ultradns-sdk 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +22 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/LICENSE +201 -0
- data/README.md +44 -0
- data/Rakefile +11 -0
- data/lib/ultradns.rb +11 -0
- data/lib/ultradns/api/account.rb +52 -0
- data/lib/ultradns/api/authentication.rb +107 -0
- data/lib/ultradns/api/client_accessor.rb +23 -0
- data/lib/ultradns/api/rrset.rb +112 -0
- data/lib/ultradns/api/zone.rb +137 -0
- data/lib/ultradns/client.rb +185 -0
- data/lib/ultradns/version.rb +9 -0
- data/test/fixtures/vcr_cassettes/test_account_related_apis.yml +166 -0
- data/test/fixtures/vcr_cassettes/test_auth.yml +166 -0
- data/test/fixtures/vcr_cassettes/test_auth_failure.yml +163 -0
- data/test/fixtures/vcr_cassettes/test_basic_client_apis.yml +124 -0
- data/test/fixtures/vcr_cassettes/test_tasks_list.yml +83 -0
- data/test/fixtures/vcr_cassettes/test_zone_apis.yml +124 -0
- data/test/fixtures/vcr_cassettes/test_zone_rrsets_apis.yml +546 -0
- data/test/test_authentication.rb +39 -0
- data/test/test_client_api.rb +131 -0
- data/test/test_helper.rb +54 -0
- data/ultradns-sdk.gemspec +32 -0
- metadata +191 -0
@@ -0,0 +1,9 @@
|
|
1
|
+
# Copyright 2000-2014 NeuStar, Inc. All rights reserved.
|
2
|
+
# NeuStar, the Neustar logo and related names and logos are registered
|
3
|
+
# trademarks, service marks or tradenames of NeuStar, Inc. All other
|
4
|
+
# product names, company names, marks, logos and symbols may be trademarks
|
5
|
+
# of their respective owners.
|
6
|
+
|
7
|
+
module Ultradns
|
8
|
+
VERSION = "0.0.2"
|
9
|
+
end
|
@@ -0,0 +1,166 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://restapi.ultradns.com/v1/authorization/token
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: grant_type=password&password=SECRET&username=jdamick
|
9
|
+
headers:
|
10
|
+
accept:
|
11
|
+
- application/json
|
12
|
+
content-type:
|
13
|
+
- application/x-www-form-urlencoded
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message: OK
|
18
|
+
headers:
|
19
|
+
access-control-allow-credentials:
|
20
|
+
- 'true'
|
21
|
+
access-control-allow-headers:
|
22
|
+
- Origin, X-Requested-With, Content-Type, Accept, Authorization
|
23
|
+
access-control-allow-methods:
|
24
|
+
- POST, GET, OPTIONS, DELETE, PUT, PATCH
|
25
|
+
access-control-allow-origin:
|
26
|
+
- "*"
|
27
|
+
access-control-max-age:
|
28
|
+
- '3600'
|
29
|
+
content-type:
|
30
|
+
- application/json
|
31
|
+
date:
|
32
|
+
- Mon, 28 Jul 2014 13:35:28 GMT
|
33
|
+
transfer-encoding:
|
34
|
+
- chunked
|
35
|
+
connection:
|
36
|
+
- Close
|
37
|
+
body:
|
38
|
+
encoding: UTF-8
|
39
|
+
string: '{"tokenType":"","refreshToken":"d83cd240a91043a6a77c87a5e46a784c","accessToken":"dd5782456bd640cbababeb8c50e982ba","expiresIn":""}'
|
40
|
+
http_version: '1.1'
|
41
|
+
recorded_at: Mon, 28 Jul 2014 13:35:28 GMT
|
42
|
+
- request:
|
43
|
+
method: get
|
44
|
+
uri: https://restapi.ultradns.com/v1/accounts
|
45
|
+
body:
|
46
|
+
encoding: US-ASCII
|
47
|
+
string: ''
|
48
|
+
headers:
|
49
|
+
accept:
|
50
|
+
- application/json
|
51
|
+
content-type:
|
52
|
+
- application/json
|
53
|
+
authorization:
|
54
|
+
- Bearer dd5782456bd640cbababeb8c50e982ba
|
55
|
+
response:
|
56
|
+
status:
|
57
|
+
code: 200
|
58
|
+
message: OK
|
59
|
+
headers:
|
60
|
+
access-control-allow-credentials:
|
61
|
+
- 'true'
|
62
|
+
access-control-allow-headers:
|
63
|
+
- Origin, X-Requested-With, Content-Type, Accept, Authorization
|
64
|
+
access-control-allow-methods:
|
65
|
+
- POST, GET, OPTIONS, DELETE, PUT, PATCH
|
66
|
+
access-control-allow-origin:
|
67
|
+
- "*"
|
68
|
+
access-control-max-age:
|
69
|
+
- '3600'
|
70
|
+
content-type:
|
71
|
+
- application/json
|
72
|
+
date:
|
73
|
+
- Mon, 28 Jul 2014 13:35:28 GMT
|
74
|
+
transfer-encoding:
|
75
|
+
- chunked
|
76
|
+
connection:
|
77
|
+
- Close
|
78
|
+
body:
|
79
|
+
encoding: UTF-8
|
80
|
+
string: '{"resultInfo":{"totalCount":1,"offset":0,"returnedCount":1},"accounts":[{"accountName":"jdamick","accountHolderUserName":"Neustar
|
81
|
+
Dev","ownerUserName":"jdamick","numberOfUsers":12,"numberOfGroups":9,"accountType":"ORGANIZATION"}]}'
|
82
|
+
http_version: '1.1'
|
83
|
+
recorded_at: Mon, 28 Jul 2014 13:35:28 GMT
|
84
|
+
- request:
|
85
|
+
method: get
|
86
|
+
uri: https://restapi.ultradns.com/v1/accounts/jdamick/zones
|
87
|
+
body:
|
88
|
+
encoding: US-ASCII
|
89
|
+
string: ''
|
90
|
+
headers:
|
91
|
+
accept:
|
92
|
+
- application/json
|
93
|
+
content-type:
|
94
|
+
- application/json
|
95
|
+
authorization:
|
96
|
+
- Bearer dd5782456bd640cbababeb8c50e982ba
|
97
|
+
response:
|
98
|
+
status:
|
99
|
+
code: 200
|
100
|
+
message: OK
|
101
|
+
headers:
|
102
|
+
access-control-allow-credentials:
|
103
|
+
- 'true'
|
104
|
+
access-control-allow-headers:
|
105
|
+
- Origin, X-Requested-With, Content-Type, Accept, Authorization
|
106
|
+
access-control-allow-methods:
|
107
|
+
- POST, GET, OPTIONS, DELETE, PUT, PATCH
|
108
|
+
access-control-allow-origin:
|
109
|
+
- "*"
|
110
|
+
access-control-max-age:
|
111
|
+
- '3600'
|
112
|
+
content-type:
|
113
|
+
- application/json
|
114
|
+
date:
|
115
|
+
- Mon, 28 Jul 2014 13:35:28 GMT
|
116
|
+
transfer-encoding:
|
117
|
+
- chunked
|
118
|
+
connection:
|
119
|
+
- Close
|
120
|
+
body:
|
121
|
+
encoding: UTF-8
|
122
|
+
string: '{"queryInfo":{"sort":"NAME","reverse":false,"limit":100},"resultInfo":{"totalCount":6,"offset":0,"returnedCount":6},"zones":[{"properties":{"name":"directorysearch.nexgen.neustar.biz.","accountName":"jdamick","type":"PRIMARY","dnssecStatus":"UNSIGNED","status":"ACTIVE","owner":"dbradley2","resourceRecordCount":7,"lastModifiedDateTime":"2013-12-12T15:59Z"},"registrarInfo":{"nameServers":{"ok":["pdns1.ultradns.net.","pdns2.ultradns.net.","pdns3.ultradns.org.","pdns4.ultradns.org.","pdns5.ultradns.info.","pdns6.ultradns.co.uk."]}}},{"properties":{"name":"nexgen.neustar.biz.","accountName":"jdamick","type":"PRIMARY","dnssecStatus":"UNSIGNED","status":"ACTIVE","owner":"jdamick","resourceRecordCount":1480,"lastModifiedDateTime":"2014-07-15T11:24Z"},"registrarInfo":{"nameServers":{"ok":["pdns1.ultradns.net.","pdns2.ultradns.net.","pdns3.ultradns.org.","pdns4.ultradns.org.","pdns5.ultradns.info.","pdns6.ultradns.co.uk."]}}},{"properties":{"name":"nexgen.ultradns.net.","accountName":"jdamick","type":"PRIMARY","dnssecStatus":"UNSIGNED","status":"ACTIVE","owner":"jdamick","resourceRecordCount":8,"lastModifiedDateTime":"2012-04-04T19:38Z"},"registrarInfo":{"nameServers":{"ok":["pdns1.ultradns.net.","pdns2.ultradns.net.","pdns3.ultradns.org.","pdns4.ultradns.org.","pdns5.ultradns.info.","pdns6.ultradns.co.uk."]}}},{"properties":{"name":"pdp.neustar.biz.","accountName":"jdamick","type":"PRIMARY","dnssecStatus":"UNSIGNED","status":"ACTIVE","owner":"jdamick","resourceRecordCount":8,"lastModifiedDateTime":"2014-07-22T19:40Z"},"registrarInfo":{"nameServers":{"ok":["pdns1.ultradns.net.","pdns2.ultradns.net.","pdns3.ultradns.org.","pdns4.ultradns.org.","pdns5.ultradns.info.","pdns6.ultradns.co.uk."]}}},{"properties":{"name":"splunk.nexgen.neustar.biz.","accountName":"jdamick","type":"PRIMARY","dnssecStatus":"UNSIGNED","status":"ACTIVE","owner":"dbradley2","resourceRecordCount":7,"lastModifiedDateTime":"2013-09-13T18:18Z"},"registrarInfo":{"nameServers":{"unknown":["chns2.nc.neustar.com.","stns1.va.neustar.com.","stns2.va.neustar.com.","chifbprns1.nc.neustar.com.","stifbprns1.va.neustar.com.","chns1.nc.neustar.com."],"missing":["pdns1.ultradns.net.","pdns2.ultradns.net.","pdns3.ultradns.org.","pdns4.ultradns.org.","pdns5.ultradns.info.","pdns6.ultradns.co.uk."]}}},{"properties":{"name":"ultradns.nexgen.neustar.biz.","accountName":"jdamick","type":"PRIMARY","dnssecStatus":"UNSIGNED","status":"ACTIVE","owner":"dbradley2","resourceRecordCount":7,"lastModifiedDateTime":"2013-09-16T14:44Z"},"registrarInfo":{"nameServers":{"ok":["pdns1.ultradns.net.","pdns2.ultradns.net.","pdns3.ultradns.org.","pdns4.ultradns.org.","pdns5.ultradns.info.","pdns6.ultradns.co.uk."]}}}]}'
|
123
|
+
http_version: '1.1'
|
124
|
+
recorded_at: Mon, 28 Jul 2014 13:35:28 GMT
|
125
|
+
- request:
|
126
|
+
method: get
|
127
|
+
uri: https://restapi.ultradns.com/v1/accounts/jdamick/users
|
128
|
+
body:
|
129
|
+
encoding: US-ASCII
|
130
|
+
string: ''
|
131
|
+
headers:
|
132
|
+
accept:
|
133
|
+
- application/json
|
134
|
+
content-type:
|
135
|
+
- application/json
|
136
|
+
authorization:
|
137
|
+
- Bearer dd5782456bd640cbababeb8c50e982ba
|
138
|
+
response:
|
139
|
+
status:
|
140
|
+
code: 200
|
141
|
+
message: OK
|
142
|
+
headers:
|
143
|
+
access-control-allow-credentials:
|
144
|
+
- 'true'
|
145
|
+
access-control-allow-headers:
|
146
|
+
- Origin, X-Requested-With, Content-Type, Accept, Authorization
|
147
|
+
access-control-allow-methods:
|
148
|
+
- POST, GET, OPTIONS, DELETE, PUT, PATCH
|
149
|
+
access-control-allow-origin:
|
150
|
+
- "*"
|
151
|
+
access-control-max-age:
|
152
|
+
- '3600'
|
153
|
+
content-type:
|
154
|
+
- application/json
|
155
|
+
date:
|
156
|
+
- Mon, 28 Jul 2014 13:35:29 GMT
|
157
|
+
transfer-encoding:
|
158
|
+
- chunked
|
159
|
+
connection:
|
160
|
+
- Close
|
161
|
+
body:
|
162
|
+
encoding: UTF-8
|
163
|
+
string: '{"resultInfo":{"totalCount":1,"offset":0,"returnedCount":1},"users":[{"userName":"jdamick","firstName":"Jeffrey","lastName":"Damick"}]}'
|
164
|
+
http_version: '1.1'
|
165
|
+
recorded_at: Mon, 28 Jul 2014 13:35:29 GMT
|
166
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,166 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://restapi.ultradns.com/v1/authorization/token
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: grant_type=password&password=SECRET&username=jdamick
|
9
|
+
headers:
|
10
|
+
accept:
|
11
|
+
- application/json
|
12
|
+
content-type:
|
13
|
+
- application/x-www-form-urlencoded
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message: OK
|
18
|
+
headers:
|
19
|
+
access-control-allow-credentials:
|
20
|
+
- 'true'
|
21
|
+
access-control-allow-headers:
|
22
|
+
- Origin, X-Requested-With, Content-Type, Accept, Authorization
|
23
|
+
access-control-allow-methods:
|
24
|
+
- POST, GET, OPTIONS, DELETE, PUT, PATCH
|
25
|
+
access-control-allow-origin:
|
26
|
+
- "*"
|
27
|
+
access-control-max-age:
|
28
|
+
- '3600'
|
29
|
+
content-type:
|
30
|
+
- application/json
|
31
|
+
date:
|
32
|
+
- Mon, 28 Jul 2014 02:15:04 GMT
|
33
|
+
transfer-encoding:
|
34
|
+
- chunked
|
35
|
+
connection:
|
36
|
+
- Close
|
37
|
+
body:
|
38
|
+
encoding: UTF-8
|
39
|
+
string: '{"tokenType":"","refreshToken":"c7e1db9111084e73a701857530f865d4","accessToken":"6b012bcc854243858b50c60cf3569777","expiresIn":""}'
|
40
|
+
http_version: '1.1'
|
41
|
+
recorded_at: Mon, 28 Jul 2014 02:15:04 GMT
|
42
|
+
- request:
|
43
|
+
method: get
|
44
|
+
uri: https://restapi.ultradns.com/v1/accounts/jdamick/zones
|
45
|
+
body:
|
46
|
+
encoding: US-ASCII
|
47
|
+
string: ''
|
48
|
+
headers:
|
49
|
+
accept:
|
50
|
+
- application/json
|
51
|
+
content-type:
|
52
|
+
- application/json
|
53
|
+
authorization:
|
54
|
+
- Bearer 6b012bcc854243858b50c60cf3569777
|
55
|
+
response:
|
56
|
+
status:
|
57
|
+
code: 200
|
58
|
+
message: OK
|
59
|
+
headers:
|
60
|
+
access-control-allow-credentials:
|
61
|
+
- 'true'
|
62
|
+
access-control-allow-headers:
|
63
|
+
- Origin, X-Requested-With, Content-Type, Accept, Authorization
|
64
|
+
access-control-allow-methods:
|
65
|
+
- POST, GET, OPTIONS, DELETE, PUT, PATCH
|
66
|
+
access-control-allow-origin:
|
67
|
+
- "*"
|
68
|
+
access-control-max-age:
|
69
|
+
- '3600'
|
70
|
+
content-type:
|
71
|
+
- application/json
|
72
|
+
date:
|
73
|
+
- Mon, 28 Jul 2014 02:15:04 GMT
|
74
|
+
transfer-encoding:
|
75
|
+
- chunked
|
76
|
+
connection:
|
77
|
+
- Close
|
78
|
+
body:
|
79
|
+
encoding: UTF-8
|
80
|
+
string: '{"queryInfo":{"sort":"NAME","reverse":false,"limit":100},"resultInfo":{"totalCount":6,"offset":0,"returnedCount":6},"zones":[{"properties":{"name":"directorysearch.nexgen.neustar.biz.","accountName":"jdamick","type":"PRIMARY","dnssecStatus":"UNSIGNED","status":"ACTIVE","owner":"dbradley2","resourceRecordCount":7,"lastModifiedDateTime":"2013-12-12T15:59Z"},"registrarInfo":{"nameServers":{"ok":["pdns1.ultradns.net.","pdns2.ultradns.net.","pdns3.ultradns.org.","pdns4.ultradns.org.","pdns5.ultradns.info.","pdns6.ultradns.co.uk."]}}},{"properties":{"name":"nexgen.neustar.biz.","accountName":"jdamick","type":"PRIMARY","dnssecStatus":"UNSIGNED","status":"ACTIVE","owner":"jdamick","resourceRecordCount":1480,"lastModifiedDateTime":"2014-07-15T11:24Z"},"registrarInfo":{"nameServers":{"ok":["pdns1.ultradns.net.","pdns2.ultradns.net.","pdns3.ultradns.org.","pdns4.ultradns.org.","pdns5.ultradns.info.","pdns6.ultradns.co.uk."]}}},{"properties":{"name":"nexgen.ultradns.net.","accountName":"jdamick","type":"PRIMARY","dnssecStatus":"UNSIGNED","status":"ACTIVE","owner":"jdamick","resourceRecordCount":8,"lastModifiedDateTime":"2012-04-04T19:38Z"},"registrarInfo":{"nameServers":{"ok":["pdns1.ultradns.net.","pdns2.ultradns.net.","pdns3.ultradns.org.","pdns4.ultradns.org.","pdns5.ultradns.info.","pdns6.ultradns.co.uk."]}}},{"properties":{"name":"pdp.neustar.biz.","accountName":"jdamick","type":"PRIMARY","dnssecStatus":"UNSIGNED","status":"ACTIVE","owner":"jdamick","resourceRecordCount":8,"lastModifiedDateTime":"2014-07-22T19:40Z"},"registrarInfo":{"nameServers":{"ok":["pdns1.ultradns.net.","pdns2.ultradns.net.","pdns3.ultradns.org.","pdns4.ultradns.org.","pdns5.ultradns.info.","pdns6.ultradns.co.uk."]}}},{"properties":{"name":"splunk.nexgen.neustar.biz.","accountName":"jdamick","type":"PRIMARY","dnssecStatus":"UNSIGNED","status":"ACTIVE","owner":"dbradley2","resourceRecordCount":7,"lastModifiedDateTime":"2013-09-13T18:18Z"},"registrarInfo":{"nameServers":{"unknown":["chns2.nc.neustar.com.","stns1.va.neustar.com.","stns2.va.neustar.com.","chifbprns1.nc.neustar.com.","stifbprns1.va.neustar.com.","chns1.nc.neustar.com."],"missing":["pdns1.ultradns.net.","pdns2.ultradns.net.","pdns3.ultradns.org.","pdns4.ultradns.org.","pdns5.ultradns.info.","pdns6.ultradns.co.uk."]}}},{"properties":{"name":"ultradns.nexgen.neustar.biz.","accountName":"jdamick","type":"PRIMARY","dnssecStatus":"UNSIGNED","status":"ACTIVE","owner":"dbradley2","resourceRecordCount":7,"lastModifiedDateTime":"2013-09-16T14:44Z"},"registrarInfo":{"nameServers":{"ok":["pdns1.ultradns.net.","pdns2.ultradns.net.","pdns3.ultradns.org.","pdns4.ultradns.org.","pdns5.ultradns.info.","pdns6.ultradns.co.uk."]}}}]}'
|
81
|
+
http_version: '1.1'
|
82
|
+
recorded_at: Mon, 28 Jul 2014 02:15:04 GMT
|
83
|
+
- request:
|
84
|
+
method: get
|
85
|
+
uri: https://restapi.ultradns.com/v1/accounts
|
86
|
+
body:
|
87
|
+
encoding: US-ASCII
|
88
|
+
string: ''
|
89
|
+
headers:
|
90
|
+
accept:
|
91
|
+
- application/json
|
92
|
+
content-type:
|
93
|
+
- application/json
|
94
|
+
authorization:
|
95
|
+
- Bearer 6b012bcc854243858b50c60cf3569777
|
96
|
+
response:
|
97
|
+
status:
|
98
|
+
code: 200
|
99
|
+
message: OK
|
100
|
+
headers:
|
101
|
+
access-control-allow-credentials:
|
102
|
+
- 'true'
|
103
|
+
access-control-allow-headers:
|
104
|
+
- Origin, X-Requested-With, Content-Type, Accept, Authorization
|
105
|
+
access-control-allow-methods:
|
106
|
+
- POST, GET, OPTIONS, DELETE, PUT, PATCH
|
107
|
+
access-control-allow-origin:
|
108
|
+
- "*"
|
109
|
+
access-control-max-age:
|
110
|
+
- '3600'
|
111
|
+
content-type:
|
112
|
+
- application/json
|
113
|
+
date:
|
114
|
+
- Mon, 28 Jul 2014 02:15:04 GMT
|
115
|
+
transfer-encoding:
|
116
|
+
- chunked
|
117
|
+
connection:
|
118
|
+
- Close
|
119
|
+
body:
|
120
|
+
encoding: UTF-8
|
121
|
+
string: '{"resultInfo":{"totalCount":1,"offset":0,"returnedCount":1},"accounts":[{"accountName":"jdamick","accountHolderUserName":"Neustar
|
122
|
+
Dev","ownerUserName":"jdamick","numberOfUsers":15,"numberOfGroups":9,"accountType":"ORGANIZATION"}]}'
|
123
|
+
http_version: '1.1'
|
124
|
+
recorded_at: Mon, 28 Jul 2014 02:15:04 GMT
|
125
|
+
- request:
|
126
|
+
method: get
|
127
|
+
uri: https://restapi.ultradns.com/v1/status
|
128
|
+
body:
|
129
|
+
encoding: US-ASCII
|
130
|
+
string: ''
|
131
|
+
headers:
|
132
|
+
accept:
|
133
|
+
- application/json
|
134
|
+
content-type:
|
135
|
+
- application/json
|
136
|
+
authorization:
|
137
|
+
- Bearer 6b012bcc854243858b50c60cf3569777
|
138
|
+
response:
|
139
|
+
status:
|
140
|
+
code: 200
|
141
|
+
message: OK
|
142
|
+
headers:
|
143
|
+
access-control-allow-credentials:
|
144
|
+
- 'true'
|
145
|
+
access-control-allow-headers:
|
146
|
+
- Origin, X-Requested-With, Content-Type, Accept, Authorization
|
147
|
+
access-control-allow-methods:
|
148
|
+
- POST, GET, OPTIONS, DELETE, PUT, PATCH
|
149
|
+
access-control-allow-origin:
|
150
|
+
- "*"
|
151
|
+
access-control-max-age:
|
152
|
+
- '3600'
|
153
|
+
content-type:
|
154
|
+
- application/json
|
155
|
+
date:
|
156
|
+
- Mon, 28 Jul 2014 02:15:04 GMT
|
157
|
+
transfer-encoding:
|
158
|
+
- chunked
|
159
|
+
connection:
|
160
|
+
- Close
|
161
|
+
body:
|
162
|
+
encoding: UTF-8
|
163
|
+
string: '{"message":"Good"}'
|
164
|
+
http_version: '1.1'
|
165
|
+
recorded_at: Mon, 28 Jul 2014 02:15:04 GMT
|
166
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,163 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://restapi.ultradns.com/v1/authorization/token
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: grant_type=password&password=SECRET&username=jdamick
|
9
|
+
headers:
|
10
|
+
accept:
|
11
|
+
- application/json
|
12
|
+
content-type:
|
13
|
+
- application/x-www-form-urlencoded
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message: OK
|
18
|
+
headers:
|
19
|
+
access-control-allow-credentials:
|
20
|
+
- 'true'
|
21
|
+
access-control-allow-headers:
|
22
|
+
- Origin, X-Requested-With, Content-Type, Accept, Authorization
|
23
|
+
access-control-allow-methods:
|
24
|
+
- POST, GET, OPTIONS, DELETE, PUT, PATCH
|
25
|
+
access-control-allow-origin:
|
26
|
+
- "*"
|
27
|
+
access-control-max-age:
|
28
|
+
- '3600'
|
29
|
+
content-type:
|
30
|
+
- application/json
|
31
|
+
date:
|
32
|
+
- Mon, 28 Jul 2014 02:15:05 GMT
|
33
|
+
transfer-encoding:
|
34
|
+
- chunked
|
35
|
+
connection:
|
36
|
+
- Close
|
37
|
+
body:
|
38
|
+
encoding: UTF-8
|
39
|
+
string: '{"tokenType":"","refreshToken":"0aabfdca86c1440f968d92d3899e9bbc","accessToken":"cba38be1d4f049ffb4a2c1f064ac3a84","expiresIn":""}'
|
40
|
+
http_version: '1.1'
|
41
|
+
recorded_at: Mon, 28 Jul 2014 02:15:05 GMT
|
42
|
+
- request:
|
43
|
+
method: get
|
44
|
+
uri: https://restapi.ultradns.com/v1/status
|
45
|
+
body:
|
46
|
+
encoding: US-ASCII
|
47
|
+
string: ''
|
48
|
+
headers:
|
49
|
+
accept:
|
50
|
+
- application/json
|
51
|
+
content-type:
|
52
|
+
- application/json
|
53
|
+
authorization:
|
54
|
+
- Bearer xx
|
55
|
+
response:
|
56
|
+
status:
|
57
|
+
code: 401
|
58
|
+
message: Unauthorized
|
59
|
+
headers:
|
60
|
+
access-control-allow-credentials:
|
61
|
+
- 'true'
|
62
|
+
access-control-allow-headers:
|
63
|
+
- Origin, X-Requested-With, Content-Type, Accept, Authorization
|
64
|
+
access-control-allow-methods:
|
65
|
+
- POST, GET, OPTIONS, DELETE, PUT, PATCH
|
66
|
+
access-control-allow-origin:
|
67
|
+
- "*"
|
68
|
+
access-control-max-age:
|
69
|
+
- '3600'
|
70
|
+
date:
|
71
|
+
- Mon, 28 Jul 2014 02:15:05 GMT
|
72
|
+
content-length:
|
73
|
+
- '189'
|
74
|
+
connection:
|
75
|
+
- Close
|
76
|
+
body:
|
77
|
+
encoding: UTF-8
|
78
|
+
string: '{"errorCode":60001,"errorMessage":"invalid_grant:token not found, expired
|
79
|
+
or invalid","error":"invalid_grant","error_description":"60001: invalid_grant:token
|
80
|
+
not found, expired or invalid"}'
|
81
|
+
http_version: '1.1'
|
82
|
+
recorded_at: Mon, 28 Jul 2014 02:15:05 GMT
|
83
|
+
- request:
|
84
|
+
method: post
|
85
|
+
uri: https://restapi.ultradns.com/v1/authorization/token
|
86
|
+
body:
|
87
|
+
encoding: UTF-8
|
88
|
+
string: grant_type=password&password=SECRET&username=jdamick
|
89
|
+
headers:
|
90
|
+
accept:
|
91
|
+
- application/json
|
92
|
+
content-type:
|
93
|
+
- application/x-www-form-urlencoded
|
94
|
+
response:
|
95
|
+
status:
|
96
|
+
code: 200
|
97
|
+
message: OK
|
98
|
+
headers:
|
99
|
+
access-control-allow-credentials:
|
100
|
+
- 'true'
|
101
|
+
access-control-allow-headers:
|
102
|
+
- Origin, X-Requested-With, Content-Type, Accept, Authorization
|
103
|
+
access-control-allow-methods:
|
104
|
+
- POST, GET, OPTIONS, DELETE, PUT, PATCH
|
105
|
+
access-control-allow-origin:
|
106
|
+
- "*"
|
107
|
+
access-control-max-age:
|
108
|
+
- '3600'
|
109
|
+
content-type:
|
110
|
+
- application/json
|
111
|
+
date:
|
112
|
+
- Mon, 28 Jul 2014 02:15:05 GMT
|
113
|
+
transfer-encoding:
|
114
|
+
- chunked
|
115
|
+
connection:
|
116
|
+
- Close
|
117
|
+
body:
|
118
|
+
encoding: UTF-8
|
119
|
+
string: '{"tokenType":"","refreshToken":"d1f39f1f6f024fa09a9afacf0831f0cd","accessToken":"8f40d0f768144fa8b47e1656185abf56","expiresIn":""}'
|
120
|
+
http_version: '1.1'
|
121
|
+
recorded_at: Mon, 28 Jul 2014 02:15:05 GMT
|
122
|
+
- request:
|
123
|
+
method: get
|
124
|
+
uri: https://restapi.ultradns.com/v1/status
|
125
|
+
body:
|
126
|
+
encoding: US-ASCII
|
127
|
+
string: ''
|
128
|
+
headers:
|
129
|
+
accept:
|
130
|
+
- application/json
|
131
|
+
content-type:
|
132
|
+
- application/json
|
133
|
+
authorization:
|
134
|
+
- Bearer 8f40d0f768144fa8b47e1656185abf56
|
135
|
+
response:
|
136
|
+
status:
|
137
|
+
code: 200
|
138
|
+
message: OK
|
139
|
+
headers:
|
140
|
+
access-control-allow-credentials:
|
141
|
+
- 'true'
|
142
|
+
access-control-allow-headers:
|
143
|
+
- Origin, X-Requested-With, Content-Type, Accept, Authorization
|
144
|
+
access-control-allow-methods:
|
145
|
+
- POST, GET, OPTIONS, DELETE, PUT, PATCH
|
146
|
+
access-control-allow-origin:
|
147
|
+
- "*"
|
148
|
+
access-control-max-age:
|
149
|
+
- '3600'
|
150
|
+
content-type:
|
151
|
+
- application/json
|
152
|
+
date:
|
153
|
+
- Mon, 28 Jul 2014 02:15:05 GMT
|
154
|
+
transfer-encoding:
|
155
|
+
- chunked
|
156
|
+
connection:
|
157
|
+
- Close
|
158
|
+
body:
|
159
|
+
encoding: UTF-8
|
160
|
+
string: '{"message":"Good"}'
|
161
|
+
http_version: '1.1'
|
162
|
+
recorded_at: Mon, 28 Jul 2014 02:15:05 GMT
|
163
|
+
recorded_with: VCR 2.9.2
|