Forum Discussion

sai_in's avatar
sai_in
Occasional Visitor
9 years ago

Smartbear v9.0 JSON - Obtaining Email for a userId

I am working on a tool that identifies the list of reviews that are due for the day using a custom webservice developed in-house by my organisation. It basically pulls all the relevant review details like reviewID, authors, reviewers, observers,deadline and so. I want to obtain the email address of users who have a review deadline on a particular day to remind them of that. I checked the javadoc provided in the server. Here is my sample code

 

[{"command" : "SessionService.getLoginTicket",

"args":{"login":"abc","password":"pass"}}

]

[

{"command" : "SessionService.authenticate",

"args":{"login":"abc","ticket":"0123456789abcdef0123456789abcdef"}}

]

[

{"command" : "UserInfo.getEmail",

"args":{"user":"xyz"}}

]

But i get a message saying that UserInfo.getEmail() is  a invalid command. I supply, authorName available in the review as input to UserInfo.getEmail() method

 

Here is my question:

1) Is this formatting of REST request correct.If not, what is the correct form to format the request

2)Do i need any smartbear jars for this to integrate it into my javacode eventhough this being a RESTful api?

 

Thanks in advance.

 

Note: I am a noob when it comes to REST

1 Reply

  • AndrewF's avatar
    AndrewF
    SmartBear Alumni (Retired)

    Hello,

     

    Please try:

     

    [ {
    "command" : "SessionService.getLoginTicket",
    "args" : {
    "login" : "abcd",
    "password" : "password"
    }
    }, {
    "command" : "SessionService.authenticate",
    "args" : {
    "login" : "abcd",
    "ticket" : "ryuiuy......"
    }
    }, {
    "command" : "UserService.findUserByLogin",
    "args" : {
    "login" : "bcda"
    }
    }
    ]