<div dir="ltr"><div><div><div>Hi Anastasia,<br><br>Could you give some clues as to what API changes (if any) will come with this change?<br><br></div>Our current usage looks something like:<br><br></div>Client SetAnnotations Tag=$entityType-$entityId Pairs=[($key1, $value1), ($key2, $value2)...]<br><br></div>Thanks,<br><br>Adam<br><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 12 January 2015 at 00:41, Anastasia Macmood <span dir="ltr"><<a href="mailto:anastasia.macmood@canonical.com" target="_blank">anastasia.macmood@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">A new annotations client is available from 1.22 effectively deprecating annotations in old client.<br>
<br>
New annotations client provides functionality to annotate charms as well as environment, machine, service and unit previously done through our old client.<br>
New annotations client also supports bulk calls.<br>
<br>
For the SET annotations call that looks similar to this:<br>
<br>
......{<br>
            "Type": "Annotations",<br>
            "Request": "Set",<br>
            "Params": {<br>
                 "Annotations": {{<br>
                    "Entity": a, "Annotations": pairs1<br>
                  },{<br>
                    "Entity": b, "Annotations": pairs2<br>
                  }}<br>
}}......<br>
<br>
corresponding GET annotations call may look like:<br>
<br>
......{<br>
            "Type": "Annotations",<br>
            "Request": "Get",<br>
            "Params": {<br>
                 "Entities": {{<br>
                    "Tag": a},{<br>
                    "Tag": b}}<br>
}}......<br>
<br>
Returning<br>
<br>
{<br>
    "Results": {<br>
          {"Entity": a, "Annotations": pairs1, "Error": nil},<br>
          {"Entity": b, "Annotations": pairs2, "Error": nil},<br>
<br>
    }<br>
<br>
}<br>
<br>
Note that where SET call returns an error, Error in GET call return is params.ErrorResult.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
<br>
<br>
--<br>
Juju-dev mailing list<br>
<a href="mailto:Juju-dev@lists.ubuntu.com">Juju-dev@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/juju-dev" target="_blank">https://lists.ubuntu.com/mailman/listinfo/juju-dev</a><br>
</font></span></blockquote></div><br></div>