Author Topic: API-resolved HotCodes/Metadata  (Read 848 times)

Offline Marziah

  • Full Member
  • ***
  • Posts: 108
    • View Profile
API-resolved HotCodes/Metadata
« on: August 13, 2021, 03:16:15 PM »
Quote
Leonhard Kreissig created topic
2 years ago on Fri, Nov 15, 2019 at 8:04 PM
Hello,



I thought about resolving HotCodes or filling Metadata fields via a custom API.

The user sets a web hook URL and a defined set of metadata fields that are transmitted.

If PM encounters a specially denoted variable, PM will take the values of the metadata fields and call the web hook URL with them, e.g.

http://mylocalserver.local/customPMAPI/resolveVariables/?timestamp=123456789&serial=123abc456jkl
Alternatively PM could define the wanted variable within the request.



My server would then reply something like this:

Js
{
    "headline": "Some headline",
    "city": "Exampletown",
    "copyrightNote": "Shot by John Doe, 2019",
    "keywordTemplate": "[city]|[event]|[head]"
}
The answer could be cached unless the key metadata is changed or the cache is deleted.



As seen in my example, the resolved fields could contain Hotcodes, Code Replacements or regular field names that would then be resolved.

This would allow to change the format of various fields based on other metadata.