Hi @HughWu,
so to give some context the app we’re currently porting is mailto.wiki. It’s an email integration for Confluence.
So we’ve partly upgraded to the V2 api. The configuration service now uses the V2 api where possible but other services still use V1. Overall the transformation was easier than I thought. I don’t like that the content api is now replaced by 3 apis (pages, blog posts, comments) but because they share a lot of properties we can sort of easily built abstractions around that without needing to change to much of our internal logic.
What is annoying when switching is the fact that we now have to store space key and space id along side each other because there are still a lot of V1 apis we have to use. The fact that all numeric space keys are allowed, makes this even more error prone as a simple is it all digit check can’t be used to distinguish between space keys and space ids.
Here are the V1 apis that we couldn’t find a replacement for:
/rest/api/search/
We use this endpoint to search for spaces. To propagate select2 select boxes.
/rest/api/content/search/
We use this to search for pages by title.
But the bigger issue for us is the following. Our app maps pages, blog posts and comments to emails. We use custom content properties to store metadata about emails (subject, messageid, from, to, etc.). We then use the search endpoint to match replies to existing pages, blog posts and comments. Are there any plans for V2 search endpoint that will be able to search pages, blog posts and comments simultaneously and to search for custom content properties? We’re currently thinking about using an external index for this. This would be a viable solution for us. However we need backwards compatibility for at least a year, to find old content that users created in the past so if we switch to an external search index we still need a grace period.
/rest/api/group/ and /rest/api/user/
We us this to search for groups and users by name and to get the email addresses of users.
Besides of our backend services still using V1 content apis our end to end tests also still use V1 apis.
The configuration service has now been using the V1 content api for a couple of weeks. Given this I think we can realistically switch to the new V2 apis where they are available within the next half year. But the search endpoint is the one that has me worried the most.
The deprecation headers also help us as we now have build in logging for deprecation notices which makes it a lot easier to monitor deprecations.
We will also have to make a lot more api calls. As the old api allowed us to do a lot of things within a single call (like getting a page and all it comments). Which should decrease performance. But this is in our case not much of an issue.
This is our experience and current state of migration.
All the Best
Sebastian