I have created Group and using the id of the group i tried to fetch the Case Template. But i am getting blank response in pilot environment. I have created 2 custom fields as well. But still the response is same. What does i am missing?
For a deeper look into our World Check One API, look into:
I have created Group and using the id of the group i tried to fetch the Case Template. But i am getting blank response in pilot environment. I have created 2 custom fields as well. But still the response is same. What does i am missing?
Hi @anurag.patil,
Just need to check for confirmation did you add/edit the groupId in environment variable.Attached the screenshot for environment variable.
Thanks,
Shilpi
Actually, i am using the WCO java project for testing.
Below are the code where is used my group id,
String dataToSign = "(request-target): get " + gatewayurl + "groups/" + groupid + "/caseTemplate\n" + "host: " + gatewayhost + "\n" + "date: " + date; String hmac = generateAuthHeader(dataToSign, apisecret); String authorisation = "Signature keyId=\"" + apikey + "\",algorithm=\"hmac-sha256\",headers=\"(request-target) host date\",signature=\"" + hmac + "\""; log.info("dataToSign is......" + dataToSign); log.info("hmac is......" + dataToSign); HttpGet httpGet = new HttpGet(httpsUrlForGroups + groupid + "/caseTemplate"); httpGet.addHeader("Authorization", authorisation);
So not sure where to do the change for environment variable?
Hi @anurag.patil,
We can set environment variable whenever we use Postman colllection. But in java code we can set it in a properties file or in code itself.
So can you please confirm me how you can assign this string variable in your java code with specific groupId.
Normally in standard java code we can set the groupId in below way using properties file
static String groupid = fromApiPropertyFile.getProperty("Groupid").trim();
or we can directly put the groupId value in code itself.
static String groupid = "0a3687d0-5d37-1694-974e-8fec0000002f"
Thanks,
Shilpi
static String groupid = "2F0a3687cf-5e6c-1d9c-979f-d60d0000023a"
I did the same!
Did you get any error.If you can get can you please share with us.Please share the whole java code as well.
Yes, I get 404 Not Found.
I have created a group on aapp.accelus.com, and copied its group id from URL.
Do i need to make any modification in gatway host url?
Hi @anurag.patil,
Below the string variable value we can set in java code.Please do the same for all variable. You can check the groupId also once.
gatewayurl = /v1/
gatewayhost = rms-world-check-one-api-pilot.thomsonreuters.com
Thanks,
Shilpi
PFA complete code.
Let me know anythingwco-case-template.zip else required.
As per code You are using our credentials and it's working fine in our java environment. Please check one more time.
Hi @anurag.patil,
Using your code I got successful result. Once you can run the main program WorldCheckApiMain you can get menu option in your screen.For case template you can press 3 and you will get the result.Attached the screenshot in my local environment.If you need will do webex.
Thanks,
Shilpi
Yes, but you haven't got case template in as json response. Can you please print the json response of Get Case template call. Response is blank.
Hi @anurag.patil,
I created log file for captured all json response.Attached the screenshot for your reference.
Thanks,
Shilpi
Please check the log file once again, the group id you used is your own, not my group id.
My group ID : 2F0a3687cf-5e6c-1d9c-979f-d60d0000023a
Hi @anurag.patil,
Can you please run the option 1 Get Top Level Groups in java and send me the screenshot.Use one of them groupId.I think your groupId is wrong.I saw your code and you are using my credentials and in this credentials there is no groupId whatever you are using.
Not sure from where you can get this groupId.
Thanks,
Shilpi
Please see atteched images.
In GetTopLevelGroups response i am not seeing my group id.
I copied the group id from url. see attached image.
As per this portal only i got to know to get the group id from URL. Is this way is wrong?
Hi @anurag.patil,
If you want to get your own groupId you can use your own credentials.You are using my Apikey and SecretKey. That's why in java code you are not getting your groupId. Please can you use your own credentials if you have and then run the java code.The groupId you are using it's not exists in this using java code credentials .That's why you are getting 404 error.Please use correct groupId which is available in option 1 Get Top Level Groups.
Thanks,
Shilpi