I've got a sort of weird problem that I can't figure out. I have a webAPI built that kicks off a process model for creating new users. When I test it within Appian, I get a JSON response with all the info about the process model.
{ "pp" : { "id" : 268442112, "name" : "Create User Bob Newman", "priority" : 1, "initiator" : { "id" : "******" }, "startTime" : "2022-01-06T18:04:14.980Z", "timeZone" : "US/Eastern", "starred" : false, "parentName" : "", "execId" : 1, "status" : 0 }, "pm" : { "id" : 5238, "uuid" : "0005e780-67c2-8000-2559-7f0000014e7a", "name" : "PP Web API User Generation", "description" : "Create a new user with a web API", "version" : "16.0", "creator" : { "id" : "*****" }, "timeZone" : "US/Eastern", "starred" : false, "parentName" : "" }, "pv" : { "GroupsLIstDS" : { "id" : "0aeb9200-355f-4ff1-9741-7b2ef4459c2a@35138" }, "email" : "bob.newman@example.com", "firstName" : "Bob", "lastName" : "Newman", "newuser" : null, "successCode" : "207", "username" : "Bob Newman" } }
However when I access the same API externally, I get an empty JSON response that looks like this:
Discussion posts and replies are publicly visible
If I understood correctly, you are looking for capturing response at external system when API gets called.
If yes, you can do it by using onSuccess attribute of start process SS.
e.g:
onSuccess: a!httpResponse( statusCode: 200, body: a!toJson( {response: index(fv!processInfo, "pp", {}) } ) )
That's exactly what I am doing (well, returning all of fv!process info, not just the pp section), but the response data is all empty. And even then only when I access it from an external source. If I test it within appian, all the data is there (as shown in the first section) but externally the data is missing (as the second section).