REST API Testing and User Restriction


Step 5: Test REST API using access token:

API keys and Tokens can be tested with the Test tokens feature. Select the type - Basic/Bearer, paste the token and click on Test token button.

Rest API OAuth, API token, API Key authentication for Jira and Confluence Confluence-Rest-API-AzureAD B2C

Click here to get a  FREE TRIAL  of Bitbucket REST API Plugin

  • Call Confluence REST API endpoint. Include the access token in the Authorization header. Here’s an example of fetching content from Confluence.
  • Go to the Postman application select method type as GET and enter the Request URL. For eg. http://{Confluence_Base_URL}/confluence/rest/api/content/
  • In the Authorization tab select type as Bearer Token.
Token  
  • In the Header tab add the header “content-type: application/json and send the request.
Result
Request:
     curl
                             -X GET
                             -H "Authorization: Bearer <Access Token>"
                             -H "Content-type: application/json"
                             http://{confluence_base_url}/confluence/rest/api/content/
                    
  • This will show the content in Confluence and will return the status 200.
  • If the token is invalid or missing, the call will return a 401 Unauthorized response

Click here to get a  FREE TRIAL  of Bitbucket REST API Plugin

  • Call Bitbucket REST API endpoint. Include the access token in the Authorization header. Here’s an example of fetching content from Bitbucket.
  • Go to the Postman application select method type as GET and enter the Request URL. For eg. http://{Bitbucket_Base_URL}/rest/api/1.0/dashboard/pull-requests
  • In the Authorization tab select type as Bearer Token.
Rest API OAuth, API token, API Key authentication for Jira and Confluence Confluence-Rest-API-AzureAD B2C  
  • In the Header tab add the header “content-type: application/json and send the request.
Rest API OAuth, API token, API Key authentication for Jira and Confluence Confluence-Rest-API-AzureAD B2C
Request:
     curl 
     -X GET  
     -H "Authorization: Bearer <Access Token>" 
     -H "Content-type: application/json" 
     http://{bitbucket_base_url}/rest/api/1.0/dashboard/pull-requests/
  • This will Retrieve a page of pull requests where the current authenticated user status 200.
  • If the token is invalid or missing, the call will return a 401 Unauthorized response