WEB API issue when is writing to the DB

Hi,

I'm experiencing issues when I'm trying to write to DB with another user. Basically my API looks exactly like this one: https://docs.appian.com/suite/help/18.3/Web_API_Tutorial_-_Level_II.html 

With my user is working fine, but with another user I'm getting 500: "There was an error writing to the data store"

I put this user with Administrator privileges to  the datastore, constant, data type object and API object so basically has the same privileges like me for all the objects that this API is using, but somehow is not working.

Is there something that I'm missing?

Thank you in advance.

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer
    Hi couple of workaround to find out the root cause of this issue:

    -- I would not recommend setting up the security to the user's directly, instead create a group for the basic users who can access this API
    -- Try mapping this user under this newly created group
    -- Allow this newly created group as Viewer permission to the following types of objects
    -- API, Data Store Entity, rules directory (in case some rules are being used in this API) and the process model(if its being triggered by this API)

    If the above solution didn't work, then try debugging this as mentioned below:
    -- Try mapping this user under the same group as yours, once it's done, try accessing this API using the other user account.
    -- If this is working means, your group security setting with respect to objects are different than the basic user group.
    -- If this also didn't work then i would recommend you to have a look on log, as HTTP ERROR 500 represents exceptions

    Hope this will help you trace/debug the actual error and resolve it.
  • Hi Mike,

    As suggested by Alok, Please check the security of the web API, Data Store Entity, rules directory and the process models if used in WebApi.
  • Hello mike for sure take a look at the security and set they to a group, that way if one user get it right any other user inside that group can get the same. Please take a look at the others suggestions.

    Another comment is to take look at the logs, what error do you get there? If nothing comes up there let us know we might be able to help in other way.

    Jose
  • Please check security. You should give viewer security for application, rules folder, records, data store Web API and KC (if any using)