WEB API Giving 404 - Not Found Error

Hi All,

We have created a Web API which Starts a Process (Process generates a document and sends an email). I am trying to test the Web API Standalone it is working Fine, but if I am trying to hit the Web API link from Web Browser it is giving 404 error.

On the other hand if I have a Web API which generates a simple XML with User details using user() and trying to hit the same from Web Browser it is working perfectly fine.

I have given Admin rights to the web API and Process Model but no luck. If I am trying to call this WEB API Via Integration Object then also Getting 404 Error

Actual Use Case:

My actual use case is we need to expose a simple Appian process via Web API so that it can be accessible by anyone within the team to perform some tasks just by hitting the API without logging into the environment navigating to Actions tab and doing some action.

Additional Question regarding WEB API:

 - Is it possible to expose an Appian Process to anyone within the Organisation or outside the Organisation irrespective of the case that the initiator is available within Appian or not (Initiator's ID has been created or not in Appian).

 - Where we will give the authentication within the WEB API. Please find attached sample WEB API Code for the same.

with(
  a!startProcess(
    processModel: cons!TEST_AUDIT_PROCESS_MODEL,
    processParameters: a!fromJson(
      http!request.body
    ),
    onSuccess: a!httpResponse(
      statusCode: 200,
      headers: {
        a!httpHeader(name: "Content-Type", value: "application/json")
      },
      body: a!toJson(
        fv!processInfo
      )
    ),
    onError: a!httpResponse(
      statusCode: 500,
      headers: {
        a!httpHeader(name: "Content-Type", value: "application/json")
      },
      body: a!toJson(
        {
          error: "There was an error starting the process"
        }
      )
    )
  )
)

Thanks

  Discussion posts and replies are publicly visible

Parents Reply Children