--- http_interactions: - request: method: post uri: https://my.datacentred.io/api/roles body: encoding: UTF-8 string: '{"role":{"name":"New Role"}}' headers: Accept: - application/vnd.datacentred.api+json; version=1 Authorization: - Token token=access_key:secret_key Content-Type: - application/json User-Agent: - Faraday v0.9.2 Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 response: status: code: 201 message: Created headers: X-Frame-Options: - SAMEORIGIN X-Xss-Protection: - 1; mode=block X-Content-Type-Options: - nosniff X-Api-Version: - '1' Content-Type: - application/vnd.datacentred.api+json; charset=utf-8 Etag: - W/"41b511803b74af08f16067a9d1e3bc5a" Cache-Control: - max-age=0, private, must-revalidate X-Request-Id: - 19be8bd6-bb38-480b-949d-b78410bf2243 X-Runtime: - '0.114881' Transfer-Encoding: - chunked body: encoding: UTF-8 string: '{"role":{"id":"b7d9843a-6d52-4fc5-917e-e555b132a17a","name":"New Role","admin":false,"permissions":[],"created_at":"2017-09-05T15:31:38Z","updated_at":"2017-09-05T15:31:38Z","links":[{"href":"https://my.datacentred.io/api/roles/b7d9843a-6d52-4fc5-917e-e555b132a17a","rel":"self"},{"href":"https://my.datacentred.io/api/schemas/role","rel":"schema"}]}}' http_version: recorded_at: Tue, 05 Sep 2017 15:31:38 GMT - request: method: put uri: https://my.datacentred.io/api/roles/b7d9843a-6d52-4fc5-917e-e555b132a17a body: encoding: UTF-8 string: '{"role":{"name":"Genghis Khan","permissions":["fighting"]}}' headers: Accept: - application/vnd.datacentred.api+json; version=1 Authorization: - Token token=e9d2d4cd37adf1634e2a65b9e18a8fcb:821fac118e7675f28fa42ab79ace57de Content-Type: - application/json User-Agent: - Faraday v0.9.2 Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 response: status: code: 422 message: Unprocessable Entity headers: X-Frame-Options: - SAMEORIGIN X-Xss-Protection: - 1; mode=block X-Content-Type-Options: - nosniff X-Api-Version: - '1' Content-Type: - application/json; charset=utf-8 Cache-Control: - no-cache X-Request-Id: - 069b9bff-e479-409c-8c9b-7393763853a0 X-Runtime: - '0.106739' Transfer-Encoding: - chunked body: encoding: UTF-8 string: '{"errors":[{"resource":"role","detail":"Role permissions must be one of: ''access requests.raise for others'', ''access requests.raise for self'', ''api.read'', ''cloud.read'', ''roles.modify'', ''roles.read'', ''storage.read'', ''tickets.modify'', ''usage.read''. ''fighting'' is not allowed.","field":"permissions"}],"links":[{"href":"https://my.datacentred.io/api","rel":"help"}]}' http_version: recorded_at: Tue, 05 Sep 2017 15:31:38 GMT recorded_with: VCR 2.8.0