Update APIM Subscription Activation date

Nagashree Balasundaram 701 Reputation points
2022-08-15T22:01:19.743+00:00

Is it possible to update the startdate of a subscription?
When a primary key is regenerated, does the "start date" or "creation date" for the subscription get updated?

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,145 questions
No comments
{count} votes

Accepted answer
  1. MuthuKumaranMurugaachari-MSFT 8,311 Reputation points
    2022-08-16T14:47:52.277+00:00

    @Nagashree Balasundaram Thank you for reaching out to Microsoft Q&A. The properties.startDate in the subscription is for audit purposes only and will be updated based on the subscription state. Check SubscriptionContract and it has the below description:

    Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated. The subscription lifecycle can be managed by using the state property. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.

    It cannot be updated directly via REST API (or other tools like CLI/PowerShell/SDK) and please refer SubscriptionCreateParameters or SubscriptionUpdateParameters which don't have this property for the user to specify.

    Regenerating a primary key (or secondary key) will not update the startdate and as mentioned above, this is based on subscription state. To validate, I regenerated primary key in one of my subscriptions and checked https://learn.microsoft.com/en-us/rest/api/apimanagement/current-ga/subscription/list?tabs=HTTP#code-try-0 which confirmed that start date was not updated.

    properties.createdDate - this is subscription created date and cannot be updated as well.

    I hope this answers your question and feel free to add if you have any questions. Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

0 additional answers

Sort by: Most helpful