Hi Graeme.
Sounds very useful to me. Would be great to have this info properly
formatted in the CLI and UI.
As for the structure, I would suggest to avoid spaces in map keys as best
practice, so having either:
[{
...
"highlights": {
"lastConfirmation": {
"name": "Last Confirmation",
"description": "sdjnfvsdjvfdjsng",
"time": 12345689,
"taskId": 1345
},
...
}
}]
or maybe even better, something like this:
[{
...
"highlights": [
{
"name": "Last Confirmation",
"description": "sdjnfvsdjvfdjsng",
"time": 12345689,
"taskId": 1345
},
...
]
}]
In terms of implementation, it would be useful to extend it to other types
of Brooklyn Object such as enrichers, etc. Although, it looks like Geoff
has already made the same comment/suggestion.
Cheers
On Thu, 7 Sep 2017 at 13:30 Graeme Miller <[email protected]> wrote:
> Hello,
>
> I'd like to make a change to the REST API for policies. As this is a REST
> API change I figured it would be best to flag it on the mailing list first
> in case anyone has any objections.
>
> It would be useful when consuming this API to be able to find out more
> information about the policy. Specifically, it would be useful to find out
> things like last action performed, last policy violation, last
> confirmation, what the triggers are etc.
>
> To do so, I plan to amend the REST API to include 'highlights' for a
> policy. Highlights are a map of a name to a tuple of information including
> description, time and task.
>
> Essentially this endpoint:
> "GET /applications/{application}/entities/{entity}/policies"
> Will now include this:
> [{
> ...
> "highlights": {
> "Last Confirmation": {
> "description": "sdjnfvsdjvfdjsng",
> "time": 12345689,
> "taskId": 1345
> },
> ...
> }
> }]
>
> Please shout if you have any problems with this, otherwise I'll submit a PR
> shortly with this change.
>
> Regards,
> Graeme Miller
>
--
Thomas Bouron • Senior Software Engineer @ Cloudsoft Corporation •
https://cloudsoft.io/
Github: https://github.com/tbouron
Twitter: https://twitter.com/eltibouron