how can i display the result of my rest service before invoke it from the gadget?

Hi every one,

i developpe a gadget which have to retreive data from a rest service.

i want show the result of my rest service before communicate it with the gadget.

atlassian-plugin.xml :

--------------------------

<rest key="helloWorldRest" path="/helloworld" version="1.0">
<description>Provides hello world services.</description>
</rest>

my rest service:

-------------------

@Path("/")
@Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public class RestHelloWorldService {
@GET
@Path("users")
public Response getUncompletedUsers() {
return Response.ok(new User("Fred","Bloggs")).build();
}
}

class User

-------------

@XmlRootElement
public class User
{
@XmlElement
private String firstName;

@XmlElement
private String lastName;

// This private constructor isn't used by any code, but JAXB requires any
// representation class to have a no-args constructor.
private User() { }

public User(String firstName, String lastName)
{
this.firstName = firstName;
this.lastName = lastName;
}
}

i used this : http://localhost:2990/jira/rest/helloworld/1.0/users

but i had this error :

Etat HTTP 404 - /jira/rest/helloworld/1.0/users

how can display my rest service result ??

Thanks

3 answers

1 accepted

now not know

know i have this error,

Etat HTTP 401 - os_authType was 'any' and an invalid cookie was sent

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,311 views 14 20
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot