Hi,

try this

tags[0].key=foo tags[0].value=bar


-Wei

On Thu, Oct 31, 2024 at 11:12 AM Waag, Markus <markus.w...@zv.fraunhofer.de>
wrote:

> Hi,
> we use projects to organize our customers and now want to tag certain
> projects. I am currently trying to do this via CloudMonkey and the API
> command createTags, but I am struggling with the syntax for the "tags"
> attribute. Can someone help me out?
>
> The API reference says I need a map of tags (key/value pairs) (
> https://cloudstack.apache.org/api/apidocs-4.18/apis/createTags.html).
> Here's an example of one of my attempts:
> create tags resourcetype=project
> resourceids=4a2d488d-7b11-486a-8ab0-7b6111ceb704
> tags=[{"key":"foo","value":"bar"}]
> but this results in:
> Error: (HTTP 431, error code 9999) Unable to execute API command
> createtags due to invalid value [{key:foo,value:bar}] for parameter tags.
>
> I have already tried several other formats already with the same results;
> can someone tell me a working syntax?
>
> Thanks in advance
> Markus
>

Reply via email to