Question about modifying/creating subscriptions via API and it's limitations

Not Yet Reviewed

I have a question regarding the limitations of the xMatters API. Without getting into overly granular specifics (I can provide them though if needed), I would describe my specific use case as follows:

I am building a workflow which essentially pulls in one workflow, or a specific piece of it, from one environment and POST's it to another. This has all worked as intended up until subscriptions. 

Since subscriptions point to the UUID of a given subscription form, and I intend to essentially create a new workflow which is a copy of the first, from a User's perspective, that means that the UUID's will not match. 

The easiest solution I could think of would be to change the UUID of the subscription form the subscription is pointing to but the UPDATE endpoint the API provides does not include this as a valid attribute in it's payload.

That leaves the only other option I can see which would be to recreate the subscription. The problem I have here, is that in several cases, we have subscriptions which are "Shared" with more than 1,000 other people. Each of these people would need to be included in the payload POST request under it's RECIPIENTS property field. I am worried that this is too much to include in a POST and that it will fail either due to the constraints imposed by your controllers/database or simply just timeout. 

What would be my best solution here? I can provide more details as needed if the above explanation isn't entirely clear

0

Comments

2 comments
Date Votes

Please sign in to leave a comment.

  • Hey Mike,

    Thanks for the post.

    Subscriptions are always associated to a subscription form, the form is the contract for creating each subscription. As you've discovered, when updating a subscription you can't change the subscription form it belongs to because it could break the contract. We expect that you create a new subscription for the new subscription form.

    So that leaves option two. As far as I know, there shouldn't be any limitation on the number of recipients you can post. However, execution times will vary depending on the size of the payload. I'd recommend that you test some sample requests for the subscriptions that you want to recreate, I find curl, Postman, or Insomnia are useful tools for the job.

    Let us know if you run into issues. If you do post up the responses of your troubled requests and we'll take a look.

     

    Thanks,

    Craig

    0
  • Sounds good. I will try that then and report back :)

    0

Didn't find what you were looking for?

New post