Skip to content

Commit

Permalink
Update API-design-guidelines.md
Browse files Browse the repository at this point in the history
Add information for exiresAT + limitation to subscriptionMaxEvent and subscriptionExpireTime.
Fixes camaraproject#303
  • Loading branch information
bigludo7 authored Oct 10, 2024
1 parent 8bd8ef5 commit 6030436
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion documentation/API-design-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -1683,7 +1683,7 @@ The following table provides `/subscriptions` attributes
| config | object | Implementation-specific configuration parameters needed by the subscription manager for acquiring events. In CAMARA we have predefined attributes like ``subscriptionExpireTime``, ``subscriptionMaxEvents`` or ``initialEvent``. See detail below. | mandatory |
| id | string | Identifier of the event subscription - This attribute must not be present in the POST request as it is provided by API server | mandatory in server response |
| startsAt | string - date-time | Date when the event subscription will begin/began. This attribute must not be present in the `POST` request as it is provided by API server. It must be present in `GET` endpoints | optional |
| expiresAt | string - date-time | Date when the event subscription will expire. This attribute must not be present in the `POST` request as it is provided (optionally) by API server. | optional |
| expiresAt | string - date-time | Date when the event subscription will expire. This attribute must not be present in the `POST` request as it is provided (optionally) by API server. This attribute must be provided by the server if subscriptionExpireTime is provided in the request and server not able to handle it. | optional |
| status | string | Current status of the subscription - Management of Subscription state engine is not mandatory for now. Note: not all statuses may be considered to be implemented. See below status table. | optional |
Expand Down Expand Up @@ -1754,6 +1754,7 @@ It could be useful to provide a mechanism to inform subscriber for all cases. In
_Termination rules regarding subscriptionExpireTime & subscriptionMaxEvents usage_
* When client side providing a `subscriptionExpireTime` and/or `subscriptionMaxEvents` service side has to terminate the subscription without expecting a `DELETE` operation.
* CAMARA did not impose limitations for `subscriptionExpireTime` or `subscriptionMaxEvents` but API provider enforce limitations and have to document them.
* If both `subscriptionExpireTime` and `subscriptionMaxEvents` are provided, the subscription will end when the first one is reached.
* When none `subscriptionExpireTime` and `subscriptionMaxEvents` are not provided, client side has to trigger a `DELETE` operation to terminate it.
* It is perfectly valid for client side to trigger a DELETE operation before `subscriptionExpireTime` and/or `subscriptionMaxEvents` reached.
Expand Down

0 comments on commit 6030436

Please sign in to comment.