Restore child links from the Undo action, including links to files that stay Missing (#603).
POST
/api/v1/notes/journal/entries/{block_id}/attachments/restore
const url = 'https://example.com/api/v1/notes/journal/entries/example/attachments/restore';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"attachments":[{"target":"example","text":"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/notes/journal/entries/example/attachments/restore \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "attachments": [ { "target": "example", "text": "example" } ] }'Route: /api/v1/notes/journal/entries/{block_id}/attachments/restore. Inputs: block_id. Do not automatically replay this operation after an uncertain result.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”block_id
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Existing Home files to append to one Journal entry (#421). Keeping the batch explicit lets the server validate every target before one checked Daily note write.
object
attachments
required
Array<object>
One composer attachment: a Home-relative file path and its link text (#421).
object
target
required
string
text
required
string
Examplegenerated
{ "attachments": [ { "target": "example", "text": "example" } ]}Responses
Section titled “Responses”Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}