akamai_api 0.4.1 → 1.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 (66) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.travis.yml +2 -6
  4. data/Gemfile +1 -0
  5. data/README.md +6 -11
  6. data/akamai_api.gemspec +1 -0
  7. data/cassettes/akamai_api_ccu_arl_invalidate/invalid_credentials.yml +32 -21
  8. data/cassettes/akamai_api_ccu_arl_invalidate/invalid_item.yml +2 -2
  9. data/cassettes/akamai_api_ccu_arl_invalidate/multiple_items.yml +4 -5
  10. data/cassettes/akamai_api_ccu_arl_invalidate/single_item.yml +4 -5
  11. data/cassettes/akamai_api_ccu_arl_remove/invalid_credentials.yml +30 -19
  12. data/cassettes/akamai_api_ccu_arl_remove/invalid_item.yml +1 -1
  13. data/cassettes/akamai_api_ccu_arl_remove/multiple_items.yml +1 -1
  14. data/cassettes/akamai_api_ccu_arl_remove/single_item.yml +1 -1
  15. data/cassettes/akamai_api_ccu_cpcode_invalidate/invalid_credentials.yml +31 -20
  16. data/cassettes/akamai_api_ccu_cpcode_invalidate/invalid_item.yml +1 -1
  17. data/cassettes/akamai_api_ccu_cpcode_invalidate/multiple_items.yml +1 -1
  18. data/cassettes/akamai_api_ccu_cpcode_invalidate/single_item.yml +1 -1
  19. data/cassettes/akamai_api_ccu_cpcode_remove/invalid_credentials.yml +31 -20
  20. data/cassettes/akamai_api_ccu_cpcode_remove/invalid_item.yml +1 -1
  21. data/cassettes/akamai_api_ccu_cpcode_remove/multiple_items.yml +1 -1
  22. data/cassettes/akamai_api_ccu_cpcode_remove/single_item.yml +1 -1
  23. data/cassettes/akamai_api_ccu_purge_status/completed_request.yml +4 -1
  24. data/cassettes/akamai_api_ccu_purge_status/enqueued_request.yml +1 -1
  25. data/cassettes/akamai_api_ccu_purge_status/invalid_credentials.yml +4 -1
  26. data/cassettes/akamai_api_ccu_purge_status/not_found_request.yml +4 -1
  27. data/cassettes/akamai_api_ccu_status/invalid_credentials.yml +1 -1
  28. data/cassettes/akamai_api_ccu_status/valid_credentials.yml +1 -1
  29. data/cassettes/akamai_api_eccu_all_ids/invalid_credentials.yml +3 -1
  30. data/cassettes/akamai_api_eccu_all_ids/successful.yml +3 -1
  31. data/cassettes/akamai_api_eccu_destroy/invalid_credentials.yml +10 -8
  32. data/cassettes/akamai_api_eccu_destroy/not_found_request.yml +3 -1
  33. data/cassettes/akamai_api_eccu_destroy/successful.yml +4 -2
  34. data/cassettes/akamai_api_eccu_find/invalid_credentials.yml +9 -7
  35. data/cassettes/akamai_api_eccu_find/not_found_request.yml +3 -1
  36. data/cassettes/akamai_api_eccu_find/successful.yml +4 -2
  37. data/cassettes/akamai_api_eccu_find/successful_without_content.yml +4 -2
  38. data/cassettes/akamai_api_eccu_last_request/invalid_credentials.yml +1 -1
  39. data/cassettes/akamai_api_eccu_last_request/valid_credentials.yml +6 -2
  40. data/cassettes/akamai_api_eccu_publish/invalid_credentials.yml +12 -10
  41. data/cassettes/akamai_api_eccu_publish/invalid_domain.yml +4 -2
  42. data/cassettes/akamai_api_eccu_publish/successful.yml +7 -3
  43. data/cassettes/akamai_api_eccu_requests/invalid_credentials.yml +3 -1
  44. data/cassettes/akamai_api_eccu_requests/valid_credentials.yml +15 -5
  45. data/cassettes/akamai_api_eccu_update_email/invalid_credentials.yml +11 -9
  46. data/cassettes/akamai_api_eccu_update_email/not_found_request.yml +3 -1
  47. data/cassettes/akamai_api_eccu_update_email/successful.yml +4 -2
  48. data/cassettes/akamai_api_eccu_update_notes/invalid_credentials.yml +11 -9
  49. data/cassettes/akamai_api_eccu_update_notes/not_found_request.yml +3 -1
  50. data/cassettes/akamai_api_eccu_update_notes/successful.yml +4 -2
  51. data/features/ccu_arl_invalidate.feature +1 -25
  52. data/features/support/env.rb +7 -2
  53. data/lib/akamai_api.rb +8 -2
  54. data/lib/akamai_api/ccu/purge/request.rb +52 -12
  55. data/lib/akamai_api/cli/ccu/arl.rb +8 -23
  56. data/lib/akamai_api/cli/ccu/purge_renderer.rb +5 -8
  57. data/lib/akamai_api/cli/command.rb +14 -29
  58. data/lib/akamai_api/version.rb +1 -1
  59. data/spec/features/ccu/purge_request_spec.rb +5 -2
  60. data/spec/lib/akamai_api/ccu/purge/request_spec.rb +29 -46
  61. data/spec/lib/akamai_api/ccu_spec.rb +0 -18
  62. data/spec/spec_helper.rb +8 -2
  63. metadata +17 -10
  64. data/spec/features/ccu/purge_status_request_spec.rb +0 -31
  65. data/spec/features/ccu/status_request_spec.rb +0 -17
  66. data/spec/lib/akamai_api/cli/ccu/arl_spec.rb +0 -40
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb09444b44c9dcc6d38ae14de3a5adcce70cae50
4
- data.tar.gz: 485a448a35dad5ae5d44067346aa38ed481dc8de
3
+ metadata.gz: 75194dd603008485e124ac375a0d0f282682025b
4
+ data.tar.gz: 7111cb9b184f8c714313b212c99ac969c6add61d
5
5
  SHA512:
6
- metadata.gz: 0fa0004f9cd6adb99bd416924662bbf0ecc30e4878d717c4853b1c80014980ed54202af49a625b80d819d89518d476840212ba2f4b47dc69d91affb4417260f8
7
- data.tar.gz: 706da63b0feb903d26c5db010ee7962d589618f68bfbfb43772c06288ab6b14693bc5d43fe6607cd1a7a88a33da66db1c2068c6368e73ab08e50ec06365eee81
6
+ metadata.gz: 74a18d318badae846ff0b212dd3ce5839d97797bd32805e8fd035fe77470f2d381a835b3937dc88764b656fa2cc65e6a8d5afa88202a392168c46ac9f61d46c5
7
+ data.tar.gz: b1c4e77d2f00b95c1aa3f5044a508d128184ce35e61c765f9b7c338d24f436393ccb3663021310c34c737d9a088f786a0ac72584011e9c5596475e41908d8396
data/.gitignore CHANGED
@@ -19,3 +19,4 @@ spec/auth.rb
19
19
  Gemfile.lock
20
20
  bin/stubs/
21
21
  .idea/**
22
+ *.swp
data/.travis.yml CHANGED
@@ -1,13 +1,9 @@
1
1
  bundler_args: --without development
2
2
  language: ruby
3
- rvm:
4
- - 1.9.3
5
- - 2.0.0
6
- - 2.1.1
7
- - jruby-19mode
3
+ rvm: 2.2.5
8
4
  matrix:
9
5
  fast_finish: true
10
6
  script:
11
7
  - bundle exec thor spec
12
8
  - bundle exec thor features
13
- after_script: bundle exec thor coveralls
9
+ after_script: bundle exec thor coveralls
data/Gemfile CHANGED
@@ -10,6 +10,7 @@ group :test do
10
10
  gem 'webmock'
11
11
  gem 'vcr'
12
12
  gem 'coveralls'
13
+ gem 'rake'
13
14
  end
14
15
 
15
16
  group :development do
data/README.md CHANGED
@@ -9,14 +9,18 @@ AkamaiApi is a ruby library and command line utility to interact with Akamai CCU
9
9
 
10
10
  After gem installation you will have a CLI utility to execute operations on Akamai. Each method requires authentication. You can provide auth info using one of the following methods:
11
11
 
12
- - Passing --username (-u) and --password (-p) arguments at each invocation
13
- - Set ENV variables: `AKAMAI_USERNAME` and `AKAMAI_PASSWORD`
12
+ - Passing --username (-u) and --password (-p) arguments at each invocation (for ECCU/old CCU Rest Api)
14
13
  - Creating a config file in your HOME directory named `.akamai_api.yml` with the following format:
15
14
 
16
15
  ```yaml
17
16
  auth:
18
17
  - user
19
18
  - pass
19
+ openapi: # openapi credentials
20
+ base_url: https://akab-abcdefghi-jklmnopq.purge.akamaiapis.net
21
+ client_token: akab-abcdefghijklmnopqrstuv12345
22
+ client_secret: abcedfhijklmnopqrstuv12345
23
+ access_token: akab-12345abcedfghijklmnopqrstuv
20
24
  log: true # optional for enabling logging in ECCU requests. false by default
21
25
  ```
22
26
 
@@ -297,13 +301,4 @@ You can specify the following optional arguments in args: file_name, notes, vers
297
301
 
298
302
  - Clone this repository
299
303
  - Run 'bundle install'
300
- - To run the specs, create the file spec/auth.rb with the following content:
301
-
302
- ```ruby
303
- # Fill the following with your akamai login before running your spec
304
- AkamaiApi.config.merge!({
305
- :auth => ['user', 'pass']
306
- })
307
- ```
308
-
309
304
  - Run specs using `guard`. Alternatively you can execute the specs with `thor spec` and cucumber features with `cucumber`
data/akamai_api.gemspec CHANGED
@@ -22,4 +22,5 @@ Gem::Specification.new do |gem|
22
22
  gem.add_dependency 'thor', '>= 0.14.0', '< 2.0'
23
23
  gem.add_dependency 'savon', '~> 2.5'
24
24
  gem.add_dependency 'builder', '~> 3.0'
25
+ gem.add_dependency 'akamai-edgegrid','~> 1.0'
25
26
  end
@@ -2,36 +2,47 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://foo:bar@api.ccu.akamai.com/ccu/v2/queues/default/
5
+ uri: https://some-subdomain.purge.akamaiapis.net/ccu/v3/invalidate/url/production
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"type":"arl","action":"invalidate","domain":"production","objects":["http://www.foo.bar/t.txt"]}'
8
+ string: '{"objects":["http://www.foo.bar/t.txt"]}'
9
9
  headers:
10
10
  Content-Type:
11
11
  - application/json
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ User-Agent:
17
+ - Ruby
12
18
  response:
13
19
  status:
14
- code: 401
15
- message: Unauthorized
20
+ code: 400
21
+ message: Bad Request
16
22
  headers:
17
- Date:
18
- - Tue, 13 May 2014 14:31:21 GMT
19
- Server:
20
- - Apache
21
23
  Content-Length:
22
- - '146'
23
- Allow:
24
- - GET, HEAD, POST
25
- Www-Authenticate:
26
- - Basic realm="Luna Control Center"
27
- Vary:
28
- - Authorization
24
+ - '428'
25
+ Date:
26
+ - Thu, 16 Mar 2017 07:11:10 GMT
27
+ Connection:
28
+ - close
29
29
  Content-Type:
30
- - text/html;charset=utf-8
30
+ - application/problem+json
31
31
  body:
32
32
  encoding: UTF-8
33
- string: <html><head><title>401 Unauthorized</title></head><body><p>401 Unauthorized</p><p>You
34
- are not authorized to access that resource</p></body></html>
35
- http_version:
36
- recorded_at: Tue, 13 May 2014 14:31:21 GMT
37
- recorded_with: VCR 2.9.0
33
+ string: |
34
+ {
35
+ "type": "https://problems.purge.akamaiapis.net/-/pep-authn/request-error",
36
+ "title": "Bad request",
37
+ "status": 400,
38
+ "detail": "Invalid client token",
39
+ "instance": "https://some-subdomain.purge.akamaiapis.net/ccu/v3/invalidate/url/production",
40
+ "method": "POST",
41
+ "serverIp": "x.x.x.x",
42
+ "clientIp": "y.y.y.y",
43
+ "requestId": "1234567",
44
+ "requestTime": "2017-03-16T07:11:10Z"
45
+ }
46
+ http_version:
47
+ recorded_at: Thu, 16 Mar 2017 07:11:10 GMT
48
+ recorded_with: VCR 3.0.3
@@ -2,10 +2,10 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://USERNAME:PASSWORD@api.ccu.akamai.com/ccu/v2/queues/default/
5
+ uri: https://some-subdomain.purge.akamaiapis.net/ccu/v3/invalidate/url/production
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"type":"arl","action":"invalidate","domain":"production","objects":["http://www.foo.bar/t.txt"]}'
8
+ string: '{"objects":["http://www.foo.bar/t.txt"]}'
9
9
  headers:
10
10
  Content-Type:
11
11
  - application/json
@@ -2,10 +2,10 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://USERNAME:PASSWORD@api.ccu.akamai.com/ccu/v2/queues/default/
5
+ uri: https://some-subdomain.purge.akamaiapis.net/ccu/v3/invalidate/url/production
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"type":"arl","action":"invalidate","domain":"production","objects":["http://www.foo.com/bar.txt","http://www.foo.com/baz.txt"]}'
8
+ string: '{"objects":["http://www.foo.bar/t.txt","http://www.foo.com/baz.txt"]}'
9
9
  headers:
10
10
  Content-Type:
11
11
  - application/json
@@ -30,9 +30,8 @@ http_interactions:
30
30
  - application/json
31
31
  body:
32
32
  encoding: UTF-8
33
- string: '{"estimatedSeconds": 420, "progressUri": "/ccu/v2/purges/12345678-1234-5678-1234-123456789012",
34
- "purgeId": "12345678-1234-1234-1234-123456789012", "supportId": "12345678901234567890-123456789",
35
- "httpStatus": 201, "detail": "Request accepted.", "pingAfterSeconds": 420}'
33
+ string: '{"purgeId": "12345678-1234-1234-1234-123456789012", "supportId": "12345678901234567890-123456789",
34
+ "httpStatus": 201, "detail": "Request accepted."}'
36
35
  http_version:
37
36
  recorded_at: Tue, 13 May 2014 15:37:49 GMT
38
37
  recorded_with: VCR 2.9.0
@@ -2,10 +2,10 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://USERNAME:PASSWORD@api.ccu.akamai.com/ccu/v2/queues/default/
5
+ uri: https://some-subdomain.purge.akamaiapis.net/ccu/v3/invalidate/url/production
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"type":"arl","action":"invalidate","domain":"production","objects":["http://www.foo.bar/t.txt"]}'
8
+ string: '{"objects":["http://www.foo.bar/t.txt"]}'
9
9
  headers:
10
10
  Content-Type:
11
11
  - application/json
@@ -30,9 +30,8 @@ http_interactions:
30
30
  - application/json
31
31
  body:
32
32
  encoding: UTF-8
33
- string: '{"estimatedSeconds": 420, "progressUri": "/ccu/v2/purges/12345678-1234-5678-1234-123456789012",
34
- "purgeId": "12345678-1234-1234-1234-123456789012", "supportId": "12345678901234567890-123456789",
35
- "httpStatus": 201, "detail": "Request accepted.", "pingAfterSeconds": 420}'
33
+ string: '{"estimatedSeconds": 5, "purgeId": "12345678-1234-1234-1234-123456789012", "supportId": "12345678901234567890-123456789",
34
+ "httpStatus": 201, "detail": "Request accepted."}'
36
35
  http_version:
37
36
  recorded_at: Tue, 13 May 2014 15:37:49 GMT
38
37
  recorded_with: VCR 2.9.0
@@ -2,36 +2,47 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://foo:bar@api.ccu.akamai.com/ccu/v2/queues/default/
5
+ uri: https://some-subdomain.purge.akamaiapis.net/ccu/v2/queues/default
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"type":"arl","action":"remove","domain":"production","objects":["http://www.foo.bar/t.txt"]}'
9
9
  headers:
10
10
  Content-Type:
11
11
  - application/json
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ User-Agent:
17
+ - Ruby
12
18
  response:
13
19
  status:
14
- code: 401
15
- message: Unauthorized
20
+ code: 400
21
+ message: Bad Request
16
22
  headers:
17
- Date:
18
- - Tue, 13 May 2014 14:31:21 GMT
19
- Server:
20
- - Apache
21
23
  Content-Length:
22
- - '146'
23
- Allow:
24
- - GET, HEAD, POST
25
- Www-Authenticate:
26
- - Basic realm="Luna Control Center"
27
- Vary:
28
- - Authorization
24
+ - '413'
25
+ Date:
26
+ - Tue, 14 Mar 2017 04:47:01 GMT
27
+ Connection:
28
+ - close
29
29
  Content-Type:
30
- - text/html;charset=utf-8
30
+ - application/problem+json
31
31
  body:
32
32
  encoding: UTF-8
33
- string: <html><head><title>401 Unauthorized</title></head><body><p>401 Unauthorized</p><p>You
34
- are not authorized to access that resource</p></body></html>
33
+ string: |
34
+ {
35
+ "type": "https://problems.purge.akamaiapis.net/-/pep-authn/request-error",
36
+ "title": "Bad request",
37
+ "status": 400,
38
+ "detail": "Invalid client token",
39
+ "instance": "https://some-subdomain.purge.akamaiapis.net/ccu/v2/queues/default",
40
+ "method": "POST",
41
+ "serverIp": "y.y.y.y",
42
+ "clientIp": "x.x.x.x",
43
+ "requestId": "1234567",
44
+ "requestTime": "2017-03-14T04:47:01Z"
45
+ }
35
46
  http_version:
36
- recorded_at: Tue, 13 May 2014 14:31:21 GMT
37
- recorded_with: VCR 2.9.0
47
+ recorded_at: Tue, 14 Mar 2017 04:47:00 GMT
48
+ recorded_with: VCR 3.0.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://USERNAME:PASSWORD@api.ccu.akamai.com/ccu/v2/queues/default/
5
+ uri: https://some-subdomain.purge.akamaiapis.net/ccu/v2/queues/default
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"type":"arl","action":"remove","domain":"production","objects":["http://www.foo.bar/t.txt"]}'
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://USERNAME:PASSWORD@api.ccu.akamai.com/ccu/v2/queues/default/
5
+ uri: https://some-subdomain.purge.akamaiapis.net/ccu/v2/queues/default
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"type":"arl","action":"remove","domain":"production","objects":["http://www.foo.com/bar.txt","http://www.foo.com/baz.txt"]}'
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://USERNAME:PASSWORD@api.ccu.akamai.com/ccu/v2/queues/default/
5
+ uri: https://some-subdomain.purge.akamaiapis.net/ccu/v2/queues/default
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"type":"arl","action":"remove","domain":"production","objects":["http://www.foo.bar/t.txt"]}'
@@ -2,36 +2,47 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://foo:bar@api.ccu.akamai.com/ccu/v2/queues/default/
5
+ uri: https://some-subdomain.purge.akamaiapis.net/ccu/v2/queues/default
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"type":"cpcode","action":"invalidate","domain":"production","objects":["12345"]}'
9
9
  headers:
10
10
  Content-Type:
11
11
  - application/json
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ User-Agent:
17
+ - Ruby
12
18
  response:
13
19
  status:
14
- code: 401
15
- message: Unauthorized
20
+ code: 400
21
+ message: Bad Request
16
22
  headers:
17
- Date:
18
- - Tue, 13 May 2014 14:31:21 GMT
19
- Server:
20
- - Apache
21
23
  Content-Length:
22
- - '146'
23
- Allow:
24
- - GET, HEAD, POST
25
- Www-Authenticate:
26
- - Basic realm="Luna Control Center"
27
- Vary:
28
- - Authorization
24
+ - '414'
25
+ Date:
26
+ - Thu, 16 Mar 2017 22:43:27 GMT
27
+ Connection:
28
+ - close
29
29
  Content-Type:
30
- - text/html;charset=utf-8
30
+ - application/problem+json
31
31
  body:
32
32
  encoding: UTF-8
33
- string: <html><head><title>401 Unauthorized</title></head><body><p>401 Unauthorized</p><p>You
34
- are not authorized to access that resource</p></body></html>
35
- http_version:
36
- recorded_at: Tue, 13 May 2014 14:31:21 GMT
37
- recorded_with: VCR 2.9.0
33
+ string: |
34
+ {
35
+ "type": "https://problems.purge.akamaiapis.net/-/pep-authn/request-error",
36
+ "title": "Bad request",
37
+ "status": 400,
38
+ "detail": "Invalid client token",
39
+ "instance": "https://some-subdomain.purge.akamaiapis.net/ccu/v2/queues/default",
40
+ "method": "POST",
41
+ "serverIp": "x.x.x.x",
42
+ "clientIp": "y.y.y.y",
43
+ "requestId": "1234567",
44
+ "requestTime": "2017-03-16T22:43:27Z"
45
+ }
46
+ http_version:
47
+ recorded_at: Thu, 16 Mar 2017 22:43:27 GMT
48
+ recorded_with: VCR 3.0.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://USERNAME:PASSWORD@api.ccu.akamai.com/ccu/v2/queues/default/
5
+ uri: https://some-subdomain.purge.akamaiapis.net/ccu/v2/queues/default
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"type":"cpcode","action":"invalidate","domain":"production","objects":["12345"]}'
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://USERNAME:PASSWORD@api.ccu.akamai.com/ccu/v2/queues/default/
5
+ uri: https://some-subdomain.purge.akamaiapis.net/ccu/v2/queues/default
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"type":"cpcode","action":"invalidate","domain":"production","objects":["12345","12346"]}'
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://USERNAME:PASSWORD@api.ccu.akamai.com/ccu/v2/queues/default/
5
+ uri: https://some-subdomain.purge.akamaiapis.net/ccu/v2/queues/default
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"type":"cpcode","action":"invalidate","domain":"production","objects":["12345"]}'
@@ -2,36 +2,47 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://foo:bar@api.ccu.akamai.com/ccu/v2/queues/default/
5
+ uri: https://some-subdomain.purge.akamaiapis.net/ccu/v2/queues/default
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"type":"cpcode","action":"remove","domain":"production","objects":["12345"]}'
9
9
  headers:
10
10
  Content-Type:
11
11
  - application/json
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ User-Agent:
17
+ - Ruby
12
18
  response:
13
19
  status:
14
- code: 401
15
- message: Unauthorized
20
+ code: 400
21
+ message: Bad Request
16
22
  headers:
17
- Date:
18
- - Tue, 13 May 2014 14:31:21 GMT
19
- Server:
20
- - Apache
21
23
  Content-Length:
22
- - '146'
23
- Allow:
24
- - GET, HEAD, POST
25
- Www-Authenticate:
26
- - Basic realm="Luna Control Center"
27
- Vary:
28
- - Authorization
24
+ - '417'
25
+ Date:
26
+ - Sat, 11 Mar 2017 10:14:57 GMT
27
+ Connection:
28
+ - close
29
29
  Content-Type:
30
- - text/html;charset=utf-8
30
+ - application/problem+json
31
31
  body:
32
32
  encoding: UTF-8
33
- string: <html><head><title>401 Unauthorized</title></head><body><p>401 Unauthorized</p><p>You
34
- are not authorized to access that resource</p></body></html>
35
- http_version:
36
- recorded_at: Tue, 13 May 2014 14:31:21 GMT
37
- recorded_with: VCR 2.9.0
33
+ string: |
34
+ {
35
+ "type": "https://problems.purge.akamaiapis.net/-/pep-authn/request-error",
36
+ "title": "Bad request",
37
+ "status": 400,
38
+ "detail": "Invalid client token",
39
+ "instance": "https://some-subdomain.purge.akamaiapis.net/ccu/v2/queues/default",
40
+ "method": "POST",
41
+ "serverIp": "x.x.x.x.",
42
+ "clientIp": "y.y.y.y",
43
+ "requestId": "1c1d405c",
44
+ "requestTime": "2017-03-11T10:14:57Z"
45
+ }
46
+ http_version:
47
+ recorded_at: Sat, 11 Mar 2017 10:14:57 GMT
48
+ recorded_with: VCR 3.0.3