iotcreators.com web
    • Login
    • Search
    • forum.iotcreators.com
    • docs.iotcreators.com
    • Tags
    • Popular
    • Recent
    • Register

    How to properly handle subscriptions and their attached serialnumbers

    iotcreators.com portal & API
    subcription imei
    2
    5
    143
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Cees Meijer
      Cees Meijer last edited by

      Originally I just added devices throught the dashboard, which were then automatically added to a subscription (what I was not even aware of). Later, after ading a second endpoint, I found out that this second endpoint would only receive data after manually adding a subscription, which I did by using he Postman script:

      {{base_url}}/m2m/subscriptions?type=resources
      

      First I did this for a few single IMEI numbers, and then I also used it to register several numbers at once.
      Later I noticed that everytime I do this, a new subscription, with it’s own ID gets created. So now when I ‘GET’ all subscriptions I get a long list with a all different subscription ID’s, and even some duplicate IMEI numbers with different ID’s.
      Now I just found in the documentation that I can also add IMEI numbers to existing subscriptions, so that is probably a better thing to do for the next set of IMEI numbers.
      But how do I even know which subscription belongs to what ? There obiously is one subscription that is used for the dashboard, but how do I know which one this is ? And how is it possible that all other subscriptions automatically go to the second endpoint ?

      What is the easiest way to handle all this? The documentation just gives the CURL examples, and the existing Postman scripts make it a little easier, but I don’t think this very scalable once you have hundreds of devices.

      1 Reply Last reply Reply Quote 0
      • Ederuiter
        Ederuiter last edited by

        Hi Cees,

        The portal uses a different user to manage the subscriptions for all the devices in the project; so you will not see those subscriptions when using the API.
        How you manage the subscriptions for your user is completely up to you, you can choose to add a new subscription for each device or you can reuse a subscription and add devices to it.

        Multi endpoint capabilities are on the backlog/wishlist for the portal but we currently don’t have a date/sprint for it. If your use case requires this, please contact the iotcreators team to discuss this with them.

        Cees Meijer 1 Reply Last reply Reply Quote 0
        • Cees Meijer
          Cees Meijer @Ederuiter last edited by

          @Ederuiter But if I GET all Subscriptions, I do always get at least one subscriptionId section, with a list of IMEI numbers that match the numbers on the dashboard. And when I add something through the dashboard, it will also show up in this list. So what am I seeing then ?

          1 Reply Last reply Reply Quote 0
          • Ederuiter
            Ederuiter last edited by

            Hi @Cees-Meijer ,

            Yes you are right, I was thinking of the mysubscriptions endpoint:

            {{base_url}}/m2m/mysubscriptions
            

            This endpoint should only list the subscriptions associated with your user.

            Cees Meijer 1 Reply Last reply Reply Quote 0
            • Cees Meijer
              Cees Meijer @Ederuiter last edited by

              @Ederuiter Thanks. I did not know about ‘mysubscriptions’. But it seems indeed the easiest way to list only those.

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post