Skip to main content
danieleg6283
July 4, 2023
Question

Test Web API created in Appian with Integration

  • July 4, 2023
  • 6 replies
  • 0 views

Hi everyone,

I created a Web API with the get method. To test it I want to use an integration (created in another appian enviroment) but I have some issue.

I can access to the API with Api key as authentication method but I have this error:

  • title"The external system did not understand the request"(Testo)
      • message"The request was missing required details or was improperly formatted"(Testo)
          • detail"HTTP/1.1 400 Bad Request"(Testo)

          To test the connection I always return this:

          bodyParagraphField

          { "test" : "success", "call" : { "url" : "mockURLforExample", "pathSegments" : [ ], "queryParameters" : { }, "headers" : { }, "body" : "" } }

          This comes from the api and I don0t have any header or parameters.

          I use an integration with GET method without any headers or parameter but the http response is this:

          HTTP/1.1 400 Bad Request Date: Tue, 04 Jul 2023 09:35:24 GMT Content-Type: text/html; charset=iso-8859-1 Content-Length: 226 Connection: keep-alive Server: Apache

          <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>400 Bad Request</title> </head><body> <h1>Bad Request</h1> <p>Your browser sent a request that this server could not understand.<br /> </p> </body></html>

          Do you know if is possible to test the web api in this way?

          Do you think that the problem is the API? 

          Thanks,

          Daniele

          6 replies

          stewart.burchell
          July 4, 2023

          Hi Daniele

          1. does your WebAPI work locally? That is, does it successfully complete using the built in test harness in the WebAPI designer?
          2. does your WebAPI work when called from a tool such as SOAP UI or PostMan?

          You should be able to call your WebAPI from an Integration in another Appian environment. I assume you're passing the API key value you generated for the associated Service Account?

          danieleg6283
          July 4, 2023

          1. locally it works, I use the test button, so yes for the second question too.

          2. I can't test it that way right now, if you know some tool to test it will be very helpful.

          Yes, I'm passing the api key generated, I had some problem with authentication but now it works and return this error.

          It seems like that the integrations sends a request that isn't compatible with the Web API

          stewart.burchell
          July 4, 2023

          A lots of developer sue Postman as a tool for testing Web Services:

          https://www.postman.com/downloads/

          It's a useful tool to test independently of Appian.