mintNoteAttachmentDownload
mutation · in the family Work and notes
What it does
Get a short-lived download link for a note attachment.
Mint a short-TTL presigned download for one note attachment: authz through the target-construct read; scanned-prefix blobs gate on the GuardDutyMalwareScanStatus tag (NO_THREATS_FOUND serves · tag-absent = scan-in-progress refuses politely · THREATS_FOUND refuses + the event · unsupported/ACCESS_DENIED/failed refuse fail-closed naming the status); unscanned-prefix blobs skip the gate (risky types never landed there — the routing). Template class (hand-derived v29).
Before you call
A bearer session from an API key (see Authentication and key hygiene) or a signed-in user.
Capability area: Work and notes — Tasks, notes, messages, dashboards and the everyday tools every staff member keeps.
Roles that may call it:
- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
- Cashier
- An API key whose scope allows
api:mintNoteAttachmentDownload
What happens
Files that require virus scanning only serve after a clean verdict — a flagged file refuses loudly.
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
input | MintNoteAttachmentDownloadInput MintNoteAttachmentDownloadInput! | yes | Download-mint input. |
Returns
NoteAttachmentDownloadTicket NoteAttachmentDownloadTicket! — The download ticket: a short-TTL presigned GET (the verdict gate already passed for scanned-prefix blobs).
Example request
mutation ExampleMintNoteAttachmentDownload($input: MintNoteAttachmentDownloadInput!) {
mintNoteAttachmentDownload(input: $input) {
attachmentId
filename
declaredContentType
bytes
downloadUrl
expiresAt
}
}Variables:
{
"input": {
"noteId": "01900000-0000-7000-8000-1440c15d0000",
"attachmentId": "01900000-0000-7000-8000-9048e2880000"
}
}Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.
Example response
{
"data": {
"mintNoteAttachmentDownload": {
"attachmentId": "01900000-0000-7000-8000-9048e2880000",
"filename": "<filename>",
"declaredContentType": "<declared content type>",
"bytes": 1,
"downloadUrl": "https://example.com/hook",
"expiresAt": "2028-01-31T00:00:00.000Z"
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": {
"name": "genesis",
"number": 0
},
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}Errors this call can answer
VALIDATION/INVALID— Something in the request is not valid. Retry: no. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. Retry: no. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. Retry: no. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. Retry: yes. (RATE_LIMIT)NOT_FOUND/*— That record could not be found. Retry: no. (NOT_FOUND)CONFLICT/*— The record’s state, or a change made in the meantime, does not allow this; the codes are on the CONFLICT page. (CONFLICT)VALIDATION/VERSION_REQUIRED— The request did not say which app version it came from. Retry: no. (VALIDATION)