From 16e00a7ed7a7bab217182ad14c61663b310d1097 Mon Sep 17 00:00:00 2001 From: Jeroen Pinoy Date: Sun, 7 Mar 2021 22:43:22 +0100 Subject: [PATCH] chg: [automation] expand the POST /tags/add section --- automation/README.md | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/automation/README.md b/automation/README.md index 66fb097..e3f0b36 100644 --- a/automation/README.md +++ b/automation/README.md @@ -529,10 +529,34 @@ The same search could be accomplished using the following POSTed XML object (not ## Tag management ### POST /tags/add - #### Description - - +Add a tag on the instance +#### URL Arguments +##### Mandatory +- name +##### Optional +- colour : A valid hexadecimal colour, for example #51961a, if not set, a random colour is chosen +- exportable : whether the tag is exported when synchronising with other instances, default true +- hide_tag : if set, the tag will not be selectable, default false +- org_id : if set, only users from this organisation will be able to add the tag to objects +- user_id : if set, only this user will be able to add the tag to objects +#### Example +~~~ +curl \ + -d '{"name":"tag_only_name"}' \ + -H "Authorization: YOUR API KEY" \ + -H "Accept: application/json" \ + -H "Content-type: application/json" \ + -X POST https://192.168.0.223/tags/add +~~~ +~~~ +curl \ + -d '{"name":"tag_doc","colour":"#51961a","exportable":1,"hide_tag":0,"org_id":1}' \ + -H "Authorization: YOUR API KEY" \ + -H "Accept: application/json" \ + -H "Content-type: application/json" \ + -X POST https://192.168.0.223/tags/add +~~~ ### POST /tags/attachTagToObject #### Description