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 :
how can display my rest service result ??
Thanks
Login to JIRA first and try the url. Or go through the below docs for some examples.
https://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+Version+2+Tutorial
http://confluence.atlassian.com/display/DOCSPRINT/The+Simplest+Possible+JIRA+REST+Examples
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.