Give me more info about Rest API v2 and its uses
Asked by Sachin Somannavar:

and difference between rest api vs rest api v2


Answers:
author: Andrii Maliuta
body: Hello [@Sachin Somannavar](/t5/user/viewprofilepage/user-id/5428744) ,

IF you refer to the very documentation, you can see '... with definitions and performance intended to be an improvement over v1': <https://developer.atlassian.com/cloud/confluence/rest/v2/intro/#about>

The REST v2 seems to have some performance and response control improvements over V1 API. It has more distinctive content types separation for endpoints and more control over the pagination and size of the response.


author: Salzi
body: Hello [@Sachin Somannavar](/t5/user/viewprofilepage/user-id/5428744)   
Look here:  
<https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#about>

It actually describes quite well what you need the API for.

V2 is the further development of the API, there is currently also a V3 (but it is still in the beta phase).

Do you have any more specific questions about the API?

Best Salzi

comments: author: Sachin Somannavar
body: is Rest API v2 , supports Oauth(3L0) , I have used the access token , that works very well for the rest api v1 , but it not working with Rest API 2 , in rest api2 we need to pass the username and passoword , to get the json results

More important thing is there some Rest API v1 that are showing deprecated , but still they are working , is there any chance they become completely non function , in that case if we did not get the correct rest api v2 , then our solution will suffer


author: Sachin Somannavar
body: [Salzi](https://community.atlassian.com/t5/user/viewprofilepage/user-id/4136120) please provide info on the above


author: Salzi
body: Hey [@Sachin Somannavar](/t5/user/viewprofilepage/user-id/5428744)  

I can't imagine that Oauth 2.0 works in API v1, but not in V2. I am not an authentication specialist. But do you know this site: <https://developer.atlassian.com/cloud/confluence/oauth-2-3lo-apps/>

yes, the rest of the API endpoints that are now shown as deprecated will be switched off at some point. You shouldn't use these anymore. Before Atlassian switches this off completely, there is usually another message about it.  
For new developments please use the new endpoints from API v2


author: Sachin Somannavar
body: I have followed the exactly same website for getting the access and refresh token, as per the url mention there if we are using Oauth tokens we need to use this as domain name

Requests that use OAuth 2.0 (3LO) are made via `api.atlassian.com` (not <https://your-domain.atlassian.net>). Construct your request URL using the following structure:

* Jira apps: <https://api.atlassian.com/ex/jira/{cloudid}/{api>`}`
* Confluence apps: <https://api.atlassian.com/ex/confluence/{cloudid}/{api>`}``when I use this domain it is working fine with rest api v1 all endpoints , but not with rest api v2, dont know what is the exact problem , can you please share information on this`


author: David Nickell
body: The APIs can be cobbled together to do a variety of tasks. Here are two use cases I've had in the past few years:

1. **NAVIGATION and MONITORING:** I started new with an organization where the documentation had grown to "hard to manage and navigate" levels. No one, for example, could point to the most updated technical docs for our system. By walking the spaces and pages with the API, I could tell which pages were being updated (and by who), It also made it easy for me to be alerted when a page I was interested in changed. (and yes, I know about the "watcher" feature).
2. **EXTRACT and MIGRATE:** Another organization had stored technical data in their confluence pages and wanted to migrate the data into SharePoint Lists. We were able to use the API to extract the sought after detail for eventual import to SharePoint,

Hope this helps.


Tags: cloud

confluence-cloud