Thank you for the clarification regarding your last response.
Unfortunately, it sounds like this would be a feature request. We don't have a
getTransactionName API call. We can get your transaction names from the REST API, and we can set the transaction name at least 3 different ways, but we don't have a way to programmatically get the name of the current transaction.
I understand you would prefer to have something more or less similar to this:
string transactionName = newrelic.getTransactionName but
getTransactionName doesn't exist at this time. Therefore, we may have to turn this in as a feature request.