For a deeper look into our World Check One API, look into:

Overview |  Quickstart |  Documentation |  Downloads

question

Upvotes
Accepted
3 0 1 4

Why does i get the blank response while getting case template by group id which i created?

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?

world-checkworld-check-onescreeningtemplate
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

11 Answers

Upvotes
Accepted
456 2 2 2

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


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
3 0 1 4

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?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
456 2 2 2

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

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
3 0 1 4

static String groupid = "2F0a3687cf-5e6c-1d9c-979f-d60d0000023a"

I did the same!

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

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.

Show more comments
Upvotes
456 2 2 2

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


javacode.png (133.7 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
3 0 1 4

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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
456 2 2 2

Hi @anurag.patil,

I created log file for captured all json response.Attached the screenshot for your reference.

Thanks,

Shilpi


jsonresponse.png (88.1 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
3 0 1 4

@shilpi.saha

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

Please see the attached screenshot.2.png1.png


2.png (195.7 KiB)
1.png (178.3 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
456 2 2 2

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

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
3 0 1 4

3.png4.png@ shilpi.saha

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?


3.png (21.0 KiB)
4.png (196.8 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
456 2 2 2

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

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea