Skip Navigation
Expand
Expired subscription ID is reissued if a similar new subscription is created
Answer ID 11546   |   Last Review Date 05/15/2020

Is it wrong that same subscription ID was recreated?

Environment:

Oracle Field Service (OFS)

Issue:

One of my events subscription expired after not being used for 36 hours. When I created a new similar subscription, the subscription ID for the newly created subscription is exactly the same as the expired subscription. I was expecting a new (different) subscription ID.

Resolution:

The described behavior is expected and valid. When your the subscription expires and a new request is sent the same way, using the same fields/events as used in the expired subscription, same subscription ID may be created but the page number will be different, as seen in the example below.


Request:


POST: https://api.etadirect.com/rest/ofscCore/v1/events/subscriptions

{
    "subscriptionConfig":[
        {
            "events" : ["activityUpdated", "activityMoved"],
              "fields" : [
                              "external_activity_id",
                              "activityId",                         
                                                                       
"resourceId",
                                                                       
"status",
                                                                       
"date",
                                                                       
"external_start_time_placeholder",
                                                                       
"startTime",
                                                                       
"endTime",
                                                                       
"timeSlot"
              ]
        }
    ]
}



Response:


{
    "subscriptionId": "10bb6ccd90fake7a446dd5a64e729f5510a22944",
    "nextPage": "191005-082,0",
    "links": [
        {
            "rel": "describedby",
            "href":
"https://api.etadirect.com/rest/ofscCore/v1/metadata-catalog/events"
        },
        {
            "rel": "canonical",
            "href":
"https://api.etadirect.com/rest/ofscCore/v1/events/subscriptions/10bb6ccd90fake7a446dd5a64e729f5510a22944"
        },
        {
            "rel": "data",
            "href":
"https://api.etadirect.com/rest/ofscCore/v1/events/?subscriptionId=10bb6ccd90fake7a446dd5a64e729f5510a22944&page=191005-082,0"
        }
    ]
}


After 36 hours, same request is sent.


New response:

{
    "subscriptionId": "10bb6ccd90fake7a446dd5a64e729f5510a22944",
    "nextPage": "191009-515,0",
    "links": [
        {
            "rel": "describedby",
            "href":
"https://api.etadirect.com/rest/ofscCore/v1/metadata-catalog/events"
        },
        {
            "rel": "canonical",
            "href":
"https://api.etadirect.com/rest/ofscCore/v1/events/subscriptions/10bb6ccd90fake7a446dd5a64e729f5510a22944"
        },
        {
            "rel": "data",
            "href":
"https://api.etadirect.com/rest/ofscCore/v1/events/?subscriptionId=10bb6ccd90fake7a446dd5a64e729f5510a22944&page=191009-515,0"
        }
    ]