Preview rename
POST
/api/v1/tags/rename/preview
const url = 'https://example.com/api/v1/tags/rename/preview';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"confirmed":true,"new_tag":"example","old_tag":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/tags/rename/preview \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "confirmed": true, "new_tag": "example", "old_tag": "example" }'Shows a preview of the rename. It requires a signed-in User with the data scope. It can return 400 if the request is invalid, 401 if the session is missing or expired and 403 if access is denied. Route: /api/v1/tags/rename/preview. Inputs: . Do not automatically replay this operation after an uncertain result.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Legacy rename and preview arguments retain their names; optional consent follows the durable merge rule for every adapter (#1110).
object
confirmed
boolean
new_tag
required
string
old_tag
required
string
Examplegenerated
{ "confirmed": true, "new_tag": "example", "old_tag": "example"}Responses
Section titled “Responses”Media typeapplication/json
object
affected_count
required
integer format: int64
items
required
Array<object>
One tagged object in a Home.
object
id
required
string
kind
required
string
path
required
string
title
string | null
new_tag
required
string
old_tag
required
string
supports_rewrite
required
True when an indexed Markdown or Sidecar source can be rewritten.
boolean
truncated
required
boolean
Examplegenerated
{ "affected_count": 1, "items": [ { "id": "example", "kind": "example", "path": "example", "title": "example" } ], "new_tag": "example", "old_tag": "example", "supports_rewrite": true, "truncated": true}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}