Process Model Error reporting via API

We have an  POST API on Appian that is being called to perform user related task ( add, remove, update, activate, deactivate) based on the data sent to the API. The API works fine as its a Cast and the API response of the Cast is being being sent back to the API initiator. However when there is an error the response is sent as an email alert how can the error be sent as an api response. For eg 

There is a problem with task “Deactivate User” in the process “PPL_IG Deactivate User Profile”

Problem:  An error occurred in executing an Activity Class.

Details:  The user [test.abc] you are trying to deactivate is invalid or does not exist.

Recommended Action:  Examine the activity class to correct the error and then resume.

How do i capture the "Details:  The user [test.abc] you are trying to deactivate is invalid or does not exist." from the error message received via email? 

Parents Reply
  • Your pointers did help and we are able to get the error and success response in the API  body but  when getting all groups and users the json is converted in to string format is there a way to get the output in json

    What we are currently getting is 

    getAllGroups": [
    "groupName: ACO Administrators",
    "description: ",
    "groupName: ACO All Users",
    "description: ",
    "groupName: Application Users",
    "description: Members of this group will be able to use applications exposed through the applications portal, but do not have permission to use the designer interface.",

    What we are looking for is something in the below format

    getAllGroups": [
    {
    "groupName: ACO Administrators",
    "description: ",
    }
    {
    "groupName: ACO All Users",
    "description: ",
    }
    {
    "groupName: Application Users",
    "description: Members of this group will be able to use applications exposed through the applications portal, but do not have permission to use the designer interface.",
    }

Children

 Discussion posts and replies are publicly visible