The files attached to a note
GET
/api/v1/saga/notes/{id}/attachments
const url = 'https://api.yggy.tech/api/v1/saga/notes/example/attachments';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.yggy.tech/api/v1/saga/notes/example/attachments \ --header 'Authorization: Bearer <token>'The attachments of one of the caller’s notes, oldest first, each with its own reading status. An attachment is a document of its own and is never listed as a note.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string
Responses
Section titled “ Responses ”Attachments
Media type application/json
object
noteId
required
string
attachments
required
Array<object>
object
id
required
string
title
required
string
status
required
Read on its own, apart from the note.
string
contentType
required
string | null
sourceKind
required
Where the file came from: UPLOAD for a device file, LINK for a link, else the provider.
string
link
required
Set for a link attachment.
object
url
required
string
platform
required
string
fetch
required
Whether yggy has read the link yet.
string
failure
required
string | null
title
required
string | null
author
required
string | null
site
required
string | null
hasPreview
required
A preview image can be loaded from the link preview route.
boolean
forLinkId
required
The link attachment this file was uploaded for, e.g. a video for its transcript.
string | null
Example
{ "attachments": [ { "status": "PENDING", "link": { "platform": "youtube", "fetch": "pending", "failure": "unreachable" } } ]}Not a yggy notes workspace
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}