certificate-factory 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +3 -0
  3. data/.ruby-version +1 -0
  4. data/.travis.yml +19 -0
  5. data/Gemfile +6 -0
  6. data/Gemfile.lock +154 -0
  7. data/LICENSE.md +10 -0
  8. data/README.md +54 -0
  9. data/Rakefile +114 -0
  10. data/certificate-factory.gemspec +33 -0
  11. data/env.example +3 -0
  12. data/lib/certificate-factory.rb +14 -0
  13. data/lib/certificate-factory/api.rb +19 -0
  14. data/lib/certificate-factory/certificate.rb +112 -0
  15. data/lib/certificate-factory/factory.rb +89 -0
  16. data/lib/certificate-factory/version.rb +3 -0
  17. data/spec/api_spec.rb +12 -0
  18. data/spec/cassettes/CertificateFactory_API/returns_the_correct_URL_for_a_dataset.yml +107 -0
  19. data/spec/cassettes/CertificateFactory_Certificate/keeps_trying_for_a_result_until_it_gets_one.yml +64 -0
  20. data/spec/cassettes/CertificateFactory_Certificate/requests_and_gets_a_certificate.yml +781 -0
  21. data/spec/cassettes/CertificateFactory_Certificate/requests_certificate_creation.yml +39 -0
  22. data/spec/cassettes/CertificateFactory_Certificate/returns_an_error_if_dataset_already_exists.yml +106 -0
  23. data/spec/cassettes/CertificateFactory_Factory/builds_certificates_correctly.yml +726 -0
  24. data/spec/cassettes/CertificateFactory_Factory/creates_the_correct_number_of_certificates_going_over_multiple_pages.yml +4900 -0
  25. data/spec/cassettes/CertificateFactory_Factory/creates_the_correct_number_of_certificates_when_querying_a_single_page.yml +696 -0
  26. data/spec/cassettes/CertificateFactory_Factory/stops_when_it_gets_to_the_end_of_a_feed.yml +126 -0
  27. data/spec/certificate_spec.rb +93 -0
  28. data/spec/factory_spec.rb +88 -0
  29. data/spec/fixtures/certificate.json +1 -0
  30. data/spec/fixtures/feed.atom +97 -0
  31. data/spec/fixtures/one-page.atom +23 -0
  32. data/spec/fixtures/single-feed-1.atom +26 -0
  33. data/spec/fixtures/single-feed-2.atom +32 -0
  34. data/spec/fixtures/single-feed.atom +24 -0
  35. data/spec/spec_helper.rb +43 -0
  36. metadata +254 -0
@@ -0,0 +1,19 @@
1
+ module CertificateFactory
2
+
3
+ class API
4
+ include HTTParty
5
+
6
+ format :json
7
+
8
+ def initialize(url)
9
+ @url = url
10
+ @response = self.class.get(@url)
11
+ end
12
+
13
+ def ckan_url
14
+ @response['ckan_url']
15
+ end
16
+
17
+ end
18
+
19
+ end
@@ -0,0 +1,112 @@
1
+ module CertificateFactory
2
+
3
+ class Certificate
4
+ include HTTParty
5
+
6
+ base_uri ENV['BASE_URI']
7
+ basic_auth ENV['ODC_USERNAME'], ENV['ODC_API_KEY']
8
+ headers 'Content-Type' => 'application/json'
9
+ default_timeout 120
10
+
11
+ def initialize(url, options = {})
12
+ @url = url
13
+ @dataset_url = options[:dataset_url]
14
+ @campaign = options[:campaign]
15
+ end
16
+
17
+ def generate
18
+ response = post
19
+ if response.code == 202
20
+ @dataset_url = response["dataset_url"]
21
+ {
22
+ success: "pending",
23
+ documentation_url: @url,
24
+ dataset_url: @dataset_url
25
+ }
26
+ else
27
+ {
28
+ success: "false",
29
+ published: "false",
30
+ documentation_url: @url,
31
+ dataset_url: response["dataset_url"],
32
+ error: get_error(response)
33
+ }
34
+ end
35
+ end
36
+
37
+ def update
38
+ response = generate
39
+ if response[:success] != "pending" && response[:error] == "Dataset already exists"
40
+ dataset_id = response['dataset_id']
41
+ response = self.class.post("/datasets/#{dataset_id}/certificates", body: body)
42
+ {
43
+ success: response['success'],
44
+ documentation_url: @url,
45
+ dataset_url: @dataset_url,
46
+ error: get_error(response)
47
+ }
48
+ else
49
+ return response
50
+ end
51
+ end
52
+
53
+ def result
54
+ if @dataset_url
55
+ result = get_result(@dataset_url)
56
+ {
57
+ success: result["success"],
58
+ published: result["published"],
59
+ documentation_url: @url,
60
+ certificate_url: result["certificate_url"],
61
+ user: result["owner_email"]
62
+ }
63
+ else
64
+ response = generate
65
+ if @dataset_url
66
+ self.result
67
+ else
68
+ response
69
+ end
70
+ end
71
+ end
72
+
73
+ def post
74
+ self.class.post("/datasets", body: body)
75
+ end
76
+
77
+ private
78
+
79
+ def body
80
+ hash = {
81
+ "jurisdiction" => "gb",
82
+ "create_user" => true,
83
+ "dataset" => {
84
+ "documentationUrl" => @url
85
+ }
86
+ }
87
+ hash['campaign'] = @campaign if @campaign
88
+ hash.to_json
89
+ end
90
+
91
+ def get_result(url)
92
+ loop do
93
+ result = self.class.get(url)
94
+ return result if result["success"] != "pending"
95
+ url = result["dataset_url"]
96
+ sleep 5
97
+ end
98
+ end
99
+
100
+ def get_error(response)
101
+ if response.code == 422
102
+ response["errors"].first
103
+ elsif response.code == 401
104
+ "Username and / or API key not recognised"
105
+ else
106
+ "Unknown error"
107
+ end
108
+ end
109
+
110
+ end
111
+
112
+ end
@@ -0,0 +1,89 @@
1
+ module CertificateFactory
2
+
3
+ class Factory
4
+ include HTTParty
5
+ format :xml
6
+
7
+ attr_reader :count, :response
8
+
9
+ def initialize(options)
10
+ @url = options[:feed]
11
+ @limit = options[:limit]
12
+ @campaign = options[:campaign]
13
+ @count = 0
14
+ @response = self.class.get(@url)
15
+ @logger = options[:logger]
16
+ end
17
+
18
+ def build
19
+ each do |item|
20
+ url = get_link(item)
21
+ yield Certificate.new(url, campaign: @campaign).generate
22
+ end
23
+ end
24
+
25
+ def each
26
+ loop do
27
+ feed_items.each do |item|
28
+ yield item
29
+ @count += 1
30
+ return if over_limit?
31
+ end
32
+ return unless fetch_next_page
33
+ end
34
+ end
35
+
36
+ def over_limit?
37
+ @limit && @limit <= @count
38
+ end
39
+
40
+ def feed_items
41
+ [response["feed"]["entry"]].flatten # In case there is only one feed item
42
+ end
43
+
44
+ def next_page
45
+ response["feed"]["link"].find { |l| l["rel"] == "next" }["href"] rescue nil
46
+ end
47
+
48
+ def fetch_next_page
49
+ @url = next_page
50
+ if @url
51
+ @logger.debug "feed: #{@url}" if @logger
52
+ @response = self.class.get(@url)
53
+ else
54
+ return false
55
+ end
56
+ end
57
+
58
+ def get_link(item)
59
+ api_url = item["link"].find { |l| l["rel"] == "enclosure" }["href"]
60
+ ckan_url(api_url)
61
+ end
62
+
63
+ def ckan_url(api_url)
64
+ CertificateFactory::API.new(api_url).ckan_url
65
+ end
66
+ end
67
+
68
+ class CSVFactory < Factory
69
+ def initialize(options)
70
+ @file = options[:file]
71
+ @limit = options[:limit]
72
+ @campaign = options[:campaign]
73
+ @count = 0
74
+ @logger = options[:logger]
75
+ end
76
+
77
+ def get_link(url)
78
+ return url
79
+ end
80
+
81
+ def each
82
+ CSV::foreach(@file, headers: :first_row) do |row|
83
+ yield row['documentation_url']
84
+ @count += 1
85
+ break if over_limit?
86
+ end
87
+ end
88
+ end
89
+ end
@@ -0,0 +1,3 @@
1
+ module CertificateFactory
2
+ VERSION = "0.1.0"
3
+ end
data/spec/api_spec.rb ADDED
@@ -0,0 +1,12 @@
1
+ require 'spec_helper'
2
+
3
+ describe CertificateFactory::API do
4
+
5
+ it "returns the correct URL for a dataset", :vcr do
6
+ url = 'http://data.gov.uk/api/2/rest/package/nhs-england-primary-care-trusts-local-spending-data'
7
+ api = CertificateFactory::API.new(url)
8
+
9
+ expect(api.ckan_url).to eq('http://data.gov.uk/dataset/nhs-england-primary-care-trusts-local-spending-data')
10
+ end
11
+
12
+ end
@@ -0,0 +1,107 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://data.gov.uk/api/2/rest/package/nhs-england-primary-care-trusts-local-spending-data
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ Server:
16
+ - nginx/1.6.0
17
+ Date:
18
+ - Tue, 16 Sep 2014 10:30:05 GMT
19
+ Content-Type:
20
+ - application/json;charset=utf-8
21
+ Content-Length:
22
+ - '4264'
23
+ Connection:
24
+ - keep-alive
25
+ Vary:
26
+ - Accept-Encoding
27
+ - Cookie
28
+ Pragma:
29
+ - no-cache
30
+ Cache-Control:
31
+ - no-cache
32
+ Access-Control-Allow-Origin:
33
+ - "*"
34
+ Access-Control-Allow-Methods:
35
+ - POST, PUT, GET, DELETE, OPTIONS
36
+ Access-Control-Allow-Headers:
37
+ - X-CKAN-API-KEY, Authorization, Content-Type
38
+ Accept-Ranges:
39
+ - bytes
40
+ X-Varnish:
41
+ - '258802775'
42
+ Age:
43
+ - '0'
44
+ Via:
45
+ - 1.1 varnish
46
+ X-App:
47
+ - ckan
48
+ X-Varnish-Cache:
49
+ - MISS
50
+ body:
51
+ encoding: UTF-8
52
+ string: "{\"license_title\": \"UK Open Government Licence (OGL)\", \"maintainer\":
53
+ \"NHS Financial Information & Accounts Branch, NHS Accounting Processes Section
54
+ \", \"private\": false, \"maintainer_email\": null, \"id\": \"59973e86-5e1f-45bd-b231-e541df65cda2\",
55
+ \"metadata_created\": \"2010-09-23T13:13:14.866379\", \"relationships\": [],
56
+ \"license\": \"UK Open Government Licence (OGL)\", \"metadata_modified\":
57
+ \"2014-09-12T21:05:50.543448\", \"author\": \"Department of Health Customer
58
+ Service Centre\", \"author_email\": null, \"state\": \"active\", \"version\":
59
+ null, \"creator_user_id\": null, \"type\": \"dataset\", \"resources\": [{\"resource_group_id\":
60
+ \"2531e75b-68a1-1ca7-b7a5-a8157b8b2560\", \"cache_last_updated\": null, \"package_id\":
61
+ \"59973e86-5e1f-45bd-b231-e541df65cda2\", \"webstore_last_updated\": null,
62
+ \"id\": \"045af25f-f72b-4cc3-a85e-be64dc4a0bd2\", \"size\": null, \"last_modified\":
63
+ null, \"hash\": \"\", \"description\": \"Spend data 2006-2010\", \"format\":
64
+ \"XLS\", \"mimetype_inner\": null, \"url_type\": null, \"mimetype\": null,
65
+ \"cache_url\": null, \"name\": null, \"created\": \"2014-09-12T22:05:50.608706\",
66
+ \"url\": \"http://webarchive.nationalarchives.gov.uk/20130107105354/http://www.dh.gov.uk/prod_consum_dh/groups/dh_digitalassets/@dh/@en/@ps/documents/digitalasset/dh_119508.xls\",
67
+ \"webstore_url\": null, \"position\": 0, \"resource_type\": \"file\"}], \"num_resources\":
68
+ 1, \"tags\": [\"expenditure\", \"finance\", \"local-spend-data\", \"nhs\",
69
+ \"nhs-england\", \"nhs-local-spending-data\", \"primary-care-trusts\", \"spending\"],
70
+ \"groups\": [], \"license_id\": \"uk-ogl\", \"num_tags\": 8, \"organization\":
71
+ {\"description\": \"The Department of Health (DH) helps people to live better
72
+ for longer. We lead, shape and fund health and care in England, making sure
73
+ people have the support, care and treatment they need, with the compassion,
74
+ respect and dignity they deserve.\\r\\n\\r\\nDH is a ministerial department,
75
+ supported by 23 agencies and public bodies.\\r\\n\\r\\nhttps://www.gov.uk/government/organisations/department-of-health\\r\\n\",
76
+ \"title\": \"Department of Health\", \"created\": \"2012-06-27T14:48:41.338440\",
77
+ \"approval_status\": \"pending\", \"revision_timestamp\": \"2013-11-05T07:03:27.394488\",
78
+ \"is_organization\": true, \"state\": \"active\", \"image_url\": \"\", \"revision_id\":
79
+ \"2b10fb9f-ef12-4acd-9bd0-03f4c4a86c69\", \"type\": \"organization\", \"id\":
80
+ \"d7a32a99-60ee-451e-9c0b-ce2f30fecb6c\", \"name\": \"department-of-health\"},
81
+ \"name\": \"nhs-england-primary-care-trusts-local-spending-data\", \"isopen\":
82
+ true, \"notes_rendered\": \"<p>The spreadsheets provide expenditure data form
83
+ 2006-2010, for Primary Care Trusts.\\n</p>\\n<p>To contact the Department
84
+ of Health Customer Service Centre about this data follow this link: <a href=\\\"http://www.info.doh.gov.uk/contactus.nsf/memo?openform.\\\"
85
+ target=\\\"_blank\\\" rel=\\\"nofollow\\\">http://www.info.doh.gov.uk/contactus.nsf/memo?openform.</a>\\n</p>\",
86
+ \"url\": \"http://www.dh.gov.uk/en/Publicationsandstatistics/Publications/PublicationsPolicyAndGuidance/DH_119505\",
87
+ \"ckan_url\": \"http://data.gov.uk/dataset/nhs-england-primary-care-trusts-local-spending-data\",
88
+ \"notes\": \"The spreadsheets provide expenditure data form 2006-2010, for
89
+ Primary Care Trusts.\\r\\n\\r\\nTo contact the Department of Health Customer
90
+ Service Centre about this data follow this link: http://www.info.doh.gov.uk/contactus.nsf/memo?openform.\\r\\n\",
91
+ \"owner_org\": \"d7a32a99-60ee-451e-9c0b-ce2f30fecb6c\", \"ratings_average\":
92
+ null, \"extras\": {\"temporal_coverage-from\": \"\", \"unpublished\": \"false\",
93
+ \"foi-email\": \"\", \"openness_score\": \"0\", \"temporal_granularity\":
94
+ \"year\", \"agency\": \"\", \"geographic_granularity\": \"point\", \"core-dataset\":
95
+ \"true\", \"temporal_coverage-to\": \"\", \"department\": \"Department of
96
+ Health\", \"foi-web\": \"\", \"contact-email\": \"\", \"foi-name\": \"\",
97
+ \"precision\": \"financial - \\u00a3thousands\", \"published_by\": \"Department
98
+ of Health [11410]\", \"contact-phone\": \"\", \"mandate\": \"\", \"categories\":
99
+ \"\", \"geographic_coverage\": \"100000: England\", \"contact-name\": \"\",
100
+ \"external_reference\": \"\", \"openness_score_last_checked\": \"2011-06-06T17:27:26.393843\",
101
+ \"update_frequency\": \"annual\", \"date_released\": \"2010-09-20\", \"foi-phone\":
102
+ \"\", \"theme-primary\": \"Spending\"}, \"license_url\": \"http://www.nationalarchives.gov.uk/doc/open-government-licence/version/2/\",
103
+ \"ratings_count\": 0, \"title\": \"NHS Local Spending Data - Primary Care
104
+ Trusts\", \"revision_id\": \"a6649f6f-745b-4435-99ae-bae0be317c14\"}"
105
+ http_version:
106
+ recorded_at: Tue, 16 Sep 2014 10:30:08 GMT
107
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,64 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api%40example.com:<ODC_API_KEY>@open-data-certificate.dev/datasets/1.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ Date:
18
+ - Thu, 18 Sep 2014 13:39:00 GMT
19
+ Content-Type:
20
+ - application/json; charset=utf-8
21
+ X-Ua-Compatible:
22
+ - IE=Edge
23
+ Etag:
24
+ - "\"7d8fb6c904023f95d3098ce2ac0d9342\""
25
+ Cache-Control:
26
+ - max-age=0, private, must-revalidate
27
+ X-Request-Id:
28
+ - 60205d94202fc6652fbb74054f04e252
29
+ X-Runtime:
30
+ - '0.050958'
31
+ Transfer-Encoding:
32
+ - chunked
33
+ body:
34
+ encoding: UTF-8
35
+ string: "{\"success\":true,\"dataset_id\":1,\"published\":false,\"owner_email\":\"holly@whiteoctober.co.uk\",\"errors\":[\"The
36
+ question 'publisherRights' is mandatory\",\"The question 'publisherOrigin'
37
+ is mandatory\",\"The question 'publisher' is mandatory\",\"The question 'thirdPartyOrigin'
38
+ is mandatory\",\"The question 'listing' is mandatory\",\"The question 'thirdPartyOpen'
39
+ is mandatory\",\"The question 'crowdsourced' is mandatory\",\"The question
40
+ 'reference' is mandatory\",\"The question 'currentDatasetUrl' is mandatory\",\"The
41
+ question 'crowdsourcedContent' is mandatory\",\"The question 'serviceType'
42
+ is mandatory\",\"The question 'versionsTemplateUrl' is mandatory\",\"The question
43
+ 'claUrl' is mandatory\",\"The question 'versionsUrl' is mandatory\",\"The
44
+ question 'cldsRecorded' is mandatory\",\"The question 'frequentChanges' is
45
+ mandatory\",\"The question 'seriesType' is mandatory\",\"The question 'currentDumpUrl'
46
+ is mandatory\",\"The question 'dumpsTemplateUrl' is mandatory\",\"The question
47
+ 'dumpsUrl' is mandatory\",\"The question 'changeFeedUrl' is mandatory\",\"The
48
+ question 'vocabulary' is mandatory\",\"The question 'dataLicence' is mandatory\",\"The
49
+ question 'dataNotApplicable' is mandatory\",\"The question 'codelists' is
50
+ mandatory\",\"The question 'dataWaiver' is mandatory\",\"The question 'dataOtherWaiver'
51
+ is mandatory\",\"The question 'otherDataLicenceName' is mandatory\",\"The
52
+ question 'otherDataLicenceURL' is mandatory\",\"The question 'otherDataLicenceOpen'
53
+ is mandatory\",\"The question 'contentLicence' is mandatory\",\"The question
54
+ 'contentNotApplicable' is mandatory\",\"The question 'contentWaiver' is mandatory\",\"The
55
+ question 'contentOtherWaiver' is mandatory\",\"The question 'otherContentLicenceName'
56
+ is mandatory\",\"The question 'otherContentLicenceURL' is mandatory\",\"The
57
+ question 'account' is mandatory\",\"The question 'otherContentLicenceOpen'
58
+ is mandatory\",\"The question 'dataPersonal' is mandatory\",\"The question
59
+ 'appliedAnon' is mandatory\",\"The question 'engagementTeamUrl' is mandatory\",\"The
60
+ question 'existingExternalUrls' is mandatory\",\"The question 'reliableExternalUrls'
61
+ is mandatory\",\"The question 'dpStaff' is mandatory\"]}"
62
+ http_version:
63
+ recorded_at: Thu, 18 Sep 2014 13:39:00 GMT
64
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,781 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api%40example.com:<ODC_API_KEY>@open-data-certificate.dev/datasets/2657.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ Date:
18
+ - Fri, 19 Sep 2014 08:11:21 GMT
19
+ Content-Type:
20
+ - application/json; charset=utf-8
21
+ X-Ua-Compatible:
22
+ - IE=Edge
23
+ Etag:
24
+ - "\"3fe0d6fa01b3d036a62080416413b3f1\""
25
+ Cache-Control:
26
+ - max-age=0, private, must-revalidate
27
+ X-Request-Id:
28
+ - 9ff83b7dc2672d69a08a710916757675
29
+ X-Runtime:
30
+ - '0.034262'
31
+ Transfer-Encoding:
32
+ - chunked
33
+ body:
34
+ encoding: UTF-8
35
+ string: "{\"success\":\"pending\",\"dataset_id\":2657,\"dataset_url\":\"<BASE_URI>/datasets/2657.json\"}"
36
+ http_version:
37
+ recorded_at: Fri, 19 Sep 2014 08:11:21 GMT
38
+ - request:
39
+ method: get
40
+ uri: http://api%40example.com:<ODC_API_KEY>@open-data-certificate.dev/datasets/2657.json
41
+ body:
42
+ encoding: US-ASCII
43
+ string: ''
44
+ headers:
45
+ Content-Type:
46
+ - application/json
47
+ response:
48
+ status:
49
+ code: 200
50
+ message: OK
51
+ headers:
52
+ Date:
53
+ - Fri, 19 Sep 2014 08:11:26 GMT
54
+ Content-Type:
55
+ - application/json; charset=utf-8
56
+ X-Ua-Compatible:
57
+ - IE=Edge
58
+ Etag:
59
+ - "\"3fe0d6fa01b3d036a62080416413b3f1\""
60
+ Cache-Control:
61
+ - max-age=0, private, must-revalidate
62
+ X-Request-Id:
63
+ - 755e401c636eed603795316ab67b2c1f
64
+ X-Runtime:
65
+ - '0.024905'
66
+ Transfer-Encoding:
67
+ - chunked
68
+ body:
69
+ encoding: UTF-8
70
+ string: "{\"success\":\"pending\",\"dataset_id\":2657,\"dataset_url\":\"<BASE_URI>/datasets/2657.json\"}"
71
+ http_version:
72
+ recorded_at: Fri, 19 Sep 2014 08:11:26 GMT
73
+ - request:
74
+ method: get
75
+ uri: http://api%40example.com:<ODC_API_KEY>@open-data-certificate.dev/datasets/2657.json
76
+ body:
77
+ encoding: US-ASCII
78
+ string: ''
79
+ headers:
80
+ Content-Type:
81
+ - application/json
82
+ response:
83
+ status:
84
+ code: 200
85
+ message: OK
86
+ headers:
87
+ Date:
88
+ - Fri, 19 Sep 2014 08:11:31 GMT
89
+ Content-Type:
90
+ - application/json; charset=utf-8
91
+ X-Ua-Compatible:
92
+ - IE=Edge
93
+ Etag:
94
+ - "\"3fe0d6fa01b3d036a62080416413b3f1\""
95
+ Cache-Control:
96
+ - max-age=0, private, must-revalidate
97
+ X-Request-Id:
98
+ - 3a76a767b308028274af97d9892a424a
99
+ X-Runtime:
100
+ - '0.021230'
101
+ Transfer-Encoding:
102
+ - chunked
103
+ body:
104
+ encoding: UTF-8
105
+ string: "{\"success\":\"pending\",\"dataset_id\":2657,\"dataset_url\":\"<BASE_URI>/datasets/2657.json\"}"
106
+ http_version:
107
+ recorded_at: Fri, 19 Sep 2014 08:11:31 GMT
108
+ - request:
109
+ method: get
110
+ uri: http://api%40example.com:<ODC_API_KEY>@open-data-certificate.dev/datasets/2657.json
111
+ body:
112
+ encoding: US-ASCII
113
+ string: ''
114
+ headers:
115
+ Content-Type:
116
+ - application/json
117
+ response:
118
+ status:
119
+ code: 200
120
+ message: OK
121
+ headers:
122
+ Date:
123
+ - Fri, 19 Sep 2014 08:11:37 GMT
124
+ Content-Type:
125
+ - application/json; charset=utf-8
126
+ X-Ua-Compatible:
127
+ - IE=Edge
128
+ Etag:
129
+ - "\"3fe0d6fa01b3d036a62080416413b3f1\""
130
+ Cache-Control:
131
+ - max-age=0, private, must-revalidate
132
+ X-Request-Id:
133
+ - bfe295ade0b29c1835d0d443b49ee451
134
+ X-Runtime:
135
+ - '0.027753'
136
+ Transfer-Encoding:
137
+ - chunked
138
+ body:
139
+ encoding: UTF-8
140
+ string: "{\"success\":\"pending\",\"dataset_id\":2657,\"dataset_url\":\"<BASE_URI>/datasets/2657.json\"}"
141
+ http_version:
142
+ recorded_at: Fri, 19 Sep 2014 08:11:37 GMT
143
+ - request:
144
+ method: get
145
+ uri: http://api%40example.com:<ODC_API_KEY>@open-data-certificate.dev/datasets/2657.json
146
+ body:
147
+ encoding: US-ASCII
148
+ string: ''
149
+ headers:
150
+ Content-Type:
151
+ - application/json
152
+ response:
153
+ status:
154
+ code: 200
155
+ message: OK
156
+ headers:
157
+ Date:
158
+ - Fri, 19 Sep 2014 08:11:42 GMT
159
+ Content-Type:
160
+ - application/json; charset=utf-8
161
+ X-Ua-Compatible:
162
+ - IE=Edge
163
+ Etag:
164
+ - "\"3fe0d6fa01b3d036a62080416413b3f1\""
165
+ Cache-Control:
166
+ - max-age=0, private, must-revalidate
167
+ X-Request-Id:
168
+ - 0b2ab7d5f454fe6e0e7d8427e2867452
169
+ X-Runtime:
170
+ - '0.124021'
171
+ Transfer-Encoding:
172
+ - chunked
173
+ body:
174
+ encoding: UTF-8
175
+ string: "{\"success\":\"pending\",\"dataset_id\":2657,\"dataset_url\":\"<BASE_URI>/datasets/2657.json\"}"
176
+ http_version:
177
+ recorded_at: Fri, 19 Sep 2014 08:11:42 GMT
178
+ - request:
179
+ method: get
180
+ uri: http://api%40example.com:<ODC_API_KEY>@open-data-certificate.dev/datasets/2657.json
181
+ body:
182
+ encoding: US-ASCII
183
+ string: ''
184
+ headers:
185
+ Content-Type:
186
+ - application/json
187
+ response:
188
+ status:
189
+ code: 200
190
+ message: OK
191
+ headers:
192
+ Date:
193
+ - Fri, 19 Sep 2014 08:11:47 GMT
194
+ Content-Type:
195
+ - application/json; charset=utf-8
196
+ X-Ua-Compatible:
197
+ - IE=Edge
198
+ Etag:
199
+ - "\"3fe0d6fa01b3d036a62080416413b3f1\""
200
+ Cache-Control:
201
+ - max-age=0, private, must-revalidate
202
+ X-Request-Id:
203
+ - b3c5e049f58e261afb079f2623ae64f8
204
+ X-Runtime:
205
+ - '0.027952'
206
+ Transfer-Encoding:
207
+ - chunked
208
+ body:
209
+ encoding: UTF-8
210
+ string: "{\"success\":\"pending\",\"dataset_id\":2657,\"dataset_url\":\"<BASE_URI>/datasets/2657.json\"}"
211
+ http_version:
212
+ recorded_at: Fri, 19 Sep 2014 08:11:47 GMT
213
+ - request:
214
+ method: get
215
+ uri: http://api%40example.com:<ODC_API_KEY>@open-data-certificate.dev/datasets/2657.json
216
+ body:
217
+ encoding: US-ASCII
218
+ string: ''
219
+ headers:
220
+ Content-Type:
221
+ - application/json
222
+ response:
223
+ status:
224
+ code: 200
225
+ message: OK
226
+ headers:
227
+ Date:
228
+ - Fri, 19 Sep 2014 08:11:52 GMT
229
+ Content-Type:
230
+ - application/json; charset=utf-8
231
+ X-Ua-Compatible:
232
+ - IE=Edge
233
+ Etag:
234
+ - "\"e62a8ebd2e282c43c2b6c903550a7565\""
235
+ Cache-Control:
236
+ - max-age=0, private, must-revalidate
237
+ X-Request-Id:
238
+ - d4d59bbb309d70e1b27686adfbd795e9
239
+ X-Runtime:
240
+ - '0.102206'
241
+ Transfer-Encoding:
242
+ - chunked
243
+ body:
244
+ encoding: UTF-8
245
+ string: "{\"success\":true,\"dataset_id\":2657,\"published\":true,\"owner_email\":\"<ODC_USERNAME>\",\"errors\":[\"The
246
+ question 'webpage' is mandatory\",\"The question 'thirdPartyOrigin' is mandatory\",\"The
247
+ question 'thirdPartyOpen' is mandatory\",\"The question 'reference' is mandatory\",\"The
248
+ question 'currentDatasetUrl' is mandatory\",\"The question 'versionsTemplateUrl'
249
+ is mandatory\",\"The question 'crowdsourced' is mandatory\",\"The question
250
+ 'serviceType' is mandatory\",\"The question 'crowdsourcedContent' is mandatory\",\"The
251
+ question 'claUrl' is mandatory\",\"The question 'cldsRecorded' is mandatory\",\"The
252
+ question 'seriesType' is mandatory\",\"The question 'currentDumpUrl' is mandatory\",\"The
253
+ question 'dumpsTemplateUrl' is mandatory\",\"The question 'dumpsUrl' is mandatory\",\"The
254
+ question 'changeFeedUrl' is mandatory\",\"The question 'dataNotApplicable'
255
+ is mandatory\",\"The question 'dataWaiver' is mandatory\",\"The question 'dataOtherWaiver'
256
+ is mandatory\",\"The question 'otherDataLicenceName' is mandatory\",\"The
257
+ question 'otherDataLicenceURL' is mandatory\",\"The question 'otherDataLicenceOpen'
258
+ is mandatory\",\"The question 'contentNotApplicable' is mandatory\",\"The
259
+ question 'contentWaiver' is mandatory\",\"The question 'contentOtherWaiver'
260
+ is mandatory\",\"The question 'account' is mandatory\",\"The question 'otherContentLicenceName'
261
+ is mandatory\",\"The question 'otherContentLicenceURL' is mandatory\",\"The
262
+ question 'otherContentLicenceOpen' is mandatory\",\"The question 'contentRightsURL'
263
+ is mandatory\",\"The question 'engagementTeamUrl' is mandatory\",\"The question
264
+ 'existingExternalUrls' is mandatory\",\"The question 'reliableExternalUrls'
265
+ is mandatory\",\"The question 'appliedAnon' is mandatory\",\"The question
266
+ 'dpStaff' is mandatory\"]}"
267
+ http_version:
268
+ recorded_at: Fri, 19 Sep 2014 08:11:52 GMT
269
+ - request:
270
+ method: post
271
+ uri: http://api%40example.com:<ODC_API_KEY>@open-data-certificate.dev/datasets
272
+ body:
273
+ encoding: UTF-8
274
+ string: "{\"jurisdiction\":\"gb\",\"create_user\":\"true\",\"dataset\":{\"documentationUrl\":\"http://data.gov.uk/dataset/defence-infrastructure-organisation-disposals-database-house-of-commons-report\"}}"
275
+ headers:
276
+ Content-Type:
277
+ - application/json
278
+ response:
279
+ status:
280
+ code: 202
281
+ message: Accepted
282
+ headers:
283
+ Date:
284
+ - Fri, 19 Sep 2014 10:42:16 GMT
285
+ Content-Type:
286
+ - application/json; charset=utf-8
287
+ X-Ua-Compatible:
288
+ - IE=Edge
289
+ Cache-Control:
290
+ - no-cache
291
+ X-Request-Id:
292
+ - e4b5796e758dc7f841515ead0e4174d0
293
+ X-Runtime:
294
+ - '2.107274'
295
+ Set-Cookie:
296
+ - _open-data-certificate_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTVhM2I0Y2I5NmVhYmVhYzI2Y2VhNjg2Y2EzNzkyZWY4BjsAVA%3D%3D--5809486d93e8272fd48e2c7f12ecc87097404442;
297
+ path=/; HttpOnly
298
+ Transfer-Encoding:
299
+ - chunked
300
+ body:
301
+ encoding: UTF-8
302
+ string: "{\"success\":\"pending\",\"dataset_id\":2615,\"dataset_url\":\"<BASE_URI>/datasets/2615.json\"}"
303
+ http_version:
304
+ recorded_at: Fri, 19 Sep 2014 10:42:16 GMT
305
+ - request:
306
+ method: get
307
+ uri: http://api%40example.com:<ODC_API_KEY>@open-data-certificate.dev/datasets/2615.json
308
+ body:
309
+ encoding: US-ASCII
310
+ string: ''
311
+ headers:
312
+ Content-Type:
313
+ - application/json
314
+ response:
315
+ status:
316
+ code: 200
317
+ message: OK
318
+ headers:
319
+ Date:
320
+ - Fri, 19 Sep 2014 10:42:16 GMT
321
+ Content-Type:
322
+ - application/json; charset=utf-8
323
+ X-Ua-Compatible:
324
+ - IE=Edge
325
+ Etag:
326
+ - "\"d6bc317ea9996e9bec3d78fd32ea0221\""
327
+ Cache-Control:
328
+ - max-age=0, private, must-revalidate
329
+ X-Request-Id:
330
+ - 62cc5bc48214858b5113ea8da2276293
331
+ X-Runtime:
332
+ - '0.033566'
333
+ Transfer-Encoding:
334
+ - chunked
335
+ body:
336
+ encoding: UTF-8
337
+ string: "{\"success\":\"pending\",\"dataset_id\":2615,\"dataset_url\":\"<BASE_URI>/datasets/2615.json\"}"
338
+ http_version:
339
+ recorded_at: Fri, 19 Sep 2014 10:42:16 GMT
340
+ - request:
341
+ method: get
342
+ uri: http://api%40example.com:<ODC_API_KEY>@open-data-certificate.dev/datasets/2615.json
343
+ body:
344
+ encoding: US-ASCII
345
+ string: ''
346
+ headers:
347
+ Content-Type:
348
+ - application/json
349
+ response:
350
+ status:
351
+ code: 200
352
+ message: OK
353
+ headers:
354
+ Date:
355
+ - Fri, 19 Sep 2014 10:42:21 GMT
356
+ Content-Type:
357
+ - application/json; charset=utf-8
358
+ X-Ua-Compatible:
359
+ - IE=Edge
360
+ Etag:
361
+ - "\"d6bc317ea9996e9bec3d78fd32ea0221\""
362
+ Cache-Control:
363
+ - max-age=0, private, must-revalidate
364
+ X-Request-Id:
365
+ - 305be265cff099aa4c961a54373ec3dc
366
+ X-Runtime:
367
+ - '0.035996'
368
+ Transfer-Encoding:
369
+ - chunked
370
+ body:
371
+ encoding: UTF-8
372
+ string: "{\"success\":\"pending\",\"dataset_id\":2615,\"dataset_url\":\"<BASE_URI>/datasets/2615.json\"}"
373
+ http_version:
374
+ recorded_at: Fri, 19 Sep 2014 10:42:21 GMT
375
+ - request:
376
+ method: get
377
+ uri: http://api%40example.com:<ODC_API_KEY>@open-data-certificate.dev/datasets/2615.json
378
+ body:
379
+ encoding: US-ASCII
380
+ string: ''
381
+ headers:
382
+ Content-Type:
383
+ - application/json
384
+ response:
385
+ status:
386
+ code: 200
387
+ message: OK
388
+ headers:
389
+ Date:
390
+ - Fri, 19 Sep 2014 10:42:26 GMT
391
+ Content-Type:
392
+ - application/json; charset=utf-8
393
+ X-Ua-Compatible:
394
+ - IE=Edge
395
+ Etag:
396
+ - "\"d6bc317ea9996e9bec3d78fd32ea0221\""
397
+ Cache-Control:
398
+ - max-age=0, private, must-revalidate
399
+ X-Request-Id:
400
+ - ed6b175ea87c603f4b485539527cb4ff
401
+ X-Runtime:
402
+ - '0.054878'
403
+ Transfer-Encoding:
404
+ - chunked
405
+ body:
406
+ encoding: UTF-8
407
+ string: "{\"success\":\"pending\",\"dataset_id\":2615,\"dataset_url\":\"<BASE_URI>/datasets/2615.json\"}"
408
+ http_version:
409
+ recorded_at: Fri, 19 Sep 2014 10:42:26 GMT
410
+ - request:
411
+ method: get
412
+ uri: http://api%40example.com:<ODC_API_KEY>@open-data-certificate.dev/datasets/2615.json
413
+ body:
414
+ encoding: US-ASCII
415
+ string: ''
416
+ headers:
417
+ Content-Type:
418
+ - application/json
419
+ response:
420
+ status:
421
+ code: 200
422
+ message: OK
423
+ headers:
424
+ Date:
425
+ - Fri, 19 Sep 2014 10:42:31 GMT
426
+ Content-Type:
427
+ - application/json; charset=utf-8
428
+ X-Ua-Compatible:
429
+ - IE=Edge
430
+ Etag:
431
+ - "\"d6bc317ea9996e9bec3d78fd32ea0221\""
432
+ Cache-Control:
433
+ - max-age=0, private, must-revalidate
434
+ X-Request-Id:
435
+ - e4138c886d3497cd5bf8b42437d18a23
436
+ X-Runtime:
437
+ - '0.024175'
438
+ Transfer-Encoding:
439
+ - chunked
440
+ body:
441
+ encoding: UTF-8
442
+ string: "{\"success\":\"pending\",\"dataset_id\":2615,\"dataset_url\":\"<BASE_URI>/datasets/2615.json\"}"
443
+ http_version:
444
+ recorded_at: Fri, 19 Sep 2014 10:42:31 GMT
445
+ - request:
446
+ method: get
447
+ uri: http://api%40example.com:<ODC_API_KEY>@open-data-certificate.dev/datasets/2615.json
448
+ body:
449
+ encoding: US-ASCII
450
+ string: ''
451
+ headers:
452
+ Content-Type:
453
+ - application/json
454
+ response:
455
+ status:
456
+ code: 200
457
+ message: OK
458
+ headers:
459
+ Date:
460
+ - Fri, 19 Sep 2014 10:42:36 GMT
461
+ Content-Type:
462
+ - application/json; charset=utf-8
463
+ X-Ua-Compatible:
464
+ - IE=Edge
465
+ Etag:
466
+ - "\"d6bc317ea9996e9bec3d78fd32ea0221\""
467
+ Cache-Control:
468
+ - max-age=0, private, must-revalidate
469
+ X-Request-Id:
470
+ - 65e787f085ccbd52ad5071c46cb85803
471
+ X-Runtime:
472
+ - '0.025134'
473
+ Transfer-Encoding:
474
+ - chunked
475
+ body:
476
+ encoding: UTF-8
477
+ string: "{\"success\":\"pending\",\"dataset_id\":2615,\"dataset_url\":\"<BASE_URI>/datasets/2615.json\"}"
478
+ http_version:
479
+ recorded_at: Fri, 19 Sep 2014 10:42:36 GMT
480
+ - request:
481
+ method: get
482
+ uri: http://api%40example.com:<ODC_API_KEY>@open-data-certificate.dev/datasets/2615.json
483
+ body:
484
+ encoding: US-ASCII
485
+ string: ''
486
+ headers:
487
+ Content-Type:
488
+ - application/json
489
+ response:
490
+ status:
491
+ code: 200
492
+ message: OK
493
+ headers:
494
+ Date:
495
+ - Fri, 19 Sep 2014 10:42:41 GMT
496
+ Content-Type:
497
+ - application/json; charset=utf-8
498
+ X-Ua-Compatible:
499
+ - IE=Edge
500
+ Etag:
501
+ - "\"d6bc317ea9996e9bec3d78fd32ea0221\""
502
+ Cache-Control:
503
+ - max-age=0, private, must-revalidate
504
+ X-Request-Id:
505
+ - 99c7df648fdf1ab29a0210ff0c8400a0
506
+ X-Runtime:
507
+ - '0.033831'
508
+ Transfer-Encoding:
509
+ - chunked
510
+ body:
511
+ encoding: UTF-8
512
+ string: "{\"success\":\"pending\",\"dataset_id\":2615,\"dataset_url\":\"<BASE_URI>/datasets/2615.json\"}"
513
+ http_version:
514
+ recorded_at: Fri, 19 Sep 2014 10:42:41 GMT
515
+ - request:
516
+ method: get
517
+ uri: http://api%40example.com:<ODC_API_KEY>@open-data-certificate.dev/datasets/2615.json
518
+ body:
519
+ encoding: US-ASCII
520
+ string: ''
521
+ headers:
522
+ Content-Type:
523
+ - application/json
524
+ response:
525
+ status:
526
+ code: 200
527
+ message: OK
528
+ headers:
529
+ Date:
530
+ - Fri, 19 Sep 2014 10:42:46 GMT
531
+ Content-Type:
532
+ - application/json; charset=utf-8
533
+ X-Ua-Compatible:
534
+ - IE=Edge
535
+ Etag:
536
+ - "\"d6bc317ea9996e9bec3d78fd32ea0221\""
537
+ Cache-Control:
538
+ - max-age=0, private, must-revalidate
539
+ X-Request-Id:
540
+ - c91281f776911aefb66e3a1677b2b6d6
541
+ X-Runtime:
542
+ - '0.171775'
543
+ Transfer-Encoding:
544
+ - chunked
545
+ body:
546
+ encoding: UTF-8
547
+ string: "{\"success\":\"pending\",\"dataset_id\":2615,\"dataset_url\":\"<BASE_URI>/datasets/2615.json\"}"
548
+ http_version:
549
+ recorded_at: Fri, 19 Sep 2014 10:42:46 GMT
550
+ - request:
551
+ method: get
552
+ uri: http://api%40example.com:<ODC_API_KEY>@open-data-certificate.dev/datasets/2615.json
553
+ body:
554
+ encoding: US-ASCII
555
+ string: ''
556
+ headers:
557
+ Content-Type:
558
+ - application/json
559
+ response:
560
+ status:
561
+ code: 200
562
+ message: OK
563
+ headers:
564
+ Date:
565
+ - Fri, 19 Sep 2014 10:42:51 GMT
566
+ Content-Type:
567
+ - application/json; charset=utf-8
568
+ X-Ua-Compatible:
569
+ - IE=Edge
570
+ Etag:
571
+ - "\"d6bc317ea9996e9bec3d78fd32ea0221\""
572
+ Cache-Control:
573
+ - max-age=0, private, must-revalidate
574
+ X-Request-Id:
575
+ - 33fffca7eaf75ffdeb59b813c9938670
576
+ X-Runtime:
577
+ - '0.048141'
578
+ Transfer-Encoding:
579
+ - chunked
580
+ body:
581
+ encoding: UTF-8
582
+ string: "{\"success\":\"pending\",\"dataset_id\":2615,\"dataset_url\":\"<BASE_URI>/datasets/2615.json\"}"
583
+ http_version:
584
+ recorded_at: Fri, 19 Sep 2014 10:42:51 GMT
585
+ - request:
586
+ method: get
587
+ uri: http://api%40example.com:<ODC_API_KEY>@open-data-certificate.dev/datasets/2615.json
588
+ body:
589
+ encoding: US-ASCII
590
+ string: ''
591
+ headers:
592
+ Content-Type:
593
+ - application/json
594
+ response:
595
+ status:
596
+ code: 200
597
+ message: OK
598
+ headers:
599
+ Date:
600
+ - Fri, 19 Sep 2014 10:42:56 GMT
601
+ Content-Type:
602
+ - application/json; charset=utf-8
603
+ X-Ua-Compatible:
604
+ - IE=Edge
605
+ Etag:
606
+ - "\"d6bc317ea9996e9bec3d78fd32ea0221\""
607
+ Cache-Control:
608
+ - max-age=0, private, must-revalidate
609
+ X-Request-Id:
610
+ - 2ef4e2d432b7eccb6028c39bd84742c3
611
+ X-Runtime:
612
+ - '0.038913'
613
+ Transfer-Encoding:
614
+ - chunked
615
+ body:
616
+ encoding: UTF-8
617
+ string: "{\"success\":\"pending\",\"dataset_id\":2615,\"dataset_url\":\"<BASE_URI>/datasets/2615.json\"}"
618
+ http_version:
619
+ recorded_at: Fri, 19 Sep 2014 10:42:56 GMT
620
+ - request:
621
+ method: get
622
+ uri: http://api%40example.com:<ODC_API_KEY>@open-data-certificate.dev/datasets/2615.json
623
+ body:
624
+ encoding: US-ASCII
625
+ string: ''
626
+ headers:
627
+ Content-Type:
628
+ - application/json
629
+ response:
630
+ status:
631
+ code: 200
632
+ message: OK
633
+ headers:
634
+ Date:
635
+ - Fri, 19 Sep 2014 10:43:02 GMT
636
+ Content-Type:
637
+ - application/json; charset=utf-8
638
+ X-Ua-Compatible:
639
+ - IE=Edge
640
+ Etag:
641
+ - "\"d6bc317ea9996e9bec3d78fd32ea0221\""
642
+ Cache-Control:
643
+ - max-age=0, private, must-revalidate
644
+ X-Request-Id:
645
+ - c1ffa37bfa87936af21fb36ee2579ad2
646
+ X-Runtime:
647
+ - '0.022781'
648
+ Transfer-Encoding:
649
+ - chunked
650
+ body:
651
+ encoding: UTF-8
652
+ string: "{\"success\":\"pending\",\"dataset_id\":2615,\"dataset_url\":\"<BASE_URI>/datasets/2615.json\"}"
653
+ http_version:
654
+ recorded_at: Fri, 19 Sep 2014 10:43:02 GMT
655
+ - request:
656
+ method: get
657
+ uri: http://api%40example.com:<ODC_API_KEY>@open-data-certificate.dev/datasets/2615.json
658
+ body:
659
+ encoding: US-ASCII
660
+ string: ''
661
+ headers:
662
+ Content-Type:
663
+ - application/json
664
+ response:
665
+ status:
666
+ code: 200
667
+ message: OK
668
+ headers:
669
+ Date:
670
+ - Fri, 19 Sep 2014 10:43:07 GMT
671
+ Content-Type:
672
+ - application/json; charset=utf-8
673
+ X-Ua-Compatible:
674
+ - IE=Edge
675
+ Etag:
676
+ - "\"d6bc317ea9996e9bec3d78fd32ea0221\""
677
+ Cache-Control:
678
+ - max-age=0, private, must-revalidate
679
+ X-Request-Id:
680
+ - 3e7b32ca19ed477be165598255429da2
681
+ X-Runtime:
682
+ - '0.031684'
683
+ Transfer-Encoding:
684
+ - chunked
685
+ body:
686
+ encoding: UTF-8
687
+ string: "{\"success\":\"pending\",\"dataset_id\":2615,\"dataset_url\":\"<BASE_URI>/datasets/2615.json\"}"
688
+ http_version:
689
+ recorded_at: Fri, 19 Sep 2014 10:43:07 GMT
690
+ - request:
691
+ method: get
692
+ uri: http://api%40example.com:<ODC_API_KEY>@open-data-certificate.dev/datasets/2615.json
693
+ body:
694
+ encoding: US-ASCII
695
+ string: ''
696
+ headers:
697
+ Content-Type:
698
+ - application/json
699
+ response:
700
+ status:
701
+ code: 200
702
+ message: OK
703
+ headers:
704
+ Date:
705
+ - Fri, 19 Sep 2014 10:43:12 GMT
706
+ Content-Type:
707
+ - application/json; charset=utf-8
708
+ X-Ua-Compatible:
709
+ - IE=Edge
710
+ Etag:
711
+ - "\"d6bc317ea9996e9bec3d78fd32ea0221\""
712
+ Cache-Control:
713
+ - max-age=0, private, must-revalidate
714
+ X-Request-Id:
715
+ - ac510d619374bdef0e34beaa82b7ea95
716
+ X-Runtime:
717
+ - '0.034978'
718
+ Transfer-Encoding:
719
+ - chunked
720
+ body:
721
+ encoding: UTF-8
722
+ string: "{\"success\":\"pending\",\"dataset_id\":2615,\"dataset_url\":\"<BASE_URI>/datasets/2615.json\"}"
723
+ http_version:
724
+ recorded_at: Fri, 19 Sep 2014 10:43:12 GMT
725
+ - request:
726
+ method: get
727
+ uri: http://api%40example.com:<ODC_API_KEY>@open-data-certificate.dev/datasets/2615.json
728
+ body:
729
+ encoding: US-ASCII
730
+ string: ''
731
+ headers:
732
+ Content-Type:
733
+ - application/json
734
+ response:
735
+ status:
736
+ code: 200
737
+ message: OK
738
+ headers:
739
+ Date:
740
+ - Fri, 19 Sep 2014 10:43:17 GMT
741
+ Content-Type:
742
+ - application/json; charset=utf-8
743
+ X-Ua-Compatible:
744
+ - IE=Edge
745
+ Etag:
746
+ - "\"3dc34764087fc914cf5ced2434ab2c6a\""
747
+ Cache-Control:
748
+ - max-age=0, private, must-revalidate
749
+ X-Request-Id:
750
+ - 3ac85e83c11554e9429fbae6b9c3712a
751
+ X-Runtime:
752
+ - '0.116367'
753
+ Transfer-Encoding:
754
+ - chunked
755
+ body:
756
+ encoding: UTF-8
757
+ string: "{\"success\":true,\"dataset_id\":2615,\"certificate_url\":\"<BASE_URI>/datasets/2615/certificates/14990\",\"published\":true,\"owner_email\":\"<ODC_USERNAME>\",\"errors\":[\"The
758
+ question 'webpage' is mandatory\",\"The question 'thirdPartyOrigin' is mandatory\",\"The
759
+ question 'thirdPartyOpen' is mandatory\",\"The question 'reference' is mandatory\",\"The
760
+ question 'currentDatasetUrl' is mandatory\",\"The question 'versionsTemplateUrl'
761
+ is mandatory\",\"The question 'crowdsourced' is mandatory\",\"The question
762
+ 'serviceType' is mandatory\",\"The question 'crowdsourcedContent' is mandatory\",\"The
763
+ question 'claUrl' is mandatory\",\"The question 'cldsRecorded' is mandatory\",\"The
764
+ question 'seriesType' is mandatory\",\"The question 'currentDumpUrl' is mandatory\",\"The
765
+ question 'dumpsTemplateUrl' is mandatory\",\"The question 'dumpsUrl' is mandatory\",\"The
766
+ question 'changeFeedUrl' is mandatory\",\"The question 'dataNotApplicable'
767
+ is mandatory\",\"The question 'dataWaiver' is mandatory\",\"The question 'dataOtherWaiver'
768
+ is mandatory\",\"The question 'otherDataLicenceName' is mandatory\",\"The
769
+ question 'otherDataLicenceURL' is mandatory\",\"The question 'otherDataLicenceOpen'
770
+ is mandatory\",\"The question 'contentNotApplicable' is mandatory\",\"The
771
+ question 'contentWaiver' is mandatory\",\"The question 'contentOtherWaiver'
772
+ is mandatory\",\"The question 'account' is mandatory\",\"The question 'otherContentLicenceName'
773
+ is mandatory\",\"The question 'otherContentLicenceURL' is mandatory\",\"The
774
+ question 'otherContentLicenceOpen' is mandatory\",\"The question 'contentRightsURL'
775
+ is mandatory\",\"The question 'engagementTeamUrl' is mandatory\",\"The question
776
+ 'existingExternalUrls' is mandatory\",\"The question 'reliableExternalUrls'
777
+ is mandatory\",\"The question 'appliedAnon' is mandatory\",\"The question
778
+ 'dpStaff' is mandatory\"]}"
779
+ http_version:
780
+ recorded_at: Fri, 19 Sep 2014 10:43:17 GMT
781
+ recorded_with: VCR 2.9.3