Determining and logging sending AET of study?

Hello,
Is there any way of determining and logging the sending AET of a study?

This post by Sebastian looks promising >>> https://groups.google.com/d/msg/orthanc-users/4iQiEZo3XAs/CGDIWEvrAQAJ

I have no idea how to create and populate custom metadata tags(Im supposing they are custom as the only metadata I get when I request it via restapi is “LastUpdate”) in lua. Also can we determine when a study is received in this way?

Rana, RTFM:
http://book.orthanc-server.com/faq/features.html#metadata-attachments

The manual only talks about RemoteAet of instances. How can I get this info for a study?

A single study can be assembled by instances coming from multiple modalities, so it makes no sense to have “RemoteAet” at the study level.

As usual, solution is scripting the REST API:

  1. curl http://localhost:8042/studies/{studyid}/instances

  2. For each returned instance:
    curl http://localhost:8042/instances/{instanceid}/metadata

RemoteAET isn’t available at series level either? I all because in a study all instances come from same modality

No.

As written before, use Lua to that end:
https://groups.google.com/d/msg/orthanc-users/4iQiEZo3XAs/NI5DJmQJAgAJ

http://book.orthanc-server.com/users/lua.html