From c267ed076445b8e1abf1b1075ebc8e050f803a85 Mon Sep 17 00:00:00 2001 From: Rafal Artych <121048129+rartych@users.noreply.github.com> Date: Mon, 22 Jul 2024 11:37:02 +0200 Subject: [PATCH 1/7] Update API-design-guidelines.md Alignment of table in section 6.2 with Annex A. --- documentation/API-design-guidelines.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/documentation/API-design-guidelines.md b/documentation/API-design-guidelines.md index 38753812..1d64635d 100644 --- a/documentation/API-design-guidelines.md +++ b/documentation/API-design-guidelines.md @@ -793,6 +793,9 @@ The Following table compiles the guidelines to be adopted: | 3 | Device identifiers mismatch | 422 | DEVICE_IDENTIFIERS_MISMATCH | Provided device identifiers are not consistent. | | 4 | Invalid access token context | 403 | INVALID_TOKEN_CONTEXT | Device identifiers are not consistent with access token. | | 5 | Service not applicable to the device | 422 | DEVICE_NOT_APPLICABLE | The service is not available for the provided device. | +| 6 | The device identifier is not included in the request and the device information cannot be derived from the 3-legged access token | 422 | UNIDENTIFIABLE_DEVICE | The device cannot be identified | + + #### Templates From 05d70d791f2fc1afd4742ad1f23cb145194738b7 Mon Sep 17 00:00:00 2001 From: Rafal Artych <121048129+rartych@users.noreply.github.com> Date: Fri, 26 Jul 2024 13:53:14 +0200 Subject: [PATCH 2/7] Update API-design-guidelines.md UNIDENTIFIABLE_DEVICE added to table in 6.1 --- documentation/API-design-guidelines.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/documentation/API-design-guidelines.md b/documentation/API-design-guidelines.md index 1d64635d..bb35658e 100644 --- a/documentation/API-design-guidelines.md +++ b/documentation/API-design-guidelines.md @@ -756,6 +756,7 @@ In the following, we elaborate on the existing client errors. In particular, we | 404 | `{{SPECIFIC_CODE}}` | `{{SPECIFIC_CODE_MESSAGE}}` | Specific situation to highlight the resource/concept not found (e.g. use in device) | | 422 | `DEVICE_IDENTIFIERS_MISMATCH` | Provided device identifiers are not consistent. | Inconsistency between device identifiers not pointing to the same device | | 422 | `DEVICE_NOT_APPLICABLE` | The service is not available for the provided device. | Service is not available for the provided device | +| 422 | `UNIDENTIFIABLE_DEVICE` | The device cannot be identified. |The device identifier is not included in the request and the device information cannot be derived from the 3-legged access token | | 422 | `{{SPECIFIC_CODE}}` | `{{SPECIFIC_CODE_MESSAGE}}` | Any semantic condition associated to business logic, specifically related to a field or data structure | | 429 | `QUOTA_EXCEEDED` | Either out of resource quota or reaching rate limiting. | Request is rejected due to exceeding a business quota limit | | 429 | `TOO_MANY_REQUESTS` | Either out of resource quota or reaching rate limiting. | API Server request limit is overpassed | @@ -793,7 +794,7 @@ The Following table compiles the guidelines to be adopted: | 3 | Device identifiers mismatch | 422 | DEVICE_IDENTIFIERS_MISMATCH | Provided device identifiers are not consistent. | | 4 | Invalid access token context | 403 | INVALID_TOKEN_CONTEXT | Device identifiers are not consistent with access token. | | 5 | Service not applicable to the device | 422 | DEVICE_NOT_APPLICABLE | The service is not available for the provided device. | -| 6 | The device identifier is not included in the request and the device information cannot be derived from the 3-legged access token | 422 | UNIDENTIFIABLE_DEVICE | The device cannot be identified | +| 6 | The device identifier is not included in the request and the device information cannot be derived from the 3-legged access token | 422 | UNIDENTIFIABLE_DEVICE |The device cannot be identified.| From 1ea7d6569b00b7bb15b83caaeb47a899071fc57f Mon Sep 17 00:00:00 2001 From: Rafal Artych <121048129+rartych@users.noreply.github.com> Date: Fri, 26 Jul 2024 13:59:28 +0200 Subject: [PATCH 3/7] Update CAMARA_common.yaml Err 422 UNIDENTIFIABLE_DEVICE added --- artifacts/CAMARA_common.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/artifacts/CAMARA_common.yaml b/artifacts/CAMARA_common.yaml index efce643b..d83d1c26 100644 --- a/artifacts/CAMARA_common.yaml +++ b/artifacts/CAMARA_common.yaml @@ -370,6 +370,12 @@ components: status: 422 code: DEVICE_NOT_APPLICABLE message: The service is not available for the provided device. + GENERIC_422_UNIDENTIFIABLE_DEVICE: + description: Service is not available for the provided device + value: + status: 422 + code: UNIDENTIFIABLE_DEVICE + message: The device cannot be identified. GENERIC_422_{{SPECIFIC_CODE}}: description: Any semantic condition associated to business logic, specifically related to a field or data structure value: From 375d9fabf8015f6ec18658e246ed10a58bd79f7a Mon Sep 17 00:00:00 2001 From: Rafal Artych <121048129+rartych@users.noreply.github.com> Date: Mon, 29 Jul 2024 20:50:01 +0200 Subject: [PATCH 4/7] Update artifacts/CAMARA_common.yaml Co-authored-by: Herbert Damker --- artifacts/CAMARA_common.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/artifacts/CAMARA_common.yaml b/artifacts/CAMARA_common.yaml index d83d1c26..9e681d17 100644 --- a/artifacts/CAMARA_common.yaml +++ b/artifacts/CAMARA_common.yaml @@ -374,7 +374,8 @@ components: description: Service is not available for the provided device value: status: 422 - code: UNIDENTIFIABLE_DEVICE + code: UNIDENTIFIABLE_DEVICE + message: The device cannot be identified. GENERIC_422_{{SPECIFIC_CODE}}: description: Any semantic condition associated to business logic, specifically related to a field or data structure From b2b97978dbdc3a765f2da812159a3096e9f885d7 Mon Sep 17 00:00:00 2001 From: Rafal Artych <121048129+rartych@users.noreply.github.com> Date: Tue, 30 Jul 2024 11:36:16 +0200 Subject: [PATCH 5/7] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Pedro Díez García --- artifacts/CAMARA_common.yaml | 3 ++- documentation/API-design-guidelines.md | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/artifacts/CAMARA_common.yaml b/artifacts/CAMARA_common.yaml index 9e681d17..90d7bed1 100644 --- a/artifacts/CAMARA_common.yaml +++ b/artifacts/CAMARA_common.yaml @@ -371,7 +371,8 @@ components: code: DEVICE_NOT_APPLICABLE message: The service is not available for the provided device. GENERIC_422_UNIDENTIFIABLE_DEVICE: - description: Service is not available for the provided device + description: The device identifier is not included in the request and the device information cannot be derived from the 3-legged access token + value: status: 422 code: UNIDENTIFIABLE_DEVICE diff --git a/documentation/API-design-guidelines.md b/documentation/API-design-guidelines.md index bb35658e..3835ee71 100644 --- a/documentation/API-design-guidelines.md +++ b/documentation/API-design-guidelines.md @@ -756,7 +756,7 @@ In the following, we elaborate on the existing client errors. In particular, we | 404 | `{{SPECIFIC_CODE}}` | `{{SPECIFIC_CODE_MESSAGE}}` | Specific situation to highlight the resource/concept not found (e.g. use in device) | | 422 | `DEVICE_IDENTIFIERS_MISMATCH` | Provided device identifiers are not consistent. | Inconsistency between device identifiers not pointing to the same device | | 422 | `DEVICE_NOT_APPLICABLE` | The service is not available for the provided device. | Service is not available for the provided device | -| 422 | `UNIDENTIFIABLE_DEVICE` | The device cannot be identified. |The device identifier is not included in the request and the device information cannot be derived from the 3-legged access token | +| 422 | `UNIDENTIFIABLE_DEVICE` | The device cannot be identified. | The device identifier is not included in the request and the device information cannot be derived from the 3-legged access token | | 422 | `{{SPECIFIC_CODE}}` | `{{SPECIFIC_CODE_MESSAGE}}` | Any semantic condition associated to business logic, specifically related to a field or data structure | | 429 | `QUOTA_EXCEEDED` | Either out of resource quota or reaching rate limiting. | Request is rejected due to exceeding a business quota limit | | 429 | `TOO_MANY_REQUESTS` | Either out of resource quota or reaching rate limiting. | API Server request limit is overpassed | @@ -794,7 +794,7 @@ The Following table compiles the guidelines to be adopted: | 3 | Device identifiers mismatch | 422 | DEVICE_IDENTIFIERS_MISMATCH | Provided device identifiers are not consistent. | | 4 | Invalid access token context | 403 | INVALID_TOKEN_CONTEXT | Device identifiers are not consistent with access token. | | 5 | Service not applicable to the device | 422 | DEVICE_NOT_APPLICABLE | The service is not available for the provided device. | -| 6 | The device identifier is not included in the request and the device information cannot be derived from the 3-legged access token | 422 | UNIDENTIFIABLE_DEVICE |The device cannot be identified.| +| 6 | The device identifier is not included in the request and the device information cannot be derived from the 3-legged access token | 422 | UNIDENTIFIABLE_DEVICE | The device cannot be identified. | From 2acf0bbeefc0990bd9eff9c0c9cfa7c9ec5ef153 Mon Sep 17 00:00:00 2001 From: Rafal Artych <121048129+rartych@users.noreply.github.com> Date: Tue, 30 Jul 2024 12:53:15 +0200 Subject: [PATCH 6/7] Update artifacts/CAMARA_common.yaml Co-authored-by: Herbert Damker --- artifacts/CAMARA_common.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/artifacts/CAMARA_common.yaml b/artifacts/CAMARA_common.yaml index 90d7bed1..f5708804 100644 --- a/artifacts/CAMARA_common.yaml +++ b/artifacts/CAMARA_common.yaml @@ -372,11 +372,9 @@ components: message: The service is not available for the provided device. GENERIC_422_UNIDENTIFIABLE_DEVICE: description: The device identifier is not included in the request and the device information cannot be derived from the 3-legged access token - value: status: 422 code: UNIDENTIFIABLE_DEVICE - message: The device cannot be identified. GENERIC_422_{{SPECIFIC_CODE}}: description: Any semantic condition associated to business logic, specifically related to a field or data structure From fa74f2af9998d097bb566588bf2610ae67811c35 Mon Sep 17 00:00:00 2001 From: Rafal Artych <121048129+rartych@users.noreply.github.com> Date: Wed, 31 Jul 2024 15:59:41 +0200 Subject: [PATCH 7/7] Update API-design-guidelines.md - code 422 added to table in 3.2 --- documentation/API-design-guidelines.md | 1 + 1 file changed, 1 insertion(+) diff --git a/documentation/API-design-guidelines.md b/documentation/API-design-guidelines.md index 3835ee71..dcd3a7a3 100644 --- a/documentation/API-design-guidelines.md +++ b/documentation/API-design-guidelines.md @@ -333,6 +333,7 @@ Common errors are captured in the table below. | 409 | The 409 (Conflict) status code indicates when a request conflicts with the current state of the server. | | 410 | The 410 (Gone) status code indicates that access to the target resource is no longer available at the origin server and that this condition is likely to be permanent. | | 415 | The 415 (Unsupported Media Type) status code indicates that the server cannot accept the format of the request body as indicated by the `Content-Type` or `Content-Encoding` request header. The API specification will state what request body format should be used. | +| 422 | The 422 (Unprocessable Entity) status code means the server understands the content type of the request body, and the syntax of the request body is correct but it was unable to process the contained instructions. | | 429 | The 429 (Too Many Requests) status code indicates that the server is temporarily unable to accept any more requests from the client due to the high number of requests recently sent. A `Retry-After` response header may indicate how long the client should wait before trying again. | | 500 | Status code 500 (Internal Server Error) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.
This code must always be documented. It should be used as a general system error. | | 501 | Status code 501 (Not Implemented) indicates that the requested method is not supported by the server and cannot be handled. The only methods that servers require support (and therefore should not return this code) are `GET` and HEAD. |