AlmondTill/G3N API

On this page

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).

What happens

Files that require virus scanning only serve after a clean verdict — a flagged file refuses loudly.

Who may call it

Capability area: Work and notes — Tasks, notes, messages, dashboards and the everyday tools every staff member keeps.

Arguments

NameTypeRequiredNotes
inputMintNoteAttachmentDownloadInput MintNoteAttachmentDownloadInput!yesNo further notes.

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-cf06f4680000",
    "attachmentId": "01900000-0000-7000-8000-7bdf12b50000"
  }
}

Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.

Example response

{
  "data": {
    "mintNoteAttachmentDownload": {
      "attachmentId": "01900000-0000-7000-8000-7bdf12b50000",
      "filename": "<filename>",
      "declaredContentType": "<declared content type>",
      "bytes": 1,
      "downloadUrl": "https://example.com/hook",
      "expiresAt": "2027-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