Test Web API created in Appian with Integration

Certified Lead Developer

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

            Discussion posts and replies are publicly visible

          Parents
          • 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?

          Reply
          • 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?

          Children