Hello,
I am looking to create an API call that will be able to pull user data from both the crucible and fisheye applications. I was able to write a script for other Atlassian products, such as Jira, that can pull user data. I was able to test this out using Scriptrunner. Here is an example of the Jira script:
Input:
import com.atlassian.jira.component.ComponentAccessor
def userManager = ComponentAccessor.getUserManager()
def activeUsers = userManager.getAllApplicationUsers()
.findAll { it.active }
.collect { "${it.displayName} (${it.username})" }
.sort()
def html = new StringBuilder()
html << "<table style='border-collapse: collapse;'>"
html << "<tr><th style='border:1px solid #ccc; padding:4px;'>Active Users</th></tr>"
activeUsers.each { user ->
html << "<tr><td style='border:1px solid #ccc; padding:4px;'>${user}</td></tr>"
}
html << "</table>"
return html.toString()
Output:
Williams, Jason - SS (u234589)
England, Robinson - MSSL (u203495)
etc...
Based on the script example given above from Jira, I would like to create something similar to this but as an API call for both Fisheye and Crucible that will output the user data.
Regards,
Roberto Chacon
Hey @Roberto Chacon ,
I haven't been playing much with those, but maybe you could try using something like
/rest-service/users-v1
There are official dev materials for both products here: Fisheye and Crucible / REST API guide
Guessing Groovy (ScriptRunner) could also catch the same endpoint, but I haven't written a script in there for a while, so I can't be sure.
You could also browse Developer community or ask a question there, as these folks work more with these kinds of things. 👀
Cheers,
Tobi
Hello Tobi,
Thank you for reaching out. At present, I do not have an operational instance for both Crucible and Fisheye. Therefore, I am seeking assistance from anyone who currently maintains an instance of these applications.
I am particularly interested in understanding the input structure and the procedures for capturing user data. To further explore this, I have also submitted an inquiry in the developer community forum.
Regards,
Roberto Chacon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.