contentful-management 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/Gemfile +1 -0
- data/README.md +245 -151
- data/lib/contentful/management/client.rb +20 -0
- data/lib/contentful/management/client_association_all_published_method_factory.rb +4 -0
- data/lib/contentful/management/client_content_type_methods_factory.rb +4 -0
- data/lib/contentful/management/client_editor_interface_methods_factory.rb +35 -0
- data/lib/contentful/management/client_role_methods_factory.rb +15 -0
- data/lib/contentful/management/client_webhook_methods_factory.rb +1 -1
- data/lib/contentful/management/content_type.rb +12 -0
- data/lib/contentful/management/content_type_editor_interface_methods_factory.rb +22 -0
- data/lib/contentful/management/editor_interface.rb +85 -0
- data/lib/contentful/management/field.rb +1 -0
- data/lib/contentful/management/resource/all_published.rb +1 -0
- data/lib/contentful/management/resource/refresher.rb +7 -3
- data/lib/contentful/management/resource_builder.rb +5 -1
- data/lib/contentful/management/role.rb +33 -0
- data/lib/contentful/management/space.rb +28 -0
- data/lib/contentful/management/space_association_all_published_method_factory.rb +1 -0
- data/lib/contentful/management/space_editor_interface_methods_factory.rb +21 -0
- data/lib/contentful/management/space_role_methods_factory.rb +15 -0
- data/lib/contentful/management/version.rb +1 -1
- data/lib/contentful/management/webhook.rb +4 -1
- data/spec/fixtures/vcr_cassettes/content_type/omitted_field.yml +640 -0
- data/spec/fixtures/vcr_cassettes/editor_interfaces/default_for_space.yml +252 -0
- data/spec/fixtures/vcr_cassettes/editor_interfaces/update.yml +348 -0
- data/spec/fixtures/vcr_cassettes/roles/all_for_space.yml +238 -0
- data/spec/fixtures/vcr_cassettes/roles/create_for_space.yml +143 -0
- data/spec/fixtures/vcr_cassettes/roles/destroy.yml +430 -0
- data/spec/fixtures/vcr_cassettes/roles/find.yml +155 -0
- data/spec/fixtures/vcr_cassettes/roles/find_for_space_not_found.yml +82 -0
- data/spec/fixtures/vcr_cassettes/roles/update.yml +459 -0
- data/spec/fixtures/vcr_cassettes/webhook/create_with_name_and_headers.yml +119 -0
- data/spec/fixtures/vcr_cassettes/webhook/topics.yml +117 -0
- data/spec/lib/contentful/management/asset_spec.rb +4 -0
- data/spec/lib/contentful/management/content_type_spec.rb +36 -0
- data/spec/lib/contentful/management/editor_interface_spec.rb +57 -0
- data/spec/lib/contentful/management/entry_spec.rb +5 -0
- data/spec/lib/contentful/management/role_spec.rb +125 -0
- data/spec/lib/contentful/management/webhook_spec.rb +37 -0
- metadata +35 -2
@@ -0,0 +1,155 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.contentful.com/spaces/03vrieuz7eun/roles/0rQMQMd6ZTgeF7hxjz7JDi
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- RubyContentfulManagementGem/1.0.1
|
12
|
+
Authorization:
|
13
|
+
- Bearer <ACCESS_TOKEN>
|
14
|
+
Content-Type:
|
15
|
+
- application/vnd.contentful.management.v1+json
|
16
|
+
Content-Length:
|
17
|
+
- '0'
|
18
|
+
Connection:
|
19
|
+
- close
|
20
|
+
Host:
|
21
|
+
- api.contentful.com
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 200
|
25
|
+
message: OK
|
26
|
+
headers:
|
27
|
+
Accept-Ranges:
|
28
|
+
- bytes
|
29
|
+
Access-Control-Allow-Headers:
|
30
|
+
- Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent
|
31
|
+
Access-Control-Allow-Methods:
|
32
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
33
|
+
Access-Control-Allow-Origin:
|
34
|
+
- "*"
|
35
|
+
Access-Control-Expose-Headers:
|
36
|
+
- Etag
|
37
|
+
Access-Control-Max-Age:
|
38
|
+
- '1728000'
|
39
|
+
Cache-Control:
|
40
|
+
- max-age=0
|
41
|
+
Content-Type:
|
42
|
+
- application/vnd.contentful.management.v1+json
|
43
|
+
Date:
|
44
|
+
- Thu, 07 Apr 2016 20:37:06 GMT
|
45
|
+
Etag:
|
46
|
+
- '"b07001d0296ad5d0cdebc4f6fb3fa689"'
|
47
|
+
Server:
|
48
|
+
- nginx
|
49
|
+
Status:
|
50
|
+
- 200 OK
|
51
|
+
Strict-Transport-Security:
|
52
|
+
- max-age=15768000
|
53
|
+
X-Content-Type-Options:
|
54
|
+
- nosniff
|
55
|
+
X-Contentful-Request-Id:
|
56
|
+
- 0b5-375587953
|
57
|
+
Content-Length:
|
58
|
+
- '1343'
|
59
|
+
Connection:
|
60
|
+
- Close
|
61
|
+
Set-Cookie:
|
62
|
+
- incap_ses_298_673446=fKtJK+k90H6vMs69KrYiBPHEBlcAAAAAZQrG3Xmmenh91YLdPhqT3A==;
|
63
|
+
path=/; Domain=.contentful.com
|
64
|
+
- nlbi_673446=pC1ITK7hHV5SIb14aoBaJgAAAABOysrONt6mpbFsm5xLO1MY; path=/; Domain=.contentful.com
|
65
|
+
- visid_incap_673446=7ldXYVusRkiqMnnA8UCprPHEBlcAAAAAQUIPAAAAAAANv3110Ed/O5GqRJET34Ls;
|
66
|
+
expires=Fri, 07 Apr 2017 09:48:46 GMT; path=/; Domain=.contentful.com
|
67
|
+
X-Iinfo:
|
68
|
+
- 2-14569680-14569694 NNNN CT(137 281 0) RT(1460061425183 96) q(0 0 4 -1) r(7
|
69
|
+
7) U5
|
70
|
+
X-Cdn:
|
71
|
+
- Incapsula
|
72
|
+
body:
|
73
|
+
encoding: UTF-8
|
74
|
+
string: |+
|
75
|
+
{
|
76
|
+
"name":"Developer",
|
77
|
+
"description":"Allows reading Entries and managing API Keys",
|
78
|
+
"policies":[
|
79
|
+
{
|
80
|
+
"effect":"allow",
|
81
|
+
"actions":[
|
82
|
+
"read"
|
83
|
+
],
|
84
|
+
"constraint":{
|
85
|
+
"and":[
|
86
|
+
{
|
87
|
+
"equals":[
|
88
|
+
{
|
89
|
+
"doc":"sys.type"
|
90
|
+
},
|
91
|
+
"Asset"
|
92
|
+
]
|
93
|
+
}
|
94
|
+
]
|
95
|
+
}
|
96
|
+
},
|
97
|
+
{
|
98
|
+
"effect":"allow",
|
99
|
+
"actions":[
|
100
|
+
"read"
|
101
|
+
],
|
102
|
+
"constraint":{
|
103
|
+
"and":[
|
104
|
+
{
|
105
|
+
"equals":[
|
106
|
+
{
|
107
|
+
"doc":"sys.type"
|
108
|
+
},
|
109
|
+
"Entry"
|
110
|
+
]
|
111
|
+
}
|
112
|
+
]
|
113
|
+
}
|
114
|
+
}
|
115
|
+
],
|
116
|
+
"permissions":{
|
117
|
+
"ContentModel":[
|
118
|
+
"read"
|
119
|
+
],
|
120
|
+
"Settings":[],
|
121
|
+
"ContentDelivery":"all"
|
122
|
+
},
|
123
|
+
"sys":{
|
124
|
+
"type":"Role",
|
125
|
+
"id":"0rQMQMd6ZTgeF7hxjz7JDi",
|
126
|
+
"version":0,
|
127
|
+
"space":{
|
128
|
+
"sys":{
|
129
|
+
"type":"Link",
|
130
|
+
"linkType":"Space",
|
131
|
+
"id":"03vrieuz7eun"
|
132
|
+
}
|
133
|
+
},
|
134
|
+
"createdBy":{
|
135
|
+
"sys":{
|
136
|
+
"type":"Link",
|
137
|
+
"linkType":"User",
|
138
|
+
"id":"4SejVrWT96dvL9IV4Nb7sQ"
|
139
|
+
}
|
140
|
+
},
|
141
|
+
"createdAt":"2016-04-07T20:34:32Z",
|
142
|
+
"updatedBy":{
|
143
|
+
"sys":{
|
144
|
+
"type":"Link",
|
145
|
+
"linkType":"User",
|
146
|
+
"id":"4SejVrWT96dvL9IV4Nb7sQ"
|
147
|
+
}
|
148
|
+
},
|
149
|
+
"updatedAt":"2016-04-07T20:34:32Z"
|
150
|
+
}
|
151
|
+
}
|
152
|
+
|
153
|
+
http_version:
|
154
|
+
recorded_at: Thu, 07 Apr 2016 20:37:06 GMT
|
155
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,82 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.contentful.com/spaces/03vrieuz7eun/roles/not_exist
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- RubyContentfulManagementGem/1.0.1
|
12
|
+
Authorization:
|
13
|
+
- Bearer <ACCESS_TOKEN>
|
14
|
+
Content-Type:
|
15
|
+
- application/vnd.contentful.management.v1+json
|
16
|
+
Content-Length:
|
17
|
+
- '0'
|
18
|
+
Connection:
|
19
|
+
- close
|
20
|
+
Host:
|
21
|
+
- api.contentful.com
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 404
|
25
|
+
message: Not Found
|
26
|
+
headers:
|
27
|
+
Accept-Ranges:
|
28
|
+
- bytes
|
29
|
+
Access-Control-Allow-Headers:
|
30
|
+
- Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent
|
31
|
+
Access-Control-Allow-Methods:
|
32
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
33
|
+
Access-Control-Allow-Origin:
|
34
|
+
- "*"
|
35
|
+
Access-Control-Expose-Headers:
|
36
|
+
- Etag
|
37
|
+
Access-Control-Max-Age:
|
38
|
+
- '1728000'
|
39
|
+
Cache-Control:
|
40
|
+
- max-age=0
|
41
|
+
Content-Type:
|
42
|
+
- application/vnd.contentful.management.v1+json
|
43
|
+
Date:
|
44
|
+
- Thu, 07 Apr 2016 20:46:44 GMT
|
45
|
+
Server:
|
46
|
+
- nginx
|
47
|
+
Status:
|
48
|
+
- 404 Not Found
|
49
|
+
X-Contentful-Request-Id:
|
50
|
+
- 9e1-1105916090
|
51
|
+
X-Ua-Compatible:
|
52
|
+
- IE=Edge,chrome=1
|
53
|
+
Content-Length:
|
54
|
+
- '139'
|
55
|
+
Connection:
|
56
|
+
- Close
|
57
|
+
Set-Cookie:
|
58
|
+
- incap_ses_298_673446=eTIdHQEZyFVoO9O9KrYiBDPHBlcAAAAA7Ai5D6V3h7P+lqe32MF4dg==;
|
59
|
+
path=/; Domain=.contentful.com
|
60
|
+
- nlbi_673446=2R0gEArbc3taQUSWaoBaJgAAAACis7c2leZOGOspK827IhCe; path=/; Domain=.contentful.com
|
61
|
+
- visid_incap_673446=D6gR5LxMQvqeTMQWj4Q5iTPHBlcAAAAAQUIPAAAAAADb1SgkXsGcja808BOxWv7N;
|
62
|
+
expires=Fri, 07 Apr 2017 09:48:46 GMT; path=/; Domain=.contentful.com
|
63
|
+
X-Iinfo:
|
64
|
+
- 10-33396145-33396185 NNNN CT(137 153 0) RT(1460062003224 97) q(0 0 3 -1) r(5
|
65
|
+
5) U5
|
66
|
+
X-Cdn:
|
67
|
+
- Incapsula
|
68
|
+
body:
|
69
|
+
encoding: UTF-8
|
70
|
+
string: |+
|
71
|
+
{
|
72
|
+
"requestId":"9e1-1105916090",
|
73
|
+
"message":"The resource could not be found.",
|
74
|
+
"sys":{
|
75
|
+
"type":"Error",
|
76
|
+
"id":"NotFound"
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
http_version:
|
81
|
+
recorded_at: Thu, 07 Apr 2016 20:46:44 GMT
|
82
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,459 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.contentful.com/spaces/03vrieuz7eun/roles/0rQMQMd6ZTgeF7hxjz7JDi
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- RubyContentfulManagementGem/1.0.1
|
12
|
+
Authorization:
|
13
|
+
- Bearer <ACCESS_TOKEN>
|
14
|
+
Content-Type:
|
15
|
+
- application/vnd.contentful.management.v1+json
|
16
|
+
Content-Length:
|
17
|
+
- '0'
|
18
|
+
Connection:
|
19
|
+
- close
|
20
|
+
Host:
|
21
|
+
- api.contentful.com
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 200
|
25
|
+
message: OK
|
26
|
+
headers:
|
27
|
+
Accept-Ranges:
|
28
|
+
- bytes
|
29
|
+
Access-Control-Allow-Headers:
|
30
|
+
- Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent
|
31
|
+
Access-Control-Allow-Methods:
|
32
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
33
|
+
Access-Control-Allow-Origin:
|
34
|
+
- "*"
|
35
|
+
Access-Control-Expose-Headers:
|
36
|
+
- Etag
|
37
|
+
Access-Control-Max-Age:
|
38
|
+
- '1728000'
|
39
|
+
Cache-Control:
|
40
|
+
- max-age=0
|
41
|
+
Content-Type:
|
42
|
+
- application/vnd.contentful.management.v1+json
|
43
|
+
Date:
|
44
|
+
- Thu, 07 Apr 2016 20:50:04 GMT
|
45
|
+
Etag:
|
46
|
+
- '"b07001d0296ad5d0cdebc4f6fb3fa689"'
|
47
|
+
Server:
|
48
|
+
- nginx
|
49
|
+
Status:
|
50
|
+
- 200 OK
|
51
|
+
Strict-Transport-Security:
|
52
|
+
- max-age=15768000
|
53
|
+
X-Content-Type-Options:
|
54
|
+
- nosniff
|
55
|
+
X-Contentful-Request-Id:
|
56
|
+
- b89-583996715
|
57
|
+
Content-Length:
|
58
|
+
- '1343'
|
59
|
+
Connection:
|
60
|
+
- Close
|
61
|
+
Set-Cookie:
|
62
|
+
- incap_ses_298_673446=5vDeUCEqfiE7+tS9KrYiBPvHBlcAAAAA0AGTKAhPX6PrlAWxoVkf6w==;
|
63
|
+
path=/; Domain=.contentful.com
|
64
|
+
- nlbi_673446=0/TiNbHQwldAjYzfaoBaJgAAAAAsffPFHh5nAapMoVwoXbnM; path=/; Domain=.contentful.com
|
65
|
+
- visid_incap_673446=dA2gFwY3RviuE1FDe/N28/vHBlcAAAAAQUIPAAAAAAApTp5xNipRbZqoyYeTLqdE;
|
66
|
+
expires=Fri, 07 Apr 2017 09:48:46 GMT; path=/; Domain=.contentful.com
|
67
|
+
X-Iinfo:
|
68
|
+
- 3-18164689-18164696 NNNN CT(175 361 0) RT(1460062202927 95) q(0 0 5 -1) r(7
|
69
|
+
7) U5
|
70
|
+
X-Cdn:
|
71
|
+
- Incapsula
|
72
|
+
body:
|
73
|
+
encoding: UTF-8
|
74
|
+
string: |+
|
75
|
+
{
|
76
|
+
"name":"Developer",
|
77
|
+
"description":"Allows reading Entries and managing API Keys",
|
78
|
+
"policies":[
|
79
|
+
{
|
80
|
+
"effect":"allow",
|
81
|
+
"actions":[
|
82
|
+
"read"
|
83
|
+
],
|
84
|
+
"constraint":{
|
85
|
+
"and":[
|
86
|
+
{
|
87
|
+
"equals":[
|
88
|
+
{
|
89
|
+
"doc":"sys.type"
|
90
|
+
},
|
91
|
+
"Asset"
|
92
|
+
]
|
93
|
+
}
|
94
|
+
]
|
95
|
+
}
|
96
|
+
},
|
97
|
+
{
|
98
|
+
"effect":"allow",
|
99
|
+
"actions":[
|
100
|
+
"read"
|
101
|
+
],
|
102
|
+
"constraint":{
|
103
|
+
"and":[
|
104
|
+
{
|
105
|
+
"equals":[
|
106
|
+
{
|
107
|
+
"doc":"sys.type"
|
108
|
+
},
|
109
|
+
"Entry"
|
110
|
+
]
|
111
|
+
}
|
112
|
+
]
|
113
|
+
}
|
114
|
+
}
|
115
|
+
],
|
116
|
+
"permissions":{
|
117
|
+
"ContentModel":[
|
118
|
+
"read"
|
119
|
+
],
|
120
|
+
"Settings":[],
|
121
|
+
"ContentDelivery":"all"
|
122
|
+
},
|
123
|
+
"sys":{
|
124
|
+
"type":"Role",
|
125
|
+
"id":"0rQMQMd6ZTgeF7hxjz7JDi",
|
126
|
+
"version":0,
|
127
|
+
"space":{
|
128
|
+
"sys":{
|
129
|
+
"type":"Link",
|
130
|
+
"linkType":"Space",
|
131
|
+
"id":"03vrieuz7eun"
|
132
|
+
}
|
133
|
+
},
|
134
|
+
"createdBy":{
|
135
|
+
"sys":{
|
136
|
+
"type":"Link",
|
137
|
+
"linkType":"User",
|
138
|
+
"id":"4SejVrWT96dvL9IV4Nb7sQ"
|
139
|
+
}
|
140
|
+
},
|
141
|
+
"createdAt":"2016-04-07T20:34:32Z",
|
142
|
+
"updatedBy":{
|
143
|
+
"sys":{
|
144
|
+
"type":"Link",
|
145
|
+
"linkType":"User",
|
146
|
+
"id":"4SejVrWT96dvL9IV4Nb7sQ"
|
147
|
+
}
|
148
|
+
},
|
149
|
+
"updatedAt":"2016-04-07T20:34:32Z"
|
150
|
+
}
|
151
|
+
}
|
152
|
+
|
153
|
+
http_version:
|
154
|
+
recorded_at: Thu, 07 Apr 2016 20:50:04 GMT
|
155
|
+
- request:
|
156
|
+
method: put
|
157
|
+
uri: https://api.contentful.com/spaces/03vrieuz7eun/roles/0rQMQMd6ZTgeF7hxjz7JDi
|
158
|
+
body:
|
159
|
+
encoding: UTF-8
|
160
|
+
string: '{"name":"Something"}'
|
161
|
+
headers:
|
162
|
+
User-Agent:
|
163
|
+
- RubyContentfulManagementGem/1.0.1
|
164
|
+
Authorization:
|
165
|
+
- Bearer <ACCESS_TOKEN>
|
166
|
+
Content-Type:
|
167
|
+
- application/vnd.contentful.management.v1+json
|
168
|
+
X-Contentful-Version:
|
169
|
+
- '0'
|
170
|
+
Connection:
|
171
|
+
- close
|
172
|
+
Host:
|
173
|
+
- api.contentful.com
|
174
|
+
response:
|
175
|
+
status:
|
176
|
+
code: 200
|
177
|
+
message: OK
|
178
|
+
headers:
|
179
|
+
Accept-Ranges:
|
180
|
+
- bytes
|
181
|
+
Access-Control-Allow-Headers:
|
182
|
+
- Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent
|
183
|
+
Access-Control-Allow-Methods:
|
184
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
185
|
+
Access-Control-Allow-Origin:
|
186
|
+
- "*"
|
187
|
+
Access-Control-Expose-Headers:
|
188
|
+
- Etag
|
189
|
+
Access-Control-Max-Age:
|
190
|
+
- '1728000'
|
191
|
+
Cache-Control:
|
192
|
+
- max-age=0
|
193
|
+
Content-Type:
|
194
|
+
- application/vnd.contentful.management.v1+json
|
195
|
+
Date:
|
196
|
+
- Thu, 07 Apr 2016 20:50:05 GMT
|
197
|
+
Etag:
|
198
|
+
- '"2f6a9ae9f4e081ca2601deeed51b2f68"'
|
199
|
+
Server:
|
200
|
+
- nginx
|
201
|
+
Status:
|
202
|
+
- 200 OK
|
203
|
+
Strict-Transport-Security:
|
204
|
+
- max-age=15768000
|
205
|
+
X-Content-Type-Options:
|
206
|
+
- nosniff
|
207
|
+
X-Contentful-Request-Id:
|
208
|
+
- 0b5-375598601
|
209
|
+
Content-Length:
|
210
|
+
- '1343'
|
211
|
+
Connection:
|
212
|
+
- Close
|
213
|
+
Set-Cookie:
|
214
|
+
- incap_ses_298_673446=B1LId1DOdDhM/NS9KrYiBPzHBlcAAAAAOJVXqAK+oth8B0VV1GE8PA==;
|
215
|
+
path=/; Domain=.contentful.com
|
216
|
+
- nlbi_673446=glYQeG7X7iuWiyg4aoBaJgAAAAAciytLU9f4470V2SX91X0D; path=/; Domain=.contentful.com
|
217
|
+
- visid_incap_673446=PKQkmILFSviM+bGqIKwtcvzHBlcAAAAAQUIPAAAAAAAlc/WGM0sGyATcHHstMUhv;
|
218
|
+
expires=Fri, 07 Apr 2017 09:48:46 GMT; path=/; Domain=.contentful.com
|
219
|
+
X-Iinfo:
|
220
|
+
- 6-21454979-21455001 NNNN CT(170 171 0) RT(1460062203892 87) q(0 0 4 -1) r(7
|
221
|
+
7) U5
|
222
|
+
X-Cdn:
|
223
|
+
- Incapsula
|
224
|
+
body:
|
225
|
+
encoding: UTF-8
|
226
|
+
string: |+
|
227
|
+
{
|
228
|
+
"name":"Something",
|
229
|
+
"description":"Allows reading Entries and managing API Keys",
|
230
|
+
"policies":[
|
231
|
+
{
|
232
|
+
"effect":"allow",
|
233
|
+
"actions":[
|
234
|
+
"read"
|
235
|
+
],
|
236
|
+
"constraint":{
|
237
|
+
"and":[
|
238
|
+
{
|
239
|
+
"equals":[
|
240
|
+
{
|
241
|
+
"doc":"sys.type"
|
242
|
+
},
|
243
|
+
"Asset"
|
244
|
+
]
|
245
|
+
}
|
246
|
+
]
|
247
|
+
}
|
248
|
+
},
|
249
|
+
{
|
250
|
+
"effect":"allow",
|
251
|
+
"actions":[
|
252
|
+
"read"
|
253
|
+
],
|
254
|
+
"constraint":{
|
255
|
+
"and":[
|
256
|
+
{
|
257
|
+
"equals":[
|
258
|
+
{
|
259
|
+
"doc":"sys.type"
|
260
|
+
},
|
261
|
+
"Entry"
|
262
|
+
]
|
263
|
+
}
|
264
|
+
]
|
265
|
+
}
|
266
|
+
}
|
267
|
+
],
|
268
|
+
"permissions":{
|
269
|
+
"ContentModel":[
|
270
|
+
"read"
|
271
|
+
],
|
272
|
+
"Settings":[],
|
273
|
+
"ContentDelivery":"all"
|
274
|
+
},
|
275
|
+
"sys":{
|
276
|
+
"type":"Role",
|
277
|
+
"id":"0rQMQMd6ZTgeF7hxjz7JDi",
|
278
|
+
"version":1,
|
279
|
+
"space":{
|
280
|
+
"sys":{
|
281
|
+
"type":"Link",
|
282
|
+
"linkType":"Space",
|
283
|
+
"id":"03vrieuz7eun"
|
284
|
+
}
|
285
|
+
},
|
286
|
+
"createdBy":{
|
287
|
+
"sys":{
|
288
|
+
"type":"Link",
|
289
|
+
"linkType":"User",
|
290
|
+
"id":"4SejVrWT96dvL9IV4Nb7sQ"
|
291
|
+
}
|
292
|
+
},
|
293
|
+
"createdAt":"2016-04-07T20:34:32Z",
|
294
|
+
"updatedBy":{
|
295
|
+
"sys":{
|
296
|
+
"type":"Link",
|
297
|
+
"linkType":"User",
|
298
|
+
"id":"4SejVrWT96dvL9IV4Nb7sQ"
|
299
|
+
}
|
300
|
+
},
|
301
|
+
"updatedAt":"2016-04-07T20:50:05Z"
|
302
|
+
}
|
303
|
+
}
|
304
|
+
|
305
|
+
http_version:
|
306
|
+
recorded_at: Thu, 07 Apr 2016 20:50:05 GMT
|
307
|
+
- request:
|
308
|
+
method: get
|
309
|
+
uri: https://api.contentful.com/spaces/03vrieuz7eun/roles/0rQMQMd6ZTgeF7hxjz7JDi
|
310
|
+
body:
|
311
|
+
encoding: US-ASCII
|
312
|
+
string: ''
|
313
|
+
headers:
|
314
|
+
User-Agent:
|
315
|
+
- RubyContentfulManagementGem/1.0.1
|
316
|
+
Authorization:
|
317
|
+
- Bearer <ACCESS_TOKEN>
|
318
|
+
Content-Type:
|
319
|
+
- application/vnd.contentful.management.v1+json
|
320
|
+
Content-Length:
|
321
|
+
- '0'
|
322
|
+
Connection:
|
323
|
+
- close
|
324
|
+
Host:
|
325
|
+
- api.contentful.com
|
326
|
+
response:
|
327
|
+
status:
|
328
|
+
code: 200
|
329
|
+
message: OK
|
330
|
+
headers:
|
331
|
+
Accept-Ranges:
|
332
|
+
- bytes
|
333
|
+
Access-Control-Allow-Headers:
|
334
|
+
- Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent
|
335
|
+
Access-Control-Allow-Methods:
|
336
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
337
|
+
Access-Control-Allow-Origin:
|
338
|
+
- "*"
|
339
|
+
Access-Control-Expose-Headers:
|
340
|
+
- Etag
|
341
|
+
Access-Control-Max-Age:
|
342
|
+
- '1728000'
|
343
|
+
Cache-Control:
|
344
|
+
- max-age=0
|
345
|
+
Content-Type:
|
346
|
+
- application/vnd.contentful.management.v1+json
|
347
|
+
Date:
|
348
|
+
- Thu, 07 Apr 2016 20:50:05 GMT
|
349
|
+
Etag:
|
350
|
+
- '"2f6a9ae9f4e081ca2601deeed51b2f68"'
|
351
|
+
Server:
|
352
|
+
- nginx
|
353
|
+
Status:
|
354
|
+
- 200 OK
|
355
|
+
Strict-Transport-Security:
|
356
|
+
- max-age=15768000
|
357
|
+
X-Content-Type-Options:
|
358
|
+
- nosniff
|
359
|
+
X-Contentful-Request-Id:
|
360
|
+
- 9e1-1105918588
|
361
|
+
Content-Length:
|
362
|
+
- '1343'
|
363
|
+
Connection:
|
364
|
+
- Close
|
365
|
+
Set-Cookie:
|
366
|
+
- incap_ses_298_673446=FbxqU0S1y24H/tS9KrYiBP3HBlcAAAAADaQmVi53PdMxrkO7n9aqzw==;
|
367
|
+
path=/; Domain=.contentful.com
|
368
|
+
- nlbi_673446=LVWSEqwo43EFp23GaoBaJgAAAAAA5ox8t/yFoLSgC7lAYBp8; path=/; Domain=.contentful.com
|
369
|
+
- visid_incap_673446=/WtfTqRJSDKF6w9tXhhOEf3HBlcAAAAAQUIPAAAAAACWyKaDruI6eDKtLW0K8BcR;
|
370
|
+
expires=Fri, 07 Apr 2017 09:48:45 GMT; path=/; Domain=.contentful.com
|
371
|
+
X-Iinfo:
|
372
|
+
- 5-24742505-24742526 NNNN CT(167 169 0) RT(1460062204730 109) q(0 0 3 -1) r(6
|
373
|
+
6) U5
|
374
|
+
X-Cdn:
|
375
|
+
- Incapsula
|
376
|
+
body:
|
377
|
+
encoding: UTF-8
|
378
|
+
string: |+
|
379
|
+
{
|
380
|
+
"name":"Something",
|
381
|
+
"description":"Allows reading Entries and managing API Keys",
|
382
|
+
"policies":[
|
383
|
+
{
|
384
|
+
"effect":"allow",
|
385
|
+
"actions":[
|
386
|
+
"read"
|
387
|
+
],
|
388
|
+
"constraint":{
|
389
|
+
"and":[
|
390
|
+
{
|
391
|
+
"equals":[
|
392
|
+
{
|
393
|
+
"doc":"sys.type"
|
394
|
+
},
|
395
|
+
"Asset"
|
396
|
+
]
|
397
|
+
}
|
398
|
+
]
|
399
|
+
}
|
400
|
+
},
|
401
|
+
{
|
402
|
+
"effect":"allow",
|
403
|
+
"actions":[
|
404
|
+
"read"
|
405
|
+
],
|
406
|
+
"constraint":{
|
407
|
+
"and":[
|
408
|
+
{
|
409
|
+
"equals":[
|
410
|
+
{
|
411
|
+
"doc":"sys.type"
|
412
|
+
},
|
413
|
+
"Entry"
|
414
|
+
]
|
415
|
+
}
|
416
|
+
]
|
417
|
+
}
|
418
|
+
}
|
419
|
+
],
|
420
|
+
"permissions":{
|
421
|
+
"ContentModel":[
|
422
|
+
"read"
|
423
|
+
],
|
424
|
+
"Settings":[],
|
425
|
+
"ContentDelivery":"all"
|
426
|
+
},
|
427
|
+
"sys":{
|
428
|
+
"type":"Role",
|
429
|
+
"id":"0rQMQMd6ZTgeF7hxjz7JDi",
|
430
|
+
"version":1,
|
431
|
+
"space":{
|
432
|
+
"sys":{
|
433
|
+
"type":"Link",
|
434
|
+
"linkType":"Space",
|
435
|
+
"id":"03vrieuz7eun"
|
436
|
+
}
|
437
|
+
},
|
438
|
+
"createdBy":{
|
439
|
+
"sys":{
|
440
|
+
"type":"Link",
|
441
|
+
"linkType":"User",
|
442
|
+
"id":"4SejVrWT96dvL9IV4Nb7sQ"
|
443
|
+
}
|
444
|
+
},
|
445
|
+
"createdAt":"2016-04-07T20:34:32Z",
|
446
|
+
"updatedBy":{
|
447
|
+
"sys":{
|
448
|
+
"type":"Link",
|
449
|
+
"linkType":"User",
|
450
|
+
"id":"4SejVrWT96dvL9IV4Nb7sQ"
|
451
|
+
}
|
452
|
+
},
|
453
|
+
"updatedAt":"2016-04-07T20:50:05Z"
|
454
|
+
}
|
455
|
+
}
|
456
|
+
|
457
|
+
http_version:
|
458
|
+
recorded_at: Thu, 07 Apr 2016 20:50:06 GMT
|
459
|
+
recorded_with: VCR 2.9.3
|