curl --request POST \ --url https://platform.ringcentral.com/restapi/v1.0/subscription \ --header 'accept: application/json' \ --header 'authorization: Bearer ... \ --header 'content-type: application/json' \ --data '{"deliveryMode":{"transportType":"PubNub"},"eventFilters":["/restapi/v1.0/account/~/telephony/sessions"],"expiresIn":3600}'
Response:
{ "uri": "https://platform.ringcentral.com/restapi/v1.0/subscription/5c2a73a6-4320-4a3f-ac3d-a9c7b86f10dc", "id": "5c2a73a6-4320-4a3f-ac3d-a9c7b86f10dc", "creationTime": "2021-07-19T18:07:21.411Z", "status": "Active", "eventFilters": [ "/restapi/v1.0/account/66958521/telephony/sessions" ], "expirationTime": "2021-07-19T18:22:21.411Z", "expiresIn": 899, "deliveryMode": { "transportType": "PubNub", "encryption": false, "address": "474144630900267_cXXXXXXX", "subscriberKey": "sub-c-b8b9cd8c-e906-11e2-b383-02ee2XXXXXXX" } }
Is it possible to create a subscription with a longer expiry, e.g., up to 24 hours? A 15 minute maximum makes it nearly impossible to guard against data loss during ordinary system downtime/maintenance.