Skip to content

Fold several tags into one that stays

POST
/v1/settings/tags/merge
curl --request POST \
--url https://beta-api.plune.ai/v1/settings/tags/merge \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "from": [ "smoke-test", "smoketest" ], "into": "smoke" }'

“Keep this one”: every case carrying any tag in from has those tags replaced by into in its title — one occurrence, however many it carried — through the same per-case write as rename (AC-10, AC-23). into need not exist yet; it is checked against the tag rule (400). from must not contain into (400). One transaction; each case gets its own audit entry; text versions do not move. One call rewrites at most 1 000 cases — counted once each, however many of the tags in from it carries: more is a 413, refused before anything is written.

Media type application/json
object
from
required

The tags that disappear. Must not contain into.

Array<string>
>= 1 items
into
required

The one that stays — “keep this one” (AC-23).

string
Example
{
"from": [
"smoke-test",
"smoketest"
],
"into": "smoke"
}

How many cases were rewritten

Media type application/json
object
affected
required

Cases whose title was rewritten.

integer
Example generated
{
"affected": 1
}

into is not a valid tag, from contains into, or the body is invalid

Media type application/json
object
error
required
string
Example
{
"error": "validation failed — from: must not contain the tag kept by 'into'"
}

No / invalid token or session

The rename or merge would rewrite more cases than one call may (limit, 1 000), and nothing was written. carriers is how many it would take: the distinct cases that carry any of the steps or tags named, each counted once. Asking again changes nothing until carriers is down to limit, and there is no batched rewrite to ask for instead — the sentence in error says what to do: edit some of those cases yourself to carry the new step or tag, then call again for the rest. (A body over the size limit of the API is also a 413; it is answered before the route and carries error alone.)

Media type application/json

The refusal of a rename or a merge of steps or tags that would rewrite more cases than one call may (#1142).

object
error
required

How many cases it would take, the ceiling, and what to do about it.

string
carriers
required

The cases the call would rewrite — each once, whichever of the steps or tags it carries.

integer
>= 1
limit
required

The most cases one call rewrites.

integer
>= 1
Example
{
"error": "1001 cases would be rewritten, and one rename or merge of tags rewrites at most 1000. Edit some of those cases yourself to carry the new tag, then run it again for the rest.",
"carriers": 1001,
"limit": 1000
}

Rate-limited: the per-route throttle, or the per-minute request limit of the plan an API token counts by (#1442; the body names the plan, #2092). Retry-After carries the seconds until the window rolls over.

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}
Retry-After
integer

Seconds until the window rolls over