Is there an API to get macro type via "AP"?

I have multiple macro that depend on the same low level functions to load data. It is basically a wrapper of AP. I need to get the macro key in the wrapper. But I cannot find an API to do that.

There is a field on AP _data.extension_id that gives a long string like “com.zenuml.confluence-addon__zenuml-sequence-macro__1a421363”. Can I rely on that and parse out the macro key? zenuml-sequence-macro