Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to make my REST resource appear as public in the REST API browser?

Kristin Hreinsdottir [Tempo] January 28, 2014

I am documenting a JIRA plugin REST API resources and am using the REST API browser (RAB) to verify my documentation.

In the RAB there is a checkbox to "Show only public APIs" and according to docs in the link below I should mark my APIs with the @PublicApi annotation to make my resources appear public.

https://developer.atlassian.com/display/DOCS/Documenting+your+APIs+with+the+Atlassian+REST+API+Browser

Now that does not work at all, my resources appear to be private no matter what. Does anyone know the trick to fix that?

Kind regards

Kristín

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Vitor Pelizza October 14, 2015

Hi @Kristin Hreinsdottir [Tempo] , Any news on this issue? I'm facing the same situation here, and modifying RAB's .js files is not an option :) I have found this issue that has something to do with this question: https://ecosystem.atlassian.net/browse/RAB-4 Thanks!

0 votes
Reinhard Lopinski September 23, 2014

Public Rest resources are hard coded in the plugin.

If you want to change this in your development environment, you need to patch the plugin "Atlassian Developer Toolbox". 

Steps to be done (for version 3.0.7):

extract JavaScript files using:

unzip rest-api-browser-3.0.7.jar  assets/rab/rest-api-browser.min.js assets/rab/services/rest_resources_service.js

find in  assets/rab/rest-api-browser.min.js the following line:

  var JIRA_PUBLIC_APIS=["^json-rpc/","^api/2","^auth/","^activities/"]

change to:

  var JIRA_PUBLIC_APIS=["^json-rpc/","^api/2","^auth/","^activities/","XXXX"]

where "xxx" is the path of your plugins rest resource
find in in: assets/rab/services/rest_resources_service.js

var JIRA_PUBLIC_APIS = [
'^json-rpc/',
'^api/2',
'^auth/',
'^activities/'
];

and change to:

var JIRA_PUBLIC_APIS = [
'^json-rpc/',
'^api/2',
'^auth/',
'^activities/',

'^xxxx/'
];

# Update the jar
jar -uf rest-api-browser-3.0.7.jar assets/rab/rest-api-browser.min.js assets/rab/services/rest_resources_service.js

 

Install this modifed jar as add-on (using file).

 

 

 

 

 

 

 

 

Kristin Hreinsdottir [Tempo] September 24, 2014

Well isn't that just great...I don't only want this in my dev environment. As recommended by Atlassian the RAB is a tool used as a documentation for REST APIs. I have customers that need to know which APIs are public.

TAGS
AUG Leaders

Atlassian Community Events