Logging Interface Access

I hope this message finds you well.

I would like to log the event of an interface being opened.
However, my understanding is that on the interface itself, unless an action such as clicking a button occurs,

it is not possible to write a record or start a process model.

When consulting ChatGPT, I received the following idea:

  1. Create a Web API on Appian that returns an image as the response and simultaneously saves a log.
  2. Place an image on the target interface and set the endpoint of the Web API created in (1) as the image source.
  3. As a result, when the interface is opened, the Web API in (1) is called, and the log is recorded.

However, it seems that the function a!writeToDataStoreEntity does not get triggered inside the Web API.

I have two questions and would appreciate your advice:

  1. What should I review to implement the above ChatGPT idea successfully?
  2. Are there alternative methods to log when an interface is opened?

Thank you in advance for your kind advice.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    ChatGPT's approach isn't "wrong", it's just incomplete and can be misleading. Even 2025's latest LLMs are like the over-confident interns we're constantly correcting and rolling our eyes at. Yet in this case, its approach is possible.

    For this to work

    • You need a what's colloquially known as a "loopback" API call, where an Appian API is called via an Appian integration that uses an API key from the admin console. In theory it's possible to have the logged in user authenticate to the Appian API as themselves, but in practice it's a little more nuanced than that. Depending on your environment's security requirements, loopback API's may not be a good idea to do in production.
    • API trace logging must be enabled in the admin console. Enabling this logging can cause a bit of overhead in production, and the logs will be overwritten every few days (or ~10MB) if there is a large volume of API calls.
    • View perflogs/web_api_trace.csv

    According to your prompt, you don't need to know who loaded the page, just that the page was loaded. If you need to know who loaded the page, there's a bit more development / complexity there.

Reply
  • 0
    Certified Lead Developer

    ChatGPT's approach isn't "wrong", it's just incomplete and can be misleading. Even 2025's latest LLMs are like the over-confident interns we're constantly correcting and rolling our eyes at. Yet in this case, its approach is possible.

    For this to work

    • You need a what's colloquially known as a "loopback" API call, where an Appian API is called via an Appian integration that uses an API key from the admin console. In theory it's possible to have the logged in user authenticate to the Appian API as themselves, but in practice it's a little more nuanced than that. Depending on your environment's security requirements, loopback API's may not be a good idea to do in production.
    • API trace logging must be enabled in the admin console. Enabling this logging can cause a bit of overhead in production, and the logs will be overwritten every few days (or ~10MB) if there is a large volume of API calls.
    • View perflogs/web_api_trace.csv

    According to your prompt, you don't need to know who loaded the page, just that the page was loaded. If you need to know who loaded the page, there's a bit more development / complexity there.

Children
No Data