Third Light Developer Exchange

Code and templating community forum for developers and software integrators

You are not logged in.

Announcement

If you wish to join the Developer Exchange, please contact your account manager - this is to avoid unnecessary spam in the forums. Many thanks for your understanding.

#1 2021-02-09 04:51:34

jatish_khanna@infosys.com
Member
Registered: 2021-01-22
Posts: 8

First JSON API - Postman - Error - BAD_INPUT

Hi,

  This is my first API call referring to topic - https://devexchange.thirdlight.com/viewtopic.php?id=3
  The tool I'm using is Postman but I am getting error:


  Example API request (can be imported to Postman raw input):

curl --location -g --request GET 'http://<MY_SITE>.thirdlight.com/api.json.tlx?json={%22inParams%22:{%22apikey%22:%22%3CMY_API_KEY%3E%22},%22action%22:%22Core.LoginWithKey%22,%22apiVersion%22:%221.0%22}'

  Error:

  {"result":{"api":"BAD_INPUT","action":"API_ERROR","statusCode":2},"correlationId":"<ID_FROM_RESPONSE>"}


Note: <MY_SITE>, <MY_API_KEY>, <ID_FROM_RESPONSE> - I have masked the values

Last edited by jatish_khanna@infosys.com (2021-02-09 04:52:41)

Offline

#2 2021-02-09 13:33:35

dominic
Third Light Staff
Registered: 2013-06-06
Posts: 119

Re: First JSON API - Postman - Error - BAD_INPUT

Hi,

Are you using a Chorus rather than IMS site?

Chorus does not accept the GET method for making API requests, instead you should make a POST request, with content type application/json, and the raw JSON as the body.

(This corresponds to the final example in the topic you referenced).

Dominic

Offline

#3 2021-02-09 13:46:06

jatish_khanna@infosys.com
Member
Registered: 2021-01-22
Posts: 8

Re: First JSON API - Postman - Error - BAD_INPUT

At present, I am using IMS site. I am not using the Chorus site.

Offline

#4 2021-02-23 11:58:29

dominic
Third Light Staff
Registered: 2013-06-06
Posts: 119

Re: First JSON API - Postman - Error - BAD_INPUT

Hi,
Could you email us the URL of the site you are testing against?
The command you posted does work against a test IMS v6 site (where GET API access is enabled), but errors as described against a Chorus site for the reasons mentioned before.
Dominic

Offline

#5 2021-02-23 12:19:53

dominic
Third Light Staff
Registered: 2013-06-06
Posts: 119

Re: First JSON API - Postman - Error - BAD_INPUT

Hi Jatish,

Thanks for sending that. The URL mentioned is that of your Chorus site, so I would refer you back to my earlier notes on how to make API requests against Chorus.

Dominic

Offline

#6 2021-02-23 13:28:07

jatish_khanna@infosys.com
Member
Registered: 2021-01-22
Posts: 8

Re: First JSON API - Postman - Error - BAD_INPUT

Hello Dominic,

  Thank you for your response, the small hint "Chorus Site" was a big help to me. I've successfully tested my requirements.

  In addition to that, is Chorus REST API for General Search and Advance Search in pipeline for global availability?

Regards

Offline

#7 2021-02-25 19:16:25

dominic
Third Light Staff
Registered: 2013-06-06
Posts: 119

Re: First JSON API - Postman - Error - BAD_INPUT

Hi Jatish,

We have planned the signature of the new REST search methods, but they are not yet implemented.

Dominic

Offline

Board footer