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

Overview |  Quickstart |  Documentation |  Downloads

question

Upvotes
1 1 0 2

Create Provider source.

Hi,

I'm trying to setup a client_watchList in order to test our update implementation. As I understand you must create a providersource ( SEQ-10) in order to upload a watchlist ( SEQ-12 ... ). Or am I getting one wrong already?

I'm using postman to test the creation.

When I execute SEQ-10 I reveive a "Internal Server Error".

This is how my body looks like :

provider-source-identifier = 756654321

client_watchlist_name = PDBABBDATABASE

{
"identifier": "{ {provider-source-identifier}}",
"abbreviation": "PDBABB",
"name": "{ {client_watchlist_name}}",
"providerSourceStatus": "ACTIVE",
"type": {}
}

Result :

{
"timestamp": 1529933464494,
"status": 500,
"error": "Internal Server Error",
"exception": "java.net.SocketTimeoutException",
"message": "Read timed out",
"path": "/api-gateway-service-rest/api/v1/reference/providers/sources/756654321"
}

Can you please give a direction to look for?

Thanks,

world-checkworld-check-one
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
4.2k 7 5 6

@bjorn.somers

There is no error in the payload you are sending in your request.

However, I see that you are using an incorrect path:

"path": "/api-gateway-service-rest/api/v1/reference/providers/sources/756654321"

If you are creating a new provider source identifier in pilot environment, then the path should be:

https://rms-world-check-one-api-pilot.thomsonreuters.com/v1/reference/providers/sources/756654321

Please check the path you are sending your requests to.

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
1 1 0 2

Thanks for your response. I noticed that the path was wrong. Yet I'm giving this :

PUT /v1/reference/providers/sources/756654321 HTTP/1.1
Host: rms-world-check-one-api.thomsonreuters.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 143
Authorization: Signature keyId="#####################################"
Date: Mon, 25 Jun 2018 13:32:59 GMT
Cache-Control: no-cache
Postman-Token: ########################

{
"identifier": "756654321",
"abbreviation": "PDBABB",
"name": "PDBABBDATABASE",
"providerSourceStatus": "ACTIVE",
"type": {}
}

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
2.4k 5 5 5

@bjorn.somers:

Hi,

I believe the body you're passing is incorrect, it shouldn't contain the information provider-source-identifier = 756654321,client_watchlist_name = PDBABBDATABASE, the body must contain only the fields as shown below,

{

"identifier": "{ {provider-source-identifier}}",

"abbreviation": "PDBABB",

"name": "{ {client_watchlist_name}}",

"providerSourceStatus": "ACTIVE",

"type": {}

}

I tried with the same payload and I got a 204 No Content(attached screenshot for your reference).

Also to mention even if you include the fields provider-source-identifier = 756654321,client_watchlist_name = PDBABBDATABASE you would receive a 400 Bad Request and not a 500.

We will look into this and get back to you shortly!seq10.png

Regards,

Mehran Khan
API Technical Consultant

World-check One


seq10.png (53.2 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
4.2k 7 5 6

@bjorn.somers

Following up to know if you are still getting an error when calling the SEQ-10 API call.

If yes, kindly let us know the error code you are receiving from WC1 API when you call the API.

If you are getting a 400 bad request while sending your request, then the issue should be with the payload you are sending. Kindly note the payload being sent should be strictly JSON. You can try the below JSON and let us know if that works. I am getting a 204: No content code when I try sending this through.

{
"identifier": "756654321",
"abbreviation": "PDBABB",
"name": "PDBABBDATABASE",
"providerSourceStatus": "ACTIVE",
"type": {}
}

Also, I noticed that you are sending your request to the host "rms-world-check-one-api.thomsonreuters.com" which is the URL for the production environment. If you intend to send your requests to production environment, it is the correct URL. Otherwise, you will get a 401 unauthorized error.

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
1 1 0 2

Thank you for following up my question!

The only thing I changed is the body as you suggested.

{
"identifier":"756654321",
"abbreviation":"PDBABB",
"name":"PDBABBDATABASE",
"providerSourceStatus":"ACTIVE",
"type": {}
}

The result is now 400 Bad Request.

I changed back to the pilot environment and this gave me the same result. 400 Bad Request

Kind Regards,

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
4.2k 7 5 6

@bjorn.somers,

There may be a mismatch between the "provider source identifier" value you are providing in the URL and the JSON payload of your request.

As you can notice, "identifier" in the JSON body and "provider source identifier" has to be the same.

The format of URL is

https://rms-world-check-one-api-pilot.thomsonreuters.com/v1/reference/providers/sources/

{ {provider-source-identifier}}

and the format of JSON body to be used for the API call is

{

"identifier": "{ {provider-source-identifier}}",

"abbreviation": "PDBABB",

"name": "{ {client_watchlist_name}}",

"providerSourceStatus": "ACTIVE",

"type": {}

}

so you have to provide the same value in both the place. This not only adds an identifier to the provider source you are creating but also creates a new endpoint with the same value.

Kindly pass the below JSON as the body and make sure the endpoint you are hitting is

756654321.

{
"identifier":"756654321",
"abbreviation":"PDBABB",
"name":"PDBABBDATABASE",
"providerSourceStatus":"ACTIVE",
"type": {}
}

If this does not fix the problem, please send me the body of the request, the complete URL you are sending your request and the error code so that I can debug this.

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
1 1 0 2

I placed the full url to try:

https://rms-world-check-one-api-pilot.thomsonreuters.com/v1/reference/providers/sources/{ {provider-source-identifier}}

The 2 variables exist in my environment.

{
"identifier":"{ {provider-source-identifier}}",
"abbreviation":"PDBABB",
"name":"{ {client_watchlist_name}}",
"providerSourceStatus":"ACTIVE",
"type": {}
}

the result I get when I click on the 'code' link

PUT /v1/reference/providers/sources/756654321 HTTP/1.1
Host: rms-world-check-one-api-pilot.thomsonreuters.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 139
Authorization: Signature keyId="############################""
Date: Tue, 26 Jun 2018 07:14:33 GMT
Cache-Control: no-cache
Postman-Token: ##############################

{
"identifier":"756654321",
"abbreviation":"PDBABB",
"name":"PDBABBDATABASE",
"providerSourceStatus":"ACTIVE",
"type": {}
}

This gives me back the internal error messsage.

{
"timestamp": 1529997630796,
"status": 500,
"error": "Internal Server Error",
"exception": "java.net.SocketTimeoutException",
"message": "Read timed out",
"path": "/api-gateway-service-rest/api/v1/reference/providers/sources/756654321"
}

Ik don't know why he is using "api-gateway-service-rest/".

Thanks,

Bjorn

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
4.2k 7 5 6

cusersu6068964pictures15content-type-as-json.pngcusersu6068964pictures15pre-request-script.png@bjorn.somers

Lets start this afresh:

First of all, please select the content type of your payload as JSON(application/JSON). You can do this by clicking on the body section of the Postman. Select the radio button "raw" and select "JSON(application/JSON)". Screenshot attached.

Keep the JSON body of the API call as below:

{
"identifier": "{ {provider-source-identifier}}",
"abbreviation": "PDBABB",
"name": "{ {client_watchlist_name}}", # As you are trying to use the value of "name",i.e, "client_watchlist_name" as a variable defined in your environment#
"providerSourceStatus": "ACTIVE",
"type": {}
}


Now define the variable "provider-source-identifier" as 756654321 and "client_watchlist_name" as "PDBABBDATABASE" at the environment level.

In order to use the variable "client_watchlist_name" from the environment, you would have to paste the below code in the pre request script section of your API call. Screenshot attached.

content = content.replace("{ {client_watchlist_name}}", environment["client_watchlist_name"]);

The above step is necessary to replace the value of variable "client_watchlist_name" defined in the environment.


If you do not want to do the above step, then you can pass the value of "name" directly in the JSON body as shown below:

"name": "PDBABBDATABASE" (instead of "name": "{ {client_watchlist_name}}" )


Now check your environment to see if the below variables and their values are exactly the same in your environment.
api-key and api-secret as usual.
gateway-host: rms-world-check-one-api-pilot.thomsonreuters.com
gateway-url: /v1/
protocol:https://
provider-source-identifier:756654321
client_watchlist_name: PDBABBDATABASE (if you want to define this variable in the environment, if not exclude this and pass it directly in the JSON body itself)

The below variables will be defined automatically when you send the request, just make sure that they are selected when you are sending the request.

content
contentLength
authorisation
currentDate

Kindly let me know if this works for you.


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
4.2k 7 5 6

@bjorn.somers

Please find the screenshot of the Postman environment in the attached.cusersu6068964pictures15variables.png


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
1 1 0 2

Ok I selected the text format : "Application/json". I did everything as you suggested and

I am now getting a 404 not found status.

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.

@bjorn.somers

Can you provide me the complete Postman Console logs of the request?

You can open the Postman Console by using the shortcut keys Ctrl+Alt+C. Then resend your request while Postman Console is open to record the logs of the API call.

Would you be interested in a quick webex call to resolve your query? If yes, I can write an email to bjorn.somers@delen.be to schedule a call.

@bjorn.somers

Following up on this to find out if you are still getting a 404 error.

Let me know if you would like to get into a WebEx call to understand the correct way to call this API.

Alternatively, you can share the Postman Console logs so that I can investigate this further.

Upvotes
1 1 0 2

@Irfan.Khan

Thank you for the follow up. I contacted Nabil a few days ago and he said that our account is not authorized to create a provider source. So I'm waiting on his confirmation before I test again.

I'll be in touch.

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