datacentred 0.1.0pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +35 -0
- data/README.md +2 -0
- data/Rakefile +10 -0
- data/circle.yml +5 -0
- data/datacentred.gemspec +23 -0
- data/lib/datacentred/error.rb +28 -0
- data/lib/datacentred/model/project.rb +44 -0
- data/lib/datacentred/model/role.rb +44 -0
- data/lib/datacentred/model/usage.rb +15 -0
- data/lib/datacentred/model/user.rb +32 -0
- data/lib/datacentred/model/version.rb +14 -0
- data/lib/datacentred/request/base.rb +46 -0
- data/lib/datacentred/request/projects.rb +38 -0
- data/lib/datacentred/request/roles.rb +38 -0
- data/lib/datacentred/request/usage.rb +10 -0
- data/lib/datacentred/request/users.rb +26 -0
- data/lib/datacentred/request/versions.rb +10 -0
- data/lib/datacentred/response.rb +12 -0
- data/lib/datacentred.rb +40 -0
- data/test/integration/projects_test.rb +117 -0
- data/test/integration/roles_test.rb +128 -0
- data/test/integration/usage_test.rb +24 -0
- data/test/integration/users_test.rb +128 -0
- data/test/integration/versions_test.rb +15 -0
- data/test/test_helper.rb +14 -0
- data/test/vcr_cassettes/add_user_to_project.yml +140 -0
- data/test/vcr_cassettes/add_user_to_role.yml +187 -0
- data/test/vcr_cassettes/create_project.yml +58 -0
- data/test/vcr_cassettes/create_role_with_invalid_permissions.yml +51 -0
- data/test/vcr_cassettes/create_role_with_permissions.yml +51 -0
- data/test/vcr_cassettes/create_role_without_permissions.yml +50 -0
- data/test/vcr_cassettes/create_user.yml +50 -0
- data/test/vcr_cassettes/delete_project.yml +103 -0
- data/test/vcr_cassettes/delete_role.yml +183 -0
- data/test/vcr_cassettes/delete_user.yml +136 -0
- data/test/vcr_cassettes/find_role.yml +97 -0
- data/test/vcr_cassettes/list_project_users.yml +58 -0
- data/test/vcr_cassettes/list_projects.yml +58 -0
- data/test/vcr_cassettes/list_role_users.yml +97 -0
- data/test/vcr_cassettes/list_roles.yml +50 -0
- data/test/vcr_cassettes/list_users.yml +58 -0
- data/test/vcr_cassettes/project_create_failed_validation.yml +56 -0
- data/test/vcr_cassettes/project_not_found.yml +54 -0
- data/test/vcr_cassettes/project_update_failed_validation.yml +55 -0
- data/test/vcr_cassettes/project_update_not_found.yml +54 -0
- data/test/vcr_cassettes/remove_user_from_project.yml +138 -0
- data/test/vcr_cassettes/remove_user_from_role.yml +228 -0
- data/test/vcr_cassettes/remove_user_from_role_not_found.yml +95 -0
- data/test/vcr_cassettes/show_project.yml +58 -0
- data/test/vcr_cassettes/show_usage.yml +51 -0
- data/test/vcr_cassettes/show_user.yml +97 -0
- data/test/vcr_cassettes/show_version.yml +50 -0
- data/test/vcr_cassettes/update_project.yml +58 -0
- data/test/vcr_cassettes/update_role.yml +98 -0
- data/test/vcr_cassettes/update_role_with_invalid_permissions.yml +98 -0
- data/test/vcr_cassettes/update_user.yml +97 -0
- data/test/vcr_cassettes/usage_not_found.yml +54 -0
- data/test/vcr_cassettes/user_create_failed_validation.yml +54 -0
- data/test/vcr_cassettes/user_delete_failed_validation.yml +54 -0
- data/test/vcr_cassettes/user_delete_not_found.yml +54 -0
- data/test/vcr_cassettes/user_show_not_found.yml +54 -0
- data/test/vcr_cassettes/user_update_failed_validation.yml +96 -0
- data/test/vcr_cassettes/user_update_not_found.yml +48 -0
- metadata +165 -0
@@ -0,0 +1,97 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://my.datacentred.io/api/roles
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"role":{"name":"New Role"}}'
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/vnd.datacentred.api+json; version=1
|
12
|
+
Authorization:
|
13
|
+
- Token Token token=access_key:secret_key
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
User-Agent:
|
17
|
+
- Faraday v0.9.2
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 201
|
23
|
+
message: Created
|
24
|
+
headers:
|
25
|
+
X-Frame-Options:
|
26
|
+
- SAMEORIGIN
|
27
|
+
X-Xss-Protection:
|
28
|
+
- 1; mode=block
|
29
|
+
X-Content-Type-Options:
|
30
|
+
- nosniff
|
31
|
+
X-Api-Version:
|
32
|
+
- '1'
|
33
|
+
Content-Type:
|
34
|
+
- application/vnd.datacentred.api+json; charset=utf-8
|
35
|
+
Etag:
|
36
|
+
- W/"321268a2f6e13ccb77f4e5bf315bb628"
|
37
|
+
Cache-Control:
|
38
|
+
- max-age=0, private, must-revalidate
|
39
|
+
X-Request-Id:
|
40
|
+
- 65874c7c-1f48-402f-b692-4f602c1b708e
|
41
|
+
X-Runtime:
|
42
|
+
- '0.112070'
|
43
|
+
Transfer-Encoding:
|
44
|
+
- chunked
|
45
|
+
body:
|
46
|
+
encoding: UTF-8
|
47
|
+
string: '{"role":{"id":"7bd62444-cf29-497f-a84d-ca217c090602","name":"New Role","admin":false,"permissions":[],"created_at":"2017-09-05T15:29:52Z","updated_at":"2017-09-05T15:29:52Z","links":[{"href":"https://my.datacentred.io/api/roles/7bd62444-cf29-497f-a84d-ca217c090602","rel":"self"},{"href":"https://my.datacentred.io/api/schemas/role","rel":"schema"}]}}'
|
48
|
+
http_version:
|
49
|
+
recorded_at: Tue, 05 Sep 2017 15:29:52 GMT
|
50
|
+
- request:
|
51
|
+
method: get
|
52
|
+
uri: https://my.datacentred.io/api/roles/7bd62444-cf29-497f-a84d-ca217c090602
|
53
|
+
body:
|
54
|
+
encoding: US-ASCII
|
55
|
+
string: ''
|
56
|
+
headers:
|
57
|
+
Accept:
|
58
|
+
- application/vnd.datacentred.api+json; version=1
|
59
|
+
Authorization:
|
60
|
+
- Token token=e9d2d4cd37adf1634e2a65b9e18a8fcb:821fac118e7675f28fa42ab79ace57de
|
61
|
+
Content-Type:
|
62
|
+
- application/json
|
63
|
+
User-Agent:
|
64
|
+
- Faraday v0.9.2
|
65
|
+
Accept-Encoding:
|
66
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
67
|
+
response:
|
68
|
+
status:
|
69
|
+
code: 200
|
70
|
+
message: OK
|
71
|
+
headers:
|
72
|
+
X-Frame-Options:
|
73
|
+
- SAMEORIGIN
|
74
|
+
X-Xss-Protection:
|
75
|
+
- 1; mode=block
|
76
|
+
X-Content-Type-Options:
|
77
|
+
- nosniff
|
78
|
+
X-Api-Version:
|
79
|
+
- '1'
|
80
|
+
Content-Type:
|
81
|
+
- application/vnd.datacentred.api+json; charset=utf-8
|
82
|
+
Etag:
|
83
|
+
- W/"321268a2f6e13ccb77f4e5bf315bb628"
|
84
|
+
Cache-Control:
|
85
|
+
- max-age=0, private, must-revalidate
|
86
|
+
X-Request-Id:
|
87
|
+
- 06ad0540-6a52-405d-a2ad-002ab775d8dc
|
88
|
+
X-Runtime:
|
89
|
+
- '0.093719'
|
90
|
+
Transfer-Encoding:
|
91
|
+
- chunked
|
92
|
+
body:
|
93
|
+
encoding: UTF-8
|
94
|
+
string: '{"role":{"id":"7bd62444-cf29-497f-a84d-ca217c090602","name":"New Role","admin":false,"permissions":[],"created_at":"2017-09-05T15:29:52Z","updated_at":"2017-09-05T15:29:52Z","links":[{"href":"https://my.datacentred.io/api/roles/7bd62444-cf29-497f-a84d-ca217c090602","rel":"self"},{"href":"https://my.datacentred.io/api/schemas/role","rel":"schema"}]}}'
|
95
|
+
http_version:
|
96
|
+
recorded_at: Tue, 05 Sep 2017 15:29:53 GMT
|
97
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,58 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://my.datacentred.io/api/projects/project_id1/users
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/vnd.datacentred.api+json; version=1
|
12
|
+
Authorization:
|
13
|
+
- Token token=access_key:secret_key
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
User-Agent:
|
17
|
+
- Faraday v0.9.2
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- nginx/1.10.3
|
27
|
+
Date:
|
28
|
+
- Wed, 30 Aug 2017 10:40:40 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/vnd.datacentred.api+json; charset=utf-8
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
X-Frame-Options:
|
36
|
+
- SAMEORIGIN
|
37
|
+
X-Xss-Protection:
|
38
|
+
- 1; mode=block
|
39
|
+
X-Content-Type-Options:
|
40
|
+
- nosniff
|
41
|
+
X-Api-Version:
|
42
|
+
- '1'
|
43
|
+
Etag:
|
44
|
+
- W/"4b9146d3f170bfe5ae80792079f0bc7d"
|
45
|
+
Cache-Control:
|
46
|
+
- max-age=0, private, must-revalidate
|
47
|
+
X-Request-Id:
|
48
|
+
- 98d6ab23-2b8e-4412-89da-b2dbb2795b95
|
49
|
+
X-Runtime:
|
50
|
+
- '0.174165'
|
51
|
+
Strict-Transport-Security:
|
52
|
+
- max-age=31536000; includeSubdomains; preload
|
53
|
+
body:
|
54
|
+
encoding: UTF-8
|
55
|
+
string: '{"users":[{"id":"bda96ae2c89347d5a059d663c153ec2a","email":"eugeniagrieff@gmail.com","first_name":"Eugenia","last_name":"Grieff","created_at":"2016-02-25T17:01:20Z","updated_at":"2017-08-30T10:26:39Z","links":[{"href":"https://my.datacentred.io/api/users/bda96ae2c89347d5a059d663c153ec2a","rel":"self"},{"href":"https://my.datacentred.io/api/schemas/user","rel":"schema"}]},{"id":"user_id","email":"megrieff@gmail.com","first_name":"Eugenia","last_name":"Grieff","created_at":"2017-05-23T08:36:23Z","updated_at":"2017-08-08T11:54:48Z","links":[{"href":"https://my.datacentred.io/api/users/user_id","rel":"self"},{"href":"https://my.datacentred.io/api/schemas/user","rel":"schema"}]}]}'
|
56
|
+
http_version:
|
57
|
+
recorded_at: Wed, 30 Aug 2017 10:40:40 GMT
|
58
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,58 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://my.datacentred.io/api/projects
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/vnd.datacentred.api+json; version=1
|
12
|
+
Authorization:
|
13
|
+
- Token token=access_key:secret_key
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
User-Agent:
|
17
|
+
- Faraday v0.9.2
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- nginx/1.10.3
|
27
|
+
Date:
|
28
|
+
- Tue, 29 Aug 2017 14:11:42 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/vnd.datacentred.api+json; charset=utf-8
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
X-Frame-Options:
|
36
|
+
- SAMEORIGIN
|
37
|
+
X-Xss-Protection:
|
38
|
+
- 1; mode=block
|
39
|
+
X-Content-Type-Options:
|
40
|
+
- nosniff
|
41
|
+
X-Api-Version:
|
42
|
+
- '1'
|
43
|
+
Etag:
|
44
|
+
- W/"f81add07920ba48cf7096766a4ac89cc"
|
45
|
+
Cache-Control:
|
46
|
+
- max-age=0, private, must-revalidate
|
47
|
+
X-Request-Id:
|
48
|
+
- e44997c2-1781-462e-9ecc-ae61ea957f24
|
49
|
+
X-Runtime:
|
50
|
+
- '0.204108'
|
51
|
+
Strict-Transport-Security:
|
52
|
+
- max-age=31536000; includeSubdomains; preload
|
53
|
+
body:
|
54
|
+
encoding: UTF-8
|
55
|
+
string: '{"projects":[{"id":"project_id1","name":"eugeniagrieffgmail_primary","created_at":"2016-02-25T17:00:47Z","updated_at":"2017-08-22T11:14:01Z","quota_set":{"compute":{"instances":6,"cores":10,"ram":20480},"volume":{"volumes":4,"snapshots":4,"gigabytes":40},"network":{"floatingip":1,"router":1,"security_group_rule":100,"security_group":10,"network":10,"port":10,"subnet":10,"pool":10,"vip":10}},"links":[{"href":"https://my.datacentred.io/api/projects/project_id1","rel":"self"},{"href":"https://my.datacentred.io/api/schemas/project","rel":"schema"}]}]}'
|
56
|
+
http_version:
|
57
|
+
recorded_at: Tue, 29 Aug 2017 14:11:42 GMT
|
58
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,97 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://my.datacentred.io/api/roles
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"role":{"name":"New Role"}}'
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/vnd.datacentred.api+json; version=1
|
12
|
+
Authorization:
|
13
|
+
- Token token=access_key:secret_key
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
User-Agent:
|
17
|
+
- Faraday v0.9.2
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 201
|
23
|
+
message: Created
|
24
|
+
headers:
|
25
|
+
X-Frame-Options:
|
26
|
+
- SAMEORIGIN
|
27
|
+
X-Xss-Protection:
|
28
|
+
- 1; mode=block
|
29
|
+
X-Content-Type-Options:
|
30
|
+
- nosniff
|
31
|
+
X-Api-Version:
|
32
|
+
- '1'
|
33
|
+
Content-Type:
|
34
|
+
- application/vnd.datacentred.api+json; charset=utf-8
|
35
|
+
Etag:
|
36
|
+
- W/"3a5a073ed2a2d64d7f49fc08a7b2569f"
|
37
|
+
Cache-Control:
|
38
|
+
- max-age=0, private, must-revalidate
|
39
|
+
X-Request-Id:
|
40
|
+
- 8d127fa8-4600-42e1-b002-182521ef33f7
|
41
|
+
X-Runtime:
|
42
|
+
- '0.112978'
|
43
|
+
Transfer-Encoding:
|
44
|
+
- chunked
|
45
|
+
body:
|
46
|
+
encoding: UTF-8
|
47
|
+
string: '{"role":{"id":"2e20d69a-a239-431f-853a-332aa3df75ed","name":"New Role","admin":false,"permissions":[],"created_at":"2017-09-05T16:45:05Z","updated_at":"2017-09-05T16:45:05Z","links":[{"href":"https://my.datacentred.io/api/roles/2e20d69a-a239-431f-853a-332aa3df75ed","rel":"self"},{"href":"https://my.datacentred.io/api/schemas/role","rel":"schema"}]}}'
|
48
|
+
http_version:
|
49
|
+
recorded_at: Tue, 05 Sep 2017 16:45:05 GMT
|
50
|
+
- request:
|
51
|
+
method: get
|
52
|
+
uri: https://my.datacentred.io/api/roles/2e20d69a-a239-431f-853a-332aa3df75ed/users
|
53
|
+
body:
|
54
|
+
encoding: US-ASCII
|
55
|
+
string: ''
|
56
|
+
headers:
|
57
|
+
Accept:
|
58
|
+
- application/vnd.datacentred.api+json; version=1
|
59
|
+
Authorization:
|
60
|
+
- Token token=e9d2d4cd37adf1634e2a65b9e18a8fcb:821fac118e7675f28fa42ab79ace57de
|
61
|
+
Content-Type:
|
62
|
+
- application/json
|
63
|
+
User-Agent:
|
64
|
+
- Faraday v0.9.2
|
65
|
+
Accept-Encoding:
|
66
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
67
|
+
response:
|
68
|
+
status:
|
69
|
+
code: 200
|
70
|
+
message: OK
|
71
|
+
headers:
|
72
|
+
X-Frame-Options:
|
73
|
+
- SAMEORIGIN
|
74
|
+
X-Xss-Protection:
|
75
|
+
- 1; mode=block
|
76
|
+
X-Content-Type-Options:
|
77
|
+
- nosniff
|
78
|
+
X-Api-Version:
|
79
|
+
- '1'
|
80
|
+
Content-Type:
|
81
|
+
- application/vnd.datacentred.api+json; charset=utf-8
|
82
|
+
Etag:
|
83
|
+
- W/"adac7b84dc3b7394d8385aa0c65fe27a"
|
84
|
+
Cache-Control:
|
85
|
+
- max-age=0, private, must-revalidate
|
86
|
+
X-Request-Id:
|
87
|
+
- cab26c52-5c98-4ec1-a2e1-bd6e45e43292
|
88
|
+
X-Runtime:
|
89
|
+
- '0.101221'
|
90
|
+
Transfer-Encoding:
|
91
|
+
- chunked
|
92
|
+
body:
|
93
|
+
encoding: UTF-8
|
94
|
+
string: '{"users":[]}'
|
95
|
+
http_version:
|
96
|
+
recorded_at: Tue, 05 Sep 2017 16:45:05 GMT
|
97
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,50 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://my.datacentred.io/api/roles
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/vnd.datacentred.api+json; version=1
|
12
|
+
Authorization:
|
13
|
+
- Token token=access_key:secret_key
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
User-Agent:
|
17
|
+
- Faraday v0.9.2
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
X-Frame-Options:
|
26
|
+
- SAMEORIGIN
|
27
|
+
X-Xss-Protection:
|
28
|
+
- 1; mode=block
|
29
|
+
X-Content-Type-Options:
|
30
|
+
- nosniff
|
31
|
+
X-Api-Version:
|
32
|
+
- '1'
|
33
|
+
Content-Type:
|
34
|
+
- application/vnd.datacentred.api+json; charset=utf-8
|
35
|
+
Etag:
|
36
|
+
- W/"755f40d68d204c63a29d2ec6646fc8d0"
|
37
|
+
Cache-Control:
|
38
|
+
- max-age=0, private, must-revalidate
|
39
|
+
X-Request-Id:
|
40
|
+
- 8957b65f-8edd-4dd8-b0f6-339bb9e2ff09
|
41
|
+
X-Runtime:
|
42
|
+
- '0.111247'
|
43
|
+
Transfer-Encoding:
|
44
|
+
- chunked
|
45
|
+
body:
|
46
|
+
encoding: UTF-8
|
47
|
+
string: '{"roles":[{"id":"f3ca469d-c491-4efc-baa2-753697dd6e5e","name":"Administrator","admin":true,"permissions":["roles.read","roles.modify","tickets.modify"],"created_at":"2017-07-20T13:06:19Z","updated_at":"2017-07-20T13:06:19Z","links":[{"href":"https://my.datacentred.io/api/roles/f3ca469d-c491-4efc-baa2-753697dd6e5e","rel":"self"},{"href":"https://my.datacentred.io/api/schemas/role","rel":"schema"}]},{"id":"880917ae-21ed-4202-b3a0-256eda42542f","name":"Foo","admin":false,"permissions":["cloud.read","storage.read","api.read","roles.read"],"created_at":"2017-08-08T08:43:32Z","updated_at":"2017-08-08T08:44:10Z","links":[{"href":"https://my.datacentred.io/api/roles/880917ae-21ed-4202-b3a0-256eda42542f","rel":"self"},{"href":"https://my.datacentred.io/api/schemas/role","rel":"schema"}]}]}'
|
48
|
+
http_version:
|
49
|
+
recorded_at: Mon, 04 Sep 2017 08:48:17 GMT
|
50
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,58 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://my.datacentred.io/api/users
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/vnd.datacentred.api+json; version=1
|
12
|
+
Authorization:
|
13
|
+
- Token token=access_key:secret_key
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
User-Agent:
|
17
|
+
- Faraday v0.9.2
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- nginx/1.10.3
|
27
|
+
Date:
|
28
|
+
- Wed, 30 Aug 2017 14:28:20 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/vnd.datacentred.api+json; charset=utf-8
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
X-Frame-Options:
|
36
|
+
- SAMEORIGIN
|
37
|
+
X-Xss-Protection:
|
38
|
+
- 1; mode=block
|
39
|
+
X-Content-Type-Options:
|
40
|
+
- nosniff
|
41
|
+
X-Api-Version:
|
42
|
+
- '1'
|
43
|
+
Etag:
|
44
|
+
- W/"2dde9ca2e7b4f4d5279f38ceb312691e"
|
45
|
+
Cache-Control:
|
46
|
+
- max-age=0, private, must-revalidate
|
47
|
+
X-Request-Id:
|
48
|
+
- f9b528fc-d4a1-4bff-868a-a0108f871fdf
|
49
|
+
X-Runtime:
|
50
|
+
- '0.145875'
|
51
|
+
Strict-Transport-Security:
|
52
|
+
- max-age=31536000; includeSubdomains; preload
|
53
|
+
body:
|
54
|
+
encoding: UTF-8
|
55
|
+
string: '{"users":[{"id":"bda96ae2c89347d5a059d663c153ec2a","email":"eugeniagrieff@gmail.com","first_name":"Eugenia","last_name":"Grieff","created_at":"2016-02-25T17:01:20Z","updated_at":"2017-08-30T13:55:43Z","links":[{"href":"https://my.datacentred.io/api/users/bda96ae2c89347d5a059d663c153ec2a","rel":"self"},{"href":"https://my.datacentred.io/api/schemas/user","rel":"schema"}]},{"id":"user_id","email":"megrieff@gmail.com","first_name":"Eugenia","last_name":"Grieff","created_at":"2017-05-23T08:36:23Z","updated_at":"2017-08-08T11:54:48Z","links":[{"href":"https://my.datacentred.io/api/users/user_id","rel":"self"},{"href":"https://my.datacentred.io/api/schemas/user","rel":"schema"}]}]}'
|
56
|
+
http_version:
|
57
|
+
recorded_at: Wed, 30 Aug 2017 14:28:20 GMT
|
58
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,56 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://my.datacentred.io/api/projects
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"project":{"name":"test_new_project"}}'
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/vnd.datacentred.api+json; version=1
|
12
|
+
Authorization:
|
13
|
+
- Token token=access_key:secret_key
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
User-Agent:
|
17
|
+
- Faraday v0.9.2
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 422
|
23
|
+
message: Unprocessable Entity
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- nginx/1.10.3
|
27
|
+
Date:
|
28
|
+
- Wed, 30 Aug 2017 09:53:49 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
X-Frame-Options:
|
36
|
+
- SAMEORIGIN
|
37
|
+
X-Xss-Protection:
|
38
|
+
- 1; mode=block
|
39
|
+
X-Content-Type-Options:
|
40
|
+
- nosniff
|
41
|
+
X-Api-Version:
|
42
|
+
- '1'
|
43
|
+
Cache-Control:
|
44
|
+
- no-cache
|
45
|
+
X-Request-Id:
|
46
|
+
- 15926f87-8d3b-41d1-987c-f63107c62571
|
47
|
+
X-Runtime:
|
48
|
+
- '0.600159'
|
49
|
+
body:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: '{"errors":[{"resource":"project","detail":"Project name is already
|
52
|
+
in use.","field":"name"},{"resource":"project","detail":"This account''s limits
|
53
|
+
only permit 2 projects."}],"links":[{"href":"https://my.datacentred.io/api","rel":"help"}]}'
|
54
|
+
http_version:
|
55
|
+
recorded_at: Wed, 30 Aug 2017 09:53:48 GMT
|
56
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,54 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://my.datacentred.io/api/projects/unknown
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/vnd.datacentred.api+json; version=1
|
12
|
+
Authorization:
|
13
|
+
- Token token=access_key:secret_key
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
User-Agent:
|
17
|
+
- Faraday v0.9.2
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 404
|
23
|
+
message: Not Found
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- nginx/1.10.3
|
27
|
+
Date:
|
28
|
+
- Tue, 29 Aug 2017 14:12:41 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/vnd.datacentred.api+json
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
X-Frame-Options:
|
36
|
+
- SAMEORIGIN
|
37
|
+
X-Xss-Protection:
|
38
|
+
- 1; mode=block
|
39
|
+
X-Content-Type-Options:
|
40
|
+
- nosniff
|
41
|
+
X-Api-Version:
|
42
|
+
- '1'
|
43
|
+
Cache-Control:
|
44
|
+
- no-cache
|
45
|
+
X-Request-Id:
|
46
|
+
- 506e33fc-8139-4f2b-8a9a-949716db9f19
|
47
|
+
X-Runtime:
|
48
|
+
- '0.142833'
|
49
|
+
body:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: ''
|
52
|
+
http_version:
|
53
|
+
recorded_at: Tue, 29 Aug 2017 14:12:42 GMT
|
54
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,55 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://my.datacentred.io/api/projects/project_id2
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"project":{"name":"foo"}}'
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/vnd.datacentred.api+json; version=1
|
12
|
+
Authorization:
|
13
|
+
- Token token=access_key:secret_key
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
User-Agent:
|
17
|
+
- Faraday v0.9.2
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 422
|
23
|
+
message: Unprocessable Entity
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- nginx/1.10.3
|
27
|
+
Date:
|
28
|
+
- Wed, 30 Aug 2017 13:53:37 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
X-Frame-Options:
|
36
|
+
- SAMEORIGIN
|
37
|
+
X-Xss-Protection:
|
38
|
+
- 1; mode=block
|
39
|
+
X-Content-Type-Options:
|
40
|
+
- nosniff
|
41
|
+
X-Api-Version:
|
42
|
+
- '1'
|
43
|
+
Cache-Control:
|
44
|
+
- no-cache
|
45
|
+
X-Request-Id:
|
46
|
+
- 4155139e-fc30-4a39-bc81-38d581ac2996
|
47
|
+
X-Runtime:
|
48
|
+
- '0.787557'
|
49
|
+
body:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: '{"errors":[{"resource":"project","detail":"Project name is already
|
52
|
+
in use.","field":"name"}],"links":[{"href":"https://my.datacentred.io/api","rel":"help"}]}'
|
53
|
+
http_version:
|
54
|
+
recorded_at: Wed, 30 Aug 2017 13:53:38 GMT
|
55
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,54 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://my.datacentred.io/api/projects/unknown
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"project":{"name":"new_project_name"}}'
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/vnd.datacentred.api+json; version=1
|
12
|
+
Authorization:
|
13
|
+
- Token token=access_key:secret_key
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
User-Agent:
|
17
|
+
- Faraday v0.9.2
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 404
|
23
|
+
message: Not Found
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- nginx/1.10.3
|
27
|
+
Date:
|
28
|
+
- Wed, 30 Aug 2017 10:13:05 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/vnd.datacentred.api+json
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
X-Frame-Options:
|
36
|
+
- SAMEORIGIN
|
37
|
+
X-Xss-Protection:
|
38
|
+
- 1; mode=block
|
39
|
+
X-Content-Type-Options:
|
40
|
+
- nosniff
|
41
|
+
X-Api-Version:
|
42
|
+
- '1'
|
43
|
+
Cache-Control:
|
44
|
+
- no-cache
|
45
|
+
X-Request-Id:
|
46
|
+
- 64dce0e5-8c47-4467-9c9e-85825e6af792
|
47
|
+
X-Runtime:
|
48
|
+
- '0.147298'
|
49
|
+
body:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: ''
|
52
|
+
http_version:
|
53
|
+
recorded_at: Wed, 30 Aug 2017 10:13:04 GMT
|
54
|
+
recorded_with: VCR 2.8.0
|