Hello,
Macros are resolved in the application context, so when you receive a receive a response to REST get query, any macros in document field value are obviously not resolved.
If you're doing this in the context of the Kentico (CMS) application, you can call API method for macro resolution:
MacroResolver.Resolve("string containing macro expressions")
Then it would make more sense to get the document data directly, not via REST.
I suppose you would really like to resolve the macros before the document data are sent as a response to REST request. That's however not how our macros work...
It might be still possible to call API and controls from outside Kentico instance, but the need to use REST is then also questionable.
Another option would be to resolve macros via subsequent REST queries:
/macro/<expression>
example:
/macro/CurrentSite.SiteName
This evaluates the given macro expression and serializes the result. Only works for macros that return a serializable result.
When creating the macro expression, do NOT add the encapsulating bracket characters. Also, use URL encoding for forbidden URL characters
Again, this may not be exactly what you expect.
Should you need any additional details, please feel free to ask.
Best regards,
Zdenek