Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to use Script Runner for Confluence custom REST endpoint with MyWork API

Alexander Batis April 25, 2018

On my confluence instance (6.2.1) , i have script runner and WorkBox both installed (Workbox - Common Plugin, WorkBox - Confluence Provider Plugin, & Workbox - Confluence Provider Plugin)

I can access my WorkBox via the rest API (/rest/mywork/latest/notification/), but i cant access the same information when making own custom REST endpoint with Script Runner.

When I begin writing my custom REST endpoint with ScriptRunner, I try to import  com.atlassian.mywork, but IntelliJ says

The script could not be compiled:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script162.groovy: 3: unable to resolve class com.atlassian.mywork @ line 3, column 1. import com.atlassian.mywork ^ 1 error

 

The ask here is this : how can I use the WorkBox Java API within my custom REST endpoint with ScriptRunner?

 

My ultimate goal here is to be able to get all of the notifications for any user based on a request parameter and open this route only to an administrator account, effectively providing an API endpoint that lets you to get any user's notifications if you are an admin.  If suggest a better way to accomplish this, please let me know.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events