contentful-management 2.11.0 → 3.0.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 +36 -0
- data/README.md +30 -13
- data/contentful-management.gemspec +1 -1
- data/lib/contentful/management/asset.rb +2 -0
- data/lib/contentful/management/client.rb +10 -12
- data/lib/contentful/management/{client_usage_period_methods_factory.rb → client_organization_periodic_usage_methods_factory.rb} +3 -4
- data/lib/contentful/management/{client_api_usage_methods_factory.rb → client_space_periodic_usage_methods_factory.rb} +4 -11
- data/lib/contentful/management/entry.rb +16 -12
- data/lib/contentful/management/field.rb +3 -1
- data/lib/contentful/management/organization.rb +18 -8
- data/lib/contentful/management/{api_usage.rb → organization_periodic_usage.rb} +13 -18
- data/lib/contentful/management/organization_user_methods_factory.rb +18 -0
- data/lib/contentful/management/resource.rb +3 -2
- data/lib/contentful/management/resource/metadata.rb +44 -0
- data/lib/contentful/management/resource_builder.rb +8 -6
- data/lib/contentful/management/space.rb +10 -0
- data/lib/contentful/management/{usage_period.rb → space_periodic_usage.rb} +12 -9
- data/lib/contentful/management/space_user_methods_factory.rb +19 -0
- data/lib/contentful/management/tag.rb +14 -0
- data/lib/contentful/management/user.rb +7 -1
- data/lib/contentful/management/version.rb +1 -1
- data/spec/fixtures/vcr_cassettes/asset/issue_219.yml +442 -0
- data/spec/fixtures/vcr_cassettes/entry/issue_215_1.yml +905 -0
- data/spec/fixtures/vcr_cassettes/entry/issue_215_2.yml +899 -0
- data/spec/fixtures/vcr_cassettes/entry/issue_215_3.yml +893 -0
- data/spec/fixtures/vcr_cassettes/entry/issue_219.yml +535 -0
- data/spec/fixtures/vcr_cassettes/organization/user.yml +238 -0
- data/spec/fixtures/vcr_cassettes/organization_periodic_usage/all.yml +368 -0
- data/spec/fixtures/vcr_cassettes/organization_periodic_usage/filters.yml +167 -0
- data/spec/fixtures/vcr_cassettes/space/user.yml +254 -0
- data/spec/fixtures/vcr_cassettes/space_periodic_usage/all.yml +6800 -0
- data/spec/fixtures/vcr_cassettes/space_periodic_usage/filters.yml +1976 -0
- data/spec/lib/contentful/management/asset_spec.rb +31 -0
- data/spec/lib/contentful/management/entry_spec.rb +77 -0
- data/spec/lib/contentful/management/organization_periodic_usage_spec.rb +36 -0
- data/spec/lib/contentful/management/organization_spec.rb +20 -0
- data/spec/lib/contentful/management/space_periodic_usage_spec.rb +36 -0
- data/spec/lib/contentful/management/space_spec.rb +20 -0
- metadata +43 -21
- data/spec/fixtures/vcr_cassettes/api_usage/all.yml +0 -155
- data/spec/fixtures/vcr_cassettes/usage_period/all.yml +0 -114
- data/spec/lib/contentful/management/api_usage_spec.rb +0 -28
- data/spec/lib/contentful/management/usage_period_spec.rb +0 -27
@@ -237,8 +237,9 @@ module Contentful
|
|
237
237
|
# @param [String] resource_id
|
238
238
|
#
|
239
239
|
# @return [Contentful::Management::Resource]
|
240
|
-
def find(client, space_id, environment_id = nil, resource_id = nil)
|
241
|
-
ResourceRequester.new(client, self).find(space_id: space_id, environment_id: environment_id,
|
240
|
+
def find(client, space_id, environment_id = nil, resource_id = nil, organization_id = nil)
|
241
|
+
ResourceRequester.new(client, self).find(space_id: space_id, environment_id: environment_id,
|
242
|
+
resource_id: resource_id, organization_id: organization_id)
|
242
243
|
end
|
243
244
|
|
244
245
|
# Creates a resource.
|
@@ -0,0 +1,44 @@
|
|
1
|
+
module Contentful
|
2
|
+
module Management
|
3
|
+
module Resource
|
4
|
+
# Adds metadata logic for [Resource] classes
|
5
|
+
module Metadata
|
6
|
+
# Returns the metadata hash
|
7
|
+
attr_reader :_metadata
|
8
|
+
|
9
|
+
# @private
|
10
|
+
def initialize(object = nil, *)
|
11
|
+
super
|
12
|
+
@_metadata = {}
|
13
|
+
extract_metadata_from_object! object if object
|
14
|
+
end
|
15
|
+
|
16
|
+
# @private
|
17
|
+
def inspect(info = nil)
|
18
|
+
if _metadata.empty?
|
19
|
+
super(info)
|
20
|
+
else
|
21
|
+
super("#{info} @_metadata=#{_metadata.inspect}")
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
def extract_metadata_from_object!(object)
|
28
|
+
return unless object.key?('metadata')
|
29
|
+
object['metadata'].each do |key, value|
|
30
|
+
@_metadata[key.to_sym] = if key == 'tags'
|
31
|
+
coerce_tags(value)
|
32
|
+
else
|
33
|
+
value
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def coerce_tags(tags)
|
39
|
+
tags.map { |tag| Contentful::Management::Link.new(tag) }
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require_relative 'tag'
|
1
2
|
require_relative 'link'
|
2
3
|
require_relative 'user'
|
3
4
|
require_relative 'role'
|
@@ -12,9 +13,7 @@ require_relative 'webhook'
|
|
12
13
|
require_relative 'api_key'
|
13
14
|
require_relative 'resource'
|
14
15
|
require_relative 'snapshot'
|
15
|
-
require_relative 'api_usage'
|
16
16
|
require_relative 'environment'
|
17
|
-
require_relative 'usage_period'
|
18
17
|
require_relative 'organization'
|
19
18
|
require_relative 'content_type'
|
20
19
|
require_relative 'webhook_call'
|
@@ -24,7 +23,9 @@ require_relative 'webhook_health'
|
|
24
23
|
require_relative 'preview_api_key'
|
25
24
|
require_relative 'space_membership'
|
26
25
|
require_relative 'editor_interface'
|
26
|
+
require_relative 'space_periodic_usage'
|
27
27
|
require_relative 'personal_access_token'
|
28
|
+
require_relative 'organization_periodic_usage'
|
28
29
|
|
29
30
|
module Contentful
|
30
31
|
module Management
|
@@ -37,8 +38,8 @@ module Contentful
|
|
37
38
|
'Space' => Contentful::Management::Space,
|
38
39
|
'SpaceMembership' => Contentful::Management::SpaceMembership,
|
39
40
|
'Organization' => Contentful::Management::Organization,
|
40
|
-
'
|
41
|
-
'
|
41
|
+
'SpacePeriodicUsage' => Contentful::Management::SpacePeriodicUsage,
|
42
|
+
'OrganizationPeriodicUsage' => Contentful::Management::OrganizationPeriodicUsage,
|
42
43
|
'User' => Contentful::Management::User,
|
43
44
|
'Environment' => Contentful::Management::Environment,
|
44
45
|
'ContentType' => Contentful::Management::ContentType,
|
@@ -58,7 +59,8 @@ module Contentful
|
|
58
59
|
'Extension' => Contentful::Management::UIExtension,
|
59
60
|
'EditorInterface' => Contentful::Management::EditorInterface,
|
60
61
|
'Snapshot' => Contentful::Management::Snapshot,
|
61
|
-
'Upload' => Contentful::Management::Upload
|
62
|
+
'Upload' => Contentful::Management::Upload,
|
63
|
+
'Tag' => Contentful::Management::Tag
|
62
64
|
}.freeze
|
63
65
|
|
64
66
|
# Default Entry Mapping
|
@@ -214,7 +216,7 @@ module Contentful
|
|
214
216
|
detect_child_objects(potential_objects).each do |child_name, child_object|
|
215
217
|
res.public_send(name)[child_name.to_sym] = create_resource(child_object)
|
216
218
|
end
|
217
|
-
next if name
|
219
|
+
next if %w[includes metadata].include?(name)
|
218
220
|
detect_child_arrays(potential_objects).each do |child_name, _child_array|
|
219
221
|
replace_child_array res.public_send(name)[child_name.to_sym]
|
220
222
|
end
|
@@ -6,6 +6,7 @@ require_relative 'resource'
|
|
6
6
|
require_relative 'environment'
|
7
7
|
require_relative 'space_membership'
|
8
8
|
require_relative 'space_role_methods_factory'
|
9
|
+
require_relative 'space_user_methods_factory'
|
9
10
|
require_relative 'space_webhook_methods_factory'
|
10
11
|
require_relative 'space_api_key_methods_factory'
|
11
12
|
require_relative 'space_environment_methods_factory'
|
@@ -155,6 +156,15 @@ module Contentful
|
|
155
156
|
SpaceRoleMethodsFactory.new(self)
|
156
157
|
end
|
157
158
|
|
159
|
+
# Allows viewing of users in context of the current space
|
160
|
+
# Allows listing all users of space, and finding one by ID.
|
161
|
+
# @see _ README for details.
|
162
|
+
#
|
163
|
+
# @return [Contentful::Management::SpaceUserMethodsFactory]
|
164
|
+
def users
|
165
|
+
SpaceUserMethodsFactory.new(self)
|
166
|
+
end
|
167
|
+
|
158
168
|
# Allows manipulation of webhooks in context of the current space
|
159
169
|
# Allows listing all webhooks for space and finding one by ID.
|
160
170
|
# @see _ README for details.
|
@@ -2,32 +2,35 @@ require_relative 'resource'
|
|
2
2
|
|
3
3
|
module Contentful
|
4
4
|
module Management
|
5
|
-
# Resource class for
|
6
|
-
# @see _ https://www.contentful.com/developers/docs/references/content-management-api/#/reference/
|
7
|
-
class
|
5
|
+
# Resource class for SpacePeriodicUsage.
|
6
|
+
# @see _ https://www.contentful.com/developers/docs/references/content-management-api/#/reference/usage/space-usage/get-space-usage/console/curl
|
7
|
+
class SpacePeriodicUsage
|
8
8
|
include Contentful::Management::Resource
|
9
9
|
include Contentful::Management::Resource::Refresher
|
10
10
|
include Contentful::Management::Resource::SystemProperties
|
11
11
|
|
12
|
-
property :
|
13
|
-
property :
|
12
|
+
property :metric, :string
|
13
|
+
property :usage, :integer
|
14
|
+
property :usagePerDay, :object
|
15
|
+
property :unitOfMeasure, :string
|
16
|
+
property :dateRange, :object
|
14
17
|
|
15
18
|
# @private
|
16
19
|
def self.build_endpoint(endpoint_options)
|
17
20
|
organization_id = endpoint_options[:organization_id]
|
18
21
|
|
19
|
-
"organizations/#{organization_id}/
|
22
|
+
"organizations/#{organization_id}/space_periodic_usages"
|
20
23
|
end
|
21
24
|
|
22
|
-
# Gets all
|
25
|
+
# Gets all space periodic usages for a given organization.
|
23
26
|
#
|
24
27
|
# @param [Contentful::Management::Client] client
|
25
28
|
# @param [String] organization_id
|
26
29
|
# @param [Hash] params
|
27
30
|
#
|
28
|
-
# @return [Contentful::Management::Array<Contentful::Management::
|
31
|
+
# @return [Contentful::Management::Array<Contentful::Management::SpacePeriodicUsage>]
|
29
32
|
def self.all(client, organization_id, params = {})
|
30
|
-
|
33
|
+
ClientSpacePeriodicUsageMethodsFactory.new(client, organization_id).all(params)
|
31
34
|
end
|
32
35
|
|
33
36
|
# Not supported
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require_relative 'space_association_methods_factory'
|
2
|
+
|
3
|
+
module Contentful
|
4
|
+
module Management
|
5
|
+
# Wrapper for User API for usage from within Space
|
6
|
+
# @private
|
7
|
+
class SpaceUserMethodsFactory
|
8
|
+
attr_reader :space
|
9
|
+
|
10
|
+
def initialize(space)
|
11
|
+
@space = space
|
12
|
+
end
|
13
|
+
|
14
|
+
def find(id)
|
15
|
+
User.find(space.client, space.id, nil, id)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require_relative 'resource'
|
2
|
+
|
3
|
+
module Contentful
|
4
|
+
module Management
|
5
|
+
# Resource Class for Tags
|
6
|
+
# https://www.contentful.com/developers/docs/references/content-management-api/#/reference/content-tags
|
7
|
+
class Tag
|
8
|
+
include Contentful::Management::Resource
|
9
|
+
include Contentful::Management::Resource::SystemProperties
|
10
|
+
|
11
|
+
property :name
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -19,7 +19,13 @@ module Contentful
|
|
19
19
|
|
20
20
|
# @private
|
21
21
|
def self.build_endpoint(endpoint_options)
|
22
|
-
endpoint =
|
22
|
+
endpoint = if endpoint_options[:space_id]
|
23
|
+
"spaces/#{endpoint_options[:space_id]}/users"
|
24
|
+
elsif endpoint_options[:organization_id]
|
25
|
+
"organizations/#{endpoint_options[:organization_id]}/users"
|
26
|
+
else
|
27
|
+
'users'
|
28
|
+
end
|
23
29
|
endpoint = "#{endpoint}/#{endpoint_options[:resource_id]}" if endpoint_options[:resource_id]
|
24
30
|
endpoint
|
25
31
|
end
|
@@ -0,0 +1,442 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.contentful.com/spaces/2l3j7k267g9k
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
X-Contentful-User-Agent:
|
11
|
+
- sdk contentful-management.rb/2.13.0; platform ruby/2.6.3; os macOS/18;
|
12
|
+
Authorization:
|
13
|
+
- Bearer <ACCESS_TOKEN>
|
14
|
+
Content-Type:
|
15
|
+
- application/vnd.contentful.management.v1+json
|
16
|
+
Connection:
|
17
|
+
- close
|
18
|
+
Host:
|
19
|
+
- api.contentful.com
|
20
|
+
User-Agent:
|
21
|
+
- http.rb/4.4.1
|
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,X-Contentful-Enable-Alpha-Feature,X-Contentful-Source-Environment,X-Contentful-Team,X-Contentful-Parent-Id,x-contentful-validate-only,X-Contentful-Skip-UI-Draft-Validation,X-Contentful-Marketplace,X-Contentful-UI-Content-Auto-Save,cf-trace
|
31
|
+
Access-Control-Allow-Methods:
|
32
|
+
- DELETE,GET,HEAD,POST,PUT,PATCH,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
|
+
- no-store
|
41
|
+
Cf-Organization-Id:
|
42
|
+
- 1VcAE6naLx3WZBNNUIMMZE
|
43
|
+
Cf-Space-Id:
|
44
|
+
- 2l3j7k267g9k
|
45
|
+
Content-Type:
|
46
|
+
- application/vnd.contentful.management.v1+json
|
47
|
+
Contentful-Api:
|
48
|
+
- cma
|
49
|
+
Date:
|
50
|
+
- Thu, 07 Jan 2021 11:06:34 GMT
|
51
|
+
Etag:
|
52
|
+
- W/"659d95ef36a17e58e2737034fa6383c8"
|
53
|
+
Referrer-Policy:
|
54
|
+
- strict-origin-when-cross-origin
|
55
|
+
Server:
|
56
|
+
- Contentful
|
57
|
+
Strict-Transport-Security:
|
58
|
+
- max-age=15768000
|
59
|
+
X-Content-Type-Options:
|
60
|
+
- nosniff
|
61
|
+
X-Contentful-Ratelimit-Hour-Limit:
|
62
|
+
- '36000'
|
63
|
+
X-Contentful-Ratelimit-Hour-Remaining:
|
64
|
+
- '35999'
|
65
|
+
X-Contentful-Ratelimit-Reset:
|
66
|
+
- '0'
|
67
|
+
X-Contentful-Ratelimit-Second-Limit:
|
68
|
+
- '10'
|
69
|
+
X-Contentful-Ratelimit-Second-Remaining:
|
70
|
+
- '9'
|
71
|
+
X-Contentful-Request-Id:
|
72
|
+
- ec8d18ce16f490826aa9fad2da805fab
|
73
|
+
X-Contentful-Route:
|
74
|
+
- "/spaces/:id"
|
75
|
+
X-Download-Options:
|
76
|
+
- noopen
|
77
|
+
X-Frame-Options:
|
78
|
+
- ALLOWALL
|
79
|
+
X-Permitted-Cross-Domain-Policies:
|
80
|
+
- none
|
81
|
+
X-Xss-Protection:
|
82
|
+
- 1; mode=block
|
83
|
+
Content-Length:
|
84
|
+
- '615'
|
85
|
+
Connection:
|
86
|
+
- Close
|
87
|
+
Set-Cookie:
|
88
|
+
- incap_ses_1209_673446=YVZmXgaaL1nUoYajdzvHEDnr9l8AAAAA9AANvTqheZgll2XY47/SVw==;
|
89
|
+
path=/; Domain=.contentful.com
|
90
|
+
- nlbi_673446=TEfpMs2gcV4tuBwBKsJtVwAAAADqY9XHcdiGX3TdLGbT6y5/; path=/; Domain=.contentful.com
|
91
|
+
- visid_incap_673446=Tu9GqOaLRImlZ3thm9+RNznr9l8AAAAAQUIPAAAAAAA1c9Y1VFXr0Jkj3riEyjEx;
|
92
|
+
expires=Fri, 07 Jan 2022 10:05:00 GMT; HttpOnly; path=/; Domain=.contentful.com
|
93
|
+
X-Cdn:
|
94
|
+
- Incapsula
|
95
|
+
X-Iinfo:
|
96
|
+
- 6-1974143-1974145 NNNN CT(159 160 0) RT(1610017593403 47) q(0 0 3 -1) r(5
|
97
|
+
5) U5
|
98
|
+
body:
|
99
|
+
encoding: ASCII-8BIT
|
100
|
+
string: |+
|
101
|
+
{
|
102
|
+
"name":"Colorful-Demo-Dev-workflow",
|
103
|
+
"sys":{
|
104
|
+
"type":"Space",
|
105
|
+
"id":"2l3j7k267g9k",
|
106
|
+
"version":3,
|
107
|
+
"createdBy":{
|
108
|
+
"sys":{
|
109
|
+
"type":"Link",
|
110
|
+
"linkType":"User",
|
111
|
+
"id":"0PCYk22mt1xD7gTKZhHycN"
|
112
|
+
}
|
113
|
+
},
|
114
|
+
"createdAt":"2019-09-09T14:37:05Z",
|
115
|
+
"updatedBy":{
|
116
|
+
"sys":{
|
117
|
+
"type":"Link",
|
118
|
+
"linkType":"User",
|
119
|
+
"id":"0PCYk22mt1xD7gTKZhHycN"
|
120
|
+
}
|
121
|
+
},
|
122
|
+
"updatedAt":"2019-10-25T15:17:48Z",
|
123
|
+
"organization":{
|
124
|
+
"sys":{
|
125
|
+
"type":"Link",
|
126
|
+
"linkType":"Organization",
|
127
|
+
"id":"1VcAE6naLx3WZBNNUIMMZE"
|
128
|
+
}
|
129
|
+
}
|
130
|
+
}
|
131
|
+
}
|
132
|
+
|
133
|
+
http_version:
|
134
|
+
recorded_at: Thu, 07 Jan 2021 11:06:32 GMT
|
135
|
+
- request:
|
136
|
+
method: get
|
137
|
+
uri: https://api.contentful.com/spaces/2l3j7k267g9k/environments/master
|
138
|
+
body:
|
139
|
+
encoding: UTF-8
|
140
|
+
string: ''
|
141
|
+
headers:
|
142
|
+
X-Contentful-User-Agent:
|
143
|
+
- sdk contentful-management.rb/2.13.0; platform ruby/2.6.3; os macOS/18;
|
144
|
+
Authorization:
|
145
|
+
- Bearer <ACCESS_TOKEN>
|
146
|
+
Content-Type:
|
147
|
+
- application/vnd.contentful.management.v1+json
|
148
|
+
Connection:
|
149
|
+
- close
|
150
|
+
Host:
|
151
|
+
- api.contentful.com
|
152
|
+
User-Agent:
|
153
|
+
- http.rb/4.4.1
|
154
|
+
response:
|
155
|
+
status:
|
156
|
+
code: 200
|
157
|
+
message: OK
|
158
|
+
headers:
|
159
|
+
Accept-Ranges:
|
160
|
+
- bytes
|
161
|
+
Access-Control-Allow-Headers:
|
162
|
+
- 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,X-Contentful-Enable-Alpha-Feature,X-Contentful-Source-Environment,X-Contentful-Team,X-Contentful-Parent-Id,x-contentful-validate-only,X-Contentful-Skip-UI-Draft-Validation,X-Contentful-Marketplace,X-Contentful-UI-Content-Auto-Save,cf-trace
|
163
|
+
Access-Control-Allow-Methods:
|
164
|
+
- DELETE,GET,HEAD,POST,PUT,PATCH,OPTIONS
|
165
|
+
Access-Control-Allow-Origin:
|
166
|
+
- "*"
|
167
|
+
Access-Control-Expose-Headers:
|
168
|
+
- Etag
|
169
|
+
Access-Control-Max-Age:
|
170
|
+
- '1728000'
|
171
|
+
Cache-Control:
|
172
|
+
- no-store
|
173
|
+
Cf-Organization-Id:
|
174
|
+
- 1VcAE6naLx3WZBNNUIMMZE
|
175
|
+
Cf-Space-Id:
|
176
|
+
- 2l3j7k267g9k
|
177
|
+
Content-Type:
|
178
|
+
- application/vnd.contentful.management.v1+json
|
179
|
+
Contentful-Api:
|
180
|
+
- cma
|
181
|
+
Date:
|
182
|
+
- Thu, 07 Jan 2021 11:06:34 GMT
|
183
|
+
Etag:
|
184
|
+
- W/"901485ea9ca14612f2a5764df6b0fc04"
|
185
|
+
Referrer-Policy:
|
186
|
+
- strict-origin-when-cross-origin
|
187
|
+
Server:
|
188
|
+
- Contentful
|
189
|
+
Strict-Transport-Security:
|
190
|
+
- max-age=15768000
|
191
|
+
X-Content-Type-Options:
|
192
|
+
- nosniff
|
193
|
+
X-Contentful-Ratelimit-Hour-Limit:
|
194
|
+
- '36000'
|
195
|
+
X-Contentful-Ratelimit-Hour-Remaining:
|
196
|
+
- '35998'
|
197
|
+
X-Contentful-Ratelimit-Reset:
|
198
|
+
- '0'
|
199
|
+
X-Contentful-Ratelimit-Second-Limit:
|
200
|
+
- '10'
|
201
|
+
X-Contentful-Ratelimit-Second-Remaining:
|
202
|
+
- '8'
|
203
|
+
X-Contentful-Request-Id:
|
204
|
+
- 9b6794c810697dd6efc6303e4e8ef4d9
|
205
|
+
X-Contentful-Route:
|
206
|
+
- "/spaces/:space_id/environments/:id"
|
207
|
+
X-Download-Options:
|
208
|
+
- noopen
|
209
|
+
X-Frame-Options:
|
210
|
+
- ALLOWALL
|
211
|
+
X-Permitted-Cross-Domain-Policies:
|
212
|
+
- none
|
213
|
+
X-Xss-Protection:
|
214
|
+
- 1; mode=block
|
215
|
+
Content-Length:
|
216
|
+
- '827'
|
217
|
+
Connection:
|
218
|
+
- Close
|
219
|
+
Set-Cookie:
|
220
|
+
- incap_ses_1209_673446=Y2ykEEBgTnreoYajdzvHEDrr9l8AAAAAkviSHB+2OK8NcHzKUeC0Wg==;
|
221
|
+
path=/; Domain=.contentful.com
|
222
|
+
- nlbi_673446=t9IxdbWZoBXar3EkKsJtVwAAAACJnZFzX6lnLUI0ElgfMeWH; path=/; Domain=.contentful.com
|
223
|
+
- visid_incap_673446=CY/ac4UKQqSGiRg3sUKObDrr9l8AAAAAQUIPAAAAAADMHW0fGxjNQm6BtzVzbNhH;
|
224
|
+
expires=Fri, 07 Jan 2022 10:05:05 GMT; HttpOnly; path=/; Domain=.contentful.com
|
225
|
+
X-Cdn:
|
226
|
+
- Incapsula
|
227
|
+
X-Iinfo:
|
228
|
+
- 2-1495637-1495638 NNNY CT(0 0 0) RT(1610017594007 44) q(0 0 0 -1) r(2 2) U5
|
229
|
+
body:
|
230
|
+
encoding: ASCII-8BIT
|
231
|
+
string: |+
|
232
|
+
{
|
233
|
+
"name":"backup-1",
|
234
|
+
"sys":{
|
235
|
+
"type":"Environment",
|
236
|
+
"id":"master",
|
237
|
+
"aliasedEnvironment":{
|
238
|
+
"sys":{
|
239
|
+
"type":"Link",
|
240
|
+
"linkType":"Environment",
|
241
|
+
"id":"backup-1"
|
242
|
+
}
|
243
|
+
},
|
244
|
+
"version":3,
|
245
|
+
"space":{
|
246
|
+
"sys":{
|
247
|
+
"type":"Link",
|
248
|
+
"linkType":"Space",
|
249
|
+
"id":"2l3j7k267g9k"
|
250
|
+
}
|
251
|
+
},
|
252
|
+
"status":{
|
253
|
+
"sys":{
|
254
|
+
"type":"Link",
|
255
|
+
"linkType":"Status",
|
256
|
+
"id":"ready"
|
257
|
+
}
|
258
|
+
},
|
259
|
+
"createdBy":{
|
260
|
+
"sys":{
|
261
|
+
"type":"Link",
|
262
|
+
"linkType":"User",
|
263
|
+
"id":"6c10tlsIDlE3qvnNoTwYa5"
|
264
|
+
}
|
265
|
+
},
|
266
|
+
"createdAt":"2020-10-05T14:36:26Z",
|
267
|
+
"updatedBy":{
|
268
|
+
"sys":{
|
269
|
+
"type":"Link",
|
270
|
+
"linkType":"User",
|
271
|
+
"id":"6c10tlsIDlE3qvnNoTwYa5"
|
272
|
+
}
|
273
|
+
},
|
274
|
+
"updatedAt":"2020-10-05T14:36:30Z"
|
275
|
+
}
|
276
|
+
}
|
277
|
+
|
278
|
+
http_version:
|
279
|
+
recorded_at: Thu, 07 Jan 2021 11:06:32 GMT
|
280
|
+
- request:
|
281
|
+
method: get
|
282
|
+
uri: https://api.contentful.com/spaces/2l3j7k267g9k/environments/master/assets/2lxYoWv3LWHe0yhO3w2Yid
|
283
|
+
body:
|
284
|
+
encoding: UTF-8
|
285
|
+
string: ''
|
286
|
+
headers:
|
287
|
+
X-Contentful-User-Agent:
|
288
|
+
- sdk contentful-management.rb/2.13.0; platform ruby/2.6.3; os macOS/18;
|
289
|
+
Authorization:
|
290
|
+
- Bearer <ACCESS_TOKEN>
|
291
|
+
Content-Type:
|
292
|
+
- application/vnd.contentful.management.v1+json
|
293
|
+
Connection:
|
294
|
+
- close
|
295
|
+
Host:
|
296
|
+
- api.contentful.com
|
297
|
+
User-Agent:
|
298
|
+
- http.rb/4.4.1
|
299
|
+
response:
|
300
|
+
status:
|
301
|
+
code: 200
|
302
|
+
message: OK
|
303
|
+
headers:
|
304
|
+
Access-Control-Allow-Headers:
|
305
|
+
- 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,X-Contentful-Enable-Alpha-Feature,X-Contentful-Source-Environment,X-Contentful-Team,X-Contentful-Parent-Id,x-contentful-validate-only,X-Contentful-Skip-UI-Draft-Validation,X-Contentful-Marketplace,X-Contentful-UI-Content-Auto-Save,cf-trace
|
306
|
+
Access-Control-Allow-Methods:
|
307
|
+
- DELETE,GET,HEAD,POST,PUT,PATCH,OPTIONS
|
308
|
+
Access-Control-Allow-Origin:
|
309
|
+
- "*"
|
310
|
+
Access-Control-Expose-Headers:
|
311
|
+
- Etag
|
312
|
+
Access-Control-Max-Age:
|
313
|
+
- '1728000'
|
314
|
+
Cache-Control:
|
315
|
+
- no-store
|
316
|
+
Cf-Environment-Id:
|
317
|
+
- master
|
318
|
+
Cf-Environment-Uuid:
|
319
|
+
- master
|
320
|
+
Cf-Space-Id:
|
321
|
+
- 2l3j7k267g9k
|
322
|
+
Content-Type:
|
323
|
+
- application/vnd.contentful.management.v1+json
|
324
|
+
Contentful-Api:
|
325
|
+
- cma
|
326
|
+
Date:
|
327
|
+
- Thu, 07 Jan 2021 11:06:35 GMT
|
328
|
+
Etag:
|
329
|
+
- '"8117790482973496674"'
|
330
|
+
Server:
|
331
|
+
- Contentful
|
332
|
+
Strict-Transport-Security:
|
333
|
+
- max-age=15768000
|
334
|
+
X-Content-Type-Options:
|
335
|
+
- nosniff
|
336
|
+
X-Contentful-Ratelimit-Hour-Limit:
|
337
|
+
- '36000'
|
338
|
+
X-Contentful-Ratelimit-Hour-Remaining:
|
339
|
+
- '35997'
|
340
|
+
X-Contentful-Ratelimit-Reset:
|
341
|
+
- '0'
|
342
|
+
X-Contentful-Ratelimit-Second-Limit:
|
343
|
+
- '10'
|
344
|
+
X-Contentful-Ratelimit-Second-Remaining:
|
345
|
+
- '7'
|
346
|
+
X-Contentful-Request-Id:
|
347
|
+
- e9987a6feedac9d160825158388850fe
|
348
|
+
X-Contentful-Route:
|
349
|
+
- "/spaces/:space/environments/:environment/assets/:id"
|
350
|
+
Content-Length:
|
351
|
+
- '1517'
|
352
|
+
Connection:
|
353
|
+
- Close
|
354
|
+
Set-Cookie:
|
355
|
+
- incap_ses_1209_673446=dVwret9u1XPsoYajdzvHEDvr9l8AAAAATsuve5Yp0rNFifAENHDQWg==;
|
356
|
+
path=/; Domain=.contentful.com
|
357
|
+
- nlbi_673446=0tHYcaIMu2YAHvPnKsJtVwAAAAB0aM8FkVVYSdZiiR9Cm87x; path=/; Domain=.contentful.com
|
358
|
+
- visid_incap_673446=q/YtdCgUTpKLYpGlrXXQ/Tvr9l8AAAAAQUIPAAAAAADMMMF1cxU9/9X4djNOAm0R;
|
359
|
+
expires=Fri, 07 Jan 2022 10:05:05 GMT; HttpOnly; path=/; Domain=.contentful.com
|
360
|
+
X-Cdn:
|
361
|
+
- Incapsula
|
362
|
+
X-Iinfo:
|
363
|
+
- 5-4907447-4907449 NNNN CT(164 163 0) RT(1610017594299 46) q(0 0 3 -1) r(7
|
364
|
+
7) U5
|
365
|
+
body:
|
366
|
+
encoding: ASCII-8BIT
|
367
|
+
string: |
|
368
|
+
{
|
369
|
+
"metadata": {
|
370
|
+
"tags": [
|
371
|
+
{
|
372
|
+
"sys": {
|
373
|
+
"type": "Link",
|
374
|
+
"linkType": "Tag",
|
375
|
+
"id": "mobQa"
|
376
|
+
}
|
377
|
+
}
|
378
|
+
]
|
379
|
+
},
|
380
|
+
"sys": {
|
381
|
+
"space": {
|
382
|
+
"sys": {
|
383
|
+
"type": "Link",
|
384
|
+
"linkType": "Space",
|
385
|
+
"id": "2l3j7k267g9k"
|
386
|
+
}
|
387
|
+
},
|
388
|
+
"id": "2lxYoWv3LWHe0yhO3w2Yid",
|
389
|
+
"type": "Asset",
|
390
|
+
"createdAt": "2019-09-09T14:43:26.287Z",
|
391
|
+
"updatedAt": "2020-11-23T14:38:46.698Z",
|
392
|
+
"environment": {
|
393
|
+
"sys": {
|
394
|
+
"id": "master",
|
395
|
+
"type": "Link",
|
396
|
+
"linkType": "Environment"
|
397
|
+
}
|
398
|
+
},
|
399
|
+
"firstPublishedAt": "2019-09-09T14:52:29.719Z",
|
400
|
+
"createdBy": {
|
401
|
+
"sys": {
|
402
|
+
"type": "Link",
|
403
|
+
"linkType": "User",
|
404
|
+
"id": "0PCYk22mt1xD7gTKZhHycN"
|
405
|
+
}
|
406
|
+
},
|
407
|
+
"updatedBy": {
|
408
|
+
"sys": {
|
409
|
+
"type": "Link",
|
410
|
+
"linkType": "User",
|
411
|
+
"id": "2tk1qOdVUXzixfz5dsanLT"
|
412
|
+
}
|
413
|
+
},
|
414
|
+
"publishedCounter": 4,
|
415
|
+
"version": 14
|
416
|
+
},
|
417
|
+
"fields": {
|
418
|
+
"title": {
|
419
|
+
"en-US": "Berlin skyline"
|
420
|
+
},
|
421
|
+
"description": {
|
422
|
+
"en-US": "changed"
|
423
|
+
},
|
424
|
+
"file": {
|
425
|
+
"en-US": {
|
426
|
+
"url": "//images.ctfassets.net/2l3j7k267g9k/2lxYoWv3LWHe0yhO3w2Yid/c6df694a8607018926bfd2fe32fe9b88/photo-1532978794596-d56d649a0493",
|
427
|
+
"details": {
|
428
|
+
"size": 571480,
|
429
|
+
"image": {
|
430
|
+
"width": 2550,
|
431
|
+
"height": 1700
|
432
|
+
}
|
433
|
+
},
|
434
|
+
"fileName": "photo-1532978794596-d56d649a0493",
|
435
|
+
"contentType": "image/jpeg"
|
436
|
+
}
|
437
|
+
}
|
438
|
+
}
|
439
|
+
}
|
440
|
+
http_version:
|
441
|
+
recorded_at: Thu, 07 Jan 2021 11:06:33 GMT
|
442
|
+
recorded_with: VCR 4.0.0
|