2
API versioning discussion
Problem reported by Webio - 11/20/2023 at 5:56 AM
Being Fixed
Hello,

I think we need to talk seriously about API versioning. Does SM devs have any suggestiom how this can be handled?

For sure something has changed between latest stable .NET Framework version and beta .NET Core versions. Is there any place where we can see all changes made to API endpoints?

This small changes create issues where providers created for certain API will just stop working without any notice (example: MSP Server provider which works fine on current stable version returns error for .NET API). I will investigate it and probably fix it but it makes question do I need to update MSPControl provider everytime API is being updated and create some kind of versioning for version on which this change occured?

Thanks

6 Replies

Reply to Thread
0
Tim Uzzanti Replied
Employee Post
API's are backwards compatible.  We may add data to outputs but we do it in a way that there should be no issues.  If there is an API not working, it would be a bug.  Please provide whatever calls you are concerned about and we can take a look.  There was a post by Chris which has been overlooked and I stumbled across it when I searched for other concerns.  I've asked our team to respond to that thread and we will look at those as well.
Tim Uzzanti
CEO
SmarterTools Inc.
(877) 357-6278
www.smartertools.com
0
Webio Replied
0
Tim Uzzanti Replied
Employee Post
That was one of the two reported by Chris that were overlooked.  It will be resolved.
Tim Uzzanti
CEO
SmarterTools Inc.
(877) 357-6278
www.smartertools.com
0
Webio Replied
Another thing. Something which worked before (on latest stable .NET Framerowk but does not work on beta .NET Core):


Query to:

/api/v1/settings/sysadmin/post-user-mail
With content:

{"email":"some@email.com","userMailSettings":{"isEnabled":true,"maxSize":"0","lockPassword":false,"replyToAddress":"","signature":""}}
Returns:

{
  "message": "Object reference not set to an instance of an object.",
  "success": false
}
So maybe this is not a change but some bug in API.

ALSO it would be great to have in API documentation info which params are required and which are not.

SO. Before sending this ticket I've opened dev tools and noticed that webmail is using:


instead of:


Both of them looks the same but one is being posted with domain token and second one with admin token. One with domain token works and one with sysadmin token returns error mentioned above.
1
Webio Replied
It would be also good to have info when some method was introduced. Now I'm not sure if method SetUsersMailSettings was already present under Domain API section when I was writing latest SM provider for MSP or it was added recently. If this kind of changes will be made to API all external providers will have to be released as new ones based on build when they where working. So it will not be like it was in the past like SM VERSION.x but SM BUILD which as you can see in recent changes will enforce to release new providers much much often
0
Webio Replied
Another one (build 8720 - call using domain token):

URL/api/v1/settings/domain/dkim-settings
Content:

{"fields":["return-path","received","comments","keywords","bcc","resent-bcc","dkim-signature"],"keySize":"KiloSize"}
Returns:

{
  "message": "Object reference not set to an instance of an object.",
  "success": false
}
Call to (with sysadmin token):

/api/v1/settings/sysadmin/dkim-settings/DOMAINNAME
returns the same error

Reply to Thread