12. API Economy - Bifurcated Technical Roles
● Digital Development Teams
○ Speed of Development
○ Simplicity of Solution
○ Ease of Use
● Backend Integration Teams
○ Sanity of Solution
○ Security
○ Ease of Scale
13. RFC 7807 (March 2016)
Essential Motivation:
1. Missing Adequate Depth of Error Scenario
2. Categorization of Subtypes below HTTP Error Codes
3. Response is too basic to add value to UX
14. RFC 7807 (March 2016)
Proposed Ingredients:
1. Type
2. Title
3. HTTP Status
4. Detail
5. Instance
15. RFC 7807
Zalando Implementation (September 2016):
1. Type
2. Title
3. Detail
{
"type": "https://example.org/out-of-stock",
"title": "Out of Stock",
"status": 400,
"detail": "Item B00027Y5QG is no longer available"
}
Ref: https://github.com/zalando/problem
16. RFC 7807 : Security Considerations
Vetting of information in Detail & Instance
Disagreement on Status ( possible modification of status by proxy!)
{
"type": "https://example.org/out-of-stock",
"title": "Out of Stock",
"status": 400,
"detail": "Item B00027Y5QG is no longer available"
}
Ref: https://github.com/zalando/problem
17. RFC 7807: Extending & Dynamic Vetting
HTTP/1.1 403 Forbidden
Content-Type: application/problem+json
Content-Language: en
{
"type": "https://example.com/probs/out-of-credit",
"title": "You do not have enough credit.",
"status": 403,
"detail": "Your current balance is 30, but that costs 50.",
"instance": "/account/12345/msgs/abc",
"balance": 30,
"accounts": ["/account/12345","/account/67890"]
}
HTTP/1.1 400 Bad Request
Content-Type: application/problem+json
Content-Language: en
{
"type": "https://example.com/validation-error",
"title": "Your request parameters didn't validate.",
"status": 400,
"invalid-params": [ {
"name": "age",
"reason": "must be a positive integer"
},
{
"name": "color",
"reason": "must be 'green', 'red' or 'blue'"}
]
}