@@ -461,16 +461,16 @@ proper guidance for handling batch/bulk requests and responses, we herewith
461461define the following approach:
462462
463463* A batch or bulk request *always* responds with HTTP status code {207}
464- unless a non-item-specific failure occurs.
464+ unless a non-item-specific failure occurs.
465465
466466* A batch or bulk request *may* return {4xx}/{5xx} status codes, if the
467- failure is non-item-specific and cannot be restricted to individual items of
468- the batch or bulk request, e.g. in case of overload situations or general
469- service failures.
467+ failure is non-item-specific and cannot be restricted to individual items of
468+ the batch or bulk request, e.g. in case of overload situations or general
469+ service failures.
470470
471471* A batch or bulk response with status code {207} *always* returns as payload
472- a multi-status response containing item specific status and/or monitoring
473- information for each part of the batch or bulk request.
472+ a multi-status response containing item specific status and/or monitoring
473+ information for each part of the batch or bulk request.
474474
475475**Note:** These rules apply _even in the case_ that processing of all
476476individual parts _fail_ or each part is executed _asynchronously_!
@@ -529,23 +529,23 @@ providing further details to the client. There are two approaches a service
529529can take for header information:
530530
531531* Return a {Retry-After} header indicating how long the client ought to wait
532- before making a follow-up request. The Retry-After header can contain a HTTP
533- date value to retry after or the number of seconds to delay. Either is
534- acceptable but APIs should prefer to use a delay in seconds.
532+ before making a follow-up request. The Retry-After header can contain a HTTP
533+ date value to retry after or the number of seconds to delay. Either is
534+ acceptable but APIs should prefer to use a delay in seconds.
535535* Return a trio of `X-RateLimit` headers. These headers (described below) allow
536- a server to express a service level in the form of a number of allowing
537- requests within a given window of time and when the window is reset.
536+ a server to express a service level in the form of a number of allowing
537+ requests within a given window of time and when the window is reset.
538538
539539The `X-RateLimit` headers are:
540540
541541* `X-RateLimit-Limit`: The maximum number of requests that the client is
542- allowed to make in this window.
542+ allowed to make in this window.
543543* `X-RateLimit-Remaining`: The number of requests allowed in the current
544- window.
544+ window.
545545* `X-RateLimit-Reset`: The relative time in seconds when the rate limit window
546- will be reset. **Beware** that this is different to Github and Twitter's
547- usage of a header with the same name which is using UTC epoch seconds
548- instead.
546+ will be reset. **Beware** that this is different to Github and Twitter's
547+ usage of a header with the same name which is using UTC epoch seconds
548+ instead.
549549
550550The reason to allow both approaches is that APIs can have different
551551needs. Retry-After is often sufficient for general load handling and
@@ -568,63 +568,21 @@ number of requests made within a given window for each named entity.
568568errors in API responses. It serves several purposes:
569569
570570* Developers: to debug, diagnose and resolve issues during API integration or
571- operation
571+ operation
572572* Client applications: to inform users about errors (in user interface) and to
573- support automated processing and error handling when appropriate.
573+ support automated processing and error handling when appropriate.
574574
575- ==== Problem schema members, suppported by the API guidelines
576- Problem detail objects can have the following members.
575+ ==== Problem schema members, supported by the API guidelines
576+ Problem detail objects can have the following members described in the OpenAPI
577+ schema definition
578+ https://opensource.zalando.com/restful-api-guidelines/models/problem-1.0.1.yaml[on
579+ GitHub].
577580
578581**Note:** If a member's value type does not match the specified type,
579582the member MUST be ignored -- i.e., processing will continue as if
580583the member had not been present.
581584
582- ===== status (integer)
583- The HTTP status code generated by the origin server for occurrences of the problem.
584- Example:
585-
586- `"status": 400`
587-
588- ===== title (string)
589- A short, human-readable summary of the problem type. It *SHOULD NOT* change
590- from occurrence to occurrence of the problem, except for purposes of
591- localization.
592- Example:
593-
594- `"title": "Invalid parameter"`
595-
596- ===== detail (string)
597- A human-readable explanation specific to this occurrence of the problem.
598- Provides additional context or specifics about the error for debugging
599- or display to the user.
600- Example:
601-
602- `"detail": "The 'color' parameter is invalid"`
603-
604- ===== type and instance (URI references)
605- The standardized Problem JSON object also allows for the following optional
606- members:
607-
608- - type: a URI identifying the problem type, typically more specific than the
609- HTTP status code. In many cases, an error code can be placed in the type
610- property. It may support automated client decisions in certain failure modes.
611- If the `type` doesn’t provide additional information, it can be omitted
612- (defaulting to `"about:blank"`).
613- - instance: a URI reference that identifies specific occurrence of the problem.
614- This field should serve the purpose of defining a clear error instance from
615- which the developer can determine the source location of the error.
616- Additionally, it may include relevant contextual information, such as parameters
617- associated with the error and optionally `Flow-ID` for debugging purposes.
618-
619- Examples:
620-
621- `"type": "https://example.com/errors/invalid-parameter"`
622-
623- `"type": "https://example.com/errors/ERR12345" (with error code)`
624-
625- `"instance": "/errors/12345"`
626-
627- *Note:* {RFC-9457}[RFC 9457] encourages that problem types are URI
585+ {RFC-9457}[RFC 9457] encourages that problem types are URI
628586references that point to human-readable documentation, *but* we deliberately
629587decided against that, as all important parts of the API must be documented
630588using <<101, OpenAPI>> anyway. In addition, URLs tend to be fragile and not
@@ -644,7 +602,7 @@ identifiers in `type` and `instance` fields:
644602*Hint:* The use of https://tools.ietf.org/html/rfc3986#section-4.3[absolute
645603URIs] is not forbidden but strongly discouraged. If you use absolute URIs,
646604please reference
647- https://opensource.zalando.com/restful-api-guidelines/models/problem-1.0.0 .yaml#/Problem[problem-1.0.0 .yaml#/Problem]
605+ https://opensource.zalando.com/restful-api-guidelines/models/problem-1.0.1 .yaml#/Problem[problem-1.0.1 .yaml#/Problem]
648606instead.
649607
650608==== Usage of Problem Object
@@ -654,9 +612,9 @@ properties being present or having specific values.
654612The examples of such cases are:
655613
656614- response might be created by infrastructure components (and have a different
657- response format, comparing to the guidelines)
615+ response format, comparing to the guidelines)
658616- response might be created by a service that is unable to comply with the
659- guidelines due to certain error situations
617+ guidelines due to certain error situations
660618
661619In cases where the Problem Object lacks the required information, clients must
662620implement fallback mechanisms, defaulting to reasonable behavior similar to
@@ -694,21 +652,21 @@ The following guidelines offer best practices for utilizing type in automated
694652processing:
695653
6966541. Property `type` may be used by clients to make automatic decisions in
697- certain failure modes. The `title` property serves as a concise,
698- human-readable summary of the type. It is particularly helpful for debugging
699- and serves as an engineer-readable shorthand for the problem type.
655+ certain failure modes. The `title` property serves as a concise,
656+ human-readable summary of the type. It is particularly helpful for debugging
657+ and serves as an engineer-readable shorthand for the problem type.
700658
7016592. Clients may use these fields to drive automated actions if the API
702- explicitly defines the semantics of `type` and `instance` and enumerates
703- stable values. This can be achieved by extending the Problem JSON object and
704- associating an x-extensible-enum with the type property.
660+ explicitly defines the semantics of `type` and `instance` and enumerates
661+ stable values. This can be achieved by extending the Problem JSON object and
662+ associating an x-extensible-enum with the type property.
705663
7066643. Clients must handle scenarios where the type is absent or unrecognized and
707- fallback to default behaviors.
665+ fallback to default behaviors.
708666
7096674. For collections of related APIs, using shared type values for similar errors
710- and distinct values for different errors simplifies automated processing and
711- error handling for clients working across APIs.
668+ and distinct values for different errors simplifies automated processing and
669+ error handling for clients working across APIs.
712670
713671*Note:* Include descriptions for each known error that can happen directly in
714672the specification or reference external documentation to clarify their meanings
@@ -788,9 +746,9 @@ redirection to migrate clients to a new service location. However, this is
788746better accomplished by one of the following.
789747
7907481. Changing the clients to use the new location in the first place, avoiding
791- the need for redirection.
749+ the need for redirection.
7927502. Redirecting the traffic behind the API layer (e.g. in the reverse proxy or
793- the app itself) without the client having to be involved.
751+ the app itself) without the client having to be involved.
7947523. Deprecating the endpoint and removing it as described in <<deprecation>>.
795753
796754For idempotent {POST} cases, where you want to inform the client that a resource
0 commit comments